|
Boost : |
From: John Max Skaller (skaller_at_[hidden])
Date: 2001-06-27 11:01:26
scleary_at_[hidden] wrote:
> I recall a little debate a while back over an alternate implementation:
> #ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
> # define BOOST_STATIC_CONSTANT(type, name, value) enum { name = value }
I think this macro is useless and should be removed altogether.
1. If you're declaring an integral constant, use an enum
2. Otherwise make the definition out of class.
The only benefit of inclass static const initialisation
is syntactic, and that benefit is destroyed by using
a macro. [And I'd argue the enum is terser anyhow]
Have I missed something?
-- John (Max) Skaller, mailto:skaller_at_[hidden] 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 New generation programming language Felix http://felix.sourceforge.net Literate Programming tool Interscript http://Interscript.sourceforge.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk