
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Matt Calabrese
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.
The problem is that there isn't any arbitrary precision arithmetic support in the pp-lib. If there was, you could do better than that for syntax: BOOST_BINARY_INT( 1100 0011 1010 ) Regards, Paul Mensonides