Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-10-22 09:56:27

"Paul Mensonides" <pmenso57_at_[hidden]> writes:

> I think a template-based version is unacceptable for one primary
> reason. To the template mechanism, 001 and 0001 are the same thing.
> That is a bad thing when specifying groups of binary bits, as the
> groupings are often not simple four-bit groupings. The macro
> version can differentiate between the two, and can specify any
> pattern of bit groups. Other then the ability to tack UL (etc.)
> onto the end, it isn't a great strength that the macro produces a
> literal--only that it produces a compile-time constant suitably
> typed. IMO, as far as this is concerned, the template-based version
> and the macro-based version are more-or-less equivalent. The great
> strength of the macro version is the support for arbitrary bit
> groupings.

I guess I consider that a non-essential but very-nice-to-have
feature. So I wouldn't go as far as labelling the template-based
approach "unacceptable," but that does tilt me strongly back towards
the macro approach.

Dave Abrahams
Boost Consulting

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