Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:42:47

0001 //
0002 //! Copyright (c) 2011-2012
0003 //! Brandon Kohn
0004 //
0005 //  Distributed under the Boost Software License, Version 1.0. (See
0006 //  accompanying file LICENSE_1_0.txt or copy at
0007 //  http://www.boost.org/LICENSE_1_0.txt)
0008 //
0009 
0010 #if !defined(BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES)
0011 
0012     #include <boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp>
0013     
0014     #if !defined(BOOST_NO_LONG_LONG)
0015         #include <boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp>
0016     #endif
0017     
0018 #else
0019 #if !BOOST_PP_IS_ITERATING
0020 
0021     #include <boost/preprocessor/seq/elem.hpp>
0022     #include <boost/preprocessor/seq/size.hpp>
0023     #include <boost/preprocessor/iteration/iterate.hpp>
0024     
0025     #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
0026         #pragma wave option(preserve: 2, line: 0, output: "preprocessed/numeric_cast_traits_common.hpp")
0027     #endif
0028 //
0029 //! Copyright (c) 2011-2012
0030 //! Brandon Kohn
0031 //
0032 //  Distributed under the Boost Software License, Version 1.0. (See
0033 //  accompanying file LICENSE_1_0.txt or copy at
0034 //  http://www.boost.org/LICENSE_1_0.txt)
0035 //
0036     #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
0037         #pragma wave option(preserve: 1)
0038     #endif
0039     
0040     //! These are the assumed common built in fundamental types (not typedefs/macros.)
0041     #define BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES() \
0042         (char)                                            \
0043         (signed char)                                     \
0044         (unsigned char)                                   \
0045         (short)                                           \
0046         (unsigned short)                                  \
0047         (int)                                             \
0048         (unsigned int)                                    \
0049         (long)                                            \
0050         (unsigned long)                                   \
0051         (float)                                           \
0052         (double)                                          \
0053         (long double)                                     \
0054     /***/
0055     
0056     #define BOOST_NUMERIC_CONVERSION_SEQ_A() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES()
0057     #define BOOST_NUMERIC_CONVERSION_SEQ_B() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES()
0058 
0059 namespace boost { namespace numeric {
0060 
0061     #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>))
0062     #include BOOST_PP_ITERATE()    
0063 
0064 }}//namespace boost::numeric;
0065 
0066     #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
0067         #pragma wave option(output: null)
0068     #endif   
0069     
0070     #if ( defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) ) || !defined(BOOST_NO_LONG_LONG)
0071     
0072         #undef BOOST_NUMERIC_CONVERSION_SEQ_A
0073         #undef BOOST_NUMERIC_CONVERSION_SEQ_B
0074 
0075         #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
0076             #pragma wave option(preserve: 2, line: 0, output: "preprocessed/numeric_cast_traits_long_long.hpp")
0077         #endif
0078 
0079 //
0080 //! Copyright (c) 2011-2012
0081 //! Brandon Kohn
0082 //
0083 //  Distributed under the Boost Software License, Version 1.0. (See
0084 //  accompanying file LICENSE_1_0.txt or copy at
0085 //  http://www.boost.org/LICENSE_1_0.txt)
0086 //
0087         #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
0088             #pragma wave option(preserve: 1)
0089         #endif
0090 
0091 namespace boost { namespace numeric {
0092 
0093     #define BOOST_NUMERIC_CONVERSION_SEQ_A() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES()(boost::long_long_type)(boost::ulong_long_type)
0094     #define BOOST_NUMERIC_CONVERSION_SEQ_B() (boost::long_long_type)(boost::ulong_long_type)
0095     
0096     #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>))
0097     #include BOOST_PP_ITERATE()    
0098 
0099 }}//namespace boost::numeric;
0100 
0101         #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
0102             #pragma wave option(output: null)
0103         #endif   
0104     
0105     #endif
0106         
0107     #undef BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES
0108     #undef BOOST_NUMERIC_CONVERSION_SEQ_A
0109     #undef BOOST_NUMERIC_CONVERSION_SEQ_B
0110     
0111 #elif BOOST_PP_ITERATION_DEPTH() == 1
0112 
0113     #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>))
0114     #include BOOST_PP_ITERATE()
0115 
0116 #elif BOOST_PP_ITERATION_DEPTH() == 2
0117 
0118     //! Generate default traits for the specified source and target.
0119     #define BOOST_NUMERIC_CONVERSION_A BOOST_PP_FRAME_ITERATION(1)
0120     #define BOOST_NUMERIC_CONVERSION_B BOOST_PP_FRAME_ITERATION(2)
0121 
0122     template <>
0123     struct numeric_cast_traits
0124         <
0125             BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_A, BOOST_NUMERIC_CONVERSION_SEQ_A())
0126           , BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_B, BOOST_NUMERIC_CONVERSION_SEQ_B())
0127         >
0128     {
0129         typedef def_overflow_handler overflow_policy;
0130         typedef UseInternalRangeChecker range_checking_policy;
0131         typedef Trunc<BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_B, BOOST_NUMERIC_CONVERSION_SEQ_B())> rounding_policy;
0132     };     
0133 
0134     #undef BOOST_NUMERIC_CONVERSION_A
0135     #undef BOOST_NUMERIC_CONVERSION_B
0136 
0137 #endif//! Depth 2.
0138 #endif// BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES