C++ PATCH for c++/50298 (static constexpr reference in-class initialization)

Jason Merrill jason@redhat.com
Wed Sep 7 17:07:00 GMT 2011


cp_parser_constant_expression wants an rvalue constant, so we shouldn't 
use it for parsing initializers, since the thing being initialized might 
be a reference.  In C++98 it's OK because only integral statics can be 
initialized in the class, but in C++11 any type can be with the 
constexpr tag.

Tested x86_64-pc-linux-gnu, applying to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 50298.patch
Type: text/x-patch
Size: 1512 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110907/e9481d82/attachment.bin>


More information about the Gcc-patches mailing list