Boost logo

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:
> # 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
Literate Programming tool Interscript

Boost list run by bdawes at, gregod at, cpdaniel at, john at