From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-09-11 22:27:06
"Daniel James" <daniel_at_[hidden]> wrote
> When running your tests, the intel linux compiler gives this warning:
> main.cpp(143): warning #858: type qualifier on return type is meaningless
> const int cf();
> which means that BOOST_TYPEOF_PRESERVE_LVALUE(cf()) gives int, and your
> test fails, so you might want to remove that test.
> Also neither encode_signed nor encode_unsigned seem to work for zero
> values. I think encode_signed is missing a check for zero, and I guess
> encode_unsigned should add 1 to value when encoding, and then subtract 1
> when decoding - or have a special case like encode_signed does.
I actualy re-wrote the integral encoding part, taking more bit-wise
approach, which allowed me to handle all integral types (signed, unsigned
and boolean) an a uniform manner. I encode 4-byte types using two integers
(because of zero, and also limitations on the array size I ran into in GCC),
and shorter types using just one.
I also switched from mpl::int_ to mpl::size_t.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk