forked from boostorg/conversion
Fixed testing of 128bit integer types and added staic assert that cheks for std::numeric_limits specializations, if they are required for conversion (refs #8790)
[SVN r85072]
This commit is contained in:
@@ -879,6 +879,15 @@ namespace boost {
|
||||
{
|
||||
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
BOOST_STATIC_ASSERT(!std::numeric_limits<T>::is_signed);
|
||||
|
||||
// GCC when used with flag -std=c++0x may not have std::numeric_limits
|
||||
// specializations for __int128 and unsigned __int128 types.
|
||||
// Try compilation with -std=gnu++0x or -std=gnu++11.
|
||||
//
|
||||
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40856
|
||||
BOOST_STATIC_ASSERT_MSG(std::numeric_limits<T>::is_specialized,
|
||||
"std::numeric_limits are not specialized for integral type passed to boost::lexical_cast"
|
||||
);
|
||||
#endif
|
||||
CharT const czero = lcast_char_constants<CharT>::zero;
|
||||
--end;
|
||||
|
||||
Reference in New Issue
Block a user