http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54483

--- Comment #3 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2012-09-05 11:12:13 UTC ---
(In reply to comment #1)
> This is invalid as per [class.static.data]/3 :

On C++11 level it should be valid, because odr-usage does not happen here
according to [basic.def.odr] p3:

"A variable x whose name appears as a potentially-evaluated expression ex is
odr-used unless x is an object that satisfies the requirements for appearing in
a constant expression (5.19) and ex is an element of the set of potential
results of an expression e, where either the lvalue-to-rvalue conversion (4.1)
is applied
to e, or e is a discarded-value expression (Clause 5)."

Reply via email to