On Tue, Nov 30, 2010 at 2:33 AM, Miles Bader <mi...@gnu.org> wrote:
> Gabriel Dos Reis <g...@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...

hmm, that sounds like an awful lot of effort put into something that looked
to me as simple code to write using standard functionalities.  Though
I have to confess I do not understand why the class must be right and the
namespace must be  wrong.  (Maybe I have not seen the real code, I
don't know.)

Good luck.

Reply via email to