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


Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
>>> 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++.

Right, but I want it in the class namespace.

I.e., I can choose between various types of ugliness -- wrong namespace,
funny syntax, or (currently) gcc-dependence.  I used to choose gcc-
dependence, but then switched to funny syntax.  In the future when c++0x
support is more widespread, of course, I won't have to make such an
annoying choice any more...

-Miles

-- 
XML is like violence.  If it doesn't solve your problem, you're not
using enough of it.


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