|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r76765 - in trunk/boost/numeric/conversion/detail: . preprocessed
From: blkohn_at_[hidden]
Date: 2012-01-28 14:59:36
Author: brandon.kohn
Date: 2012-01-28 14:59:35 EST (Sat, 28 Jan 2012)
New Revision: 76765
URL: http://svn.boost.org/trac/boost/changeset/76765
Log:
Fixes for https://svn.boost.org/trac/boost/ticket/6158 numeric_cast_traits.
Added:
trunk/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp (contents, props changed)
trunk/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp (contents, props changed)
Removed:
trunk/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp
Text files modified:
trunk/boost/numeric/conversion/detail/numeric_cast_traits.hpp | 125 +++++++++++++++++++++++++--------------
1 files changed, 79 insertions(+), 46 deletions(-)
Modified: trunk/boost/numeric/conversion/detail/numeric_cast_traits.hpp
==============================================================================
--- trunk/boost/numeric/conversion/detail/numeric_cast_traits.hpp (original)
+++ trunk/boost/numeric/conversion/detail/numeric_cast_traits.hpp 2012-01-28 14:59:35 EST (Sat, 28 Jan 2012)
@@ -1,26 +1,32 @@
//
-//! Copyright (c) 2011
+//! Copyright (c) 2011-2012
//! Brandon Kohn
//
// 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)
//
+
#if !defined(BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES)
- #include <boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp>
+
+ #include <boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp>
+
+ #if !defined(BOOST_NO_LONG_LONG)
+ #include <boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp>
+ #endif
+
#else
#if !BOOST_PP_IS_ITERATING
- #include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/seq/elem.hpp>
#include <boost/preprocessor/seq/size.hpp>
-
+ #include <boost/preprocessor/iteration/iterate.hpp>
+
#if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
- #pragma wave option(preserve: 2, line: 0, output: "preprocessed/numeric_cast_traits.hpp")
+ #pragma wave option(preserve: 2, line: 0, output: "preprocessed/numeric_cast_traits_common.hpp")
#endif
-
//
-//! Copyright (c) 2011
+//! Copyright (c) 2011-2012
//! Brandon Kohn
//
// Distributed under the Boost Software License, Version 1.0. (See
@@ -30,41 +36,29 @@
#if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif
-
- //! Generate the specializations for the built-in types.
- #if !defined( BOOST_NO_INT64_T )
- #define BOOST_NUMERIC_CONVERSION_BUILTIN_TYPES() \
- (char) \
- (boost::int8_t) \
- (boost::uint8_t) \
- (boost::int16_t) \
- (boost::uint16_t) \
- (boost::int32_t) \
- (boost::uint32_t) \
- (boost::int64_t) \
- (boost::uint64_t) \
- (float) \
- (double) \
- (long double) \
- /***/
- #else
- #define BOOST_NUMERIC_CONVERSION_BUILTIN_TYPES() \
- (char) \
- (boost::int8_t) \
- (boost::uint8_t) \
- (boost::int16_t) \
- (boost::uint16_t) \
- (boost::int32_t) \
- (boost::uint32_t) \
- (float) \
- (double) \
- (long double) \
- /***/
- #endif
+
+ //! These are the assumed common built in fundamental types (not typedefs/macros.)
+ #define BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES() \
+ (char) \
+ (signed char) \
+ (unsigned char) \
+ (short) \
+ (unsigned short) \
+ (int) \
+ (unsigned int) \
+ (long) \
+ (unsigned long) \
+ (float) \
+ (double) \
+ (long double) \
+ /***/
+
+ #define BOOST_NUMERIC_CONVERSION_SEQ_A() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES()
+ #define BOOST_NUMERIC_CONVERSION_SEQ_B() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES()
namespace boost { namespace numeric {
- #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_BUILTIN_TYPES())), <boost/numeric/conversion/detail/numeric_cast_traits.hpp>))
+ #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_A())), <boost/numeric/conversion/detail/numeric_cast_traits.hpp>))
#include BOOST_PP_ITERATE()
}}//namespace boost::numeric;
@@ -72,14 +66,53 @@
#if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
+
+ #if ( defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) ) || !defined(BOOST_NO_LONG_LONG)
+
+ #undef BOOST_NUMERIC_CONVERSION_SEQ_A
+ #undef BOOST_NUMERIC_CONVERSION_SEQ_B
+
+ #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+ #pragma wave option(preserve: 2, line: 0, output: "preprocessed/numeric_cast_traits_long_long.hpp")
+ #endif
+
+//
+//! Copyright (c) 2011-2012
+//! Brandon Kohn
+//
+// 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)
+//
+ #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+ #pragma wave option(preserve: 1)
+ #endif
- #undef BOOST_NUMERIC_CONVERSION_BUILTIN_TYPES
+namespace boost { namespace numeric {
+ #define BOOST_NUMERIC_CONVERSION_SEQ_A() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES()(long long)(unsigned long long)
+ #define BOOST_NUMERIC_CONVERSION_SEQ_B() (long long)(unsigned long long)
+
+ #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_A())), <boost/numeric/conversion/detail/numeric_cast_traits.hpp>))
+ #include BOOST_PP_ITERATE()
+
+}}//namespace boost::numeric;
+
+ #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+ #pragma wave option(output: null)
+ #endif
+
+ #endif
+
+ #undef BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES
+ #undef BOOST_NUMERIC_CONVERSION_SEQ_A
+ #undef BOOST_NUMERIC_CONVERSION_SEQ_B
+
#elif BOOST_PP_ITERATION_DEPTH() == 1
- #define BOOST_PP_ITERATION_PARAMS_2 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_BUILTIN_TYPES())), <boost/numeric/conversion/detail/numeric_cast_traits.hpp>))
- #include BOOST_PP_ITERATE()
-
+ #define BOOST_PP_ITERATION_PARAMS_2 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_B())), <boost/numeric/conversion/detail/numeric_cast_traits.hpp>))
+ #include BOOST_PP_ITERATE()
+
#elif BOOST_PP_ITERATION_DEPTH() == 2
//! Generate default traits for the specified source and target.
@@ -89,13 +122,13 @@
template <>
struct numeric_cast_traits
<
- BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_A, BOOST_NUMERIC_CONVERSION_BUILTIN_TYPES())
- , BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_B, BOOST_NUMERIC_CONVERSION_BUILTIN_TYPES())
+ BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_A, BOOST_NUMERIC_CONVERSION_SEQ_A())
+ , BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_B, BOOST_NUMERIC_CONVERSION_SEQ_B())
>
{
typedef def_overflow_handler overflow_policy;
typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_B, BOOST_NUMERIC_CONVERSION_BUILTIN_TYPES())> rounding_policy;
+ typedef Trunc<BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_B, BOOST_NUMERIC_CONVERSION_SEQ_B())> rounding_policy;
};
#undef BOOST_NUMERIC_CONVERSION_A
Deleted: trunk/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp
==============================================================================
--- trunk/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp 2012-01-28 14:59:35 EST (Sat, 28 Jan 2012)
+++ (empty file)
@@ -1,1751 +0,0 @@
-//
-//! Copyright (c) 2011
-//! Brandon Kohn
-//
-// 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)
-//
-
-namespace boost { namespace numeric {
-
- template <>
- struct numeric_cast_traits
- <
- char
- , char
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<char> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- char
- , boost::int8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- char
- , boost::uint8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- char
- , boost::int16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- char
- , boost::uint16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- char
- , boost::int32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- char
- , boost::uint32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- char
- , boost::int64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- char
- , boost::uint64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- char
- , float
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<float> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- char
- , double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<double> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- char
- , long double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<long double> rounding_policy;
- };
-
-
- template <>
- struct numeric_cast_traits
- <
- boost::int8_t
- , char
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<char> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int8_t
- , boost::int8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int8_t
- , boost::uint8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int8_t
- , boost::int16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int8_t
- , boost::uint16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int8_t
- , boost::int32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int8_t
- , boost::uint32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int8_t
- , boost::int64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int8_t
- , boost::uint64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int8_t
- , float
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<float> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int8_t
- , double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<double> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int8_t
- , long double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<long double> rounding_policy;
- };
-
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint8_t
- , char
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<char> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint8_t
- , boost::int8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint8_t
- , boost::uint8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint8_t
- , boost::int16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint8_t
- , boost::uint16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint8_t
- , boost::int32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint8_t
- , boost::uint32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint8_t
- , boost::int64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint8_t
- , boost::uint64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint8_t
- , float
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<float> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint8_t
- , double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<double> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint8_t
- , long double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<long double> rounding_policy;
- };
-
-
- template <>
- struct numeric_cast_traits
- <
- boost::int16_t
- , char
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<char> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int16_t
- , boost::int8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int16_t
- , boost::uint8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int16_t
- , boost::int16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int16_t
- , boost::uint16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int16_t
- , boost::int32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int16_t
- , boost::uint32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int16_t
- , boost::int64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int16_t
- , boost::uint64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int16_t
- , float
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<float> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int16_t
- , double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<double> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int16_t
- , long double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<long double> rounding_policy;
- };
-
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint16_t
- , char
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<char> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint16_t
- , boost::int8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint16_t
- , boost::uint8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint16_t
- , boost::int16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint16_t
- , boost::uint16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint16_t
- , boost::int32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint16_t
- , boost::uint32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint16_t
- , boost::int64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint16_t
- , boost::uint64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint16_t
- , float
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<float> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint16_t
- , double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<double> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint16_t
- , long double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<long double> rounding_policy;
- };
-
-
- template <>
- struct numeric_cast_traits
- <
- boost::int32_t
- , char
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<char> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int32_t
- , boost::int8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int32_t
- , boost::uint8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int32_t
- , boost::int16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int32_t
- , boost::uint16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int32_t
- , boost::int32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int32_t
- , boost::uint32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int32_t
- , boost::int64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int32_t
- , boost::uint64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int32_t
- , float
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<float> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int32_t
- , double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<double> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int32_t
- , long double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<long double> rounding_policy;
- };
-
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint32_t
- , char
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<char> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint32_t
- , boost::int8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint32_t
- , boost::uint8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint32_t
- , boost::int16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint32_t
- , boost::uint16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint32_t
- , boost::int32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint32_t
- , boost::uint32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint32_t
- , boost::int64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint32_t
- , boost::uint64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint32_t
- , float
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<float> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint32_t
- , double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<double> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint32_t
- , long double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<long double> rounding_policy;
- };
-
-
- template <>
- struct numeric_cast_traits
- <
- boost::int64_t
- , char
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<char> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int64_t
- , boost::int8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int64_t
- , boost::uint8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int64_t
- , boost::int16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int64_t
- , boost::uint16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int64_t
- , boost::int32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int64_t
- , boost::uint32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int64_t
- , boost::int64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int64_t
- , boost::uint64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int64_t
- , float
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<float> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int64_t
- , double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<double> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::int64_t
- , long double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<long double> rounding_policy;
- };
-
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint64_t
- , char
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<char> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint64_t
- , boost::int8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint64_t
- , boost::uint8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint64_t
- , boost::int16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint64_t
- , boost::uint16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint64_t
- , boost::int32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint64_t
- , boost::uint32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint64_t
- , boost::int64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint64_t
- , boost::uint64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint64_t
- , float
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<float> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint64_t
- , double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<double> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- boost::uint64_t
- , long double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<long double> rounding_policy;
- };
-
-
- template <>
- struct numeric_cast_traits
- <
- float
- , char
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<char> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- float
- , boost::int8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- float
- , boost::uint8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- float
- , boost::int16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- float
- , boost::uint16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- float
- , boost::int32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- float
- , boost::uint32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- float
- , boost::int64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- float
- , boost::uint64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- float
- , float
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<float> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- float
- , double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<double> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- float
- , long double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<long double> rounding_policy;
- };
-
-
- template <>
- struct numeric_cast_traits
- <
- double
- , char
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<char> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- double
- , boost::int8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- double
- , boost::uint8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- double
- , boost::int16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- double
- , boost::uint16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- double
- , boost::int32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- double
- , boost::uint32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- double
- , boost::int64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- double
- , boost::uint64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- double
- , float
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<float> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- double
- , double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<double> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- double
- , long double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<long double> rounding_policy;
- };
-
-
- template <>
- struct numeric_cast_traits
- <
- long double
- , char
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<char> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- long double
- , boost::int8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- long double
- , boost::uint8_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint8_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- long double
- , boost::int16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- long double
- , boost::uint16_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint16_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- long double
- , boost::int32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- long double
- , boost::uint32_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint32_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- long double
- , boost::int64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::int64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- long double
- , boost::uint64_t
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<boost::uint64_t> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- long double
- , float
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<float> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- long double
- , double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<double> rounding_policy;
- };
-
- template <>
- struct numeric_cast_traits
- <
- long double
- , long double
- >
- {
- typedef def_overflow_handler overflow_policy;
- typedef UseInternalRangeChecker range_checking_policy;
- typedef Trunc<long double> rounding_policy;
- };
-
-}}
Added: trunk/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp 2012-01-28 14:59:35 EST (Sat, 28 Jan 2012)
@@ -0,0 +1,1741 @@
+//
+//! Copyright (c) 2011-2012
+//! Brandon Kohn
+//
+// 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)
+//
+
+
+
+namespace boost { namespace numeric {
+
+ template <>
+ struct numeric_cast_traits
+ <
+ char
+ , char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ char
+ , signed char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<signed char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ char
+ , unsigned char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ char
+ , short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ char
+ , unsigned short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ char
+ , int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ char
+ , unsigned int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ char
+ , long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ char
+ , unsigned long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ char
+ , float
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<float> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ char
+ , double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ char
+ , long double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ signed char
+ , char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ signed char
+ , signed char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<signed char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ signed char
+ , unsigned char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ signed char
+ , short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ signed char
+ , unsigned short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ signed char
+ , int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ signed char
+ , unsigned int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ signed char
+ , long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ signed char
+ , unsigned long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ signed char
+ , float
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<float> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ signed char
+ , double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ signed char
+ , long double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned char
+ , char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned char
+ , signed char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<signed char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned char
+ , unsigned char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned char
+ , short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned char
+ , unsigned short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned char
+ , int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned char
+ , unsigned int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned char
+ , long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned char
+ , unsigned long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned char
+ , float
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<float> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned char
+ , double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned char
+ , long double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ short
+ , char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ short
+ , signed char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<signed char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ short
+ , unsigned char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ short
+ , short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ short
+ , unsigned short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ short
+ , int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ short
+ , unsigned int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ short
+ , long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ short
+ , unsigned long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ short
+ , float
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<float> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ short
+ , double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ short
+ , long double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned short
+ , char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned short
+ , signed char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<signed char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned short
+ , unsigned char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned short
+ , short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned short
+ , unsigned short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned short
+ , int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned short
+ , unsigned int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned short
+ , long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned short
+ , unsigned long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned short
+ , float
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<float> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned short
+ , double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned short
+ , long double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ int
+ , char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ int
+ , signed char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<signed char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ int
+ , unsigned char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ int
+ , short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ int
+ , unsigned short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ int
+ , int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ int
+ , unsigned int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ int
+ , long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ int
+ , unsigned long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ int
+ , float
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<float> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ int
+ , double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ int
+ , long double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned int
+ , char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned int
+ , signed char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<signed char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned int
+ , unsigned char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned int
+ , short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned int
+ , unsigned short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned int
+ , int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned int
+ , unsigned int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned int
+ , long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned int
+ , unsigned long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned int
+ , float
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<float> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned int
+ , double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned int
+ , long double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long
+ , char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long
+ , signed char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<signed char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long
+ , unsigned char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long
+ , short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long
+ , unsigned short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long
+ , int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long
+ , unsigned int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long
+ , long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long
+ , unsigned long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long
+ , float
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<float> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long
+ , double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long
+ , long double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long
+ , char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long
+ , signed char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<signed char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long
+ , unsigned char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long
+ , short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long
+ , unsigned short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long
+ , int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long
+ , unsigned int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long
+ , long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long
+ , unsigned long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long
+ , float
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<float> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long
+ , double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long
+ , long double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ float
+ , char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ float
+ , signed char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<signed char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ float
+ , unsigned char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ float
+ , short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ float
+ , unsigned short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ float
+ , int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ float
+ , unsigned int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ float
+ , long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ float
+ , unsigned long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ float
+ , float
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<float> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ float
+ , double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ float
+ , long double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ double
+ , char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ double
+ , signed char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<signed char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ double
+ , unsigned char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ double
+ , short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ double
+ , unsigned short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ double
+ , int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ double
+ , unsigned int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ double
+ , long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ double
+ , unsigned long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ double
+ , float
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<float> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ double
+ , double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ double
+ , long double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long double
+ , char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long double
+ , signed char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<signed char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long double
+ , unsigned char
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned char> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long double
+ , short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long double
+ , unsigned short
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned short> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long double
+ , int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long double
+ , unsigned int
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned int> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long double
+ , long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long double
+ , unsigned long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long double
+ , float
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<float> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long double
+ , double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<double> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long double
+ , long double
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long double> rounding_policy;
+ };
+}}
Added: trunk/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp 2012-01-28 14:59:35 EST (Sat, 28 Jan 2012)
@@ -0,0 +1,347 @@
+//
+//! Copyright (c) 2011-2012
+//! Brandon Kohn
+//
+// 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)
+//
+namespace boost { namespace numeric {
+
+
+ template <>
+ struct numeric_cast_traits
+ <
+ char
+ , long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ char
+ , unsigned long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ signed char
+ , long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ signed char
+ , unsigned long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned char
+ , long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned char
+ , unsigned long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ short
+ , long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ short
+ , unsigned long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned short
+ , long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned short
+ , unsigned long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ int
+ , long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ int
+ , unsigned long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned int
+ , long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned int
+ , unsigned long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long
+ , long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long
+ , unsigned long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long
+ , long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long
+ , unsigned long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ float
+ , long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ float
+ , unsigned long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ double
+ , long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ double
+ , unsigned long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long double
+ , long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long double
+ , unsigned long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long long
+ , long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ long long
+ , unsigned long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long long
+ , long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<long long> rounding_policy;
+ };
+
+ template <>
+ struct numeric_cast_traits
+ <
+ unsigned long long
+ , unsigned long long
+ >
+ {
+ typedef def_overflow_handler overflow_policy;
+ typedef UseInternalRangeChecker range_checking_policy;
+ typedef Trunc<unsigned long long> rounding_policy;
+ };
+}}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk