Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2007-10-08 13:37:09

Compiling the following snippet in MSVC++ 6.5 + STLport 4.5.3
with the trunk

  #include <boost/lexical_cast.hpp>

  int main()
    return 0;

results in

...\boost\detail\lcast_precision.hpp(79) : error C2027:
  use of undefined type 'STATIC_ASSERTION_FAILURE<0>'
  ...\boost\detail\lcast_precision.hpp(89) : see reference to class template instantiation
  'boost::detail::lcast_precision<T>' being compiled

The offending asserion in boost/detail/lcast_precision.hpp is

    BOOST_STATIC_ASSERT(!is_specialized_bin ||
            limits::digits + 0UL < ULONG_MAX / 30103UL &&
            precision_bin > limits::digits10 + 0UL &&
            precision_bin <= streamsize_max + 0UL

This problem did not arise with Boost 1.34 because boost/lexical_cast.hpp
did not use the newly created lcast_precision.hpp. Other assertions in
lcast_precision<> seem to work OK, so looks like is this particular one
that should be fixed only. I lack the skills to propose a patch myself, but I can
locally try patches others may provide.

Thank you,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo

Boost list run by bdawes at, gregod at, cpdaniel at, john at