|
Boost : |
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2005-10-21 13:22:54
On 10/21/05, Paul Mensonides <pmenso57_at_[hidden]> wrote:
>
> BOOST_BINARY_LITERAL(...)
> BOOST_BINARY_LITERAL_U(...)
> BOOST_BINARY_LITERAL_L(...)
> BOOST_BINARY_LITERAL_UL(...)
One reason I'd prefer not to do that is because as it stands, you can use
any suffixes you want with the literal, including suffixes which are
provided as extensions with your particular compiler, such as to specify
64-bit ints and 64-bit unsigned ints, etc.
If the length of BOOST_SUFFIXED_BINARY_LITERAL is what is not liked, it
could be changed to BOOST_SUFFIXED_BITS or something like that. I only
wanted BINARY_LITERAL in the name as opposed to just BINARY or BITS to
stress that it is, in fact, a literal. The result of the macro is an octal
literal and can be used as such. If it's really disliked that much, I don't
mind changing it to whatever is wanted.
Also, it was unmentioned in this post, but arbitrary groupings of bits are
supported up to 8 bits per group, such as BOOST_BINARY_LITERAL( 11001001 00
00011 1101 00 11 ), as per suggestion by Paul during development.
I'd like to write up documentation and rationale this weekend to cover all
of this and I really should have had it done and uploaded already, but I've
been going crazy with work and am also currently developing a units library
for boost and am a part of a long discussion on it as well. I seem to be
spending 95% of my day coding and engineering libraries in front of a
computer screen and it's becoming tough to balance what needs to be done
first.
-- -Matt Calabrese
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk