|
Boost : |
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2005-09-02 18:54:09
On 9/2/05, Scott Schurr <scott_schurr_at_[hidden]> wrote:
> I expect these binary literals to
> work any place that an integer literal would work at compile
> (not preprocessing) time.
Forgive me if this has already been addressed, but is there a reason as to
why a template is prefered here as opposed to a macro solution? A solution
using preprocessor metaprogramming would allow one to use the value at
preprocessing time as well as compile-time, making a template version
unecessary, and syntactically it would be even simpler since you wouldn't
need to do ::value. The call could be as simple as BOOST_BINARY_INT(
(1100)(0011)(1010) ) using Boost.Preprocessor sequences. Again, I am sorry
if this has already been addressed.
-- -Matt Calabrese
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk