[Bug c++/10634] in-class initialization of static data members no longer allowed
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Sat May 8 05:32:00 GMT 2004
------- Additional Comments From bangerth at dealii dot org 2004-05-08 05:32 -------
It should be, but wasn't always. You can find numerous PRs on it not being
inlined in ?: expressions. This was fixed for 3.4 and maybe even some
3.3.x release. On the other hand, the compiler has to emit a definition
in each translation unit since it is of course allowed to take the address
of such a member variable.
However, even if it were always inlined: putting the definition into a header
file would be an ODR violation.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10634
More information about the Gcc-bugs
mailing list