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 11:40 PM, Gabriel Dos Reis
<gdr@integrable-solutions.net> wrote:
> I agree. ?I think we have a case here where people will
> say anything to justify a (mis)feature that leads to brittle
> codes

Why does it "lead to brittle codes"?

> If people are worried about multiple translation units, they
> will still have to provide a definition outside the class -- most
> likely

Why?

Certainly as in my experience, that's not true.

In C++ "static const" is a way of defining constants, and the fact
that integral class "constants" were allowed whereas floating-point
class "constants" were not was just a wart.

It's nice that c++0x has fixed this wart, but there was nothing wrong
with gcc's different method of doing so, beyond its lack of
portability.

-Miles

-- 
Cat is power. ?Cat is peace.


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