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: new requirement of "constexpr" for static const float data members is too restrictive


On Tue, Nov 30, 2010 at 2:17 AM, Miles Bader <miles@gnu.org> wrote:
> On Tue, Nov 30, 2010 at 5:13 PM, Gabriel Dos Reis
> <gdr@integrable-solutions.net> wrote:
>> If you are doing that, why don't you write a simpler code by
>> just defining (e.g. initializing) the data member outside the class?
>
> 'cause I want the compiler to be able to use (inline) the underlying values.

then write even simple code: dispense with the class stuff and use
bona fide `const float' at namespace scope.  It works with all compilers
and all versions of GCC/g++.


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