* Goswin von Brederlow:

>> This was once desirable because you couldn't declare real constants in
>> classes.  Today,
>>
>>   template <typename T>
>>   struct Foo
>>   {
>>     static const unsigned N = T::N;
>>     char bar[N];
>>   };
>>
>> works and the enum trick lost its importance.
>
> Doesn't that still make N a real variable in memory and does not get
> optimized away like enums?

Only if you provide a definition, and not just a declaration, it
seems.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to