ext/boost/integer_traits.hpp in passenger-2.2.15 vs ext/boost/integer_traits.hpp in passenger-3.0.0.pre1

- old
+ new

@@ -3,11 +3,11 @@ * Copyright Jens Maurer 2000 * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * - * $Id: integer_traits.hpp 32576 2006-02-05 10:19:42Z johnmaddock $ + * $Id: integer_traits.hpp 58381 2009-12-14 18:14:48Z johnmaddock $ * * Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers */ // See http://www.boost.org/libs/integer for documentation. @@ -25,10 +25,21 @@ // and some may have <wchar.h> but not <cwchar> ... #if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && (!defined(BOOST_NO_CWCHAR) || defined(sun) || defined(__sun) || defined(__QNX__)) #include <wchar.h> #endif +// +// We simply cannot include this header on gcc without getting copious warnings of the kind: +// +// ../../../boost/integer_traits.hpp:164:66: warning: use of C99 long long integer constant +// +// And yet there is no other reasonable implementation, so we declare this a system header +// to suppress these warnings. +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif namespace boost { template<class T> class integer_traits : public std::numeric_limits<T> { @@ -221,9 +232,23 @@ template<> class integer_traits< ::boost::ulong_long_type> : public std::numeric_limits< ::boost::ulong_long_type>, public detail::integer_traits_base< ::boost::ulong_long_type, 0, ~0uLL> +{ }; + +#elif defined(BOOST_HAS_MS_INT64) + +template<> +class integer_traits< __int64> + : public std::numeric_limits< __int64>, + public detail::integer_traits_base< __int64, _I64_MIN, _I64_MAX> +{ }; + +template<> +class integer_traits< unsigned __int64> + : public std::numeric_limits< unsigned __int64>, + public detail::integer_traits_base< unsigned __int64, 0, _UI64_MAX> { }; #endif #endif