boost/boost-1.54.0-lexical_cast-int128.patch

62 lines
2.1 KiB
Diff

diff -up boost/lexical_cast.hpp\~ boost/lexical_cast.hpp
--- boost/lexical_cast.hpp~ 2013-07-27 12:03:21.000000000 +0200
+++ boost/lexical_cast.hpp 2013-07-30 19:30:54.969548144 +0200
@@ -69,11 +69,6 @@
throw_exception(bad_lexical_cast(typeid(Source), typeid(Target)))
#endif
-#if (defined(BOOST_LCAST_HAS_INT128) && !defined(__GNUC__)) || GCC_VERSION > 40700
-#define BOOST_LCAST_HAS_INT128
-#endif
-
-
namespace boost
{
// exception used to indicate runtime lexical_cast failure
@@ -316,7 +311,7 @@ namespace boost {
> {};
#endif
-#ifdef BOOST_LCAST_HAS_INT128
+#ifdef BOOST_HAS_INT128
template <> struct stream_char_common< boost::int128_type >: public boost::mpl::identity< char > {};
template <> struct stream_char_common< boost::uint128_type >: public boost::mpl::identity< char > {};
#endif
@@ -613,7 +608,7 @@ namespace boost {
BOOST_LCAST_DEF(unsigned __int64)
BOOST_LCAST_DEF( __int64)
#endif
-#ifdef BOOST_LCAST_HAS_INT128
+#ifdef BOOST_HAS_INT128
BOOST_LCAST_DEF(boost::int128_type)
BOOST_LCAST_DEF(boost::uint128_type)
#endif
@@ -1827,7 +1822,7 @@ namespace boost {
bool operator<<( __int64 n) { return shl_signed(n); }
#endif
-#ifdef BOOST_LCAST_HAS_INT128
+#ifdef BOOST_HAS_INT128
bool operator<<(const boost::uint128_type& n) { start = lcast_put_unsigned<Traits>(n, finish); return true; }
bool operator<<(const boost::int128_type& n) { return shl_signed(n); }
#endif
@@ -2039,7 +2034,7 @@ namespace boost {
bool operator>>(__int64& output) { return shr_signed(output); }
#endif
-#ifdef BOOST_LCAST_HAS_INT128
+#ifdef BOOST_HAS_INT128
bool operator>>(boost::uint128_type& output) { return shr_unsigned(output); }
bool operator>>(boost::int128_type& output) { return shr_signed(output); }
#endif
@@ -2719,7 +2714,6 @@ namespace boost {
#undef BOOST_LCAST_THROW_BAD_CAST
#undef BOOST_LCAST_NO_WCHAR_T
-#undef BOOST_LCAST_HAS_INT128
#endif // BOOST_LEXICAL_CAST_INCLUDED
Diff finished. Tue Jul 30 19:30:58 2013