is this static legal?
I understood this to be illegal, but it works on my
gcc 4.2.1
1 2 3 4 5 6 7 8
|
struct seconds {
static const int scale = 0;
...
};
struct milliseconds : public seconds {
static const int scale = 3;
...
}
|
what say you?
it is, static const integral types can be initialized like so.
I see.
thanks bazzy
gcc has some extra features
If you want to avoid them use the flag -pedantic-errors -std 90 (or 99)
it works ok with:
that's good enough for me.
thanks people.
Topic archived. No new replies allowed.