Re: Polyspace Problem
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Wed, 28 Feb 2007 14:07:02 -0800
"matevzb" <matevzb@xxxxxxxxx> writes:
[...]
<OT>Actually, OP's compiler must be a C++ compiler, since typedef-
within-a-struct seems to be legal in C++. An example from working
draft ISO:
struct X {
typedef int T;
static T count;
void f(T);
};
void X::f(T t = count ) { }
That makes sense (for C++, not so much for C). In C++, a struct is
almost exactly the same thing as a class, which is a fundamental unit
of encapsulation as well as a data type.
</OT>
If someone wants to implement something STL-like in C, that's just one
of the many things that will have to be dealt with. (If I needed the
STL, I'd probably just use C++.)
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.
- References:
- Polyspace Problem
- From: hyderabadblues
- Re: Polyspace Problem
- From: Keith Thompson
- Re: Polyspace Problem
- From: matevzb
- Polyspace Problem
- Prev by Date: Re: Polyspace Problem
- Previous by thread: Re: Polyspace Problem
- Next by thread: Re: INT_MIN and compiler diagnostic
- Index(es):
Relevant Pages
|