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-18 23:35 -------
I just ran into this bug.

By my reading of the C++ standard, I do not believe that an out-of-definition
should be necessary for a "static const int" class variable.  See Section
9.4.2 "Static data members", specifically paragraph 4.

It is true that the bug can be worked around by turning the conditional
expression "a = (c ? X : Y)" into "if (c) { a = X; } else { a = Y; }".

-- 


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]