Gabriel Dos Reis wrote:
> 
> I'm not one the authors of the book mentioned but I will say what I
> know (from experience both as a user and casual implementor).  The
> issue of enum/static const is an endless debate. However, one thing is
> sure:  Even with the amended paragraph in the Standard (redefinition of
> "used"), passing an lvalue to a function that expects a const
> reference more or less takes the referenced entity's address, and as
> such makes the "static const object" used, therefore a definition is
> required.  One looses the "purely compile-time constant" aspect.

This matches my experience (as a user only :)

> Yes, a smarter compiler may do better, but such smarter compilers are
> quite rare :-)
> Yes, the thingy ends up in the link map (as a local symbol).

Just to make sure: Do you "vote" in favor of enums? I have seen problems
with 'static const ...', but I have never seen problems with enums
(although they theoretically exist). Both have their drawbacks, it seems
we have to choose the petty evil...

> -- Gaby

Regards, Daniel

-- 
Daniel Frey

aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: [EMAIL PROTECTED], web: http://www.aixigo.de
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to