From 3af0af940567f99cddbd341e356813c80d479045 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Tue, 7 May 2013 19:24:47 +0000 Subject: [PATCH] Merge from trunk: * Fix for GCC-4.8 warning (fixes #8547) * Disable tests, invalid for C11 (clang specific) [SVN r84183] --- include/boost/lexical_cast.hpp | 5 ++--- test/lexical_cast_float_types_test.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/boost/lexical_cast.hpp b/include/boost/lexical_cast.hpp index 2562b62..66e5370 100644 --- a/include/boost/lexical_cast.hpp +++ b/include/boost/lexical_cast.hpp @@ -19,7 +19,7 @@ // Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, // Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, // Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters -// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2012 +// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2013 #include #if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING) @@ -880,7 +880,6 @@ namespace boost { #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS BOOST_STATIC_ASSERT(!std::numeric_limits::is_signed); #endif - typedef typename Traits::int_type int_type; CharT const czero = lcast_char_constants::zero; --end; value = 0; @@ -2712,7 +2711,7 @@ namespace boost { // Copyright Kevlin Henney, 2000-2005. // Copyright Alexander Nasonov, 2006-2010. -// Copyright Antony Polukhin, 2011-2012. +// Copyright Antony Polukhin, 2011-2013. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at diff --git a/test/lexical_cast_float_types_test.cpp b/test/lexical_cast_float_types_test.cpp index 2bc3d05..aafee05 100755 --- a/test/lexical_cast_float_types_test.cpp +++ b/test/lexical_cast_float_types_test.cpp @@ -264,8 +264,11 @@ void test_converion_to_float_types() BOOST_CHECK_THROW(lexical_cast("."), bad_lexical_cast); BOOST_CHECK_THROW(lexical_cast("-B"), bad_lexical_cast); - BOOST_CHECK_THROW(lexical_cast("0xB"), bad_lexical_cast); - BOOST_CHECK_THROW(lexical_cast("0x0"), bad_lexical_cast); + + // Following two tests are not valid for C++11 compilers + //BOOST_CHECK_THROW(lexical_cast("0xB"), bad_lexical_cast); + //BOOST_CHECK_THROW(lexical_cast("0x0"), bad_lexical_cast); + BOOST_CHECK_THROW(lexical_cast("--1.0"), bad_lexical_cast); BOOST_CHECK_THROW(lexical_cast("1.0e--1"), bad_lexical_cast); BOOST_CHECK_THROW(lexical_cast("1.0.0"), bad_lexical_cast);