Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-11 20:40:26

----- Original Message -----
From: "Daryle Walker" <darylew_at_[hidden]>

> The BOOST_STATIC_CONSTANT macro was added to <boost/config.hpp> two days
> ago. I think it has a slight inefficiency. Here's a copy:
> BOOST_STATIC_CONSTANT( ::std::size_t, bit_count = Bits );
> My question is: why do we make the user explicitly add the "="? What's
> wrong with (excuse any line-wrap my e-mail client adds):

It's a choice between ',' and '='.
In this case, '=' is more memnonic than ','
The use of the macro resembles the "ideal" declaration:

      static const bool is_fake = !is_real ;
BOOST_STATIC_CONSTANT(bool, is_fake = !is_real);

> (I moved the "const" to follow the type, since that always works[1].) Is
> there some subtle point of macro definitions that keeps this from working,


> or did we make a silly oversight? If it was an oversight

Where's the oversight? The silliness? Where's the LOVE?!

Okay, I'm getting carried away, but seriously: what's wrong with it the way
it is?

> can we change the macro to this form?

Not without good cause.

> Yes, I know that I'm asking for an incompatible change,
> but the macro is only a few days old, so I don't think that there's too
> code to change. Within Boost 1.21.0 itself, the macro (name) appears 207
> times in 12 files. It could be updated in approximately a day, probably
> a team of people with CVS write access. (I'll change them if you guys
> insist, but I would have to send Beman a ZIP file to merge into CVS.)

That's a lot of work for a change which buys little or nothing (even less
than nothing if you consider the memnonic value of '=').


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