[Bug c++/9048] Conditional expression error with static const members
hull at paracel dot com
gcc-bugzilla@gcc.gnu.org
Fri Mar 19 19:51:00 GMT 2004
------- Additional Comments From hull at paracel dot com 2004-03-19 19:51 -------
I now understand why it isn't a bug.
Even though class foo says
class foo {
static const int bar1 = 1, bar2 = 2;
...
};
it is also necessary to write
const int foo::bar1, foo::bar2;
This is what Nathan Sidwell's comment was saying, but I didn't
understand it. This means that "static const int" is not quite
the complete replacement for "#define" that I misunderstood it
to be because it's not a header-only solution.
Thank you for your patience.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9048
More information about the Gcc-bugs
mailing list