mirror of
https://github.com/boostorg/conversion.git
synced 2025-08-03 22:44:32 +02:00
applied workaround for MSVC++ 6.5/7.0 problem with static constants inside templates, see http://lists.boost.org/Archives/boost/2007/10/128392.php
[SVN r40146]
This commit is contained in:
@@ -21,7 +21,13 @@
|
|||||||
#include <boost/type_traits/is_abstract.hpp>
|
#include <boost/type_traits/is_abstract.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
#if defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || \
|
||||||
|
(defined(BOOST_MSVC) && (BOOST_MSVC<1310))
|
||||||
|
|
||||||
|
#define BOOST_LCAST_NO_COMPILE_TIME_PRECISION
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
|
||||||
#include <boost/assert.hpp>
|
#include <boost/assert.hpp>
|
||||||
#else
|
#else
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
@@ -31,7 +37,7 @@ namespace boost { namespace detail {
|
|||||||
|
|
||||||
class lcast_abstract_stub {};
|
class lcast_abstract_stub {};
|
||||||
|
|
||||||
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
|
||||||
// Calculate an argument to pass to std::ios_base::precision from
|
// Calculate an argument to pass to std::ios_base::precision from
|
||||||
// lexical_cast. See alternative implementation for broken standard
|
// lexical_cast. See alternative implementation for broken standard
|
||||||
// libraries in lcast_get_precision below. Keep them in sync, please.
|
// libraries in lcast_get_precision below. Keep them in sync, please.
|
||||||
@@ -92,7 +98,7 @@ struct lcast_precision
|
|||||||
template<class T>
|
template<class T>
|
||||||
inline std::streamsize lcast_get_precision(T* = 0)
|
inline std::streamsize lcast_get_precision(T* = 0)
|
||||||
{
|
{
|
||||||
#if !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
|
#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
|
||||||
return lcast_precision<T>::value;
|
return lcast_precision<T>::value;
|
||||||
#else // Follow lcast_precision algorithm at run-time:
|
#else // Follow lcast_precision algorithm at run-time:
|
||||||
|
|
||||||
|
@@ -307,7 +307,7 @@ namespace boost
|
|||||||
#undef BOOST_AUX_LEXICAL_CAST_DEF
|
#undef BOOST_AUX_LEXICAL_CAST_DEF
|
||||||
#undef BOOST_AUX_LEXICAL_CAST_DEF1
|
#undef BOOST_AUX_LEXICAL_CAST_DEF1
|
||||||
|
|
||||||
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
|
||||||
// This #if is in sync with lcast_precision
|
// This #if is in sync with lcast_precision
|
||||||
|
|
||||||
// Helper for floating point types.
|
// Helper for floating point types.
|
||||||
@@ -376,7 +376,7 @@ namespace boost
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif // #ifndef DISABLE_WIDE_CHAR_SUPPORT
|
#endif // #ifndef DISABLE_WIDE_CHAR_SUPPORT
|
||||||
#endif // #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
#endif // #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace detail // '0' and '-' constants
|
namespace detail // '0' and '-' constants
|
||||||
|
Reference in New Issue
Block a user