This is the mail archive of the gcc@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]

Re: Fw: new requirement of "constexpr" for static const float data members is too restrictive


On Mon, Nov 29, 2010 at 1:24 PM, Roman Kononov <roman@xtremedata.com> wrote:
> $ cat test.cc
> struct X { static float const v=1; };
>
> $ g++ -c -std=gnu++0x test.cc
> test.cc:1:33: error: 'constexpr' needed for in-class initialization of
> static data member 'v' of non-integral type
>
> This will break a great deal of existing c++

well this code is not valid C++03 code to begin with.

-- Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]