|
Boost : |
From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-04-29 06:37:09
Daryle,
Following on from my previous comments - I've found at least one of the
problems with VC6, and that's the function:
template < std::size_t Bits >
typename boost::uint_t<Bits>::fast
reflect( typename boost::uint_t<Bits>::fast x )
VC6 doesn't support template functions with non-type template arguments (I
think there are a few commercial unix compilers that are the same BTW), it
compiler the code, but passes garbage values to the function's template
arguments, as a result reflect just doesn't work (it basically turns the
input into garbage). I think you can fix this, and make the code more
generally portable by using something like:
template < std::size_t Bits >
struct reflector
{
static typename boost::uint_t<Bits>::fast
reflect( typename boost::uint_t<Bits>::fast x );
};
and then replacing calls to reflect<N> with calls to reflector<N>::reflect.
- John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk