Boost logo

Boost :

From: Alexander Nasonov (alexander.nasonov_at_[hidden])
Date: 2006-10-05 05:40:57


[[[ Reposting as the first message didn't get through ]]]

Paul A Bristow wrote:
> A further detail that might cause trouble for older compilers that I have
> confirmed with John Maddock.
>
> BOOST_STATIC_ASSERT doesn't work for all and needs to be a BOOST_ASSERT
> instead thus:

> #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
> BOOST_STATIC_ASSERT(::std::numeric_limits<T>::is_specialized);
> #else
> BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
> #endif

I just realised that I use BOOST_STATIC_ASSERT in lexical_cast
optimization patch (http://tinyurl.com/qu388):

BOOST_STATIC_ASSERT(std::numeric_limits<T>::digits10 < CHAR_MAX);

This check is applied only to integral types. I thought I could
replace std::numeric_limits<T> with boost::integer_traits<T> but I
don't see any use of BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS in
integer_traits.hpp.

-- 
Alexander Nasonov
http://nasonov.blogspot.com
http://alnsn.livejournal.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk