This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Fw: new requirement of "constexpr" for static const float data members is too restrictive
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Roman Kononov <roman at xtremedata dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 29 Nov 2010 13:25:52 -0800
- Subject: Re: Fw: new requirement of "constexpr" for static const float data members is too restrictive
- References: <20101129152417.5798b44d@abend.internal.xtremedata.com>
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