[Bug c++/9048] Conditional expression error with static const members
hull at paracel dot com
gcc-bugzilla@gcc.gnu.org
Thu Mar 18 23:35:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list