This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/9048] Conditional expression error with static const members


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]