]> git.lyx.org Git - features.git/commitdiff
update boost to version 1.48
authorPeter Kümmel <syntheticpp@gmx.net>
Sun, 20 Nov 2011 18:58:15 +0000 (18:58 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Sun, 20 Nov 2011 18:58:15 +0000 (18:58 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40230 a592a061-630c-0410-9148-cb99ea01b6c8

156 files changed:
boost/boost/config/auto_link.hpp
boost/boost/config/compiler/borland.hpp
boost/boost/config/compiler/clang.hpp
boost/boost/config/compiler/common_edg.hpp
boost/boost/config/compiler/cray.hpp [new file with mode: 0644]
boost/boost/config/compiler/digitalmars.hpp
boost/boost/config/compiler/gcc.hpp
boost/boost/config/compiler/gcc_xml.hpp
boost/boost/config/compiler/hp_acc.hpp
boost/boost/config/compiler/intel.hpp
boost/boost/config/compiler/metrowerks.hpp
boost/boost/config/compiler/mpw.hpp
boost/boost/config/compiler/pathscale.hpp
boost/boost/config/compiler/pgi.hpp
boost/boost/config/compiler/sunpro_cc.hpp
boost/boost/config/compiler/vacpp.hpp
boost/boost/config/compiler/visualc.hpp
boost/boost/config/platform/cray.hpp [new file with mode: 0644]
boost/boost/config/platform/win32.hpp
boost/boost/config/select_compiler_config.hpp
boost/boost/config/select_platform_config.hpp
boost/boost/config/suffix.hpp
boost/boost/current_function.hpp
boost/boost/detail/container_fwd.hpp
boost/boost/detail/fenv.hpp [new file with mode: 0644]
boost/boost/function/function_template.hpp
boost/boost/integer_traits.hpp
boost/boost/lexical_cast.hpp
boost/boost/math/policies/policy.hpp [new file with mode: 0644]
boost/boost/math/special_functions/detail/fp_traits.hpp [new file with mode: 0644]
boost/boost/math/special_functions/detail/round_fwd.hpp [new file with mode: 0644]
boost/boost/math/special_functions/fpclassify.hpp [new file with mode: 0644]
boost/boost/math/special_functions/math_fwd.hpp [new file with mode: 0644]
boost/boost/math/special_functions/sign.hpp [new file with mode: 0644]
boost/boost/math/tools/config.hpp [new file with mode: 0644]
boost/boost/math/tools/promotion.hpp [new file with mode: 0644]
boost/boost/math/tools/real_cast.hpp [new file with mode: 0644]
boost/boost/math/tools/user.hpp [new file with mode: 0644]
boost/boost/mpl/comparison.hpp [new file with mode: 0644]
boost/boost/mpl/greater.hpp [new file with mode: 0644]
boost/boost/mpl/greater_equal.hpp [new file with mode: 0644]
boost/boost/mpl/less_equal.hpp [new file with mode: 0644]
boost/boost/mpl/limits/list.hpp [new file with mode: 0644]
boost/boost/mpl/list.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/O1_size.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/begin_end.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/clear.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/empty.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/front.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/include_preprocessed.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/item.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/iterator.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/numbered.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/numbered_c.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/pop_front.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/preprocessed/plain/list10.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/preprocessed/plain/list20.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/preprocessed/plain/list30.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/preprocessed/plain/list40.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/preprocessed/plain/list50.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/push_back.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/push_front.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/size.hpp [new file with mode: 0644]
boost/boost/mpl/list/aux_/tag.hpp [new file with mode: 0644]
boost/boost/mpl/list/list0.hpp [new file with mode: 0644]
boost/boost/mpl/list/list0_c.hpp [new file with mode: 0644]
boost/boost/mpl/list/list10.hpp [new file with mode: 0644]
boost/boost/mpl/list/list10_c.hpp [new file with mode: 0644]
boost/boost/mpl/list/list20.hpp [new file with mode: 0644]
boost/boost/mpl/list/list20_c.hpp [new file with mode: 0644]
boost/boost/mpl/list/list30.hpp [new file with mode: 0644]
boost/boost/mpl/list/list30_c.hpp [new file with mode: 0644]
boost/boost/mpl/list/list40.hpp [new file with mode: 0644]
boost/boost/mpl/list/list40_c.hpp [new file with mode: 0644]
boost/boost/mpl/list/list50.hpp [new file with mode: 0644]
boost/boost/mpl/list/list50_c.hpp [new file with mode: 0644]
boost/boost/mpl/not_equal_to.hpp [new file with mode: 0644]
boost/boost/mpl/remove_if.hpp [new file with mode: 0644]
boost/boost/numeric/conversion/cast.hpp
boost/boost/numeric/conversion/detail/numeric_cast_traits.hpp [new file with mode: 0644]
boost/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp [new file with mode: 0644]
boost/boost/numeric/conversion/numeric_cast_traits.hpp [new file with mode: 0644]
boost/boost/regex/icu.hpp
boost/boost/regex/pending/unicode_iterator.hpp
boost/boost/regex/v4/basic_regex.hpp
boost/boost/regex/v4/basic_regex_creator.hpp
boost/boost/regex/v4/basic_regex_parser.hpp
boost/boost/regex/v4/regex_format.hpp
boost/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
boost/boost/smart_ptr/detail/sp_has_sync.hpp
boost/boost/smart_ptr/shared_array.hpp
boost/boost/smart_ptr/shared_ptr.hpp
boost/boost/smart_ptr/weak_ptr.hpp
boost/boost/type_traits.hpp
boost/boost/type_traits/add_rvalue_reference.hpp
boost/boost/type_traits/detail/bool_trait_def.hpp
boost/boost/type_traits/detail/bool_trait_undef.hpp
boost/boost/type_traits/detail/has_binary_operator.hpp [new file with mode: 0644]
boost/boost/type_traits/detail/has_postfix_operator.hpp [new file with mode: 0644]
boost/boost/type_traits/detail/has_prefix_operator.hpp [new file with mode: 0644]
boost/boost/type_traits/has_bit_and.hpp [new file with mode: 0644]
boost/boost/type_traits/has_bit_and_assign.hpp [new file with mode: 0644]
boost/boost/type_traits/has_bit_or.hpp [new file with mode: 0644]
boost/boost/type_traits/has_bit_or_assign.hpp [new file with mode: 0644]
boost/boost/type_traits/has_bit_xor.hpp [new file with mode: 0644]
boost/boost/type_traits/has_bit_xor_assign.hpp [new file with mode: 0644]
boost/boost/type_traits/has_complement.hpp [new file with mode: 0644]
boost/boost/type_traits/has_dereference.hpp [new file with mode: 0644]
boost/boost/type_traits/has_divides.hpp [new file with mode: 0644]
boost/boost/type_traits/has_divides_assign.hpp [new file with mode: 0644]
boost/boost/type_traits/has_equal_to.hpp [new file with mode: 0644]
boost/boost/type_traits/has_greater.hpp [new file with mode: 0644]
boost/boost/type_traits/has_greater_equal.hpp [new file with mode: 0644]
boost/boost/type_traits/has_left_shift.hpp [new file with mode: 0644]
boost/boost/type_traits/has_left_shift_assign.hpp [new file with mode: 0644]
boost/boost/type_traits/has_less.hpp [new file with mode: 0644]
boost/boost/type_traits/has_less_equal.hpp [new file with mode: 0644]
boost/boost/type_traits/has_logical_and.hpp [new file with mode: 0644]
boost/boost/type_traits/has_logical_not.hpp [new file with mode: 0644]
boost/boost/type_traits/has_logical_or.hpp [new file with mode: 0644]
boost/boost/type_traits/has_minus.hpp [new file with mode: 0644]
boost/boost/type_traits/has_minus_assign.hpp [new file with mode: 0644]
boost/boost/type_traits/has_modulus.hpp [new file with mode: 0644]
boost/boost/type_traits/has_modulus_assign.hpp [new file with mode: 0644]
boost/boost/type_traits/has_multiplies.hpp [new file with mode: 0644]
boost/boost/type_traits/has_multiplies_assign.hpp [new file with mode: 0644]
boost/boost/type_traits/has_negate.hpp [new file with mode: 0644]
boost/boost/type_traits/has_not_equal_to.hpp [new file with mode: 0644]
boost/boost/type_traits/has_operator.hpp [new file with mode: 0644]
boost/boost/type_traits/has_plus.hpp [new file with mode: 0644]
boost/boost/type_traits/has_plus_assign.hpp [new file with mode: 0644]
boost/boost/type_traits/has_post_decrement.hpp [new file with mode: 0644]
boost/boost/type_traits/has_post_increment.hpp [new file with mode: 0644]
boost/boost/type_traits/has_pre_decrement.hpp [new file with mode: 0644]
boost/boost/type_traits/has_pre_increment.hpp [new file with mode: 0644]
boost/boost/type_traits/has_right_shift.hpp [new file with mode: 0644]
boost/boost/type_traits/has_right_shift_assign.hpp [new file with mode: 0644]
boost/boost/type_traits/has_unary_minus.hpp [new file with mode: 0644]
boost/boost/type_traits/has_unary_plus.hpp [new file with mode: 0644]
boost/boost/type_traits/intrinsics.hpp
boost/boost/type_traits/is_unsigned.hpp
boost/boost/type_traits/remove_cv.hpp
boost/boost/typeof/typeof.hpp
boost/boost/version.hpp
boost/libs/regex/src/c_regex_traits.cpp
boost/libs/regex/src/cregex.cpp
boost/libs/regex/src/fileiter.cpp
boost/libs/regex/src/internals.hpp [new file with mode: 0644]
boost/libs/regex/src/posix_api.cpp
boost/libs/regex/src/wc_regex_traits.cpp
boost/libs/regex/src/wide_posix_api.cpp

index f5a0a007b4be6e11d2e1aa2a09d73be867c24ad4..05b47fb430fa24950370d158e5d543eedf1edbfd 100644 (file)
@@ -364,7 +364,7 @@ BOOST_LIB_VERSION:    The Boost version, in the form x_y, for Boost version x.y.
 #ifdef BOOST_AUTO_LINK_TAGGED
 #  pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
 #  ifdef BOOST_LIB_DIAGNOSTIC
-#     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
+#     pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
 #  endif
 #elif defined(BOOST_AUTO_LINK_NOMANGLE)
 #  pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
index 60f5505547c4fbda909717a1aaba6806286280b9..680e87bde8d36fcd9d493e9a253996df98ece242 100644 (file)
 #define BOOST_NO_AUTO_DECLARATIONS
 #define BOOST_NO_AUTO_MULTIDECLARATIONS
 #define BOOST_NO_CONSTEXPR
+#define BOOST_NO_DECLTYPE_N3276
 #define BOOST_NO_DEFAULTED_FUNCTIONS
 #define BOOST_NO_DELETED_FUNCTIONS
 #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
index 623452cd23174fdfffc2572419a7cbbbfbb87bfa..9f4adf8234ac99ea6b41f3925d0bd6854b7f40a5 100644 (file)
@@ -35,6 +35,7 @@
 #  define BOOST_NO_DECLTYPE
 #endif
 
+#define BOOST_NO_DECLTYPE_N3276
 #define BOOST_NO_DEFAULTED_FUNCTIONS
 
 #if !__has_feature(cxx_deleted_functions)
index c98c4751ebceec3102cff7f9282db872d912fa63..10333ad2d3a6e7b56566babea8c1b1dc8cfc57f9 100644 (file)
@@ -76,6 +76,7 @@
 #define BOOST_NO_CHAR32_T
 #define BOOST_NO_CONSTEXPR
 #define BOOST_NO_DECLTYPE
+#define BOOST_NO_DECLTYPE_N3276
 #define BOOST_NO_DEFAULTED_FUNCTIONS
 #define BOOST_NO_DELETED_FUNCTIONS
 #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
diff --git a/boost/boost/config/compiler/cray.hpp b/boost/boost/config/compiler/cray.hpp
new file mode 100644 (file)
index 0000000..ad2eeaf
--- /dev/null
@@ -0,0 +1,61 @@
+//  (C) Copyright John Maddock 2011.
+//  Use, modification and distribution are subject to 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)
+
+//  See http://www.boost.org for most recent version.
+
+//  Greenhills C compiler setup:
+
+#define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE)
+
+#if _RELEASE < 7
+#  error "Boost is not configured for Cray compilers prior to version 7, please try the configure script."
+#endif
+
+//
+// Check this is a recent EDG based compiler, otherwise we don't support it here:
+//
+#ifndef __EDG_VERSION__
+#  error "Unsupported Cray compiler, please try running the configure script."
+#endif
+
+#include "boost/config/compiler/common_edg.hpp"
+
+//
+// Cray peculiarities, probably version 7 specific:
+//
+#undef BOOST_NO_AUTO_DECLARATIONS
+#undef BOOST_NO_AUTO_MULTIDECLARATIONS
+#define BOOST_HAS_NRVO
+#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_UNICODE_LITERALS
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#define BOOST_HAS_NRVO
+#define BOOST_NO_TEMPLATE_ALIASES
+#define BOOST_NO_STATIC_ASSERT
+#define BOOST_NO_SFINAE_EXPR
+#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_RVALUE_REFERENCES
+#define BOOST_NO_RAW_LITERALS
+#define BOOST_NO_NULLPTR
+#define BOOST_NO_NOEXCEPT
+#define BOOST_NO_LAMBDAS
+#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_DELETED_FUNCTIONS
+#define BOOST_NO_DEFAULTED_FUNCTIONS
+#define BOOST_NO_DECLTYPE_N3276
+#define BOOST_NO_DECLTYPE
+#define BOOST_NO_CONSTEXPR
+#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+#define BOOST_NO_CHAR32_T
+#define BOOST_NO_CHAR16_T
+//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
+#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
+//#define BOOST_HAS_FPCLASSIFY
+
+#define BOOST_SP_USE_PTHREADS 
+#define BOOST_AC_USE_PTHREADS 
+
index 27d6b8e498e6103fc5adca9237de5a25ab2e5df0..ed92306fb1926217722e14417b8b4941eaa24dbe 100644 (file)
@@ -66,6 +66,7 @@
 #define BOOST_NO_CHAR32_T
 #define BOOST_NO_CONSTEXPR
 #define BOOST_NO_DECLTYPE
+#define BOOST_NO_DECLTYPE_N3276
 #define BOOST_NO_DEFAULTED_FUNCTIONS
 #define BOOST_NO_DELETED_FUNCTIONS
 #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
index 90db8c56df1938846b8b92182a1027bc03c90cdd..5a69cb4931e2f904951f997aa521f2687b2a4bfc 100644 (file)
 #define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
 #endif
 
+// C++0x features not supported at all yet
+//
+#define BOOST_NO_DECLTYPE_N3276
+
 #ifndef BOOST_COMPILER
 #  define BOOST_COMPILER "GNU C++ version " __VERSION__
 #endif
index 54a9ae1bc66c45ed138cfbfa53d1fe40d854af00..61dcedcc6fda99145970e5d05938910a508d899c 100644 (file)
@@ -31,6 +31,7 @@
 #  define BOOST_NO_NULLPTR
 #  define BOOST_NO_TEMPLATE_ALIASES
 #  define BOOST_NO_DECLTYPE
+#  define BOOST_NO_DECLTYPE_N3276
 #  define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
 #  define BOOST_NO_RVALUE_REFERENCES
 #  define BOOST_NO_STATIC_ASSERT
index cc0c0af5bc541f532a37a6c054be3bf72de68edd..0d73b287529f41c785c202b0da3582a1cc903ae0 100644 (file)
@@ -98,6 +98,7 @@
 #define BOOST_NO_CHAR32_T
 #define BOOST_NO_CONSTEXPR
 #define BOOST_NO_DECLTYPE
+#define BOOST_NO_DECLTYPE_N3276
 #define BOOST_NO_DEFAULTED_FUNCTIONS
 #define BOOST_NO_DELETED_FUNCTIONS
 #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
index faa080fc6bc4c8996204aa96de218516227d63dd..eb4d81404eb3b85bb0f6d9c770e83bc328dcbeff 100644 (file)
@@ -27,7 +27,7 @@
 #endif
 
 // Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x'
-#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && __STDC_HOSTED__) || defined(__GXX_EXPERIMENTAL_CPP0X__)
+#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__)
 #  define BOOST_INTEL_STDCXX0X
 #endif
 #if defined(_MSC_VER) && (_MSC_VER >= 1600)
@@ -179,8 +179,9 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
 // intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some 
 // cases when it should be value-initialized.
 // (Niels Dekker, LKEB, May 2010)
+// Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression).
 #if defined(__INTEL_COMPILER)
-#  if __INTEL_COMPILER <= 1110
+#  if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999)
 #    define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
 #  endif
 #endif
@@ -210,7 +211,7 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
 #endif
 
 #if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1200)
-#  undef  BOOST_NO_RVALUE_REFERENCES
+//#  undef  BOOST_NO_RVALUE_REFERENCES // Enabling this breaks Filesystem and Exception libraries
 //#  undef  BOOST_NO_SCOPED_ENUMS  // doesn't really work!!
 #  undef  BOOST_NO_DELETED_FUNCTIONS
 #  undef  BOOST_NO_DEFAULTED_FUNCTIONS
index fb0401fea4cb42e1c2ba9f54ec6ec25c6b70cc44..02baecddee7e91194c41b63555bab7da95635334 100644 (file)
@@ -98,6 +98,7 @@
 #define BOOST_NO_CHAR32_T
 #define BOOST_NO_CONSTEXPR
 #define BOOST_NO_DECLTYPE
+#define BOOST_NO_DECLTYPE_N3276
 #define BOOST_NO_DEFAULTED_FUNCTIONS
 #define BOOST_NO_DELETED_FUNCTIONS
 #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
index e372f093ceb7f43546d684ad8c0f488a9fe1baba..45e1aa45c6316a3c8871e02ae4694d21feff2936 100644 (file)
@@ -46,6 +46,7 @@
 #define BOOST_NO_CHAR32_T
 #define BOOST_NO_CONSTEXPR
 #define BOOST_NO_DECLTYPE
+#define BOOST_NO_DECLTYPE_N3276
 #define BOOST_NO_DEFAULTED_FUNCTIONS
 #define BOOST_NO_DELETED_FUNCTIONS
 #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
index 5f9444c477d01742b0594ea29be6b60b4a408e9e..94e44726f12152da8de5bd1c05e223fe0c5ed9fd 100644 (file)
@@ -52,6 +52,7 @@
 #  define BOOST_NO_DELETED_FUNCTIONS
 #  define BOOST_NO_DEFAULTED_FUNCTIONS
 #  define BOOST_NO_DECLTYPE
+#  define BOOST_NO_DECLTYPE_N3276
 #  define BOOST_NO_CONSTEXPR
 #  define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
 #  define BOOST_NO_CHAR32_T
index 3c803133448de9b7706b92a03f867013d815e023..6da0e0f4bf0db4615e1183d24b563e2cd7d9aa33 100644 (file)
@@ -53,6 +53,7 @@
 #define BOOST_NO_CHAR32_T
 #define BOOST_NO_CONSTEXPR
 #define BOOST_NO_DECLTYPE
+#define BOOST_NO_DECLTYPE_N3276
 #define BOOST_NO_DEFAULTED_FUNCTIONS
 #define BOOST_NO_DELETED_FUNCTIONS
 #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
index 206b53f0fd32215bde4e009d92b906f71f6c6a37..eaf6c741c7957e9c8ca4a67b4d5159e52490eb4f 100644 (file)
 #define BOOST_NO_CHAR32_T
 #define BOOST_NO_CONSTEXPR
 #define BOOST_NO_DECLTYPE
+#define BOOST_NO_DECLTYPE_N3276
 #define BOOST_NO_DEFAULTED_FUNCTIONS
 #define BOOST_NO_DELETED_FUNCTIONS
 #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
index 52500202b4829bbbbb80e7e8b5217ae0ef8b3650..b0407aab7109393eedfcb9ad88e82758202f0b83 100644 (file)
@@ -84,6 +84,7 @@
 #else
 #  define BOOST_HAS_DECLTYPE
 #endif
+#define BOOST_NO_DECLTYPE_N3276
 #define BOOST_NO_DEFAULTED_FUNCTIONS
 #define BOOST_NO_DELETED_FUNCTIONS
 #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
index d2dfa7ef0a274839e5bff2995e7c7fd02ebaca2d..b9c81757accb50d6287f3f4ee809e56daf6cb3ba 100644 (file)
 #define BOOST_NO_CHAR16_T
 #define BOOST_NO_CHAR32_T
 #define BOOST_NO_CONSTEXPR
+#define BOOST_NO_DECLTYPE_N3276
 #define BOOST_NO_DEFAULTED_FUNCTIONS
 #define BOOST_NO_DELETED_FUNCTIONS
 #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
diff --git a/boost/boost/config/platform/cray.hpp b/boost/boost/config/platform/cray.hpp
new file mode 100644 (file)
index 0000000..5c476e4
--- /dev/null
@@ -0,0 +1,18 @@
+//  (C) Copyright John Maddock 2011.
+//  Use, modification and distribution are subject to 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)
+
+
+//  See http://www.boost.org for most recent version.
+
+//  SGI Irix specific config options:
+
+#define BOOST_PLATFORM "Cray"
+
+// boilerplate code:
+#define BOOST_HAS_UNISTD_H
+#include <boost/config/posix_features.hpp>
+
+
+
index 72c3dcebdca0a78f53372f7bacac234ca4cff845..39220127b2499905a4d3793c5f136f280f7a90ac 100644 (file)
@@ -55,6 +55,8 @@
 
 #ifdef _WIN32_WCE
 #  define BOOST_NO_ANSI_APIS
+#else
+#  define BOOST_HAS_GETSYSTEMTIMEASFILETIME
 #endif
 
 #ifndef BOOST_HAS_PTHREADS
index 34a4da5889d90e8a39a61caeb259214e20eb33db..0d47b25424071bc164c05ba5b88e630e3e6d670a 100644 (file)
 // GCC-XML emulates other compilers, it has to appear first here!
 #   define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
 
+#elif defined(_CRAYC)
+// EDG based Cray compiler:
+#   define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp"
+
 #elif defined __CUDACC__
 //  NVIDIA CUDA C++ compiler for GPU
 #   define BOOST_COMPILER_CONFIG "boost/config/compiler/nvcc.hpp"
index bc1ffaf69f36c15055d78ccc3bacf3e70617d319..2af61d2d46b56f69aefadf398631873561622eda 100644 (file)
@@ -13,7 +13,7 @@
 // <header_name> in order to prevent macro expansion within the header
 // name (for example "linux" is a macro on linux systems).
 
-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) 
+#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC)
 // linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though?
 #  define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp"
 
 // Symbian: 
 #  define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp" 
 
+#elif defined(_CRAYC)
+// Cray:
+#  define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp" 
+
 #elif defined(__VMS) 
 // VMS:
 #  define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" 
index 30622872bc379696177be7c99cfc320a3b343005..7e5d4d4dd2938aacbdfe529dab87eaa773fdee0e 100644 (file)
 #define BOOST_HAS_VARIADIC_TMPL
 #endif
 
+//
+// Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined
+//
+#if !defined(BOOST_NO_DECLTYPE_N3276) && defined(BOOST_NO_DECLTYPE)
+#define BOOST_NO_DECLTYPE_N3276
+#endif
+
 //  BOOST_HAS_ABI_HEADERS
 //  This macro gets set if we have headers that fix the ABI,
 //  and prevent ODR violations when linking to external libraries:
index aa5756e0a5b83f77da042af5189c3947686f815b..cb36e35c36dffef9ba6c1b28a463eb38c560e683 100644 (file)
@@ -28,7 +28,7 @@ namespace detail
 inline void current_function_helper()
 {
 
-#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600))
+#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__)
 
 # define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__
 
@@ -65,3 +65,4 @@ inline void current_function_helper()
 } // namespace boost
 
 #endif // #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED
+
index 1a58935a7eeb962596ffa5783a3e7eb538899b01..5e4e04758871c73b50f93143115e52ba96dafbe0 100644 (file)
@@ -1,25 +1,84 @@
 
-// Copyright 2005-2008 Daniel James.
+// Copyright 2005-2011 Daniel James.
 // 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)
 
+// Note: if you change this include guard, you also need to change
+// container_fwd_compile_fail.cpp
 #if !defined(BOOST_DETAIL_CONTAINER_FWD_HPP)
 #define BOOST_DETAIL_CONTAINER_FWD_HPP
 
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+#if defined(_MSC_VER) && (_MSC_VER >= 1020) && \
+    !defined(BOOST_DETAIL_TEST_CONFIG_ONLY)
 # pragma once
 #endif
 
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
 
-#if defined(BOOST_DETAIL_NO_CONTAINER_FWD) \
-    || ((defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
-        && (defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL))) \
-    || BOOST_WORKAROUND(__BORLANDC__, > 0x551) \
-    || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x842)) \
-    || (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) \
-    || (defined(_LIBCPP_VERSION))
+////////////////////////////////////////////////////////////////////////////////
+//                                                                            //
+// Define BOOST_DETAIL_NO_CONTAINER_FWD if you don't want this header to      //
+// forward declare standard containers.                                       //
+//                                                                            //
+////////////////////////////////////////////////////////////////////////////////
+
+#if !defined(BOOST_DETAIL_NO_CONTAINER_FWD)
+#  if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
+     // STLport
+#    define BOOST_DETAIL_NO_CONTAINER_FWD
+#  elif defined(__LIBCOMO__)
+     // Comeau STL:
+#    define BOOST_DETAIL_NO_CONTAINER_FWD
+#  elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
+     // Rogue Wave library:
+#    define BOOST_DETAIL_NO_CONTAINER_FWD
+#  elif defined(_LIBCPP_VERSION)
+     // libc++
+#    define BOOST_DETAIL_NO_CONTAINER_FWD
+#  elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
+     // GNU libstdc++ 3
+#    if defined(_GLIBCXX_DEBUG) \
+        || defined(_GLIBCXX_PARALLEL) \
+        || defined(_GLIBCXX_PROFILE)
+#      define BOOST_DETAIL_NO_CONTAINER_FWD
+#    endif
+#  elif defined(__STL_CONFIG_H)
+     // generic SGI STL
+     //
+     // Forward declaration seems to be okay, but it has a couple of odd
+     // implementations.
+#    define BOOST_CONTAINER_FWD_BAD_BITSET
+#    if !defined(__STL_NON_TYPE_TMPL_PARAM_BUG)
+#      define BOOST_CONTAINER_FWD_BAD_DEQUE
+#     endif
+#  elif defined(__MSL_CPP__)
+     // MSL standard lib:
+#    define BOOST_DETAIL_NO_CONTAINER_FWD
+#  elif defined(__IBMCPP__)
+     // The default VACPP std lib, forward declaration seems to be fine.
+#  elif defined(MSIPL_COMPILE_H)
+     // Modena C++ standard library
+#    define BOOST_DETAIL_NO_CONTAINER_FWD
+#  elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
+     // Dinkumware Library (this has to appear after any possible replacement
+     // libraries)
+     //
+     // Works fine.
+#  else
+#    define BOOST_DETAIL_NO_CONTAINER_FWD
+#  endif
+#endif
+
+// BOOST_DETAIL_TEST_* macros are for testing only
+// and shouldn't be relied upon. But you can use
+// BOOST_DETAIL_NO_CONTAINER_FWD to prevent forward
+// declaration of containers.
+
+#if !defined(BOOST_DETAIL_TEST_CONFIG_ONLY)
+
+#if defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \
+    !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)
 
 #include <deque>
 #include <list>
 
 #include <cstddef>
 
-#if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) && \
-        defined(__STL_CONFIG_H)
-
-#define BOOST_CONTAINER_FWD_BAD_BITSET
-
-#if !defined(__STL_NON_TYPE_TMPL_PARAM_BUG)
-#define BOOST_CONTAINER_FWD_BAD_DEQUE
-#endif
-
-#endif
-
 #if defined(BOOST_CONTAINER_FWD_BAD_DEQUE)
 #include <deque>
 #endif
@@ -74,11 +122,7 @@ namespace std
     #else
         template <class T> class complex;
     #endif
-}
 
-// gcc 3.4 and greater
-namespace std
-{
 #if !defined(BOOST_CONTAINER_FWD_BAD_DEQUE)
     template <class T, class Allocator> class deque;
 #endif
@@ -101,6 +145,9 @@ namespace std
 #pragma warning(pop)
 #endif
 
-#endif
+#endif // BOOST_DETAIL_NO_CONTAINER_FWD &&
+       // !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD)
+
+#endif // BOOST_DETAIL_TEST_CONFIG_ONLY
 
 #endif
diff --git a/boost/boost/detail/fenv.hpp b/boost/boost/detail/fenv.hpp
new file mode 100644 (file)
index 0000000..1ba8833
--- /dev/null
@@ -0,0 +1,73 @@
+/*=============================================================================
+    Copyright (c) 2010      Bryce Lelbach
+
+    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)
+=============================================================================*/
+
+#include <boost/config.hpp>
+
+#if defined(BOOST_NO_FENV_H)
+  #error This platform does not have a floating point environment
+#endif
+
+#if !defined(BOOST_DETAIL_FENV_HPP)
+#define BOOST_DETAIL_FENV_HPP
+
+/* If we're using clang + glibc, we have to get hacky. 
+ * See http://llvm.org/bugs/show_bug.cgi?id=6907 */
+#if defined(__clang__)       &&                       \
+    defined(__GNU_LIBRARY__) && /* up to version 5 */ \
+    defined(__GLIBC__)          /* version 6 + */
+  #define _FENV_H
+
+  #include <features.h>
+  #include <bits/fenv.h>
+
+  extern "C" {
+    extern int fegetexceptflag (fexcept_t*, int) __THROW;
+    extern int fesetexceptflag (__const fexcept_t*, int) __THROW;
+    extern int feclearexcept (int) __THROW;
+    extern int feraiseexcept (int) __THROW;
+    extern int fetestexcept (int) __THROW;
+    extern int fegetround (void) __THROW;
+    extern int fesetround (int) __THROW;
+    extern int fegetenv (fenv_t*) __THROW;
+    extern int fesetenv (__const fenv_t*) __THROW;
+    extern int feupdateenv (__const fenv_t*) __THROW;
+    extern int feholdexcept (fenv_t*) __THROW;
+
+    #ifdef __USE_GNU
+      extern int feenableexcept (int) __THROW;
+      extern int fedisableexcept (int) __THROW;
+      extern int fegetexcept (void) __THROW;
+    #endif
+  }
+
+  namespace std { namespace tr1 {
+    using ::fenv_t;
+    using ::fexcept_t;
+    using ::fegetexceptflag;
+    using ::fesetexceptflag;
+    using ::feclearexcept;
+    using ::feraiseexcept;
+    using ::fetestexcept;
+    using ::fegetround;
+    using ::fesetround;
+    using ::fegetenv;
+    using ::fesetenv;
+    using ::feupdateenv;
+    using ::feholdexcept;
+  } }
+
+#else /* if we're not using GNU's C stdlib, fenv.h should work with clang */
+  #if defined(__SUNPRO_CC) /* lol suncc */
+    #include <stdio.h>
+  #endif
+  
+  #include <fenv.h>
+
+#endif
+
+#endif /* BOOST_DETAIL_FENV_HPP */
index 3514e28821fe0c49ef445353f0c01f76ab50566c..bf139a0957bb703151cb61e018593ba8bf323f9f 100644 (file)
@@ -858,7 +858,7 @@ namespace boost {
 #else
   private:
     struct dummy {
-      void nonnull() {};
+      void nonnull() {}
     };
 
     typedef void (dummy::*safe_bool)();
index 774d0588756ac51fcf48f5a33e626c7fc8c879ac..aec1028087e486ef490d67be5cccdb70d70bc2f4 100644 (file)
@@ -5,7 +5,7 @@
  * accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * $Id: integer_traits.hpp 72951 2011-07-07 04:57:37Z steven_watanabe $
+ * $Id: integer_traits.hpp 75471 2011-11-13 06:10:55Z jewillco $
  *
  * Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers
  */
index ddd739809368798982688d20c7191cb70010ccf8..00044617316c837a5e32eff5a78cfd990d994fa2 100644 (file)
@@ -1,6 +1,12 @@
 #ifndef BOOST_LEXICAL_CAST_INCLUDED
 #define BOOST_LEXICAL_CAST_INCLUDED
 
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
 // Boost lexical_cast.hpp header  -------------------------------------------//
 //
 // See http://www.boost.org/libs/conversion for documentation.
@@ -18,6 +24,8 @@
 #include <cstddef>
 #include <istream>
 #include <string>
+#include <cstring>
+#include <cstdio>
 #include <typeinfo>
 #include <exception>
 #include <cmath>
 #include <boost/type_traits/is_pointer.hpp>
 #include <boost/type_traits/is_integral.hpp>
 #include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
 #include <boost/numeric/conversion/cast.hpp>
 #include <boost/type_traits/ice.hpp>
 #include <boost/type_traits/make_unsigned.hpp>
 #include <boost/type_traits/is_signed.hpp>
-#include <boost/call_traits.hpp>
+#include <boost/math/special_functions/sign.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/detail/lcast_precision.hpp>
 #include <boost/detail/workaround.hpp>
+#include <cwchar>
+
 
 #ifndef BOOST_NO_STD_LOCALE
-#include <locale>
+#   include <locale>
+#else
+#   ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+#       warning "Unable to use <locale> header. boost::lexical_cast will use the 'C' locale."
+#       define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+#   endif
 #endif
 
 #ifdef BOOST_NO_STRINGSTREAM
@@ -116,60 +133,102 @@ namespace boost
 
     namespace detail // selectors for choosing stream character type
     {
-        template<typename Type>
-        struct stream_char
-        {
-            typedef char type;
-        };
+    template<typename Type>
+    struct stream_char
+    {
+        typedef char type;
+    };
 
 #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-        template<class CharT, class Traits, class Alloc>
-        struct stream_char< std::basic_string<CharT,Traits,Alloc> >
-        {
-            typedef CharT type;
-        };
+    template<class CharT, class Traits, class Alloc>
+    struct stream_char< std::basic_string<CharT,Traits,Alloc> >
+    {
+        typedef CharT type;
+    };
 #endif
 
 #ifndef BOOST_LCAST_NO_WCHAR_T
 #ifndef BOOST_NO_INTRINSIC_WCHAR_T
-        template<>
-        struct stream_char<wchar_t>
-        {
-            typedef wchar_t type;
-        };
+    template<>
+    struct stream_char<wchar_t>
+    {
+        typedef wchar_t type;
+    };
 #endif
 
-        template<>
-        struct stream_char<wchar_t *>
-        {
-            typedef wchar_t type;
-        };
+    template<>
+    struct stream_char<wchar_t *>
+    {
+        typedef wchar_t type;
+    };
 
-        template<>
-        struct stream_char<const wchar_t *>
-        {
-            typedef wchar_t type;
-        };
+    template<>
+    struct stream_char<const wchar_t *>
+    {
+        typedef wchar_t type;
+    };
 
 #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-        template<>
-        struct stream_char<std::wstring>
-        {
-            typedef wchar_t type;
-        };
+    template<>
+    struct stream_char<std::wstring>
+    {
+        typedef wchar_t type;
+    };
+#endif
+#endif
+
+
+#ifndef BOOST_NO_CHAR16_T
+
+    template<>
+    struct stream_char<char16_t>
+    {
+        typedef char16_t type;
+    };
+
+    template<>
+    struct stream_char<char16_t *>
+    {
+        typedef char16_t type;
+    };
+
+    template<>
+    struct stream_char<const char16_t *>
+    {
+        typedef char16_t type;
+    };
+
 #endif
+
+#ifndef BOOST_NO_CHAR32_T
+
+    template<>
+    struct stream_char<char32_t>
+    {
+        typedef char32_t type;
+    };
+
+    template<>
+    struct stream_char<char32_t *>
+    {
+        typedef char32_t type;
+    };
+
+    template<>
+    struct stream_char<const char32_t *>
+    {
+        typedef char32_t type;
+    };
+
 #endif
 
         template<typename TargetChar, typename SourceChar>
         struct widest_char
         {
-            typedef TargetChar type;
-        };
-
-        template<>
-        struct widest_char<char, wchar_t>
-        {
-            typedef wchar_t type;
+            typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
+                (sizeof(TargetChar) > sizeof(SourceChar))
+                , TargetChar
+                , SourceChar >::type type;
         };
     }
 
@@ -214,156 +273,16 @@ namespace boost
     namespace detail // lcast_src_length
     {
         // Return max. length of string representation of Source;
-        // 0 if unlimited (with exceptions for some types, see below).
-        // Values with limited string representation are placed to
-        // the buffer locally defined in lexical_cast function.
-        // 1 is returned for few types such as CharT const* or
-        // std::basic_string<CharT> that already have an internal
-        // buffer ready to be reused by lexical_stream_limited_src.
-        // Each specialization should have a correspondent operator<<
-        // defined in lexical_stream_limited_src.
-        template< class CharT  // A result of widest_char transformation.
-                , class Source // Source type of lexical_cast.
+        template< class Source // Source type of lexical_cast.
                 >
         struct lcast_src_length
         {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 0);
+            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
             // To check coverage, build the test with
             // bjam --v2 profile optimization=off
             static void check_coverage() {}
         };
 
-        template<>
-        struct lcast_src_length<char, bool>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-
-        template<>
-        struct lcast_src_length<char, char>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-
-        template<>
-        struct lcast_src_length<char, signed char>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-        template<>
-        struct lcast_src_length<char, unsigned char>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-        template<>
-        struct lcast_src_length<char, signed char*>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-        template<>
-        struct lcast_src_length<char, unsigned char*>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-        template<>
-        struct lcast_src_length<char, signed char const*>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-        template<>
-        struct lcast_src_length<char, unsigned char const*>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-
-#ifndef BOOST_LCAST_NO_WCHAR_T
-        template<>
-        struct lcast_src_length<wchar_t, bool>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-
-        template<>
-        struct lcast_src_length<wchar_t, char>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-
-#ifndef BOOST_NO_INTRINSIC_WCHAR_T
-        template<>
-        struct lcast_src_length<wchar_t, wchar_t>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-#endif
-#endif
-
-        template<>
-        struct lcast_src_length<char, char const*>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-
-        template<>
-        struct lcast_src_length<char, char*>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-
-#ifndef BOOST_LCAST_NO_WCHAR_T
-        template<>
-        struct lcast_src_length<wchar_t, wchar_t const*>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-
-        template<>
-        struct lcast_src_length<wchar_t, wchar_t*>
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-#endif
-
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-        template<class CharT, class Traits, class Alloc>
-        struct lcast_src_length< CharT, std::basic_string<CharT,Traits,Alloc> >
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-#else
-        template<>
-        struct lcast_src_length< char, std::basic_string<char> >
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-
-#ifndef BOOST_LCAST_NO_WCHAR_T
-        template<>
-        struct lcast_src_length< wchar_t, std::basic_string<wchar_t> >
-        {
-            BOOST_STATIC_CONSTANT(std::size_t, value = 1);
-            static void check_coverage() {}
-        };
-#endif
-#endif
-
         // Helper for integral types.
         // Notes on length calculation:
         // Max length for 32bit int with grouping "\1" and thousands_sep ',':
@@ -383,7 +302,7 @@ namespace boost
 #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
             BOOST_STATIC_CONSTANT(std::size_t, value =
                   std::numeric_limits<Source>::is_signed +
-                  std::numeric_limits<Source>::is_specialized + // == 1
+                  std::numeric_limits<Source>::is_specialized + /* == 1 */
                   std::numeric_limits<Source>::digits10 * 2
               );
 #else
@@ -391,20 +310,12 @@ namespace boost
             BOOST_STATIC_ASSERT(sizeof(Source) * CHAR_BIT <= 256);
 #endif
         };
-
-#define BOOST_LCAST_DEF1(CharT, T)               \
-    template<> struct lcast_src_length<CharT, T> \
+// TODO: FIX for char16_t, char32_t, we can ignore CharT
+#define BOOST_LCAST_DEF(T)               \
+    template<> struct lcast_src_length<T> \
         : lcast_src_length_integral<T>           \
     { static void check_coverage() {} };
 
-#ifdef BOOST_LCAST_NO_WCHAR_T
-#define BOOST_LCAST_DEF(T) BOOST_LCAST_DEF1(char, T)
-#else
-#define BOOST_LCAST_DEF(T)          \
-        BOOST_LCAST_DEF1(char, T)   \
-        BOOST_LCAST_DEF1(wchar_t, T)
-#endif
-
         BOOST_LCAST_DEF(short)
         BOOST_LCAST_DEF(unsigned short)
         BOOST_LCAST_DEF(int)
@@ -420,7 +331,6 @@ namespace boost
 #endif
 
 #undef BOOST_LCAST_DEF
-#undef BOOST_LCAST_DEF1
 
 #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
         // Helper for floating point types.
@@ -446,49 +356,26 @@ namespace boost
         };
 
         template<>
-        struct lcast_src_length<char,float>
+        struct lcast_src_length<float>
           : lcast_src_length_floating<float>
         {
             static void check_coverage() {}
         };
 
         template<>
-        struct lcast_src_length<char,double>
+        struct lcast_src_length<double>
           : lcast_src_length_floating<double>
         {
             static void check_coverage() {}
         };
 
         template<>
-        struct lcast_src_length<char,long double>
+        struct lcast_src_length<long double>
           : lcast_src_length_floating<long double>
         {
             static void check_coverage() {}
         };
 
-#ifndef BOOST_LCAST_NO_WCHAR_T
-    template<>
-    struct lcast_src_length<wchar_t,float>
-      : lcast_src_length_floating<float>
-    {
-        static void check_coverage() {}
-    };
-
-    template<>
-    struct lcast_src_length<wchar_t,double>
-      : lcast_src_length_floating<double>
-    {
-        static void check_coverage() {}
-    };
-
-    template<>
-    struct lcast_src_length<wchar_t,long double>
-      : lcast_src_length_floating<long double>
-    {
-        static void check_coverage() {}
-    };
-
-#endif // #ifndef BOOST_LCAST_NO_WCHAR_T
 #endif // #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
     }
 
@@ -502,6 +389,9 @@ namespace boost
             BOOST_STATIC_CONSTANT(char, zero  = '0');
             BOOST_STATIC_CONSTANT(char, minus = '-');
             BOOST_STATIC_CONSTANT(char, plus = '+');
+            BOOST_STATIC_CONSTANT(char, lowercase_e = 'e');
+            BOOST_STATIC_CONSTANT(char, capital_e = 'E');
+            BOOST_STATIC_CONSTANT(char, c_decimal_separator = '.');
         };
 
 #ifndef BOOST_LCAST_NO_WCHAR_T
@@ -511,15 +401,37 @@ namespace boost
             BOOST_STATIC_CONSTANT(wchar_t, zero  = L'0');
             BOOST_STATIC_CONSTANT(wchar_t, minus = L'-');
             BOOST_STATIC_CONSTANT(wchar_t, plus = L'+');
+            BOOST_STATIC_CONSTANT(wchar_t, lowercase_e = L'e');
+            BOOST_STATIC_CONSTANT(wchar_t, capital_e = L'E');
+            BOOST_STATIC_CONSTANT(wchar_t, c_decimal_separator = L'.');
         };
 #endif
-    }
 
-    namespace detail // lexical_streambuf_fake
-    {
-        struct lexical_streambuf_fake
+#ifndef BOOST_NO_CHAR16_T
+        template<>
+        struct lcast_char_constants<char16_t>
+        {
+            BOOST_STATIC_CONSTANT(char16_t, zero  = u'0');
+            BOOST_STATIC_CONSTANT(char16_t, minus = u'-');
+            BOOST_STATIC_CONSTANT(char16_t, plus = u'+');
+            BOOST_STATIC_CONSTANT(char16_t, lowercase_e = u'e');
+            BOOST_STATIC_CONSTANT(char16_t, capital_e = u'E');
+            BOOST_STATIC_CONSTANT(char16_t, c_decimal_separator = u'.');
+        };
+#endif
+
+#ifndef BOOST_NO_CHAR32_T
+        template<>
+        struct lcast_char_constants<char32_t>
         {
+            BOOST_STATIC_CONSTANT(char32_t, zero  = U'0');
+            BOOST_STATIC_CONSTANT(char32_t, minus = U'-');
+            BOOST_STATIC_CONSTANT(char32_t, plus = U'+');
+            BOOST_STATIC_CONSTANT(char32_t, lowercase_e = U'e');
+            BOOST_STATIC_CONSTANT(char32_t, capital_e = U'E');
+            BOOST_STATIC_CONSTANT(char32_t, c_decimal_separator = U'.');
         };
+#endif
     }
 
     namespace detail // lcast_to_unsigned
@@ -549,7 +461,7 @@ namespace boost
     namespace detail // lcast_put_unsigned
     {
         template<class Traits, class T, class CharT>
-        CharT* lcast_put_unsigned(T n, CharT* finish)
+        CharT* lcast_put_unsigned(const T n_param, CharT* finish)
         {
 #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
             BOOST_STATIC_ASSERT(!std::numeric_limits<T>::is_signed);
@@ -558,52 +470,58 @@ namespace boost
             typedef typename Traits::int_type int_type;
             CharT const czero = lcast_char_constants<CharT>::zero;
             int_type const zero = Traits::to_int_type(czero);
+            BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
+                    (sizeof(int_type) > sizeof(T))
+                    , int_type
+                    , T
+            >::type n = n_param;
 
 #ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
-            // TODO: use BOOST_NO_STD_LOCALE
             std::locale loc;
-            typedef std::numpunct<CharT> numpunct;
-            numpunct const& np = BOOST_USE_FACET(numpunct, loc);
-            std::string const& grouping = np.grouping();
-            std::string::size_type const grouping_size = grouping.size();
+            if (loc != std::locale::classic()) {
+                typedef std::numpunct<CharT> numpunct;
+                numpunct const& np = BOOST_USE_FACET(numpunct, loc);
+                std::string const grouping = np.grouping();
+                std::string::size_type const grouping_size = grouping.size();
 
-            if ( grouping_size && grouping[0] > 0 )
-            {
+                if ( grouping_size && grouping[0] > 0 )
+                {
 
 #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-            // Check that ulimited group is unreachable:
-            BOOST_STATIC_ASSERT(std::numeric_limits<T>::digits10 < CHAR_MAX);
+                // Check that ulimited group is unreachable:
+                BOOST_STATIC_ASSERT(std::numeric_limits<T>::digits10 < CHAR_MAX);
 #endif
-                CharT thousands_sep = np.thousands_sep();
-                std::string::size_type group = 0; // current group number
-                char last_grp_size = grouping[0];
-                char left = last_grp_size;
+                    CharT thousands_sep = np.thousands_sep();
+                    std::string::size_type group = 0; // current group number
+                    char last_grp_size = grouping[0];
+                    char left = last_grp_size;
 
-                do
-                {
-                    if(left == 0)
+                    do
                     {
-                        ++group;
-                        if(group < grouping_size)
+                        if(left == 0)
                         {
-                            char const grp_size = grouping[group];
-                            last_grp_size = grp_size <= 0 ? CHAR_MAX : grp_size;
+                            ++group;
+                            if(group < grouping_size)
+                            {
+                                char const grp_size = grouping[group];
+                                last_grp_size = grp_size <= 0 ? CHAR_MAX : grp_size;
+                            }
+
+                            left = last_grp_size;
+                            --finish;
+                            Traits::assign(*finish, thousands_sep);
                         }
 
-                        left = last_grp_size;
-                        --finish;
-                        Traits::assign(*finish, thousands_sep);
-                    }
-
-                    --left;
-
-                    --finish;
-                    int_type const digit = static_cast<int_type>(n % 10U);
-                    Traits::assign(*finish, Traits::to_char_type(zero + digit));
-                    n /= 10;
-                } while(n);
+                        --left;
 
-            } else
+                        --finish;
+                        int_type const digit = static_cast<int_type>(n % 10U);
+                        Traits::assign(*finish, Traits::to_char_type(zero + digit));
+                        n /= 10;
+                    } while(n);
+                    return finish;
+                }
+            }
 #endif
             {
                 do
@@ -639,63 +557,64 @@ namespace boost
             T multiplier = 1;
 
 #ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
-            // TODO: use BOOST_NO_STD_LOCALE
             std::locale loc;
-            typedef std::numpunct<CharT> numpunct;
-            numpunct const& np = BOOST_USE_FACET(numpunct, loc);
-            std::string const& grouping = np.grouping();
-            std::string::size_type const grouping_size = grouping.size();
-
-            /* According to [22.2.2.1.2] of Programming languages - C++
-             * we MUST check for correct grouping
-             */
-            if (grouping_size && grouping[0] > 0)
-            {
-                unsigned char current_grouping = 0;
-                CharT const thousands_sep = np.thousands_sep();
-                char remained = grouping[current_grouping] - 1;
-                bool shall_we_return = true;
-
-                for(;end>=begin; --end)
+            if (loc != std::locale::classic()) {
+                typedef std::numpunct<CharT> numpunct;
+                numpunct const& np = BOOST_USE_FACET(numpunct, loc);
+                std::string const& grouping = np.grouping();
+                std::string::size_type const grouping_size = grouping.size();
+
+                /* According to Programming languages - C++
+                 * we MUST check for correct grouping
+                 */
+                if (grouping_size && grouping[0] > 0)
                 {
-                    if (remained) {
-                        T const new_sub_value = multiplier * 10 * (*end - czero);
+                    unsigned char current_grouping = 0;
+                    CharT const thousands_sep = np.thousands_sep();
+                    char remained = grouping[current_grouping] - 1;
+                    bool shall_we_return = true;
 
-                        if (*end < czero || *end >= czero + 10
-                                /* detecting overflow */
-                                || new_sub_value/10 != multiplier * (*end - czero)
-                                || static_cast<T>((std::numeric_limits<T>::max)()-new_sub_value) < value
-                                )
-                            return false;
-
-                        value += new_sub_value;
-                        multiplier *= 10;
-                        --remained;
-                    } else {
-                        if ( !Traits::eq(*end, thousands_sep) ) //|| begin == end ) return false;
-                        {
-                            /*
-                             * According to Programming languages - C++
-                             * Digit grouping is checked. That is, the positions of discarded
-                             * separators is examined for consistency with
-                             * use_facet<numpunct<charT> >(loc ).grouping()
-                             *
-                             * BUT what if there is no separators at all and grouping()
-                             * is not empty? Well, we have no extraced separators, so we
-                             * won`t check them for consistency. This will allow us to
-                             * work with "C" locale from other locales
-                             */
-                            shall_we_return = false;
-                            break;
+                    for(;end>=begin; --end)
+                    {
+                        if (remained) {
+                            T const new_sub_value = multiplier * 10 * (*end - czero);
+
+                            if (*end < czero || *end >= czero + 10
+                                    /* detecting overflow */
+                                    || new_sub_value/10 != multiplier * (*end - czero)
+                                    || static_cast<T>((std::numeric_limits<T>::max)()-new_sub_value) < value
+                                    )
+                                return false;
+
+                            value += new_sub_value;
+                            multiplier *= 10;
+                            --remained;
                         } else {
-                            if ( begin == end ) return false;
-                            if (current_grouping < grouping_size-1 ) ++current_grouping;
-                            remained = grouping[current_grouping];
+                            if ( !Traits::eq(*end, thousands_sep) ) //|| begin == end ) return false;
+                            {
+                                /*
+                                 * According to Programming languages - C++
+                                 * Digit grouping is checked. That is, the positions of discarded
+                                 * separators is examined for consistency with
+                                 * use_facet<numpunct<charT> >(loc ).grouping()
+                                 *
+                                 * BUT what if there is no separators at all and grouping()
+                                 * is not empty? Well, we have no extraced separators, so we
+                                 * won`t check them for consistency. This will allow us to
+                                 * work with "C" locale from other locales
+                                 */
+                                shall_we_return = false;
+                                break;
+                            } else {
+                                if ( begin == end ) return false;
+                                if (current_grouping < grouping_size-1 ) ++current_grouping;
+                                remained = grouping[current_grouping];
+                            }
                         }
                     }
-                }
 
-                if (shall_we_return) return true;
+                    if (shall_we_return) return true;
+                }
             }
 #endif
             {
@@ -719,158 +638,617 @@ namespace boost
         }
     }
 
-    namespace detail // stream wrapper for handling lexical conversions
+    namespace detail
     {
-        template<typename Target, typename Source, typename Traits>
-        class lexical_stream
-        {
-        private:
-            typedef typename widest_char<
-                typename stream_char<Target>::type,
-                typename stream_char<Source>::type>::type char_type;
-
-            typedef Traits traits_type;
-
-        public:
-            lexical_stream(char_type* = 0, char_type* = 0)
+        /* Returns true and sets the correct value if found NaN or Inf. */
+        template <class CharT, class T>
+        inline bool parse_inf_nan_impl(const CharT* begin, const CharT* end, T& value
+            , const CharT* lc_NAN, const CharT* lc_nan
+            , const CharT* lc_INFINITY, const CharT* lc_infinity
+            , const CharT opening_brace, const CharT closing_brace)
+        {
+            using namespace std;
+            const wchar_t minus = lcast_char_constants<wchar_t>::minus;
+            const wchar_t plus = lcast_char_constants<wchar_t>::plus;
+            const int inifinity_size = 8;
+
+            bool has_minus = false;
+            /* Parsing +/- */
+            if( *begin == minus)
             {
-                stream.unsetf(std::ios::skipws);
-                lcast_set_precision(stream, static_cast<Source*>(0), static_cast<Target*>(0) );
+                ++ begin;
+                has_minus = true;
             }
-            ~lexical_stream()
-            {
-                #if defined(BOOST_NO_STRINGSTREAM)
-                stream.freeze(false);
-                #endif
-            }
-            bool operator<<(const Source &input)
+            else if( *begin == plus ) ++begin;
+
+            if( end-begin < 3 ) return false;
+            if( !memcmp(begin, lc_nan, 3*sizeof(CharT)) || !memcmp(begin, lc_NAN, 3*sizeof(CharT)) )
             {
-                return !(stream << input).fail();
-            }
-            template<typename InputStreamable>
-            bool operator>>(InputStreamable &output)
+                begin += 3;
+                if (end != begin) /* It is 'nan(...)' or some bad input*/
+                {
+                    if(end-begin<2) return false; // bad input
+                    -- end;
+                    if( *begin != opening_brace || *end != closing_brace) return false; // bad input
+                }
+
+                if( !has_minus ) value = std::numeric_limits<T>::quiet_NaN();
+                else value = (boost::math::changesign) (std::numeric_limits<T>::quiet_NaN());
+                return true;
+            } else
+            if (( /* 'INF' or 'inf' */
+                  end-begin==3
+                  &&
+                  (!memcmp(begin, lc_infinity, 3*sizeof(CharT)) || !memcmp(begin, lc_INFINITY, 3*sizeof(CharT)))
+                )
+                ||
+                ( /* 'INFINITY' or 'infinity' */
+                  end-begin==inifinity_size
+                  &&
+                  (!memcmp(begin, lc_infinity, inifinity_size)|| !memcmp(begin, lc_INFINITY, inifinity_size))
+                )
+             )
             {
-                return !is_pointer<InputStreamable>::value &&
-                       stream >> output &&
-                       stream.get() ==
-#if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING)
-// GCC 2.9x lacks std::char_traits<>::eof().
-// We use BOOST_NO_STD_WSTRING to filter out STLport and libstdc++-v3
-// configurations, which do provide std::char_traits<>::eof().
-    
-                           EOF;
-#else
-                           traits_type::eof();
-#endif
+                if( !has_minus ) value = std::numeric_limits<T>::infinity();
+                else value = (boost::math::changesign) (std::numeric_limits<T>::infinity());
+                return true;
             }
 
-#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+            return false;
+        }
 
-            bool operator>>(std::string &output)
+#ifndef BOOST_LCAST_NO_WCHAR_T
+        template <class T>
+        bool parse_inf_nan(const wchar_t* begin, const wchar_t* end, T& value)
+        {
+            return parse_inf_nan_impl(begin, end, value
+                               , L"NAN", L"nan"
+                               , L"INFINITY", L"infinity"
+                               , L'(', L')');
+        }
+#endif
+
+        template <class CharT, class T>
+        bool parse_inf_nan(const CharT* begin, const CharT* end, T& value)
+        {
+            return parse_inf_nan_impl(begin, end, value
+                               , "NAN", "nan"
+                               , "INFINITY", "infinity"
+                               , '(', ')');
+        }
+#ifndef BOOST_LCAST_NO_WCHAR_T
+        template <class T>
+        bool put_inf_nan(wchar_t* begin, wchar_t*& end, const T& value)
+        {
+            using namespace std;
+            if ( (boost::math::isnan)(value) )
             {
-                #if defined(BOOST_NO_STRINGSTREAM)
-                stream << '\0';
-                #endif
-                stream.str().swap(output);
+                if ( (boost::math::signbit)(value) )
+                {
+                    memcpy(begin,L"-nan", sizeof(L"-nan"));
+                    end = begin + 4;
+                } else
+                {
+                    memcpy(begin,L"nan", sizeof(L"nan"));
+                    end = begin + 3;
+                }
                 return true;
-            }
-            #ifndef BOOST_LCAST_NO_WCHAR_T
-            bool operator>>(std::wstring &output)
+            } else if ( (boost::math::isinf)(value) )
             {
-                stream.str().swap(output);
+                if ( (boost::math::signbit)(value) )
+                {
+                    memcpy(begin,L"-inf", sizeof(L"-inf"));
+                    end = begin + 4;
+                } else
+                {
+                    memcpy(begin,L"inf", sizeof(L"inf"));
+                    end = begin + 3;
+                }
                 return true;
             }
-            #endif
 
-#else
-            bool operator>>(std::basic_string<char_type,traits_type>& output)
+            return false;
+        }
+#endif
+        template <class CharT, class T>
+        bool put_inf_nan(CharT* begin, CharT*& end, const T& value)
+        {
+            using namespace std;
+            if ( (boost::math::isnan)(value) )
             {
-                stream.str().swap(output);
+                if ( (boost::math::signbit)(value) )
+                {
+                    memcpy(begin,"-nan", sizeof("-nan"));
+                    end = begin + 4;
+                } else
+                {
+                    memcpy(begin,"nan", sizeof("nan"));
+                    end = begin + 3;
+                }
+                return true;
+            } else if ( (boost::math::isinf)(value) )
+            {
+                if ( (boost::math::signbit)(value) )
+                {
+                    memcpy(begin,"-inf", sizeof("-inf"));
+                    end = begin + 4;
+                } else
+                {
+                    memcpy(begin,"inf", sizeof("inf"));
+                    end = begin + 3;
+                }
                 return true;
             }
 
-            template<class Alloc>
-            bool operator>>(std::basic_string<char_type,traits_type,Alloc>& out)
+            return false;
+        }
+
+    }
+
+
+    namespace detail // lcast_ret_float
+    {
+        template <class T>
+        struct mantissa_holder_type
+        {
+            /* Can not be used with this type */
+        };
+
+        template <>
+        struct mantissa_holder_type<float>
+        {
+            typedef unsigned int type;
+        };
+
+        template <>
+        struct mantissa_holder_type<double>
+        {
+#if defined(BOOST_HAS_LONG_LONG)
+            typedef boost::ulong_long_type type;
+#elif defined(BOOST_HAS_MS_INT64)
+            typedef unsigned __int64 type;
+#endif
+        };
+
+        template<class Traits, class T, class CharT>
+        inline bool lcast_ret_float(T& value, const CharT* begin, const CharT* end)
+        {
+
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+            std::locale loc;
+            typedef std::numpunct<CharT> numpunct;
+            numpunct const& np = BOOST_USE_FACET(numpunct, loc);
+            std::string const grouping(
+                    (loc == std::locale::classic())
+                    ? std::string()
+                    : np.grouping()
+            );
+            std::string::size_type const grouping_size = grouping.size();
+            CharT const thousands_sep = grouping_size ? np.thousands_sep() : 0;
+            CharT const decimal_point = np.decimal_point();
+            bool found_grouping = false;
+            unsigned int last_grouping_pos = grouping_size - 1;
+#else
+            CharT const decimal_point = lcast_char_constants<CharT>::c_decimal_separator;
+#endif
+
+            CharT const czero = lcast_char_constants<CharT>::zero;
+            CharT const minus = lcast_char_constants<CharT>::minus;
+            CharT const plus = lcast_char_constants<CharT>::plus;
+            CharT const capital_e = lcast_char_constants<CharT>::capital_e;
+            CharT const lowercase_e = lcast_char_constants<CharT>::lowercase_e;
+
+            value = 0.0;
+
+            if (parse_inf_nan(begin, end, value)) return true;
+
+            typedef typename Traits::int_type int_type;
+            typedef BOOST_DEDUCED_TYPENAME mantissa_holder_type<T>::type mantissa_type;
+            int_type const zero = Traits::to_int_type(czero);
+            if (begin == end) return false;
+
+            /* Getting the plus/minus sign */
+            bool has_minus = false;
+            if ( *begin == minus ) {
+                ++ begin;
+                has_minus = true;
+                if (begin == end) return false;
+            } else if ( *begin == plus ) {
+                ++begin;
+                if (begin == end) return false;
+            }
+
+            bool found_decimal = false;
+            bool found_number_before_exp = false;
+            int pow_of_10 = 0;
+            mantissa_type mantissa=0;
+            bool is_mantissa_full = false;
+
+            char length_since_last_delim = 0;
+
+            while ( begin != end )
             {
-                std::basic_string<char_type,traits_type> str(stream.str());
-                out.assign(str.begin(), str.end());
-                return true;
+                if (found_decimal) {
+                    /* We allow no thousand_separators after decimal point */
+
+                    mantissa_type tmp_mantissa = mantissa * 10u;
+                    if ( *begin == lowercase_e || *begin == capital_e ) break;
+                    if ( *begin < czero || *begin >= czero + 10 ) return false;
+                    if (    is_mantissa_full
+                            || tmp_mantissa / 10u != mantissa
+                            || (std::numeric_limits<mantissa_type>::max)()-(*begin - zero) < tmp_mantissa
+                            ) {
+                        is_mantissa_full = true;
+                        ++ begin;
+                        continue;
+                    }
+
+                    -- pow_of_10;
+                    mantissa = tmp_mantissa;
+                    mantissa += *begin - zero;
+
+                    found_number_before_exp = true;
+                } else {
+
+                    if (*begin >= czero && *begin < czero + 10) {
+
+                        /* Checking for mantissa overflow. If overflow will
+                         * occur, them we only increase multiplyer
+                         */
+                        mantissa_type tmp_mantissa = mantissa * 10u;
+                        if(     !is_mantissa_full
+                                && tmp_mantissa / 10u == mantissa
+                                && (std::numeric_limits<mantissa_type>::max)()-(*begin - zero) >= tmp_mantissa
+                            )
+                        {
+                            mantissa = tmp_mantissa;
+                            mantissa += *begin - zero;
+                        } else
+                        {
+                            is_mantissa_full = true;
+                            ++ pow_of_10;
+                        }
+
+                        found_number_before_exp = true;
+                        ++ length_since_last_delim;
+                    } else if ( *begin == decimal_point || *begin == lowercase_e || *begin == capital_e) {
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+                        /* If ( we need to check grouping
+                         *      and (   grouping missmatches
+                         *              or grouping position is incorrect
+                         *              or we are using the grouping position 0 twice
+                         *           )
+                         *    ) then return error
+                         */
+                        if( grouping_size && found_grouping
+                            && (
+                                   length_since_last_delim != grouping[0]
+                                   || last_grouping_pos>1
+                                   || (last_grouping_pos==0 && grouping_size>1)
+                                )
+                           ) return false;
+#endif
+
+                        if(*begin == decimal_point){
+                            ++ begin;
+                            found_decimal = true;
+                            continue;
+                        }else {
+                            if (!found_number_before_exp) return false;
+                            break;
+                        }
+                    }
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+                    else if (grouping_size && *begin == thousands_sep){
+                        if(found_grouping)
+                        {
+                            /* It is not he first time, when we find thousands separator,
+                             * so we need to chek, is the distance between two groupings
+                             * equal to grouping[last_grouping_pos] */
+
+                            if (length_since_last_delim != grouping[last_grouping_pos] )
+                            {
+                                if (!last_grouping_pos) return false;
+                                else
+                                {
+                                    -- last_grouping_pos;
+                                    if (length_since_last_delim != grouping[last_grouping_pos]) return false;
+                                }
+                            } else
+                                /* We are calling the grouping[0] twice, when grouping size is more than 1 */
+                                if (grouping_size>1u && last_grouping_pos+1<grouping_size) return false;
+
+                        } else {
+                            /* Delimiter at the begining ',000' */
+                            if (!length_since_last_delim) return false;
+
+                            found_grouping = true;
+                            if (length_since_last_delim > grouping[last_grouping_pos] ) return false;
+                        }
+
+                        length_since_last_delim = 0;
+                        ++ begin;
+
+                        /* Delimiter at the end '100,' */
+                        if (begin == end) return false;
+                        continue;
+                    }
+#endif
+                    else return false;
+                }
+
+                ++begin;
             }
+
+            // Exponent found
+            if ( begin != end && ( *begin == lowercase_e || *begin == capital_e ) ) {
+                ++ begin;
+                if ( begin == end ) return false;
+
+                bool exp_has_minus = false;
+                if( *begin == minus ) {
+                    exp_has_minus = true;
+                    ++ begin;
+                    if ( begin == end ) return false;
+                } else if (*begin == plus ) {
+                    ++ begin;
+                    if ( begin == end ) return false;
+                }
+
+                int exp_pow_of_10 = 0;
+                while ( begin != end )
+                {
+                    if ( *begin < czero
+                            || *begin >= czero + 10
+                            || exp_pow_of_10 * 10 < exp_pow_of_10) /* Overflows are checked lower more precisely*/
+                        return false;
+
+                    exp_pow_of_10 *= 10;
+                    exp_pow_of_10 += *begin - zero;
+                    ++ begin;
+                };
+
+                if ( exp_pow_of_10 ) {
+                    /* Overflows are checked lower */
+                    if ( exp_has_minus ) {
+                        pow_of_10 -= exp_pow_of_10;
+                    } else {
+                        pow_of_10 += exp_pow_of_10;
+                    }
+                }
+            }
+
+            /* We need a more accurate algorithm... We can not use current algorithm
+             * with long doubles (and with doubles if sizeof(double)==sizeof(long double)).
+             */
+            long double result = std::pow(10.0L, pow_of_10) * mantissa;
+            value = static_cast<T>( has_minus ? (boost::math::changesign)(result) : result);
+
+            if ( (boost::math::isinf)(value) || (boost::math::isnan)(value) ) return false;
+
+            return true;
+        }
+    }
+
+    namespace detail // stl_buf_unlocker
+    {
+        template< class BufferType, class CharT >
+        class stl_buf_unlocker: public BufferType{
+        public:
+            typedef BufferType base_class;
+#ifndef BOOST_NO_USING_TEMPLATE
+            using base_class::pptr;
+            using base_class::pbase;
+            using base_class::setg;
+            using base_class::setp;
+#else
+            CharT* pptr() const { return base_class::pptr(); }
+            CharT* pbase() const { return base_class::pbase(); }
+            void setg(CharT* gbeg, CharT* gnext, CharT* gend){ return base_class::setg(gbeg, gnext, gend); }
+            void setp(CharT* pbeg, CharT* pend) { return setp(pbeg, pend); }
 #endif
-        private:
-            #if defined(BOOST_NO_STRINGSTREAM)
-            std::strstream stream;
-            #elif defined(BOOST_NO_STD_LOCALE)
-            std::stringstream stream;
-            #else
-            std::basic_stringstream<char_type,traits_type> stream;
-            #endif
         };
     }
 
+    namespace detail
+    {
+        struct do_not_construct_stringbuffer_t{};
+    }
+
     namespace detail // optimized stream wrapper
     {
         // String representation of Source has an upper limit.
         template< class CharT // a result of widest_char transformation
-                , class Base // lexical_streambuf_fake or basic_streambuf<CharT>
                 , class Traits // usually char_traits<CharT>
+                , bool RequiresStringbuffer
                 >
-        class lexical_stream_limited_src : public Base
+        class lexical_stream_limited_src
         {
+            typedef stl_buf_unlocker<std::basic_streambuf<CharT, Traits>, CharT > local_streambuffer_t;
+
+#if defined(BOOST_NO_STRINGSTREAM)
+            typedef stl_buf_unlocker<std::strstream, CharT > local_stringbuffer_t;
+#elif defined(BOOST_NO_STD_LOCALE)
+            typedef stl_buf_unlocker<std::stringstream, CharT > local_stringbuffer_t;
+#else
+            typedef stl_buf_unlocker<std::basic_stringbuf<CharT, Traits>, CharT > local_stringbuffer_t;
+#endif
+            typedef BOOST_DEDUCED_TYPENAME ::boost::mpl::if_c<
+                RequiresStringbuffer,
+                local_stringbuffer_t,
+                do_not_construct_stringbuffer_t
+            >::type deduced_stringbuffer_t;
+
             // A string representation of Source is written to [start, finish).
-            // Currently, it is assumed that [start, finish) is big enough
-            // to hold a string representation of any Source value.
             CharT* start;
             CharT* finish;
+            deduced_stringbuffer_t stringbuffer;
+
+        public:
+            lexical_stream_limited_src(CharT* sta, CharT* fin)
+              : start(sta)
+              , finish(fin)
+            {}
 
         private:
+            // Undefined:
+            lexical_stream_limited_src(lexical_stream_limited_src const&);
+            void operator=(lexical_stream_limited_src const&);
 
-            static void widen_and_assign(char*p, char ch)
+/************************************ HELPER FUNCTIONS FOR OPERATORS << ( ... ) ********************************/
+            bool shl_char(CharT ch)
             {
-                Traits::assign(*p, ch);
+                Traits::assign(*start, ch);
+                finish = start + 1;
+                return true;
             }
 
 #ifndef BOOST_LCAST_NO_WCHAR_T
-            static void widen_and_assign(wchar_t* p, char ch)
+            template <class T>
+            bool shl_char(T ch)
             {
-                // TODO: use BOOST_NO_STD_LOCALE
+                BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)) ,
+                    "boost::lexical_cast does not support conversions from whar_t to char types."
+                    "Use boost::locale instead" );
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
                 std::locale loc;
                 wchar_t w = BOOST_USE_FACET(std::ctype<wchar_t>, loc).widen(ch);
-                Traits::assign(*p, w);
+#else
+                wchar_t w = ch;
+#endif
+                Traits::assign(*start, w);
+                finish = start + 1;
+                return true;
             }
+#endif
 
-            static void widen_and_assign(wchar_t* p, wchar_t ch)
+            bool shl_char_array(CharT const* str)
             {
-                Traits::assign(*p, ch);
+                start = const_cast<CharT*>(str);
+                finish = start + Traits::length(str);
+                return true;
             }
 
-            static void widen_and_assign(char*, wchar_t ch); // undefined
+#ifndef BOOST_LCAST_NO_WCHAR_T
+            template <class T>
+            bool shl_char_array(T const* str)
+            {
+                BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)),
+                    "boost::lexical_cast does not support conversions from wchar_t to char types."
+                    "Use boost::locale instead" );
+                return shl_input_streamable(str);
+            }
 #endif
 
-            template<class OutputStreamable>
-            bool lcast_put(const OutputStreamable& input)
+            template<typename InputStreamable>
+            bool shl_input_streamable(InputStreamable& input)
             {
-                this->setp(start, finish);
-                std::basic_ostream<CharT> stream(static_cast<Base*>(this));
-                lcast_set_precision(stream, static_cast<OutputStreamable*>(0));
+                std::basic_ostream<CharT> stream(&stringbuffer);
                 bool const result = !(stream << input).fail();
-                finish = this->pptr();
-                return result;
+                start = stringbuffer.pbase();
+                finish = stringbuffer.pptr();
+                return result && (start != finish);
             }
 
-            // Undefined:
-            lexical_stream_limited_src(lexical_stream_limited_src const&);
-            void operator=(lexical_stream_limited_src const&);
+            template <class T>
+            inline bool shl_signed(T n)
+            {
+                start = lcast_put_unsigned<Traits>(lcast_to_unsigned(n), finish);
+                if(n < 0)
+                {
+                    --start;
+                    CharT const minus = lcast_char_constants<CharT>::minus;
+                    Traits::assign(*start, minus);
+                }
+                return true;
+            }
 
-        public:
+#if (defined _MSC_VER)
+# pragma warning( push )
+// C4996: This function or variable may be unsafe. Consider using sprintf_s instead
+# pragma warning( disable : 4996 )
+#endif
 
-            lexical_stream_limited_src(CharT* sta, CharT* fin)
-              : start(sta)
-              , finish(fin)
-            {}
+            template <class T>
+            bool shl_float(float val,T* out)
+            {   using namespace std;
+                if (put_inf_nan(start,finish,val)) return true;
+                finish = start + sprintf(out,"%.*g", static_cast<int>(boost::detail::lcast_get_precision<float >()), val );
+                return finish > start;
+            }
+
+            template <class T>
+            bool shl_double(double val,T* out)
+            {   using namespace std;
+                if (put_inf_nan(start,finish,val)) return true;
+                finish = start + sprintf(out,"%.*lg", static_cast<int>(boost::detail::lcast_get_precision<double >()), val );
+                return finish > start;
+            }
+#ifndef __MINGW32__
+            template <class T>
+            bool shl_long_double(long double val,T* out)
+            {   using namespace std;
+                if (put_inf_nan(start,finish,val)) return true;
+                finish = start + sprintf(out,"%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double >()), val );
+                return finish > start;
+            }
+#endif
 
-        public: // output
+#if (defined _MSC_VER)
+# pragma warning( pop )
+#endif
+
+
+#ifndef BOOST_LCAST_NO_WCHAR_T
+            bool shl_float(float val,wchar_t* out)
+            {   using namespace std;
+                if (put_inf_nan(start,finish,val)) return true;
+                finish = start + swprintf(out,
+#if !defined(__MINGW32__) && !defined(UNDER_CE)
+                                          finish-start,
+#endif
+                                          L"%.*g", static_cast<int>(boost::detail::lcast_get_precision<float >()), val );
 
+                return finish > start;
+            }
+
+
+            bool shl_double(double val,wchar_t* out)
+            {   using namespace std;
+                if (put_inf_nan(start,finish,val)) return true;
+                /* __MINGW32__ is defined for both mingw.org and for mingw-w64.
+                 * For mingw-w64, __MINGW64__ is defined, too, when targetting
+                 * 64 bits.
+                 *
+                 * swprintf realization in MinGW and under WinCE does not conform
+                 * to the ISO C
+                 * Standard.
+                 */
+                finish = start + swprintf(out,
+#if !defined(__MINGW32__) && !defined(UNDER_CE)
+                                          finish-start,
+#endif
+                                          L"%.*lg", static_cast<int>(boost::detail::lcast_get_precision<double >()), val );
+                return finish > start;
+            }
+
+#ifndef __MINGW32__
+            bool shl_long_double(long double val,wchar_t* out)
+            {   using namespace std;
+                if (put_inf_nan(start,finish,val)) return true;
+                finish = start + swprintf(out,
+#if !defined(UNDER_CE)
+                                          finish-start,
+#endif
+                                          L"%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double >()), val );
+                return finish > start;
+            }
+#endif
+
+#endif
+
+/************************************ OPERATORS << ( ... ) ********************************/
+        public:
             template<class Alloc>
             bool operator<<(std::basic_string<CharT,Traits,Alloc> const& str)
             {
@@ -879,39 +1257,61 @@ namespace boost
                 return true;
             }
 
-            bool operator<<(bool);
-            bool operator<<(char);
-            bool operator<<(unsigned char);
-            bool operator<<(signed char);
-#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
-            bool operator<<(wchar_t);
-#endif
-            bool operator<<(unsigned char const*);
-            bool operator<<(signed char const*);
-            bool operator<<(CharT const*);
-            bool operator<<(short);
-            bool operator<<(int);
-            bool operator<<(long);
-            bool operator<<(unsigned short);
-            bool operator<<(unsigned int);
-            bool operator<<(unsigned long);
+            bool operator<<(bool value)
+            {
+                CharT const czero = lcast_char_constants<CharT>::zero;
+                Traits::assign(*start, Traits::to_char_type(czero + value));
+                finish = start + 1;
+                return true;
+            }
+
+            bool operator<<(char ch)                    { return shl_char(ch); }
+            bool operator<<(unsigned char ch)           { return ((*this) << static_cast<char>(ch)); }
+            bool operator<<(signed char ch)             { return ((*this) << static_cast<char>(ch)); }
+#if !defined(BOOST_LCAST_NO_WCHAR_T)
+            bool operator<<(wchar_t const* str)         { return shl_char_array(str); }
+            bool operator<<(wchar_t * str)              { return shl_char_array(str); }
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
+            bool operator<<(wchar_t ch)                 { return shl_char(ch); }
+#endif
+#endif
+            bool operator<<(unsigned char const* ch)    { return ((*this) << reinterpret_cast<char const*>(ch)); }
+            bool operator<<(unsigned char * ch)         { return ((*this) << reinterpret_cast<char *>(ch)); }
+            bool operator<<(signed char const* ch)      { return ((*this) << reinterpret_cast<char const*>(ch)); }
+            bool operator<<(signed char * ch)           { return ((*this) << reinterpret_cast<char *>(ch)); }
+            bool operator<<(char const* str)            { return shl_char_array(str); }
+            bool operator<<(char* str)                  { return shl_char_array(str); }
+            bool operator<<(short n)                    { return shl_signed(n); }
+            bool operator<<(int n)                      { return shl_signed(n); }
+            bool operator<<(long n)                     { return shl_signed(n); }
+            bool operator<<(unsigned short n)           { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+            bool operator<<(unsigned int n)             { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+            bool operator<<(unsigned long n)            { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+
 #if defined(BOOST_HAS_LONG_LONG)
-            bool operator<<(boost::ulong_long_type);
-            bool operator<<(boost::long_long_type );
+            bool operator<<(boost::ulong_long_type n)   { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+            bool operator<<(boost::long_long_type n)    { return shl_signed(n); }
 #elif defined(BOOST_HAS_MS_INT64)
-            bool operator<<(unsigned __int64);
-            bool operator<<(         __int64);
+            bool operator<<(unsigned __int64 n)         { start = lcast_put_unsigned<Traits>(n, finish); return true; }
+            bool operator<<(         __int64 n)         { return shl_signed(n); }
+#endif
+            bool operator<<(float val)                  { return shl_float(val,start); }
+            bool operator<<(double val)                 { return shl_double(val,start); }
+            bool operator<<(long double val)            {
+#ifndef __MINGW32__
+                return shl_long_double(val,start);
+#else
+                return shl_double(val,start);
 #endif
-            // These three operators use ostream and streambuf.
-            // lcast_streambuf_for_source<T>::value is true.
-            bool operator<<(float);
-            bool operator<<(double);
-            bool operator<<(long double);
+            }
 
-        private:
+            template<class InStreamable>
+            bool operator<<(const InStreamable& input)  { return shl_input_streamable(input); }
 
+/************************************ HELPER FUNCTIONS FOR OPERATORS >> ( ... ) ********************************/
+        private:
             template <typename Type>
-            bool input_operator_helper_unsigned(Type& output)
+            bool shr_unsigned(Type& output)
             {
                 CharT const minus = lcast_char_constants<CharT>::minus;
                 CharT const plus = lcast_char_constants<CharT>::plus;
@@ -945,7 +1345,7 @@ namespace boost
             }
 
             template <typename Type>
-            bool input_operator_helper_signed(Type& output)
+            bool shr_signed(Type& output)
             {
                 CharT const minus = lcast_char_constants<CharT>::minus;
                 CharT const plus = lcast_char_constants<CharT>::plus;
@@ -988,492 +1388,187 @@ namespace boost
                 return succeed;
             }
 
-        public: // input
-
-            bool operator>>(unsigned short& output)
-            {
-                return input_operator_helper_unsigned(output);
-            }
-
-            bool operator>>(unsigned int& output)
-            {
-                return input_operator_helper_unsigned(output);
-            }
-
-            bool operator>>(unsigned long int& output)
-            {
-                return input_operator_helper_unsigned(output);
-            }
-
-            bool operator>>(short& output)
-            {
-                return input_operator_helper_signed(output);
-            }
-
-            bool operator>>(int& output)
-            {
-                return input_operator_helper_signed(output);
-            }
-
-            bool operator>>(long int& output)
-            {
-                return input_operator_helper_signed(output);
-            }
-
-
-#if defined(BOOST_HAS_LONG_LONG)
-            bool operator>>( boost::ulong_long_type& output)
-            {
-                return input_operator_helper_unsigned(output);
-            }
-
-            bool operator>>(boost::long_long_type& output)
-            {
-                return input_operator_helper_signed(output);
-            }
-
-#elif defined(BOOST_HAS_MS_INT64)
-            bool operator>>(unsigned __int64& output)
-            {
-                return input_operator_helper_unsigned(output);
-            }
-
-            bool operator>>(__int64& output)
-            {
-                return input_operator_helper_signed(output);
-            }
-
-#endif
-
-            /*
-             * case "-0" || "0" || "+0" :   output = false; return true;
-             * case "1" || "+1":            output = true;  return true;
-             * default:                     return false;
-             */
-            bool operator>>(bool& output)
-            {
-                CharT const zero = lcast_char_constants<CharT>::zero;
-                CharT const plus = lcast_char_constants<CharT>::plus;
-                CharT const minus = lcast_char_constants<CharT>::minus;
-
-                switch(finish-start)
-                {
-                    case 1:
-                        output = Traits::eq(start[0],  zero+1);
-                        return output || Traits::eq(start[0], zero );
-                    case 2:
-                        if ( Traits::eq( plus, *start) )
-                        {
-                            ++start;
-                            output = Traits::eq(start[0], zero +1);
-                            return output || Traits::eq(start[0], zero );
-                        } else
-                        {
-                            output = false;
-                            return Traits::eq( minus, *start)
-                                && Traits::eq( zero, start[1]);
-                        }
-                    default:
-                        output = false; // Suppress warning about uninitalized variable
-                        return false;
-                }
-            }
-
-
-            // Generic istream-based algorithm.
-            // lcast_streambuf_for_target<InputStreamable>::value is true.
-            template<typename InputStreamable>
-            bool operator>>(InputStreamable& output)
-            {
-#if (defined _MSC_VER)
-# pragma warning( push )
-  // conditional expression is constant
-# pragma warning( disable : 4127 )
-#endif
-                if(is_pointer<InputStreamable>::value)
-                    return false;
-
-                this->setg(start, start, finish);
-                std::basic_istream<CharT> stream(static_cast<Base*>(this));
-                stream.unsetf(std::ios::skipws);
-                lcast_set_precision(stream, static_cast<InputStreamable*>(0));
-#if (defined _MSC_VER)
-# pragma warning( pop )
-#endif
-                return stream >> output &&
-                    stream.get() ==
-#if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING)
-        // GCC 2.9x lacks std::char_traits<>::eof().
-        // We use BOOST_NO_STD_WSTRING to filter out STLport and libstdc++-v3
-        // configurations, which do provide std::char_traits<>::eof().
-
-                    EOF;
-#else
-                Traits::eof();
-#endif
-            }
-
-            bool operator>>(CharT&);
-            bool operator>>(unsigned char&);
-            bool operator>>(signed char&);
-
-#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-// This #if is in sync with lcast_streambuf_for_target
-
-            bool operator>>(std::string&);
-
-#ifndef BOOST_LCAST_NO_WCHAR_T
-            bool operator>>(std::wstring&);
-#endif
-
-#else
-            template<class Alloc>
-            bool operator>>(std::basic_string<CharT,Traits,Alloc>& str)
-            {
-                str.assign(start, finish);
-                return true;
-            }
-#endif
-        };
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                bool value)
-        {
-            typedef typename Traits::int_type int_type;
-            CharT const czero = lcast_char_constants<CharT>::zero;
-            int_type const zero = Traits::to_int_type(czero);
-            Traits::assign(*start, Traits::to_char_type(zero + value));
-            finish = start + 1;
-            return true;
-        }
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                char ch)
-        {
-            widen_and_assign(start, ch);
-            finish = start + 1;
-            return true;
-        }
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-               unsigned char ch)
-        {
-            return ((*this) << static_cast<char>(ch));
-        }
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-               signed char ch)
-        {
-            return ((*this) << static_cast<char>(ch));
-        }
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-               unsigned char const* ch)
-        {
-            return ((*this) << reinterpret_cast<char const*>(ch));
-        }
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-               signed char const* ch)
-        {
-            return ((*this) << reinterpret_cast<char const*>(ch));
-        }
-
-#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                wchar_t ch)
-        {
-            widen_and_assign(start, ch);
-            finish = start + 1;
-            return true;
-        }
-#endif
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                short n)
-        {
-            start = lcast_put_unsigned<Traits>(lcast_to_unsigned(n), finish);
-            if(n < 0)
-            {
-                --start;
-                CharT const minus = lcast_char_constants<CharT>::minus;
-                Traits::assign(*start, minus);
-            }
-            return true;
-        }
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                int n)
-        {
-            start = lcast_put_unsigned<Traits>(lcast_to_unsigned(n), finish);
-            if(n < 0)
-            {
-                --start;
-                CharT const minus = lcast_char_constants<CharT>::minus;
-                Traits::assign(*start, minus);
-            }
-            return true;
-        }
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                long n)
-        {
-            start = lcast_put_unsigned<Traits>(lcast_to_unsigned(n), finish);
-            if(n < 0)
-            {
-                --start;
-                CharT const minus = lcast_char_constants<CharT>::minus;
-                Traits::assign(*start, minus);
-            }
-            return true;
-        }
-
-#if defined(BOOST_HAS_LONG_LONG)
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                boost::long_long_type n)
-        {
-            start = lcast_put_unsigned<Traits>(lcast_to_unsigned(n), finish);
-            if(n < 0)
-            {
-                --start;
-                CharT const minus = lcast_char_constants<CharT>::minus;
-                Traits::assign(*start, minus);
-            }
-            return true;
-        }
-#elif defined(BOOST_HAS_MS_INT64)
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                __int64 n)
-        {
-            start = lcast_put_unsigned<Traits>(lcast_to_unsigned(n), finish);
-            if(n < 0)
-            {
-                --start;
-                CharT const minus = lcast_char_constants<CharT>::minus;
-                Traits::assign(*start, minus);
-            }
-            return true;
-        }
-#endif
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                unsigned short n)
-        {
-            start = lcast_put_unsigned<Traits>(n, finish);
-            return true;
-        }
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                unsigned int n)
-        {
-            start = lcast_put_unsigned<Traits>(n, finish);
-            return true;
-        }
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                unsigned long n)
-        {
-            start = lcast_put_unsigned<Traits>(n, finish);
-            return true;
-        }
-
-#if defined(BOOST_HAS_LONG_LONG)
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                boost::ulong_long_type n)
-        {
-            start = lcast_put_unsigned<Traits>(n, finish);
-            return true;
-        }
-#elif defined(BOOST_HAS_MS_INT64)
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                unsigned __int64 n)
-        {
-            start = lcast_put_unsigned<Traits>(n, finish);
-            return true;
-        }
-#endif
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                float val)
-        {
-            return this->lcast_put(val);
-        }
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                double val)
-        {
-            return this->lcast_put(val);
-        }
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                long double val)
-        {
-            return this->lcast_put(val);
-        }
-
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator<<(
-                CharT const* str)
-        {
-            start = const_cast<CharT*>(str);
-            finish = start + Traits::length(str);
-            return true;
-        }
+            template<typename InputStreamable>
+            bool shr_using_base_class(InputStreamable& output)
+            {
+#if (defined _MSC_VER)
+# pragma warning( push )
+  // conditional expression is constant
+# pragma warning( disable : 4127 )
+#endif
+                if(is_pointer<InputStreamable>::value)
+                    return false;
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator>>(
-                CharT& output)
-        {
-            bool const ok = (finish - start == 1);
-            if(ok)
-                Traits::assign(output, *start);
-            return ok;
-        }
+                local_streambuffer_t bb;
+                bb.setg(start, start, finish);
+                std::basic_istream<CharT> stream(&bb);
+                stream.unsetf(std::ios::skipws);
+                lcast_set_precision(stream, static_cast<InputStreamable*>(0));
+#if (defined _MSC_VER)
+# pragma warning( pop )
+#endif
+                return stream >> output &&
+                    stream.get() ==
+#if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING)
+        // GCC 2.9x lacks std::char_traits<>::eof().
+        // We use BOOST_NO_STD_WSTRING to filter out STLport and libstdc++-v3
+        // configurations, which do provide std::char_traits<>::eof().
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator>>(
-                unsigned char& output)
-        {
-            BOOST_STATIC_ASSERT( sizeof(CharT) == sizeof(unsigned char) );
-            bool const ok = (finish - start == 1);
-            if(ok) {
-                CharT out;
-                Traits::assign(out, *start);
-                output = static_cast<signed char>(out);
+                    EOF;
+#else
+                Traits::eof();
+#endif
             }
-            return ok;
-        }
 
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator>>(
-                signed char& output)
-        {
-            BOOST_STATIC_ASSERT( sizeof(CharT) == sizeof(signed char) );
-            bool const ok = (finish - start == 1);
-            if(ok) {
-                CharT out;
-                Traits::assign(out, *start);
-                output = static_cast<signed char>(out);
+            template<class T>
+            inline bool shr_xchar(T& output)
+            {
+                BOOST_STATIC_ASSERT_MSG(( sizeof(CharT) == sizeof(T) ),
+                    "boost::lexical_cast does not support conversions from whar_t to char types."
+                    "Use boost::locale instead" );
+                bool const ok = (finish - start == 1);
+                if(ok) {
+                    CharT out;
+                    Traits::assign(out, *start);
+                    output = static_cast<T>(out);
+                }
+                return ok;
             }
-            return ok;
-        }
 
-#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator>>(
-                std::string& str)
-        {
-            str.assign(start, finish);
-            return true;
-        }
+/************************************ OPERATORS >> ( ... ) ********************************/
+        public:
+            bool operator>>(unsigned short& output)             { return shr_unsigned(output); }
+            bool operator>>(unsigned int& output)               { return shr_unsigned(output); }
+            bool operator>>(unsigned long int& output)          { return shr_unsigned(output); }
+            bool operator>>(short& output)                      { return shr_signed(output); }
+            bool operator>>(int& output)                        { return shr_signed(output); }
+            bool operator>>(long int& output)                   { return shr_signed(output); }
+#if defined(BOOST_HAS_LONG_LONG)
+            bool operator>>(boost::ulong_long_type& output)     { return shr_unsigned(output); }
+            bool operator>>(boost::long_long_type& output)      { return shr_signed(output); }
+#elif defined(BOOST_HAS_MS_INT64)
+            bool operator>>(unsigned __int64& output)           { return shr_unsigned(output); }
+            bool operator>>(__int64& output)                    { return shr_signed(output); }
 
-#ifndef BOOST_LCAST_NO_WCHAR_T
-        template<typename CharT, class Base, class Traits>
-        inline bool lexical_stream_limited_src<CharT,Base,Traits>::operator>>(
-                std::wstring& str)
-        {
-            str.assign(start, finish);
-            return true;
-        }
 #endif
+            bool operator>>(CharT& output)                      { return shr_xchar(output); }
+            bool operator>>(unsigned char& output)              { return shr_xchar(output); }
+            bool operator>>(signed char& output)                { return shr_xchar(output); }
+#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+            bool operator>>(std::string& str)                   { str.assign(start, finish); return true; }
+#   ifndef BOOST_LCAST_NO_WCHAR_T
+            bool operator>>(std::wstring& str)                  { str.assign(start, finish); return true; }
+#   endif
+#else
+            template<class Alloc>
+            bool operator>>(std::basic_string<CharT,Traits,Alloc>& str) { str.assign(start, finish); return true; }
 #endif
-    }
+            /*
+             * case "-0" || "0" || "+0" :   output = false; return true;
+             * case "1" || "+1":            output = true;  return true;
+             * default:                     return false;
+             */
+            bool operator>>(bool& output)
+            {
+                CharT const zero = lcast_char_constants<CharT>::zero;
+                CharT const plus = lcast_char_constants<CharT>::plus;
+                CharT const minus = lcast_char_constants<CharT>::minus;
 
-    namespace detail // lcast_streambuf_for_source
-    {
-        // Returns true if optimized stream wrapper needs ostream for writing.
-        template<class Source>
-        struct lcast_streambuf_for_source
-        {
-            BOOST_STATIC_CONSTANT(bool, value = false);
-        };
+                switch(finish-start)
+                {
+                    case 1:
+                        output = Traits::eq(start[0],  zero+1);
+                        return output || Traits::eq(start[0], zero );
+                    case 2:
+                        if ( Traits::eq( plus, *start) )
+                        {
+                            ++start;
+                            output = Traits::eq(start[0], zero +1);
+                            return output || Traits::eq(start[0], zero );
+                        } else
+                        {
+                            output = false;
+                            return Traits::eq( minus, *start)
+                                && Traits::eq( zero, start[1]);
+                        }
+                    default:
+                        output = false; // Suppress warning about uninitalized variable
+                        return false;
+                }
+            }
 
-        template<>
-        struct lcast_streambuf_for_source<float>
-        {
-            BOOST_STATIC_CONSTANT(bool, value = true);
-        };
-        template<>
-        struct lcast_streambuf_for_source<double>
-        {
-            BOOST_STATIC_CONSTANT(bool, value = true);
-        };
-  
-        template<>
-        struct lcast_streambuf_for_source<long double>
-        {
-            BOOST_STATIC_CONSTANT(bool, value = true);
-        };
-    }
+            bool operator>>(float& output) { return lcast_ret_float<Traits>(output,start,finish); }
 
-    namespace detail // lcast_streambuf_for_target
-    {
-        // Returns true if optimized stream wrapper needs istream for reading.
-        template<class Target>
-        struct lcast_streambuf_for_target
-        {
-            BOOST_STATIC_CONSTANT(bool, value =
-                (
-                 ::boost::type_traits::ice_not< is_integral<Target>::value >::value
-                )
-            );
-        };
+        private:
+            // Not optimised converter
+            template <class T>
+            bool float_types_converter_internal(T& output, int /*tag*/) {
+                if (parse_inf_nan(start, finish, output)) return true;
+                bool return_value = shr_using_base_class(output);
+
+                /* Some compilers and libraries successfully
+                 * parse 'inf', 'INFINITY', '1.0E', '1.0E-'...
+                 * We are trying to provide a unified behaviour,
+                 * so we just forbid such conversions (as some
+                 * of the most popular compilers/libraries do)
+                 * */
+                CharT const minus = lcast_char_constants<CharT>::minus;
+                CharT const plus = lcast_char_constants<CharT>::plus;
+                CharT const capital_e = lcast_char_constants<CharT>::capital_e;
+                CharT const lowercase_e = lcast_char_constants<CharT>::lowercase_e;
+                if ( return_value &&
+                     (
+                        *(finish-1) == lowercase_e                   // 1.0e
+                        || *(finish-1) == capital_e                  // 1.0E
+                        || *(finish-1) == minus                      // 1.0e- or 1.0E-
+                        || *(finish-1) == plus                       // 1.0e+ or 1.0E+
+                     )
+                ) return false;
+
+                return return_value;
+            }
 
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-        template<class Traits, class Alloc>
-        struct lcast_streambuf_for_target<
-                    std::basic_string<char,Traits,Alloc> >
-        {
-            BOOST_STATIC_CONSTANT(bool, value = false);
-        };
+            // Optimised converter
+            bool float_types_converter_internal(double& output,char /*tag*/) {
+                return lcast_ret_float<Traits>(output,start,finish);
+            }
+        public:
 
-#ifndef BOOST_LCAST_NO_WCHAR_T
-        template<class Traits, class Alloc>
-        struct lcast_streambuf_for_target<
-                    std::basic_string<wchar_t,Traits,Alloc> >
-        {
-            BOOST_STATIC_CONSTANT(bool, value = false);
-        };
-#endif
+            bool operator>>(double& output)
+            {
+                /*
+                 * Some compilers implement long double as double. In that case these types have
+                 * same size, same precision, same max and min values... And it means,
+                 * that current implementation of lcast_ret_float cannot be used for type
+                 * double, because it will give a big precision loss.
+                 * */
+                boost::mpl::if_c<
+#if defined(BOOST_HAS_LONG_LONG) || defined(BOOST_HAS_MS_INT64)
+                    ::boost::type_traits::ice_eq< sizeof(double), sizeof(long double) >::value,
 #else
-        template<>
-        struct lcast_streambuf_for_target<std::string>
-        {
-            BOOST_STATIC_CONSTANT(bool, value = false);
-        };
+                     0
+#endif
+                    int,
+                    char
+                >::type tag = 0;
 
-#ifndef BOOST_LCAST_NO_WCHAR_T
-        template<>
-        struct lcast_streambuf_for_target<std::wstring>
-        {
-            BOOST_STATIC_CONSTANT(bool, value = false);
+                return float_types_converter_internal(output, tag);
+            }
+
+            bool operator>>(long double& output)
+            {
+                int tag = 0;
+                return float_types_converter_internal(output, tag);
+            }
+
+            // Generic istream-based algorithm.
+            // lcast_streambuf_for_target<InputStreamable>::value is true.
+            template<typename InputStreamable>
+            bool operator>>(InputStreamable& output) { return shr_using_base_class(output); }
         };
-#endif
-#endif
     }
 
-    #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
     // call-by-const reference version
 
@@ -1491,47 +1586,6 @@ namespace boost
             typedef const T * type;
         };
 
-#if (defined _MSC_VER)
-# pragma warning( push )
-# pragma warning( disable : 4701 ) // possible use of ... before initialization
-# pragma warning( disable : 4702 ) // unreachable code
-# pragma warning( disable : 4267 ) // conversion from 'size_t' to 'unsigned int'
-#endif
-
-        template< typename Target
-                , typename Source
-                , bool Unlimited // string representation of Source is unlimited
-                , typename CharT
-                >
-        Target lexical_cast(
-            BOOST_DEDUCED_TYPENAME boost::call_traits<Source>::param_type arg,
-            CharT* buf, std::size_t src_len)
-        {
-            typedef BOOST_DEDUCED_TYPENAME
-                deduce_char_traits<CharT,Target,Source>::type traits;
-
-            typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
-                lcast_streambuf_for_target<Target>::value ||
-                lcast_streambuf_for_source<Source>::value
-              , std::basic_streambuf<CharT>
-              , lexical_streambuf_fake
-              >::type base;
-
-            BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
-                Unlimited
-              , detail::lexical_stream<Target,Source,traits>
-              , detail::lexical_stream_limited_src<CharT,base,traits>
-              >::type interpreter(buf, buf + src_len);
-
-            Target result;
-            if(!(interpreter << arg && interpreter >> result))
-              BOOST_LCAST_THROW_BAD_CAST(Source, Target);
-            return result;
-        }
-#if (defined _MSC_VER)
-# pragma warning( pop )
-#endif
-
         template<typename T>
         struct is_stdstring
         {
@@ -1547,28 +1601,38 @@ namespace boost
         template<typename T>
         struct is_char_or_wchar
         {
+        private:
 #ifndef BOOST_LCAST_NO_WCHAR_T
-            BOOST_STATIC_CONSTANT(bool, value =
-                    (
-                    ::boost::type_traits::ice_or<
-                         is_same< T, char >::value,
-                         is_same< T, wchar_t >::value,
-                         is_same< T, unsigned char >::value,
-                         is_same< T, signed char >::value
-                    >::value
-                    )
-            );
+            typedef wchar_t wchar_t_if_supported;
+#else
+            typedef char wchar_t_if_supported;
+#endif
+
+#ifndef BOOST_NO_CHAR16_T
+            typedef char16_t char16_t_if_supported;
+#else
+            typedef char char16_t_if_supported;
+#endif
+
+#ifndef BOOST_NO_CHAR32_T
+            typedef char32_t char32_t_if_supported;
 #else
+            typedef char char32_t_if_supported;
+#endif
+            public:
+
             BOOST_STATIC_CONSTANT(bool, value =
                     (
                     ::boost::type_traits::ice_or<
                          is_same< T, char >::value,
+                         is_same< T, wchar_t_if_supported >::value,
+                         is_same< T, char16_t_if_supported >::value,
+                         is_same< T, char32_t_if_supported >::value,
                          is_same< T, unsigned char >::value,
                          is_same< T, signed char >::value
                     >::value
                     )
             );
-#endif
         };
 
         template<typename Target, typename Source>
@@ -1634,25 +1698,62 @@ namespace boost
             BOOST_STATIC_CONSTANT(bool, value = true );
         };
 
+#if (defined _MSC_VER)
+# pragma warning( push )
+# pragma warning( disable : 4701 ) // possible use of ... before initialization
+# pragma warning( disable : 4702 ) // unreachable code
+# pragma warning( disable : 4267 ) // conversion from 'size_t' to 'unsigned int'
+#endif
         template<typename Target, typename Source>
         struct lexical_cast_do_cast
         {
-            static inline Target lexical_cast_impl(const Source &arg)
+            static inline Target lexical_cast_impl(const Sourcearg)
             {
-                typedef typename detail::array_to_pointer_decay<Source>::type src;
+                typedef BOOST_DEDUCED_TYPENAME detail::array_to_pointer_decay<Source>::type src;
 
-                typedef typename detail::widest_char<
-                typename detail::stream_char<Target>::type
-                , typename detail::stream_char<src>::type
+                typedef BOOST_DEDUCED_TYPENAME detail::widest_char<
+                    BOOST_DEDUCED_TYPENAME detail::stream_char<Target>::type
+                    , BOOST_DEDUCED_TYPENAME detail::stream_char<src>::type
                 >::type char_type;
 
-                typedef detail::lcast_src_length<char_type, src> lcast_src_length;
+                typedef detail::lcast_src_length<src> lcast_src_length;
                 std::size_t const src_len = lcast_src_length::value;
                 char_type buf[src_len + 1];
                 lcast_src_length::check_coverage();
-                return detail::lexical_cast<Target, src, !src_len>(arg, buf, src_len);
+
+                typedef BOOST_DEDUCED_TYPENAME
+                    deduce_char_traits<char_type,Target,Source>::type traits;
+
+                typedef BOOST_DEDUCED_TYPENAME remove_pointer<src >::type removed_ptr_t;
+                const bool requires_stringbuf =
+                        !(
+                             ::boost::type_traits::ice_or<
+                                 is_stdstring<src >::value,
+                                 is_arithmetic<src >::value,
+                                 ::boost::type_traits::ice_and<
+                                     is_pointer<src >::value,
+                                     is_char_or_wchar<removed_ptr_t >::value,
+                                     ::boost::type_traits::ice_eq<
+                                        sizeof(char_type),
+                                        sizeof(removed_ptr_t)
+                                     >::value
+                                 >::value
+                             >::value
+                        );
+
+                detail::lexical_stream_limited_src<char_type,traits, requires_stringbuf >
+                        interpreter(buf, buf + src_len);
+
+                Target result;
+                // Disabling ADL, by directly specifying operators.
+                if(!(interpreter.operator <<(arg) && interpreter.operator >>(result)))
+                  BOOST_LCAST_THROW_BAD_CAST(Source, Target);
+                return result;
             }
         };
+#if (defined _MSC_VER)
+# pragma warning( pop )
+#endif
 
         template<typename Source>
         struct lexical_cast_copy
@@ -1708,6 +1809,7 @@ namespace boost
                 } catch( ::boost::numeric::bad_numeric_cast const& ) {
                     BOOST_LCAST_THROW_BAD_CAST(Source, Target);
                 }
+                BOOST_UNREACHABLE_RETURN(static_cast<Target>(0));
             }
         };
 
@@ -1734,6 +1836,7 @@ namespace boost
                 } catch( ::boost::numeric::bad_numeric_cast const& ) {
                     BOOST_LCAST_THROW_BAD_CAST(Source, Target);
                 }
+                BOOST_UNREACHABLE_RETURN(static_cast<Target>(0));
             }
         };
 
@@ -1815,6 +1918,78 @@ namespace boost
 
     #else
 
+    namespace detail // stream wrapper for handling lexical conversions
+    {
+        template<typename Target, typename Source, typename Traits>
+        class lexical_stream
+        {
+        private:
+            typedef typename widest_char<
+                typename stream_char<Target>::type,
+                typename stream_char<Source>::type>::type char_type;
+
+            typedef Traits traits_type;
+
+        public:
+            lexical_stream(char_type* = 0, char_type* = 0)
+            {
+                stream.unsetf(std::ios::skipws);
+                lcast_set_precision(stream, static_cast<Source*>(0), static_cast<Target*>(0) );
+            }
+            ~lexical_stream()
+            {
+                #if defined(BOOST_NO_STRINGSTREAM)
+                stream.freeze(false);
+                #endif
+            }
+            bool operator<<(const Source &input)
+            {
+                return !(stream << input).fail();
+            }
+            template<typename InputStreamable>
+            bool operator>>(InputStreamable &output)
+            {
+                return !is_pointer<InputStreamable>::value &&
+                       stream >> output &&
+                       stream.get() ==
+#if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING)
+// GCC 2.9x lacks std::char_traits<>::eof().
+// We use BOOST_NO_STD_WSTRING to filter out STLport and libstdc++-v3
+// configurations, which do provide std::char_traits<>::eof().
+
+                           EOF;
+#else
+                           traits_type::eof();
+#endif
+            }
+
+            bool operator>>(std::string &output)
+            {
+                #if defined(BOOST_NO_STRINGSTREAM)
+                stream << '\0';
+                #endif
+                stream.str().swap(output);
+                return true;
+            }
+            #ifndef BOOST_LCAST_NO_WCHAR_T
+            bool operator>>(std::wstring &output)
+            {
+                stream.str().swap(output);
+                return true;
+            }
+            #endif
+
+        private:
+            #if defined(BOOST_NO_STRINGSTREAM)
+            std::strstream stream;
+            #elif defined(BOOST_NO_STD_LOCALE)
+            std::stringstream stream;
+            #else
+            std::basic_stringstream<char_type,traits_type> stream;
+            #endif
+        };
+    }
+
     // call-by-value fallback version (deprecated)
 
     template<typename Target, typename Source>
diff --git a/boost/boost/math/policies/policy.hpp b/boost/boost/math/policies/policy.hpp
new file mode 100644 (file)
index 0000000..355bf18
--- /dev/null
@@ -0,0 +1,959 @@
+//  Copyright John Maddock 2007.
+//  Use, modification and distribution are subject to 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)
+
+#ifndef BOOST_MATH_POLICY_HPP
+#define BOOST_MATH_POLICY_HPP
+
+#include <boost/mpl/list.hpp>
+#include <boost/mpl/contains.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/remove_if.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/push_back.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/comparison.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/assert.hpp>
+#include <boost/math/tools/config.hpp>
+#include <limits>
+// Sadly we do need the .h versions of these to be sure of getting
+// FLT_MANT_DIG etc.
+#include <limits.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <math.h>
+
+namespace boost{ namespace math{ 
+
+namespace tools{
+
+template <class T>
+int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T));
+template <class T>
+T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T));
+
+}
+
+namespace policies{
+
+//
+// Define macros for our default policies, if they're not defined already:
+//
+#ifndef BOOST_MATH_DOMAIN_ERROR_POLICY
+#define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_POLE_ERROR_POLICY
+#define BOOST_MATH_POLE_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_OVERFLOW_ERROR_POLICY
+#define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_EVALUATION_ERROR_POLICY
+#define BOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_ROUNDING_ERROR_POLICY
+#define BOOST_MATH_ROUNDING_ERROR_POLICY throw_on_error
+#endif
+#ifndef BOOST_MATH_UNDERFLOW_ERROR_POLICY
+#define BOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error
+#endif
+#ifndef BOOST_MATH_DENORM_ERROR_POLICY
+#define BOOST_MATH_DENORM_ERROR_POLICY ignore_error
+#endif
+#ifndef BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY
+#define BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY ignore_error
+#endif
+#ifndef BOOST_MATH_DIGITS10_POLICY
+#define BOOST_MATH_DIGITS10_POLICY 0
+#endif
+#ifndef BOOST_MATH_PROMOTE_FLOAT_POLICY
+#define BOOST_MATH_PROMOTE_FLOAT_POLICY true
+#endif
+#ifndef BOOST_MATH_PROMOTE_DOUBLE_POLICY
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false
+#else
+#define BOOST_MATH_PROMOTE_DOUBLE_POLICY true
+#endif
+#endif
+#ifndef BOOST_MATH_DISCRETE_QUANTILE_POLICY
+#define BOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards
+#endif
+#ifndef BOOST_MATH_ASSERT_UNDEFINED_POLICY
+#define BOOST_MATH_ASSERT_UNDEFINED_POLICY true
+#endif
+#ifndef BOOST_MATH_MAX_SERIES_ITERATION_POLICY
+#define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
+#endif
+#ifndef BOOST_MATH_MAX_ROOT_ITERATION_POLICY
+#define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
+#endif
+
+#if !defined(__BORLANDC__) \
+   && !(defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ <= 2))
+#define BOOST_MATH_META_INT(type, name, Default)\
+   template <type N = Default> struct name : public boost::mpl::int_<N>{};\
+   namespace detail{\
+   template <type N>\
+   char test_is_valid_arg(const name<N>*);\
+   char test_is_default_arg(const name<Default>*);\
+   template <class T> struct is_##name##_imp\
+   {\
+      template <type N> static char test(const name<N>*);\
+      static double test(...);\
+      BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast<T*>(0))) == 1);\
+   };\
+   }\
+   template <class T> struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp<T>::value>{};
+
+#define BOOST_MATH_META_BOOL(name, Default)\
+   template <bool N = Default> struct name : public boost::mpl::bool_<N>{};\
+   namespace detail{\
+   template <bool N>\
+   char test_is_valid_arg(const name<N>*);\
+   char test_is_default_arg(const name<Default>*);\
+   template <class T> struct is_##name##_imp\
+   {\
+      template <bool N> static char test(const name<N>*);\
+      static double test(...);\
+      BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast<T*>(0))) == 1);\
+   };\
+   }\
+   template <class T> struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp<T>::value>{};
+#else
+#define BOOST_MATH_META_INT(Type, name, Default)\
+   template <Type N = Default> struct name : public boost::mpl::int_<N>{};\
+   namespace detail{\
+   template <Type N>\
+   char test_is_valid_arg(const name<N>*);\
+   char test_is_default_arg(const name<Default>*);\
+   template <class T> struct is_##name##_tester\
+   {\
+      template <Type N> static char test(const name<N>&);\
+      static double test(...);\
+   };\
+   template <class T> struct is_##name##_imp\
+   {\
+      static T inst;\
+      BOOST_STATIC_CONSTANT(bool, value = sizeof( ::boost::math::policies::detail::is_##name##_tester<T>::test(inst)) == 1);\
+   };\
+   }\
+   template <class T> struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp<T>::value>\
+   {\
+      template <class U> struct apply{ typedef is_##name<U> type; };\
+   };
+
+#define BOOST_MATH_META_BOOL(name, Default)\
+   template <bool N = Default> struct name : public boost::mpl::bool_<N>{};\
+   namespace detail{\
+   template <bool N>\
+   char test_is_valid_arg(const name<N>*);\
+   char test_is_default_arg(const name<Default>*);\
+   template <class T> struct is_##name##_tester\
+   {\
+      template <bool N> static char test(const name<N>&);\
+      static double test(...);\
+   };\
+   template <class T> struct is_##name##_imp\
+   {\
+      static T inst;\
+      BOOST_STATIC_CONSTANT(bool, value = sizeof( ::boost::math::policies::detail::is_##name##_tester<T>::test(inst)) == 1);\
+   };\
+   }\
+   template <class T> struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp<T>::value>\
+   {\
+      template <class U> struct apply{ typedef is_##name<U> type;  };\
+   };
+#endif
+//
+// Begin by defining policy types for error handling:
+//
+enum error_policy_type
+{
+   throw_on_error = 0,
+   errno_on_error = 1,
+   ignore_error = 2,
+   user_error = 3
+};
+
+BOOST_MATH_META_INT(error_policy_type, domain_error, BOOST_MATH_DOMAIN_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, pole_error, BOOST_MATH_POLE_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, overflow_error, BOOST_MATH_OVERFLOW_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, underflow_error, BOOST_MATH_UNDERFLOW_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, denorm_error, BOOST_MATH_DENORM_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, evaluation_error, BOOST_MATH_EVALUATION_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, rounding_error, BOOST_MATH_ROUNDING_ERROR_POLICY)
+BOOST_MATH_META_INT(error_policy_type, indeterminate_result_error, BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY)
+
+//
+// Policy types for internal promotion:
+//
+BOOST_MATH_META_BOOL(promote_float, BOOST_MATH_PROMOTE_FLOAT_POLICY)
+BOOST_MATH_META_BOOL(promote_double, BOOST_MATH_PROMOTE_DOUBLE_POLICY)
+BOOST_MATH_META_BOOL(assert_undefined, BOOST_MATH_ASSERT_UNDEFINED_POLICY)
+//
+// Policy types for discrete quantiles:
+//
+enum discrete_quantile_policy_type
+{
+   real,
+   integer_round_outwards,
+   integer_round_inwards,
+   integer_round_down,
+   integer_round_up,
+   integer_round_nearest
+};
+
+BOOST_MATH_META_INT(discrete_quantile_policy_type, discrete_quantile, BOOST_MATH_DISCRETE_QUANTILE_POLICY)
+//
+// Precision:
+//
+BOOST_MATH_META_INT(int, digits10, BOOST_MATH_DIGITS10_POLICY)
+BOOST_MATH_META_INT(int, digits2, 0)
+//
+// Iterations:
+//
+BOOST_MATH_META_INT(unsigned long, max_series_iterations, BOOST_MATH_MAX_SERIES_ITERATION_POLICY)
+BOOST_MATH_META_INT(unsigned long, max_root_iterations, BOOST_MATH_MAX_ROOT_ITERATION_POLICY)
+//
+// Define the names for each possible policy:
+//
+#define BOOST_MATH_PARAMETER(name)\
+   BOOST_PARAMETER_TEMPLATE_KEYWORD(name##_name)\
+   BOOST_PARAMETER_NAME(name##_name)
+
+struct default_policy{};
+
+namespace detail{
+//
+// Trait to work out bits precision from digits10 and digits2:
+//
+template <class Digits10, class Digits2>
+struct precision
+{
+   //
+   // Now work out the precision:
+   //
+   typedef typename mpl::if_c<
+      (Digits10::value == 0),
+      digits2<0>,
+      digits2<((Digits10::value + 1) * 1000L) / 301L>
+   >::type digits2_type;
+public:
+#ifdef __BORLANDC__
+   typedef typename mpl::if_c<
+      (Digits2::value > ::boost::math::policies::detail::precision<Digits10,Digits2>::digits2_type::value),
+      Digits2, digits2_type>::type type;
+#else
+   typedef typename mpl::if_c<
+      (Digits2::value > digits2_type::value),
+      Digits2, digits2_type>::type type;
+#endif
+};
+
+template <class A, class B, bool b>
+struct select_result
+{
+   typedef A type;
+};
+template <class A, class B>
+struct select_result<A, B, false>
+{
+   typedef typename mpl::deref<B>::type type;
+};
+
+template <class Seq, class Pred, class DefaultType>
+struct find_arg
+{
+private:
+   typedef typename mpl::find_if<Seq, Pred>::type iter;
+   typedef typename mpl::end<Seq>::type end_type;
+public:
+   typedef typename select_result<
+      DefaultType, iter,
+      ::boost::is_same<iter, end_type>::value>::type type;
+};
+
+double test_is_valid_arg(...);
+double test_is_default_arg(...);
+char test_is_valid_arg(const default_policy*);
+char test_is_default_arg(const default_policy*);
+
+template <class T>
+struct is_valid_policy_imp 
+{
+   BOOST_STATIC_CONSTANT(bool, value = sizeof(::boost::math::policies::detail::test_is_valid_arg(static_cast<T*>(0))) == 1);
+};
+
+template <class T>
+struct is_default_policy_imp
+{
+   BOOST_STATIC_CONSTANT(bool, value = sizeof(::boost::math::policies::detail::test_is_default_arg(static_cast<T*>(0))) == 1);
+};
+
+template <class T> struct is_valid_policy 
+: public mpl::bool_< 
+   ::boost::math::policies::detail::is_valid_policy_imp<T>::value>
+{};
+
+template <class T> struct is_default_policy 
+: public mpl::bool_< 
+   ::boost::math::policies::detail::is_default_policy_imp<T>::value>
+{
+   template <class U>
+   struct apply
+   {
+      typedef is_default_policy<U> type;
+   };
+};
+
+template <class Seq, class T, int N>
+struct append_N
+{
+   typedef typename mpl::push_back<Seq, T>::type new_seq;
+   typedef typename append_N<new_seq, T, N-1>::type type;
+};
+
+template <class Seq, class T>
+struct append_N<Seq, T, 0>
+{
+   typedef Seq type;
+};
+
+//
+// Traits class to work out what template parameters our default
+// policy<> class will have when modified for forwarding:
+//
+template <bool f, bool d>
+struct default_args
+{
+   typedef promote_float<false> arg1;
+   typedef promote_double<false> arg2;
+};
+
+template <>
+struct default_args<false, false>
+{
+   typedef default_policy arg1;
+   typedef default_policy arg2;
+};
+
+template <>
+struct default_args<true, false>
+{
+   typedef promote_float<false> arg1;
+   typedef default_policy arg2;
+};
+
+template <>
+struct default_args<false, true>
+{
+   typedef promote_double<false> arg1;
+   typedef default_policy arg2;
+};
+
+typedef default_args<BOOST_MATH_PROMOTE_FLOAT_POLICY, BOOST_MATH_PROMOTE_DOUBLE_POLICY>::arg1 forwarding_arg1;
+typedef default_args<BOOST_MATH_PROMOTE_FLOAT_POLICY, BOOST_MATH_PROMOTE_DOUBLE_POLICY>::arg2 forwarding_arg2;
+
+} // detail
+//
+// Now define the policy type with enough arguments to handle all
+// the policies:
+//
+template <class A1 = default_policy, 
+          class A2 = default_policy, 
+          class A3 = default_policy,
+          class A4 = default_policy,
+          class A5 = default_policy,
+          class A6 = default_policy,
+          class A7 = default_policy,
+          class A8 = default_policy,
+          class A9 = default_policy,
+          class A10 = default_policy,
+          class A11 = default_policy,
+          class A12 = default_policy,
+          class A13 = default_policy>
+struct policy
+{
+private:
+   //
+   // Validate all our arguments:
+   //
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A1>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A2>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A3>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A4>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A5>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A6>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A7>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A8>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A9>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A10>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A11>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A12>::value);
+   BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy<A13>::value);
+   //
+   // Typelist of the arguments:
+   //
+   typedef mpl::list<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13> arg_list;
+
+public:
+   typedef typename detail::find_arg<arg_list, is_domain_error<mpl::_1>, domain_error<> >::type domain_error_type;
+   typedef typename detail::find_arg<arg_list, is_pole_error<mpl::_1>, pole_error<> >::type pole_error_type;
+   typedef typename detail::find_arg<arg_list, is_overflow_error<mpl::_1>, overflow_error<> >::type overflow_error_type;
+   typedef typename detail::find_arg<arg_list, is_underflow_error<mpl::_1>, underflow_error<> >::type underflow_error_type;
+   typedef typename detail::find_arg<arg_list, is_denorm_error<mpl::_1>, denorm_error<> >::type denorm_error_type;
+   typedef typename detail::find_arg<arg_list, is_evaluation_error<mpl::_1>, evaluation_error<> >::type evaluation_error_type;
+   typedef typename detail::find_arg<arg_list, is_rounding_error<mpl::_1>, rounding_error<> >::type rounding_error_type;
+   typedef typename detail::find_arg<arg_list, is_indeterminate_result_error<mpl::_1>, indeterminate_result_error<> >::type indeterminate_result_error_type;
+private:
+   //
+   // Now work out the precision:
+   //
+   typedef typename detail::find_arg<arg_list, is_digits10<mpl::_1>, digits10<> >::type digits10_type;
+   typedef typename detail::find_arg<arg_list, is_digits2<mpl::_1>, digits2<> >::type bits_precision_type;
+public:
+   typedef typename detail::precision<digits10_type, bits_precision_type>::type precision_type;
+   //
+   // Internal promotion:
+   //
+   typedef typename detail::find_arg<arg_list, is_promote_float<mpl::_1>, promote_float<> >::type promote_float_type;
+   typedef typename detail::find_arg<arg_list, is_promote_double<mpl::_1>, promote_double<> >::type promote_double_type;
+   //
+   // Discrete quantiles:
+   //
+   typedef typename detail::find_arg<arg_list, is_discrete_quantile<mpl::_1>, discrete_quantile<> >::type discrete_quantile_type;
+   //
+   // Mathematically undefined properties:
+   //
+   typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, discrete_quantile<> >::type assert_undefined_type;
+   //
+   // Max iterations:
+   //
+   typedef typename detail::find_arg<arg_list, is_max_series_iterations<mpl::_1>, max_series_iterations<> >::type max_series_iterations_type;
+   typedef typename detail::find_arg<arg_list, is_max_root_iterations<mpl::_1>, max_root_iterations<> >::type max_root_iterations_type;
+};
+//
+// These full specializations are defined to reduce the amount of
+// template instantiations that have to take place when using the default
+// policies, they have quite a large impact on compile times:
+//
+template <>
+struct policy<default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy>
+{
+public:
+   typedef domain_error<> domain_error_type;
+   typedef pole_error<> pole_error_type;
+   typedef overflow_error<> overflow_error_type;
+   typedef underflow_error<> underflow_error_type;
+   typedef denorm_error<> denorm_error_type;
+   typedef evaluation_error<> evaluation_error_type;
+   typedef rounding_error<> rounding_error_type;
+   typedef indeterminate_result_error<> indeterminate_result_error_type;
+#if BOOST_MATH_DIGITS10_POLICY == 0
+   typedef digits2<> precision_type;
+#else
+   typedef detail::precision<digits10<>, digits2<> >::type precision_type;
+#endif
+   typedef promote_float<> promote_float_type;
+   typedef promote_double<> promote_double_type;
+   typedef discrete_quantile<> discrete_quantile_type;
+   typedef assert_undefined<> assert_undefined_type;
+   typedef max_series_iterations<> max_series_iterations_type;
+   typedef max_root_iterations<> max_root_iterations_type;
+};
+
+template <>
+struct policy<detail::forwarding_arg1, detail::forwarding_arg2, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy>
+{
+public:
+   typedef domain_error<> domain_error_type;
+   typedef pole_error<> pole_error_type;
+   typedef overflow_error<> overflow_error_type;
+   typedef underflow_error<> underflow_error_type;
+   typedef denorm_error<> denorm_error_type;
+   typedef evaluation_error<> evaluation_error_type;
+   typedef rounding_error<> rounding_error_type;
+   typedef indeterminate_result_error<> indeterminate_result_error_type;
+#if BOOST_MATH_DIGITS10_POLICY == 0
+   typedef digits2<> precision_type;
+#else
+   typedef detail::precision<digits10<>, digits2<> >::type precision_type;
+#endif
+   typedef promote_float<false> promote_float_type;
+   typedef promote_double<false> promote_double_type;
+   typedef discrete_quantile<> discrete_quantile_type;
+   typedef assert_undefined<> assert_undefined_type;
+   typedef max_series_iterations<> max_series_iterations_type;
+   typedef max_root_iterations<> max_root_iterations_type;
+};
+
+template <class Policy, 
+          class A1 = default_policy, 
+          class A2 = default_policy, 
+          class A3 = default_policy,
+          class A4 = default_policy,
+          class A5 = default_policy,
+          class A6 = default_policy,
+          class A7 = default_policy,
+          class A8 = default_policy,
+          class A9 = default_policy,
+          class A10 = default_policy,
+          class A11 = default_policy,
+          class A12 = default_policy,
+          class A13 = default_policy>
+struct normalise
+{
+private:
+   typedef mpl::list<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13> arg_list;
+   typedef typename detail::find_arg<arg_list, is_domain_error<mpl::_1>, typename Policy::domain_error_type >::type domain_error_type;
+   typedef typename detail::find_arg<arg_list, is_pole_error<mpl::_1>, typename Policy::pole_error_type >::type pole_error_type;
+   typedef typename detail::find_arg<arg_list, is_overflow_error<mpl::_1>, typename Policy::overflow_error_type >::type overflow_error_type;
+   typedef typename detail::find_arg<arg_list, is_underflow_error<mpl::_1>, typename Policy::underflow_error_type >::type underflow_error_type;
+   typedef typename detail::find_arg<arg_list, is_denorm_error<mpl::_1>, typename Policy::denorm_error_type >::type denorm_error_type;
+   typedef typename detail::find_arg<arg_list, is_evaluation_error<mpl::_1>, typename Policy::evaluation_error_type >::type evaluation_error_type;
+   typedef typename detail::find_arg<arg_list, is_rounding_error<mpl::_1>, typename Policy::rounding_error_type >::type rounding_error_type;
+   typedef typename detail::find_arg<arg_list, is_indeterminate_result_error<mpl::_1>, typename Policy::indeterminate_result_error_type >::type indeterminate_result_error_type;
+   //
+   // Now work out the precision:
+   //
+   typedef typename detail::find_arg<arg_list, is_digits10<mpl::_1>, digits10<> >::type digits10_type;
+   typedef typename detail::find_arg<arg_list, is_digits2<mpl::_1>, typename Policy::precision_type >::type bits_precision_type;
+   typedef typename detail::precision<digits10_type, bits_precision_type>::type precision_type;
+   //
+   // Internal promotion:
+   //
+   typedef typename detail::find_arg<arg_list, is_promote_float<mpl::_1>, typename Policy::promote_float_type >::type promote_float_type;
+   typedef typename detail::find_arg<arg_list, is_promote_double<mpl::_1>, typename Policy::promote_double_type >::type promote_double_type;
+   //
+   // Discrete quantiles:
+   //
+   typedef typename detail::find_arg<arg_list, is_discrete_quantile<mpl::_1>, typename Policy::discrete_quantile_type >::type discrete_quantile_type;
+   //
+   // Mathematically undefined properties:
+   //
+   typedef typename detail::find_arg<arg_list, is_assert_undefined<mpl::_1>, discrete_quantile<> >::type assert_undefined_type;
+   //
+   // Max iterations:
+   //
+   typedef typename detail::find_arg<arg_list, is_max_series_iterations<mpl::_1>, max_series_iterations<> >::type max_series_iterations_type;
+   typedef typename detail::find_arg<arg_list, is_max_root_iterations<mpl::_1>, max_root_iterations<> >::type max_root_iterations_type;
+   //
+   // Define a typelist of the policies:
+   //
+   typedef mpl::vector<
+      domain_error_type,
+      pole_error_type,
+      overflow_error_type,
+      underflow_error_type,
+      denorm_error_type,
+      evaluation_error_type,
+      rounding_error_type,
+      indeterminate_result_error_type,
+      precision_type,
+      promote_float_type,
+      promote_double_type,
+      discrete_quantile_type,
+      assert_undefined_type,
+      max_series_iterations_type,
+      max_root_iterations_type> result_list;
+   //
+   // Remove all the policies that are the same as the default:
+   //
+   typedef typename mpl::remove_if<result_list, detail::is_default_policy<mpl::_> >::type reduced_list;
+   //
+   // Pad out the list with defaults:
+   //
+   typedef typename detail::append_N<reduced_list, default_policy, (14 - ::boost::mpl::size<reduced_list>::value)>::type result_type;
+public:
+   typedef policy<
+      typename mpl::at<result_type, mpl::int_<0> >::type,
+      typename mpl::at<result_type, mpl::int_<1> >::type,
+      typename mpl::at<result_type, mpl::int_<2> >::type,
+      typename mpl::at<result_type, mpl::int_<3> >::type,
+      typename mpl::at<result_type, mpl::int_<4> >::type,
+      typename mpl::at<result_type, mpl::int_<5> >::type,
+      typename mpl::at<result_type, mpl::int_<6> >::type,
+      typename mpl::at<result_type, mpl::int_<7> >::type,
+      typename mpl::at<result_type, mpl::int_<8> >::type,
+      typename mpl::at<result_type, mpl::int_<9> >::type,
+      typename mpl::at<result_type, mpl::int_<10> >::type,
+      typename mpl::at<result_type, mpl::int_<11> >::type,
+      typename mpl::at<result_type, mpl::int_<12> >::type > type;
+};
+//
+// Full specialisation to speed up compilation of the common case:
+//
+template <>
+struct normalise<policy<>, 
+          promote_float<false>, 
+          promote_double<false>, 
+          discrete_quantile<>,
+          assert_undefined<>,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy>
+{
+   typedef policy<detail::forwarding_arg1, detail::forwarding_arg2> type;
+};
+
+template <>
+struct normalise<policy<detail::forwarding_arg1, detail::forwarding_arg2>,
+          promote_float<false>,
+          promote_double<false>,
+          discrete_quantile<>,
+          assert_undefined<>,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy,
+          default_policy>
+{
+   typedef policy<detail::forwarding_arg1, detail::forwarding_arg2> type;
+};
+
+inline policy<> make_policy()
+{ return policy<>(); }
+
+template <class A1>
+inline typename normalise<policy<>, A1>::type make_policy(const A1&)
+{ 
+   typedef typename normalise<policy<>, A1>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2>
+inline typename normalise<policy<>, A1, A2>::type make_policy(const A1&, const A2&)
+{ 
+   typedef typename normalise<policy<>, A1, A2>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3>
+inline typename normalise<policy<>, A1, A2, A3>::type make_policy(const A1&, const A2&, const A3&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4>
+inline typename normalise<policy<>, A1, A2, A3, A4>::type make_policy(const A1&, const A2&, const A3&, const A4&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&)
+{ 
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type result_type;
+   return result_type(); 
+}
+
+template <class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10, class A11>
+inline typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&, const A11&)
+{
+   typedef typename normalise<policy<>, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type result_type;
+   return result_type();
+}
+
+//
+// Traits class to handle internal promotion:
+//
+template <class Real, class Policy>
+struct evaluation
+{
+   typedef Real type;
+};
+
+template <class Policy>
+struct evaluation<float, Policy>
+{
+   typedef typename mpl::if_<typename Policy::promote_float_type, double, float>::type type;
+};
+
+template <class Policy>
+struct evaluation<double, Policy>
+{
+   typedef typename mpl::if_<typename Policy::promote_double_type, long double, double>::type type;
+};
+
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+
+template <class Real>
+struct basic_digits : public mpl::int_<0>{ };
+template <>
+struct basic_digits<float> : public mpl::int_<FLT_MANT_DIG>{ };
+template <>
+struct basic_digits<double> : public mpl::int_<DBL_MANT_DIG>{ };
+template <>
+struct basic_digits<long double> : public mpl::int_<LDBL_MANT_DIG>{ };
+
+template <class Real, class Policy>
+struct precision
+{
+   BOOST_STATIC_ASSERT( ::std::numeric_limits<Real>::radix == 2);
+   typedef typename Policy::precision_type precision_type;
+   typedef basic_digits<Real> digits_t;
+   typedef typename mpl::if_<
+      mpl::equal_to<digits_t, mpl::int_<0> >,
+      // Possibly unknown precision:
+      precision_type,
+      typename mpl::if_<
+         mpl::or_<mpl::less_equal<digits_t, precision_type>, mpl::less_equal<precision_type, mpl::int_<0> > >,
+         // Default case, full precision for RealType:
+         digits2< ::std::numeric_limits<Real>::digits>,
+         // User customised precision:
+         precision_type
+      >::type
+   >::type type;
+};
+
+template <class Policy>
+struct precision<float, Policy>
+{
+   typedef digits2<FLT_MANT_DIG> type;
+};
+template <class Policy>
+struct precision<double, Policy>
+{
+   typedef digits2<DBL_MANT_DIG> type;
+};
+template <class Policy>
+struct precision<long double, Policy>
+{
+   typedef digits2<LDBL_MANT_DIG> type;
+};
+
+#else
+
+template <class Real, class Policy>
+struct precision
+{
+   BOOST_STATIC_ASSERT((::std::numeric_limits<Real>::radix == 2) || ((::std::numeric_limits<Real>::is_specialized == 0) || (::std::numeric_limits<Real>::digits == 0)));
+#ifndef __BORLANDC__
+   typedef typename Policy::precision_type precision_type;
+   typedef typename mpl::if_c<
+      ((::std::numeric_limits<Real>::is_specialized == 0) || (::std::numeric_limits<Real>::digits == 0)),
+      // Possibly unknown precision:
+      precision_type,
+      typename mpl::if_c<
+         ((::std::numeric_limits<Real>::digits <= precision_type::value) 
+         || (Policy::precision_type::value <= 0)),
+         // Default case, full precision for RealType:
+         digits2< ::std::numeric_limits<Real>::digits>,
+         // User customised precision:
+         precision_type
+      >::type
+   >::type type;
+#else
+   typedef typename Policy::precision_type precision_type;
+   typedef mpl::int_< ::std::numeric_limits<Real>::digits> digits_t;
+   typedef mpl::bool_< ::std::numeric_limits<Real>::is_specialized> spec_t;
+   typedef typename mpl::if_<
+      mpl::or_<mpl::equal_to<spec_t, mpl::false_>, mpl::equal_to<digits_t, mpl::int_<0> > >,
+      // Possibly unknown precision:
+      precision_type,
+      typename mpl::if_<
+         mpl::or_<mpl::less_equal<digits_t, precision_type>, mpl::less_equal<precision_type, mpl::int_<0> > >,
+         // Default case, full precision for RealType:
+         digits2< ::std::numeric_limits<Real>::digits>,
+         // User customised precision:
+         precision_type
+      >::type
+   >::type type;
+#endif
+};
+
+#endif
+
+namespace detail{
+
+template <class T, class Policy>
+inline int digits_imp(mpl::true_ const&)
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+#else
+   BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+#endif
+   typedef typename boost::math::policies::precision<T, Policy>::type p_t;
+   return p_t::value;
+}
+
+template <class T, class Policy>
+inline int digits_imp(mpl::false_ const&)
+{
+   return tools::digits<T>();
+}
+
+} // namespace detail
+
+template <class T, class Policy>
+inline int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
+{
+   typedef mpl::bool_< std::numeric_limits<T>::is_specialized > tag_type;
+   return detail::digits_imp<T, Policy>(tag_type());
+}
+
+template <class Policy>
+inline unsigned long get_max_series_iterations()
+{
+   typedef typename Policy::max_series_iterations_type iter_type;
+   return iter_type::value;
+}
+
+template <class Policy>
+inline unsigned long get_max_root_iterations()
+{
+   typedef typename Policy::max_root_iterations_type iter_type;
+   return iter_type::value;
+}
+
+namespace detail{
+
+template <class T, class Digits, class Small, class Default>
+struct series_factor_calc
+{
+   static T get()
+   {
+      return ldexp(T(1.0), 1 - Digits::value);
+   }
+};
+
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::true_, mpl::true_>
+{
+   static T get()
+   {
+      return boost::math::tools::epsilon<T>();
+   }
+};
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::true_, mpl::false_>
+{
+   static T get()
+   {
+      static const boost::uintmax_t v = static_cast<boost::uintmax_t>(1u) << (Digits::value - 1);
+      return 1 / static_cast<T>(v);
+   }
+};
+template <class T, class Digits>
+struct series_factor_calc<T, Digits, mpl::false_, mpl::true_>
+{
+   static T get()
+   {
+      return boost::math::tools::epsilon<T>();
+   }
+};
+
+template <class T, class Policy>
+inline T get_epsilon_imp(mpl::true_ const&)
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+   BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::radix == 2);
+#else
+   BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+   BOOST_ASSERT(::std::numeric_limits<T>::radix == 2);
+#endif
+   typedef typename boost::math::policies::precision<T, Policy>::type p_t;
+   typedef mpl::bool_<p_t::value <= std::numeric_limits<boost::uintmax_t>::digits> is_small_int;
+   typedef mpl::bool_<p_t::value >= std::numeric_limits<T>::digits> is_default_value;
+   return series_factor_calc<T, p_t, is_small_int, is_default_value>::get();
+}
+
+template <class T, class Policy>
+inline T get_epsilon_imp(mpl::false_ const&)
+{
+   return tools::epsilon<T>();
+}
+
+} // namespace detail
+
+template <class T, class Policy>
+inline T get_epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T))
+{
+   typedef mpl::bool_< (std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::radix == 2)) > tag_type;
+   return detail::get_epsilon_imp<T, Policy>(tag_type());
+}
+
+namespace detail{
+
+template <class A1, 
+          class A2, 
+          class A3,
+          class A4,
+          class A5,
+          class A6,
+          class A7,
+          class A8,
+          class A9,
+          class A10,
+          class A11>
+char test_is_policy(const policy<A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11>*);
+double test_is_policy(...);
+
+template <class P>
+struct is_policy_imp
+{
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::math::policies::detail::test_is_policy(static_cast<P*>(0))) == 1));
+};
+
+}
+
+template <class P>
+struct is_policy : public mpl::bool_< ::boost::math::policies::detail::is_policy_imp<P>::value> {};
+
+}}} // namespaces
+
+#endif // BOOST_MATH_POLICY_HPP
+
+
+
diff --git a/boost/boost/math/special_functions/detail/fp_traits.hpp b/boost/boost/math/special_functions/detail/fp_traits.hpp
new file mode 100644 (file)
index 0000000..54d4591
--- /dev/null
@@ -0,0 +1,570 @@
+// fp_traits.hpp
+
+#ifndef BOOST_MATH_FP_TRAITS_HPP
+#define BOOST_MATH_FP_TRAITS_HPP
+
+// Copyright (c) 2006 Johan Rade
+
+// 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)
+
+/*
+To support old compilers, care has been taken to avoid partial template
+specialization and meta function forwarding.
+With these techniques, the code could be simplified.
+*/
+
+#if defined(__vms) && defined(__DECCXX) && !__IEEE_FLOAT
+// The VAX floating point formats are used (for float and double)
+#   define BOOST_FPCLASSIFY_VAX_FORMAT
+#endif
+
+#include <cstring>
+
+#include <boost/assert.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/detail/endian.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+  namespace std{ using ::memcpy; }
+#endif
+
+#ifndef FP_NORMAL
+
+#define FP_ZERO        0
+#define FP_NORMAL      1
+#define FP_INFINITE    2
+#define FP_NAN         3
+#define FP_SUBNORMAL   4
+
+#else
+
+#define BOOST_HAS_FPCLASSIFY
+
+#ifndef fpclassify
+#  if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
+         && defined(_GLIBCXX_USE_C99_MATH) \
+         && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) \
+         && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0))
+#     ifdef _STLP_VENDOR_CSTD
+#        if _STLPORT_VERSION >= 0x520
+#           define BOOST_FPCLASSIFY_PREFIX ::__std_alias:: 
+#        else
+#           define BOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD:: 
+#        endif
+#     else
+#        define BOOST_FPCLASSIFY_PREFIX ::std::
+#     endif
+#  else
+#     undef BOOST_HAS_FPCLASSIFY
+#     define BOOST_FPCLASSIFY_PREFIX
+#  endif
+#elif (defined(__HP_aCC) && !defined(__hppa))
+// aCC 6 appears to do "#define fpclassify fpclassify" which messes us up a bit!
+#  define BOOST_FPCLASSIFY_PREFIX ::
+#else
+#  define BOOST_FPCLASSIFY_PREFIX
+#endif
+
+#ifdef __MINGW32__
+#  undef BOOST_HAS_FPCLASSIFY
+#endif
+
+#endif
+
+
+//------------------------------------------------------------------------------
+
+namespace boost {
+namespace math {
+namespace detail {
+
+//------------------------------------------------------------------------------
+
+/* 
+The following classes are used to tag the different methods that are used
+for floating point classification
+*/
+
+struct native_tag {};
+template <bool has_limits>
+struct generic_tag {};
+struct ieee_tag {};
+struct ieee_copy_all_bits_tag : public ieee_tag {};
+struct ieee_copy_leading_bits_tag : public ieee_tag {};
+
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+//
+// These helper functions are used only when numeric_limits<>
+// members are not compile time constants:
+//
+inline bool is_generic_tag_false(const generic_tag<false>&)
+{
+   return true;
+}
+inline bool is_generic_tag_false(...)
+{
+   return false;
+}
+#endif
+
+//------------------------------------------------------------------------------
+
+/*
+Most processors support three different floating point precisions:
+single precision (32 bits), double precision (64 bits)
+and extended double precision (80 - 128 bits, depending on the processor)
+
+Note that the C++ type long double can be implemented
+both as double precision and extended double precision.
+*/
+
+struct unknown_precision{};
+struct single_precision {};
+struct double_precision {};
+struct extended_double_precision {};
+
+// native_tag version --------------------------------------------------------------
+
+template<class T> struct fp_traits_native
+{
+    typedef native_tag method;
+};
+
+// generic_tag version -------------------------------------------------------------
+
+template<class T, class U> struct fp_traits_non_native
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   typedef generic_tag<std::numeric_limits<T>::is_specialized> method;
+#else
+   typedef generic_tag<false> method;
+#endif
+};
+
+// ieee_tag versions ---------------------------------------------------------------
+
+/*
+These specializations of fp_traits_non_native contain information needed
+to "parse" the binary representation of a floating point number.
+
+Typedef members:
+
+  bits -- the target type when copying the leading bytes of a floating
+      point number. It is a typedef for uint32_t or uint64_t.
+
+  method -- tells us whether all bytes are copied or not.
+      It is a typedef for ieee_copy_all_bits_tag or ieee_copy_leading_bits_tag.
+
+Static data members:
+
+  sign, exponent, flag, significand -- bit masks that give the meaning of the
+  bits in the leading bytes.
+
+Static function members:
+
+  get_bits(), set_bits() -- provide access to the leading bytes.
+
+*/
+
+// ieee_tag version, float (32 bits) -----------------------------------------------
+
+#ifndef BOOST_FPCLASSIFY_VAX_FORMAT
+
+template<> struct fp_traits_non_native<float, single_precision>
+{
+    typedef ieee_copy_all_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7f800000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x007fffff);
+
+    typedef uint32_t bits;
+    static void get_bits(float x, uint32_t& a) { std::memcpy(&a, &x, 4); }
+    static void set_bits(float& x, uint32_t a) { std::memcpy(&x, &a, 4); }
+};
+
+// ieee_tag version, double (64 bits) ----------------------------------------------
+
+#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) \
+   || defined(__BORLANDC__) || defined(__CODEGEAR__)
+
+template<> struct fp_traits_non_native<double, double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+    }
+
+    static void set_bits(double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+    }
+
+private:
+
+#if defined(BOOST_BIG_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(BOOST_LITTLE_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 4);
+#else
+    BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+//..............................................................................
+
+#else
+
+template<> struct fp_traits_non_native<double, double_precision>
+{
+    typedef ieee_copy_all_bits_tag method;
+
+    static const uint64_t sign     = ((uint64_t)0x80000000u) << 32;
+    static const uint64_t exponent = ((uint64_t)0x7ff00000) << 32;
+    static const uint64_t flag     = 0;
+    static const uint64_t significand
+        = (((uint64_t)0x000fffff) << 32) + ((uint64_t)0xffffffffu);
+
+    typedef uint64_t bits;
+    static void get_bits(double x, uint64_t& a) { std::memcpy(&a, &x, 8); }
+    static void set_bits(double& x, uint64_t a) { std::memcpy(&x, &a, 8); }
+};
+
+#endif
+
+#endif  // #ifndef BOOST_FPCLASSIFY_VAX_FORMAT
+
+// long double (64 bits) -------------------------------------------------------
+
+#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)\
+   || defined(__BORLANDC__) || defined(__CODEGEAR__)
+
+template<> struct fp_traits_non_native<long double, double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+    }
+
+private:
+
+#if defined(BOOST_BIG_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(BOOST_LITTLE_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 4);
+#else
+    BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+//..............................................................................
+
+#else
+
+template<> struct fp_traits_non_native<long double, double_precision>
+{
+    typedef ieee_copy_all_bits_tag method;
+
+    static const uint64_t sign     = (uint64_t)0x80000000u << 32;
+    static const uint64_t exponent = (uint64_t)0x7ff00000 << 32;
+    static const uint64_t flag     = 0;
+    static const uint64_t significand
+        = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffffu;
+
+    typedef uint64_t bits;
+    static void get_bits(long double x, uint64_t& a) { std::memcpy(&a, &x, 8); }
+    static void set_bits(long double& x, uint64_t a) { std::memcpy(&x, &a, 8); }
+};
+
+#endif
+
+
+// long double (>64 bits), x86 and x64 -----------------------------------------
+
+#if defined(__i386) || defined(__i386__) || defined(_M_IX86) \
+    || defined(__amd64) || defined(__amd64__)  || defined(_M_AMD64) \
+    || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64)
+
+// Intel extended double precision format (80 bits)
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00008000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + 6, 4);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + 6, &a, 4);
+    }
+};
+
+
+// long double (>64 bits), Itanium ---------------------------------------------
+
+#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
+
+// The floating point format is unknown at compile time
+// No template specialization is provided.
+// The generic_tag definition is used.
+
+// The Itanium supports both
+// the Intel extended double precision format (80 bits) and
+// the IEEE extended double precision format with 15 exponent bits (128 bits).
+
+
+// long double (>64 bits), PowerPC ---------------------------------------------
+
+#elif defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) \
+    || defined(__ppc) || defined(__ppc__) || defined(__PPC__)
+
+// PowerPC extended double precision format (128 bits)
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7ff00000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+    }
+
+private:
+
+#if defined(BOOST_BIG_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(BOOST_LITTLE_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 12);
+#else
+    BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+
+// long double (>64 bits), Motorola 68K ----------------------------------------
+
+#elif defined(__m68k) || defined(__m68k__) \
+    || defined(__mc68000) || defined(__mc68000__) \
+
+// Motorola extended double precision format (96 bits)
+
+// It is the same format as the Intel extended double precision format,
+// except that 1) it is big-endian, 2) the 3rd and 4th byte are padding, and
+// 3) the flag bit is not set for infinity
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00008000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);
+
+    // copy 1st, 2nd, 5th and 6th byte. 3rd and 4th byte are padding.
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, &x, 2);
+        std::memcpy(reinterpret_cast<unsigned char*>(&a) + 2,
+               reinterpret_cast<const unsigned char*>(&x) + 4, 2);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(&x, &a, 2);
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + 4,
+               reinterpret_cast<const unsigned char*>(&a) + 2, 2);
+    }
+};
+
+
+// long double (>64 bits), All other processors --------------------------------
+
+#else
+
+// IEEE extended double precision format with 15 exponent bits (128 bits)
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+    typedef ieee_copy_leading_bits_tag method;
+
+    BOOST_STATIC_CONSTANT(uint32_t, sign        = 0x80000000u);
+    BOOST_STATIC_CONSTANT(uint32_t, exponent    = 0x7fff0000);
+    BOOST_STATIC_CONSTANT(uint32_t, flag        = 0x00000000);
+    BOOST_STATIC_CONSTANT(uint32_t, significand = 0x0000ffff);
+
+    typedef uint32_t bits;
+
+    static void get_bits(long double x, uint32_t& a)
+    {
+        std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+    }
+
+    static void set_bits(long double& x, uint32_t a)
+    {
+        std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+    }
+
+private:
+
+#if defined(BOOST_BIG_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif defined(BOOST_LITTLE_ENDIAN)
+    BOOST_STATIC_CONSTANT(int, offset_ = 12);
+#else
+    BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+#endif
+
+//------------------------------------------------------------------------------
+
+// size_to_precision is a type switch for converting a C++ floating point type
+// to the corresponding precision type.
+
+template<int n, bool fp> struct size_to_precision
+{
+   typedef unknown_precision type;
+};
+
+template<> struct size_to_precision<4, true>
+{
+    typedef single_precision type;
+};
+
+template<> struct size_to_precision<8, true>
+{
+    typedef double_precision type;
+};
+
+template<> struct size_to_precision<10, true>
+{
+    typedef extended_double_precision type;
+};
+
+template<> struct size_to_precision<12, true>
+{
+    typedef extended_double_precision type;
+};
+
+template<> struct size_to_precision<16, true>
+{
+    typedef extended_double_precision type;
+};
+
+//------------------------------------------------------------------------------
+//
+// Figure out whether to use native classification functions based on
+// whether T is a built in floating point type or not:
+//
+template <class T>
+struct select_native
+{
+    typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::boost::is_floating_point<T>::value>::type precision;
+    typedef fp_traits_non_native<T, precision> type;
+};
+template<>
+struct select_native<float>
+{
+    typedef fp_traits_native<float> type;
+};
+template<>
+struct select_native<double>
+{
+    typedef fp_traits_native<double> type;
+};
+template<>
+struct select_native<long double>
+{
+    typedef fp_traits_native<long double> type;
+};
+
+//------------------------------------------------------------------------------
+
+// fp_traits is a type switch that selects the right fp_traits_non_native
+
+#if (defined(BOOST_MATH_USE_C99) && !(defined(__GNUC__) && (__GNUC__ < 4))) \
+   && !defined(__hpux) \
+   && !defined(__DECCXX)\
+   && !defined(__osf__) \
+   && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)\
+   && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
+#  define BOOST_MATH_USE_STD_FPCLASSIFY
+#endif
+
+template<class T> struct fp_traits
+{
+    typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::boost::is_floating_point<T>::value>::type precision;
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
+    typedef typename select_native<T>::type type;
+#else
+    typedef fp_traits_non_native<T, precision> type;
+#endif
+    typedef fp_traits_non_native<T, precision> sign_change_type;
+};
+
+//------------------------------------------------------------------------------
+
+}   // namespace detail
+}   // namespace math
+}   // namespace boost
+
+#endif
diff --git a/boost/boost/math/special_functions/detail/round_fwd.hpp b/boost/boost/math/special_functions/detail/round_fwd.hpp
new file mode 100644 (file)
index 0000000..952259a
--- /dev/null
@@ -0,0 +1,80 @@
+// Copyright John Maddock 2008.
+
+// Use, modification and distribution are subject to 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)
+
+#ifndef BOOST_MATH_SPECIAL_ROUND_FWD_HPP
+#define BOOST_MATH_SPECIAL_ROUND_FWD_HPP
+
+#include <boost/config.hpp>
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+namespace boost
+{
+   namespace math
+   { 
+
+   template <class T, class Policy>
+   T trunc(const T& v, const Policy& pol);
+   template <class T>
+   T trunc(const T& v);
+   template <class T, class Policy>
+   int itrunc(const T& v, const Policy& pol);
+   template <class T>
+   int itrunc(const T& v);
+   template <class T, class Policy>
+   long ltrunc(const T& v, const Policy& pol);
+   template <class T>
+   long ltrunc(const T& v);
+#ifdef BOOST_HAS_LONG_LONG
+   template <class T, class Policy>
+   boost::long_long_type lltrunc(const T& v, const Policy& pol);
+   template <class T>
+   boost::long_long_type lltrunc(const T& v);
+#endif
+   template <class T, class Policy>
+   T round(const T& v, const Policy& pol);
+   template <class T>
+   T round(const T& v);
+   template <class T, class Policy>
+   int iround(const T& v, const Policy& pol);
+   template <class T>
+   int iround(const T& v);
+   template <class T, class Policy>
+   long lround(const T& v, const Policy& pol);
+   template <class T>
+   long lround(const T& v);
+#ifdef BOOST_HAS_LONG_LONG
+   template <class T, class Policy>
+   boost::long_long_type llround(const T& v, const Policy& pol);
+   template <class T>
+   boost::long_long_type llround(const T& v);
+#endif
+   template <class T, class Policy>
+   T modf(const T& v, T* ipart, const Policy& pol);
+   template <class T>
+   T modf(const T& v, T* ipart);
+   template <class T, class Policy>
+   T modf(const T& v, int* ipart, const Policy& pol);
+   template <class T>
+   T modf(const T& v, int* ipart);
+   template <class T, class Policy>
+   T modf(const T& v, long* ipart, const Policy& pol);
+   template <class T>
+   T modf(const T& v, long* ipart);
+#ifdef BOOST_HAS_LONG_LONG
+   template <class T, class Policy>
+   T modf(const T& v, boost::long_long_type* ipart, const Policy& pol);
+   template <class T>
+   T modf(const T& v, boost::long_long_type* ipart);
+#endif
+
+   }
+}
+#endif // BOOST_MATH_SPECIAL_ROUND_FWD_HPP
+
diff --git a/boost/boost/math/special_functions/fpclassify.hpp b/boost/boost/math/special_functions/fpclassify.hpp
new file mode 100644 (file)
index 0000000..190b73f
--- /dev/null
@@ -0,0 +1,533 @@
+//  Copyright John Maddock 2005-2008.
+//  Copyright (c) 2006-2008 Johan Rade
+//  Use, modification and distribution are subject to 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)
+
+#ifndef BOOST_MATH_FPCLASSIFY_HPP
+#define BOOST_MATH_FPCLASSIFY_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <math.h>
+#include <boost/config/no_tr1/cmath.hpp>
+#include <boost/limits.hpp>
+#include <boost/math/tools/real_cast.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+#include <boost/math/special_functions/math_fwd.hpp>
+#include <boost/math/special_functions/detail/fp_traits.hpp>
+/*!
+  \file fpclassify.hpp
+  \brief Classify floating-point value as normal, subnormal, zero, infinite, or NaN.
+  \version 1.0
+  \author John Maddock
+ */
+
+/*
+
+1. If the platform is C99 compliant, then the native floating point
+classification functions are used.  However, note that we must only
+define the functions which call std::fpclassify etc if that function
+really does exist: otherwise a compiler may reject the code even though
+the template is never instantiated.
+
+2. If the platform is not C99 compliant, and the binary format for
+a floating point type (float, double or long double) can be determined
+at compile time, then the following algorithm is used:
+
+        If all exponent bits, the flag bit (if there is one), 
+        and all significand bits are 0, then the number is zero.
+
+        If all exponent bits and the flag bit (if there is one) are 0, 
+        and at least one significand bit is 1, then the number is subnormal.
+
+        If all exponent bits are 1 and all significand bits are 0, 
+        then the number is infinity.
+
+        If all exponent bits are 1 and at least one significand bit is 1,
+        then the number is a not-a-number.
+
+        Otherwise the number is normal.
+
+        This algorithm works for the IEEE 754 representation,
+        and also for several non IEEE 754 formats.
+
+    Most formats have the structure
+        sign bit + exponent bits + significand bits.
+    
+    A few have the structure
+        sign bit + exponent bits + flag bit + significand bits.
+    The flag bit is 0 for zero and subnormal numbers,
+        and 1 for normal numbers and NaN.
+        It is 0 (Motorola 68K) or 1 (Intel) for infinity.
+
+    To get the bits, the four or eight most significant bytes are copied
+    into an uint32_t or uint64_t and bit masks are applied.
+    This covers all the exponent bits and the flag bit (if there is one),
+    but not always all the significand bits.
+    Some of the functions below have two implementations,
+    depending on whether all the significand bits are copied or not.
+
+3. If the platform is not C99 compliant, and the binary format for
+a floating point type (float, double or long double) can not be determined
+at compile time, then comparison with std::numeric_limits values
+is used.
+
+*/
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+#include <float.h>
+#endif
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+  namespace std{ using ::abs; using ::fabs; }
+#endif
+
+namespace boost{ 
+
+//
+// This must not be located in any namespace under boost::math
+// otherwise we can get into an infinite loop if isnan is
+// a #define for "isnan" !
+//
+namespace math_detail{
+
+template <class T>
+inline bool is_nan_helper(T t, const boost::true_type&)
+{
+#ifdef isnan
+   return isnan(t);
+#elif defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) || !defined(BOOST_HAS_FPCLASSIFY)
+   return false;
+#else // BOOST_HAS_FPCLASSIFY
+   return (BOOST_FPCLASSIFY_PREFIX fpclassify(t) == (int)FP_NAN);
+#endif
+}
+
+template <class T>
+inline bool is_nan_helper(T, const boost::false_type&)
+{
+   return false;
+}
+
+}
+
+namespace math{
+
+namespace detail{
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+template <class T>
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const native_tag&)
+{
+   return (std::fpclassify)(t);
+}
+#endif
+
+template <class T>
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag<true>&)
+{
+   BOOST_MATH_INSTRUMENT_VARIABLE(t);
+
+   // whenever possible check for Nan's first:
+#if defined(BOOST_HAS_FPCLASSIFY)  && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
+   if(::boost::math_detail::is_nan_helper(t, ::boost::is_floating_point<T>()))
+      return FP_NAN;
+#elif defined(isnan)
+   if(boost::math_detail::is_nan_helper(t, ::boost::is_floating_point<T>()))
+      return FP_NAN;
+#elif defined(_MSC_VER) || defined(__BORLANDC__)
+   if(::_isnan(boost::math::tools::real_cast<double>(t)))
+      return FP_NAN;
+#endif
+   // std::fabs broken on a few systems especially for long long!!!!
+   T at = (t < T(0)) ? -t : t;
+
+   // Use a process of exclusion to figure out
+   // what kind of type we have, this relies on
+   // IEEE conforming reals that will treat
+   // Nan's as unordered.  Some compilers
+   // don't do this once optimisations are
+   // turned on, hence the check for nan's above.
+   if(at <= (std::numeric_limits<T>::max)())
+   {
+      if(at >= (std::numeric_limits<T>::min)())
+         return FP_NORMAL;
+      return (at != 0) ? FP_SUBNORMAL : FP_ZERO;
+   }
+   else if(at > (std::numeric_limits<T>::max)())
+      return FP_INFINITE;
+   return FP_NAN;
+}
+
+template <class T>
+inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag<false>&)
+{
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   if(std::numeric_limits<T>::is_specialized)
+      return fp_classify_imp(t, mpl::true_());
+#endif
+   // 
+   // An unknown type with no numeric_limits support,
+   // so what are we supposed to do we do here?
+   //
+   BOOST_MATH_INSTRUMENT_VARIABLE(t);
+
+   return t == 0 ? FP_ZERO : FP_NORMAL;
+}
+
+template<class T> 
+int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag)
+{
+   typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+   BOOST_MATH_INSTRUMENT_VARIABLE(x);
+
+   BOOST_DEDUCED_TYPENAME traits::bits a;
+   traits::get_bits(x,a);
+   BOOST_MATH_INSTRUMENT_VARIABLE(a);
+   a &= traits::exponent | traits::flag | traits::significand;
+   BOOST_MATH_INSTRUMENT_VARIABLE((traits::exponent | traits::flag | traits::significand));
+   BOOST_MATH_INSTRUMENT_VARIABLE(a);
+
+   if(a <= traits::significand) {
+      if(a == 0)
+         return FP_ZERO;
+      else
+         return FP_SUBNORMAL;
+   }
+
+   if(a < traits::exponent) return FP_NORMAL;
+
+   a &= traits::significand;
+   if(a == 0) return FP_INFINITE;
+
+   return FP_NAN;
+}
+
+template<class T> 
+int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag)
+{
+   typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+   BOOST_MATH_INSTRUMENT_VARIABLE(x);
+
+   BOOST_DEDUCED_TYPENAME traits::bits a;
+   traits::get_bits(x,a); 
+   a &= traits::exponent | traits::flag | traits::significand;
+
+   if(a <= traits::significand) {
+      if(x == 0)
+         return FP_ZERO;
+      else
+         return FP_SUBNORMAL;
+   }
+
+   if(a < traits::exponent) return FP_NORMAL;
+
+   a &= traits::significand;
+   traits::set_bits(x,a);
+   if(x == 0) return FP_INFINITE;
+
+   return FP_NAN;
+}
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+template <>
+inline int fpclassify_imp<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+{
+   return boost::math::detail::fpclassify_imp(t, generic_tag<true>());
+}
+#endif
+
+}  // namespace detail
+
+template <class T>
+inline int fpclassify BOOST_NO_MACRO_EXPAND(T t)
+{
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+   if(std::numeric_limits<T>::is_specialized && detail::is_generic_tag_false(method()))
+      return detail::fpclassify_imp(t, detail::generic_tag<true>());
+   return detail::fpclassify_imp(t, method());
+#else
+   return detail::fpclassify_imp(t, method());
+#endif
+}
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T> 
+    inline bool isfinite_impl(T x, native_tag const&)
+    {
+        return (std::isfinite)(x);
+    }
+#endif
+
+    template<class T> 
+    inline bool isfinite_impl(T x, generic_tag<true> const&)
+    {
+        return x >= -(std::numeric_limits<T>::max)()
+            && x <= (std::numeric_limits<T>::max)();
+    }
+
+    template<class T> 
+    inline bool isfinite_impl(T x, generic_tag<false> const&)
+    {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+      if(std::numeric_limits<T>::is_specialized)
+         return isfinite_impl(x, mpl::true_());
+#endif
+       (void)x; // warning supression.
+       return true;
+    }
+
+    template<class T> 
+    inline bool isfinite_impl(T x, ieee_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent;
+        return a != traits::exponent;
+    }
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+template <>
+inline bool isfinite_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+{
+   return boost::math::detail::isfinite_impl(t, generic_tag<true>());
+}
+#endif
+
+}
+
+template<class T> 
+inline bool (isfinite)(T x)
+{ //!< \brief return true if floating-point type t is finite.
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   typedef typename boost::is_floating_point<T>::type fp_tag;
+   return detail::isfinite_impl(x, method());
+}
+
+//------------------------------------------------------------------------------
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T> 
+    inline bool isnormal_impl(T x, native_tag const&)
+    {
+        return (std::isnormal)(x);
+    }
+#endif
+
+    template<class T> 
+    inline bool isnormal_impl(T x, generic_tag<true> const&)
+    {
+        if(x < 0) x = -x;
+        return x >= (std::numeric_limits<T>::min)()
+            && x <= (std::numeric_limits<T>::max)();
+    }
+
+    template<class T> 
+    inline bool isnormal_impl(T x, generic_tag<false> const&)
+    {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+      if(std::numeric_limits<T>::is_specialized)
+         return isnormal_impl(x, mpl::true_());
+#endif
+       return !(x == 0);
+    }
+
+    template<class T> 
+    inline bool isnormal_impl(T x, ieee_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits;
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent | traits::flag;
+        return (a != 0) && (a < traits::exponent);
+    }
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+template <>
+inline bool isnormal_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+{
+   return boost::math::detail::isnormal_impl(t, generic_tag<true>());
+}
+#endif
+
+}
+
+template<class T> 
+inline bool (isnormal)(T x)
+{
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   typedef typename boost::is_floating_point<T>::type fp_tag;
+   return detail::isnormal_impl(x, method());
+}
+
+//------------------------------------------------------------------------------
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T> 
+    inline bool isinf_impl(T x, native_tag const&)
+    {
+        return (std::isinf)(x);
+    }
+#endif
+
+    template<class T> 
+    inline bool isinf_impl(T x, generic_tag<true> const&)
+    {
+        (void)x; // in case the compiler thinks that x is unused because std::numeric_limits<T>::has_infinity is false
+        return std::numeric_limits<T>::has_infinity 
+            && ( x == std::numeric_limits<T>::infinity()
+                 || x == -std::numeric_limits<T>::infinity());
+    }
+
+    template<class T> 
+    inline bool isinf_impl(T x, generic_tag<false> const&)
+    {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+      if(std::numeric_limits<T>::is_specialized)
+         return isinf_impl(x, mpl::true_());
+#endif
+        (void)x; // warning supression.
+        return false;
+    }
+
+    template<class T> 
+    inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent | traits::significand;
+        return a == traits::exponent;
+    }
+
+    template<class T> 
+    inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent | traits::significand;
+        if(a != traits::exponent)
+            return false;
+
+        traits::set_bits(x,0);
+        return x == 0;
+    }
+
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY)
+template <>
+inline bool isinf_impl<long double> BOOST_NO_MACRO_EXPAND(long double t, const native_tag&)
+{
+   return boost::math::detail::isinf_impl(t, generic_tag<true>());
+}
+#endif
+
+}   // namespace detail
+
+template<class T> 
+inline bool (isinf)(T x)
+{
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   typedef typename boost::is_floating_point<T>::type fp_tag;
+   return detail::isinf_impl(x, method());
+}
+
+//------------------------------------------------------------------------------
+
+namespace detail {
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T> 
+    inline bool isnan_impl(T x, native_tag const&)
+    {
+        return (std::isnan)(x);
+    }
+#endif
+
+    template<class T> 
+    inline bool isnan_impl(T x, generic_tag<true> const&)
+    {
+        return std::numeric_limits<T>::has_infinity
+            ? !(x <= std::numeric_limits<T>::infinity())
+            : x != x;
+    }
+
+    template<class T> 
+    inline bool isnan_impl(T x, generic_tag<false> const&)
+    {
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+      if(std::numeric_limits<T>::is_specialized)
+         return isnan_impl(x, mpl::true_());
+#endif
+        (void)x; // warning supression
+        return false;
+    }
+
+    template<class T> 
+    inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a &= traits::exponent | traits::significand;
+        return a > traits::exponent;
+    }
+
+    template<class T> 
+    inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+
+        a &= traits::exponent | traits::significand;
+        if(a < traits::exponent)
+            return false;
+
+        a &= traits::significand;
+        traits::set_bits(x,a);
+        return x != 0;
+    }
+
+}   // namespace detail
+
+template<class T> bool (isnan)(T x)
+{ //!< \brief return true if floating-point type t is NaN (Not A Number).
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   typedef typename boost::is_floating_point<T>::type fp_tag;
+   return detail::isnan_impl(x, method());
+}
+
+#ifdef isnan
+template <> inline bool isnan BOOST_NO_MACRO_EXPAND<float>(float t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
+template <> inline bool isnan BOOST_NO_MACRO_EXPAND<double>(double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
+template <> inline bool isnan BOOST_NO_MACRO_EXPAND<long double>(long double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); }
+#endif
+
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_FPCLASSIFY_HPP
+
diff --git a/boost/boost/math/special_functions/math_fwd.hpp b/boost/boost/math/special_functions/math_fwd.hpp
new file mode 100644 (file)
index 0000000..14364a3
--- /dev/null
@@ -0,0 +1,1070 @@
+// math_fwd.hpp
+
+// TODO revise completely for new distribution classes.
+
+// Copyright Paul A. Bristow 2006.
+// Copyright John Maddock 2006.
+
+// Use, modification and distribution are subject to 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)
+
+// Omnibus list of forward declarations of math special functions.
+
+// IT = Integer type.
+// RT = Real type (built-in floating-point types, float, double, long double) & User Defined Types
+// AT = Integer or Real type 
+
+#ifndef BOOST_MATH_SPECIAL_MATH_FWD_HPP
+#define BOOST_MATH_SPECIAL_MATH_FWD_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/special_functions/detail/round_fwd.hpp>
+#include <boost/math/tools/promotion.hpp> // for argument promotion.
+#include <boost/math/policies/policy.hpp>
+#include <boost/mpl/comparison.hpp>
+#include <boost/config/no_tr1/complex.hpp>
+
+#define BOOST_NO_MACRO_EXPAND /**/
+
+namespace boost
+{
+   namespace math
+   { // Math functions (in roughly alphabetic order).
+
+   // Beta functions.
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type 
+         beta(RT1 a, RT2 b); // Beta function (2 arguments).
+
+   template <class RT1, class RT2, class A>
+   typename tools::promote_args<RT1, RT2, A>::type 
+         beta(RT1 a, RT2 b, A x); // Beta function (3 arguments).
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         beta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Beta function (3 arguments).
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         betac(RT1 a, RT2 b, RT3 x);
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         betac(RT1 a, RT2 b, RT3 x, const Policy& pol);
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta(RT1 a, RT2 b, RT3 x); // Incomplete beta function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac(RT1 a, RT2 b, RT3 x); // Incomplete beta complement function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta complement function.
+
+   template <class T1, class T2, class T3, class T4>
+   typename tools::promote_args<T1, T2, T3, T4>::type  
+         ibeta_inv(T1 a, T2 b, T3 p, T4* py);
+
+   template <class T1, class T2, class T3, class T4, class Policy>
+   typename tools::promote_args<T1, T2, T3, T4>::type  
+         ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol);
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_inv(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_inva(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_invb(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
+
+   template <class T1, class T2, class T3, class T4>
+   typename tools::promote_args<T1, T2, T3, T4>::type 
+         ibetac_inv(T1 a, T2 b, T3 q, T4* py);
+
+   template <class T1, class T2, class T3, class T4, class Policy>
+   typename tools::promote_args<T1, T2, T3, T4>::type 
+         ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol);
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac_inv(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac_inva(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac_invb(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
+
+   template <class RT1, class RT2, class RT3>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_derivative(RT1 a, RT2 b, RT3 x);  // derivative of incomplete beta
+
+   template <class RT1, class RT2, class RT3, class Policy>
+   typename tools::promote_args<RT1, RT2, RT3>::type 
+         ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol);  // derivative of incomplete beta
+
+   // erf & erfc error functions.
+   template <class RT> // Error function.
+   typename tools::promote_args<RT>::type erf(RT z);
+   template <class RT, class Policy> // Error function.
+   typename tools::promote_args<RT>::type erf(RT z, const Policy&);
+
+   template <class RT>// Error function complement.
+   typename tools::promote_args<RT>::type erfc(RT z);
+   template <class RT, class Policy>// Error function complement.
+   typename tools::promote_args<RT>::type erfc(RT z, const Policy&);
+
+   template <class RT>// Error function inverse.
+   typename tools::promote_args<RT>::type erf_inv(RT z);
+   template <class RT, class Policy>// Error function inverse.
+   typename tools::promote_args<RT>::type erf_inv(RT z, const Policy& pol);
+
+   template <class RT>// Error function complement inverse.
+   typename tools::promote_args<RT>::type erfc_inv(RT z);
+   template <class RT, class Policy>// Error function complement inverse.
+   typename tools::promote_args<RT>::type erfc_inv(RT z, const Policy& pol);
+
+   // Polynomials:
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type 
+         legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1);
+
+   template <class T>
+   typename tools::promote_args<T>::type 
+         legendre_p(int l, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type 
+         legendre_p(int l, T x, const Policy& pol);
+
+   template <class T>
+   typename tools::promote_args<T>::type 
+         legendre_q(unsigned l, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type 
+         legendre_q(unsigned l, T x, const Policy& pol);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type 
+         legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1);
+
+   template <class T>
+   typename tools::promote_args<T>::type 
+         legendre_p(int l, int m, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type 
+         legendre_p(int l, int m, T x, const Policy& pol);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type  
+         laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type  
+      laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1);
+
+   template <class T>
+   typename tools::promote_args<T>::type 
+      laguerre(unsigned n, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type 
+      laguerre(unsigned n, unsigned m, T x, const Policy& pol);
+
+   template <class T1, class T2>
+   struct laguerre_result
+   {
+      typedef typename mpl::if_<
+         policies::is_policy<T2>,
+         typename tools::promote_args<T1>::type,
+         typename tools::promote_args<T2>::type
+      >::type type;
+   };
+
+   template <class T1, class T2>
+   typename laguerre_result<T1, T2>::type 
+      laguerre(unsigned n, T1 m, T2 x);
+
+   template <class T>
+   typename tools::promote_args<T>::type 
+      hermite(unsigned n, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type 
+      hermite(unsigned n, T x, const Policy& pol);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type 
+      hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
+
+   template <class T1, class T2>
+   std::complex<typename tools::promote_args<T1, T2>::type> 
+         spherical_harmonic(unsigned n, int m, T1 theta, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   std::complex<typename tools::promote_args<T1, T2>::type> 
+      spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type 
+         spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type 
+      spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type 
+         spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type 
+      spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+
+   // Elliptic integrals:
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type 
+         ellint_rf(T1 x, T2 y, T3 z);
+
+   template <class T1, class T2, class T3, class Policy>
+   typename tools::promote_args<T1, T2, T3>::type 
+         ellint_rf(T1 x, T2 y, T3 z, const Policy& pol);
+
+   template <class T1, class T2, class T3>
+   typename tools::promote_args<T1, T2, T3>::type 
+         ellint_rd(T1 x, T2 y, T3 z);
+
+   template <class T1, class T2, class T3, class Policy>
+   typename tools::promote_args<T1, T2, T3>::type 
+         ellint_rd(T1 x, T2 y, T3 z, const Policy& pol);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type 
+         ellint_rc(T1 x, T2 y);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type 
+         ellint_rc(T1 x, T2 y, const Policy& pol);
+
+   template <class T1, class T2, class T3, class T4>
+   typename tools::promote_args<T1, T2, T3, T4>::type 
+         ellint_rj(T1 x, T2 y, T3 z, T4 p);
+
+   template <class T1, class T2, class T3, class T4, class Policy>
+   typename tools::promote_args<T1, T2, T3, T4>::type 
+         ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol);
+
+   template <typename T>
+   typename tools::promote_args<T>::type ellint_2(T k);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi, const Policy& pol);
+
+   template <typename T>
+   typename tools::promote_args<T>::type ellint_1(T k);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi, const Policy& pol);
+
+   namespace detail{
+
+   template <class T, class U, class V>
+   struct ellint_3_result
+   {
+      typedef typename mpl::if_<
+         policies::is_policy<V>,
+         typename tools::promote_args<T, U>::type,
+         typename tools::promote_args<T, U, V>::type
+      >::type type;
+   };
+
+   } // namespace detail
+
+
+   template <class T1, class T2, class T3>
+   typename detail::ellint_3_result<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi);
+
+   template <class T1, class T2, class T3, class Policy>
+   typename tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v);
+
+   // Factorial functions.
+   // Note: not for integral types, at present.
+   template <class RT>
+   struct max_factorial;
+   template <class RT>
+   RT factorial(unsigned int);
+   template <class RT, class Policy>
+   RT factorial(unsigned int, const Policy& pol);
+   template <class RT>
+   RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT)); 
+   template <class RT>
+   RT double_factorial(unsigned i);
+   template <class RT, class Policy>
+   RT double_factorial(unsigned i, const Policy& pol);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n, const Policy& pol);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type rising_factorial(RT x, int n);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type rising_factorial(RT x, int n, const Policy& pol);
+
+   // Gamma functions.
+   template <class RT>
+   typename tools::promote_args<RT>::type tgamma(RT z);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type tgamma1pm1(RT z);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type tgamma1pm1(RT z, const Policy& pol);
+
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z);
+
+   template <class RT1, class RT2, class Policy>
+   typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z, const Policy& pol);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type lgamma(RT z, int* sign);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type lgamma(RT z, int* sign, const Policy& pol);
+
+   template <class RT>
+   typename tools::promote_args<RT>::type lgamma(RT x);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type lgamma(RT x, const Policy& pol);
+
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z);
+
+   template <class RT1, class RT2, class Policy>
+   typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z, const Policy&);
+
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z);
+
+   template <class RT1, class RT2, class Policy>
+   typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z, const Policy&);
+
+   template <class RT1, class RT2>
+   typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z);
+
+   template <class RT1, class RT2, class Policy>
+   typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x, const Policy&);
+
+   // gamma inverse.
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q, const Policy&);
+
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q, const Policy&);
+
+   // digamma:
+   template <class T>
+   typename tools::promote_args<T>::type digamma(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type digamma(T x, const Policy&);
+
+   // Hypotenuse function sqrt(x ^ 2 + y ^ 2).
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type 
+         hypot(T1 x, T2 y);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type 
+         hypot(T1 x, T2 y, const Policy&);
+
+   // cbrt - cube root.
+   template <class RT>
+   typename tools::promote_args<RT>::type cbrt(RT z);
+
+   template <class RT, class Policy>
+   typename tools::promote_args<RT>::type cbrt(RT z, const Policy&);
+
+   // log1p is log(x + 1)
+   template <class T>
+   typename tools::promote_args<T>::type log1p(T);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type log1p(T, const Policy&);
+
+   // log1pmx is log(x + 1) - x
+   template <class T>
+   typename tools::promote_args<T>::type log1pmx(T);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type log1pmx(T, const Policy&);
+
+   // Exp (x) minus 1 functions.
+   template <class T>
+   typename tools::promote_args<T>::type expm1(T);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type expm1(T, const Policy&);
+
+   // Power - 1
+   template <class T1, class T2>
+   typename tools::promote_args<T1, T2>::type 
+         powm1(const T1 a, const T2 z);
+
+   template <class T1, class T2, class Policy>
+   typename tools::promote_args<T1, T2>::type 
+         powm1(const T1 a, const T2 z, const Policy&);
+
+   // sqrt(1+x) - 1
+   template <class T>
+   typename tools::promote_args<T>::type sqrt1pm1(const T& val);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type sqrt1pm1(const T& val, const Policy&);
+
+   // sinus cardinals:
+   template <class T>
+   typename tools::promote_args<T>::type sinc_pi(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type sinc_pi(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type sinhc_pi(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type sinhc_pi(T x, const Policy&);
+
+   // inverse hyperbolics:
+   template<typename T>
+   typename tools::promote_args<T>::type asinh(T x);
+
+   template<typename T, class Policy>
+   typename tools::promote_args<T>::type asinh(T x, const Policy&);
+
+   template<typename T>
+   typename tools::promote_args<T>::type acosh(T x);
+
+   template<typename T, class Policy>
+   typename tools::promote_args<T>::type acosh(T x, const Policy&);
+
+   template<typename T>
+   typename tools::promote_args<T>::type atanh(T x);
+
+   template<typename T, class Policy>
+   typename tools::promote_args<T>::type atanh(T x, const Policy&);
+
+   namespace detail{
+
+      typedef mpl::int_<0> bessel_no_int_tag;      // No integer optimisation possible.
+      typedef mpl::int_<1> bessel_maybe_int_tag;   // Maybe integer optimisation.
+      typedef mpl::int_<2> bessel_int_tag;         // Definite integer optimistaion.
+
+      template <class T1, class T2, class Policy>
+      struct bessel_traits
+      {
+         typedef typename tools::promote_args<
+            T1, T2
+         >::type result_type;
+
+         typedef typename policies::precision<result_type, Policy>::type precision_type;
+
+         typedef typename mpl::if_<
+            mpl::or_<
+               mpl::less_equal<precision_type, mpl::int_<0> >,
+               mpl::greater<precision_type, mpl::int_<64> > >,
+            bessel_no_int_tag,
+            typename mpl::if_<
+               is_integral<T1>,
+               bessel_int_tag,
+               bessel_maybe_int_tag
+            >::type
+         >::type optimisation_tag;
+      };
+   } // detail
+
+   // Bessel functions:
+   template <class T1, class T2, class Policy>
+   typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j(T1 v, T2 x);
+
+   template <class T, class Policy>
+   typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel(unsigned v, T x, const Policy& pol);
+
+   template <class T>
+   typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel(unsigned v, T x);
+
+   template <class T1, class T2, class Policy>
+   typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i(T1 v, T2 x);
+
+   template <class T1, class T2, class Policy>
+   typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k(T1 v, T2 x);
+
+   template <class T1, class T2, class Policy>
+   typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann(T1 v, T2 x, const Policy& pol);
+
+   template <class T1, class T2>
+   typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann(T1 v, T2 x);
+
+   template <class T, class Policy>
+   typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann(unsigned v, T x, const Policy& pol);
+
+   template <class T>
+   typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type sin_pi(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type sin_pi(T x);
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type cos_pi(T x, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type cos_pi(T x);
+
+   template <class T>
+   int fpclassify BOOST_NO_MACRO_EXPAND(T t);
+
+   template <class T>
+   bool isfinite BOOST_NO_MACRO_EXPAND(T z);
+
+   template <class T>
+   bool isinf BOOST_NO_MACRO_EXPAND(T t);
+
+   template <class T>
+   bool isnan BOOST_NO_MACRO_EXPAND(T t);
+
+   template <class T>
+   bool isnormal BOOST_NO_MACRO_EXPAND(T t);
+
+   template<class T> 
+   int signbit BOOST_NO_MACRO_EXPAND(T x);
+
+   template <class T>
+   int sign BOOST_NO_MACRO_EXPAND(const T& z);
+
+   template <class T>
+   T copysign BOOST_NO_MACRO_EXPAND(const T& x, const T& y);
+
+   template <class T>
+   T changesign BOOST_NO_MACRO_EXPAND(const T& z);
+
+   // Exponential integrals:
+   namespace detail{
+
+   template <class T, class U>
+   struct expint_result
+   {
+      typedef typename mpl::if_<
+         policies::is_policy<U>,
+         typename tools::promote_args<T>::type,
+         typename tools::promote_args<U>::type
+      >::type type;
+   };
+
+   } // namespace detail
+
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type expint(unsigned n, T z, const Policy&);
+
+   template <class T, class U>
+   typename detail::expint_result<T, U>::type expint(T const z, U const u);
+
+   template <class T>
+   typename tools::promote_args<T>::type expint(T z);
+
+   // Zeta:
+   template <class T, class Policy>
+   typename tools::promote_args<T>::type zeta(T s, const Policy&);
+
+   template <class T>
+   typename tools::promote_args<T>::type zeta(T s);
+
+   // pow:
+   template <int N, typename T, class Policy>
+   typename tools::promote_args<T>::type pow(T base, const Policy& policy);
+
+   template <int N, typename T>
+   typename tools::promote_args<T>::type pow(T base);
+
+   // next:
+   template <class T, class Policy>
+   T nextafter(const T&, const T&, const Policy&);
+   template <class T>
+   T nextafter(const T&, const T&);
+   template <class T, class Policy>
+   T float_next(const T&, const Policy&);
+   template <class T>
+   T float_next(const T&);
+   template <class T, class Policy>
+   T float_prior(const T&, const Policy&);
+   template <class T>
+   T float_prior(const T&);
+   template <class T, class Policy>
+   T float_distance(const T&, const T&, const Policy&);
+   template <class T>
+   T float_distance(const T&, const T&);
+
+    } // namespace math
+} // namespace boost
+
+#ifdef BOOST_HAS_LONG_LONG
+#define BOOST_MATH_DETAIL_LL_FUNC(Policy)\
+   \
+   template <class T>\
+   inline T modf(const T& v, boost::long_long_type* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
+   \
+   template <class T>\
+   inline boost::long_long_type lltrunc(const T& v){ using boost::math::lltrunc; return lltrunc(v, Policy()); }\
+   \
+   template <class T>\
+   inline boost::long_long_type llround(const T& v){ using boost::math::llround; return llround(v, Policy()); }\
+
+#else
+#define BOOST_MATH_DETAIL_LL_FUNC(Policy)
+#endif
+
+#define BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(Policy)\
+   \
+   BOOST_MATH_DETAIL_LL_FUNC(Policy)\
+   \
+   template <class RT1, class RT2>\
+   inline typename boost::math::tools::promote_args<RT1, RT2>::type \
+   beta(RT1 a, RT2 b) { return ::boost::math::beta(a, b, Policy()); }\
+\
+   template <class RT1, class RT2, class A>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, A>::type \
+   beta(RT1 a, RT2 b, A x){ return ::boost::math::beta(a, b, x, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   betac(RT1 a, RT2 b, RT3 x) { return ::boost::math::betac(a, b, x, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta(a, b, x, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibetac(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibetac(a, b, x, Policy()); }\
+\
+   template <class T1, class T2, class T3, class T4>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type  \
+   ibeta_inv(T1 a, T2 b, T3 p, T4* py){ return ::boost::math::ibeta_inv(a, b, p, py, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta_inv(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inv(a, b, p, Policy()); }\
+\
+   template <class T1, class T2, class T3, class T4>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \
+   ibetac_inv(T1 a, T2 b, T3 q, T4* py){ return ::boost::math::ibetac_inv(a, b, q, py, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta_inva(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inva(a, b, p, Policy()); }\
+\
+   template <class T1, class T2, class T3>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
+   ibetac_inva(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_inva(a, b, q, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta_invb(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_invb(a, b, p, Policy()); }\
+\
+   template <class T1, class T2, class T3>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
+   ibetac_invb(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_invb(a, b, q, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibetac_inv(RT1 a, RT2 b, RT3 q){ return ::boost::math::ibetac_inv(a, b, q, Policy()); }\
+\
+   template <class RT1, class RT2, class RT3>\
+   inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+   ibeta_derivative(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta_derivative(a, b, x, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type erf(RT z) { return ::boost::math::erf(z, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type erfc(RT z){ return ::boost::math::erfc(z, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type erf_inv(RT z) { return ::boost::math::erf_inv(z, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type erfc_inv(RT z){ return ::boost::math::erfc_inv(z, Policy()); }\
+\
+   using boost::math::legendre_next;\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type \
+   legendre_p(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type \
+   legendre_q(unsigned l, T x){ return ::boost::math::legendre_q(l, x, Policy()); }\
+\
+   using ::boost::math::legendre_next;\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type \
+   legendre_p(int l, int m, T x){ return ::boost::math::legendre_p(l, m, x, Policy()); }\
+\
+   using ::boost::math::laguerre_next;\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type \
+   laguerre(unsigned n, T x){ return ::boost::math::laguerre(n, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::laguerre_result<T1, T2>::type \
+   laguerre(unsigned n, T1 m, T2 x) { return ::boost::math::laguerre(n, m, x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type \
+   hermite(unsigned n, T x){ return ::boost::math::hermite(n, x, Policy()); }\
+\
+   using boost::math::hermite_next;\
+\
+   template <class T1, class T2>\
+   inline std::complex<typename boost::math::tools::promote_args<T1, T2>::type> \
+   spherical_harmonic(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic(n, m, theta, phi, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type \
+   spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi){ return ::boost::math::spherical_harmonic_r(n, m, theta, phi, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type \
+   spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic_i(n, m, theta, phi, Policy()); }\
+\
+   template <class T1, class T2, class Policy>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type \
+      spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);\
+\
+   template <class T1, class T2, class T3>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
+   ellint_rf(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rf(x, y, z, Policy()); }\
+\
+   template <class T1, class T2, class T3>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
+   ellint_rd(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rd(x, y, z, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type \
+   ellint_rc(T1 x, T2 y){ return ::boost::math::ellint_rc(x, y, Policy()); }\
+\
+   template <class T1, class T2, class T3, class T4>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \
+   ellint_rj(T1 x, T2 y, T3 z, T4 p){ return boost::math::ellint_rj(x, y, z, p, Policy()); }\
+\
+   template <typename T>\
+   inline typename boost::math::tools::promote_args<T>::type ellint_2(T k){ return boost::math::ellint_2(k, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi){ return boost::math::ellint_2(k, phi, Policy()); }\
+\
+   template <typename T>\
+   inline typename boost::math::tools::promote_args<T>::type ellint_1(T k){ return boost::math::ellint_1(k, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi){ return boost::math::ellint_1(k, phi, Policy()); }\
+\
+   template <class T1, class T2, class T3>\
+   inline typename boost::math::tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi){ return boost::math::ellint_3(k, v, phi, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v){ return boost::math::ellint_3(k, v, Policy()); }\
+\
+   using boost::math::max_factorial;\
+   template <class RT>\
+   inline RT factorial(unsigned int i) { return boost::math::factorial<RT>(i, Policy()); }\
+   using boost::math::unchecked_factorial;\
+   template <class RT>\
+   inline RT double_factorial(unsigned i){ return boost::math::double_factorial<RT>(i, Policy()); }\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type falling_factorial(RT x, unsigned n){ return boost::math::falling_factorial(x, n, Policy()); }\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type rising_factorial(RT x, unsigned n){ return boost::math::rising_factorial(x, n, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type tgamma(RT z){ return boost::math::tgamma(z, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type tgamma1pm1(RT z){ return boost::math::tgamma1pm1(z, Policy()); }\
+\
+   template <class RT1, class RT2>\
+   inline typename boost::math::tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z){ return boost::math::tgamma(a, z, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type lgamma(RT z, int* sign){ return boost::math::lgamma(z, sign, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type lgamma(RT x){ return boost::math::lgamma(x, Policy()); }\
+\
+   template <class RT1, class RT2>\
+   inline typename boost::math::tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z){ return boost::math::tgamma_lower(a, z, Policy()); }\
+\
+   template <class RT1, class RT2>\
+   inline typename boost::math::tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z){ return boost::math::gamma_q(a, z, Policy()); }\
+\
+   template <class RT1, class RT2>\
+   inline typename boost::math::tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z){ return boost::math::gamma_p(a, z, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta){ return boost::math::tgamma_delta_ratio(z, delta, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b) { return boost::math::tgamma_ratio(a, b, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x){ return boost::math::gamma_p_derivative(a, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p){ return boost::math::gamma_p_inv(a, p, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p){ return boost::math::gamma_p_inva(a, p, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q){ return boost::math::gamma_q_inv(a, q, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q){ return boost::math::gamma_q_inva(a, q, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type digamma(T x){ return boost::math::digamma(x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type \
+   hypot(T1 x, T2 y){ return boost::math::hypot(x, y, Policy()); }\
+\
+   template <class RT>\
+   inline typename boost::math::tools::promote_args<RT>::type cbrt(RT z){ return boost::math::cbrt(z, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type log1p(T x){ return boost::math::log1p(x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type log1pmx(T x){ return boost::math::log1pmx(x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type expm1(T x){ return boost::math::expm1(x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::tools::promote_args<T1, T2>::type \
+   powm1(const T1 a, const T2 z){ return boost::math::powm1(a, z, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type sqrt1pm1(const T& val){ return boost::math::sqrt1pm1(val, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type sinc_pi(T x){ return boost::math::sinc_pi(x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type sinhc_pi(T x){ return boost::math::sinhc_pi(x, Policy()); }\
+\
+   template<typename T>\
+   inline typename boost::math::tools::promote_args<T>::type asinh(const T x){ return boost::math::asinh(x, Policy()); }\
+\
+   template<typename T>\
+   inline typename boost::math::tools::promote_args<T>::type acosh(const T x){ return boost::math::acosh(x, Policy()); }\
+\
+   template<typename T>\
+   inline typename boost::math::tools::promote_args<T>::type atanh(const T x){ return boost::math::atanh(x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type cyl_bessel_j(T1 v, T2 x)\
+   { return boost::math::cyl_bessel_j(v, x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type sph_bessel(unsigned v, T x)\
+   { return boost::math::sph_bessel(v, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+   cyl_bessel_i(T1 v, T2 x) { return boost::math::cyl_bessel_i(v, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+   cyl_bessel_k(T1 v, T2 x) { return boost::math::cyl_bessel_k(v, x, Policy()); }\
+\
+   template <class T1, class T2>\
+   inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+   cyl_neumann(T1 v, T2 x){ return boost::math::cyl_neumann(v, x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type \
+   sph_neumann(unsigned v, T x){ return boost::math::sph_neumann(v, x, Policy()); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type sin_pi(T x){ return boost::math::sin_pi(x); }\
+\
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type cos_pi(T x){ return boost::math::cos_pi(x); }\
+\
+   using boost::math::fpclassify;\
+   using boost::math::isfinite;\
+   using boost::math::isinf;\
+   using boost::math::isnan;\
+   using boost::math::isnormal;\
+   using boost::math::signbit;\
+   using boost::math::sign;\
+   using boost::math::copysign;\
+   using boost::math::changesign;\
+   \
+   template <class T, class U>\
+   inline typename boost::math::tools::promote_args<T,U>::type expint(T const& z, U const& u)\
+   { return boost::math::expint(z, u, Policy()); }\
+   \
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type expint(T z){ return boost::math::expint(z, Policy()); }\
+   \
+   template <class T>\
+   inline typename boost::math::tools::promote_args<T>::type zeta(T s){ return boost::math::zeta(s, Policy()); }\
+   \
+   template <class T>\
+   inline T round(const T& v){ using boost::math::round; return round(v, Policy()); }\
+   \
+   template <class T>\
+   inline int iround(const T& v){ using boost::math::iround; return iround(v, Policy()); }\
+   \
+   template <class T>\
+   inline long lround(const T& v){ using boost::math::lround; return lround(v, Policy()); }\
+   \
+   template <class T>\
+   inline T trunc(const T& v){ using boost::math::trunc; return trunc(v, Policy()); }\
+   \
+   template <class T>\
+   inline int itrunc(const T& v){ using boost::math::itrunc; return itrunc(v, Policy()); }\
+   \
+   template <class T>\
+   inline long ltrunc(const T& v){ using boost::math::ltrunc; return ltrunc(v, Policy()); }\
+   \
+   template <class T>\
+   inline T modf(const T& v, T* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
+   \
+   template <class T>\
+   inline T modf(const T& v, int* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
+   \
+   template <class T>\
+   inline T modf(const T& v, long* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
+   \
+   template <int N, class T>\
+   inline typename boost::math::tools::promote_args<T>::type pow(T v){ return boost::math::pow<N>(v, Policy()); }\
+   \
+   template <class T> T nextafter(const T& a, const T& b){ return boost::math::nextafter(a, b, Policy()); }\
+   template <class T> T float_next(const T& a){ return boost::math::float_next(a, Policy()); }\
+   template <class T> T float_prior(const T& a){ return boost::math::float_prior(a, Policy()); }\
+   template <class T> T float_distance(const T& a, const T& b){ return boost::math::float_distance(a, b, Policy()); }\
+
+
+#endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP
+
+
diff --git a/boost/boost/math/special_functions/sign.hpp b/boost/boost/math/special_functions/sign.hpp
new file mode 100644 (file)
index 0000000..6de88b2
--- /dev/null
@@ -0,0 +1,145 @@
+//  (C) Copyright John Maddock 2006.
+//  (C) Copyright Johan Rade 2006.
+//  (C) Copyright Paul A. Bristow 2011 (added changesign).
+
+//  Use, modification and distribution are subject to 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)
+
+#ifndef BOOST_MATH_TOOLS_SIGN_HPP
+#define BOOST_MATH_TOOLS_SIGN_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/tools/config.hpp>
+#include <boost/math/special_functions/math_fwd.hpp>
+#include <boost/math/special_functions/detail/fp_traits.hpp>
+
+namespace boost{ namespace math{ 
+
+namespace detail {
+
+  // signbit
+
+#ifdef BOOST_MATH_USE_STD_FPCLASSIFY
+    template<class T> 
+    inline int signbit_impl(T x, native_tag const&)
+    {
+        return (std::signbit)(x);
+    }
+#endif
+
+    template<class T> 
+    inline int signbit_impl(T x, generic_tag<true> const&)
+    {
+        return x < 0;
+    }
+
+    template<class T> 
+    inline int signbit_impl(T x, generic_tag<false> const&)
+    {
+        return x < 0;
+    }
+
+    template<class T> 
+    inline int signbit_impl(T x, ieee_copy_all_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        return a & traits::sign ? 1 : 0;
+    }
+
+    template<class T> 
+    inline int signbit_impl(T x, ieee_copy_leading_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+
+        return a & traits::sign ? 1 : 0;
+    }
+
+    // Changesign
+
+    template<class T>
+    inline T (changesign_impl)(T x, generic_tag<true> const&)
+    {
+        return -x;
+    }
+
+    template<class T>
+    inline T (changesign_impl)(T x, generic_tag<false> const&)
+    {
+        return -x;
+    }
+
+
+    template<class T>
+    inline T changesign_impl(T x, ieee_copy_all_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::sign_change_type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a ^= traits::sign;
+        traits::set_bits(x,a);
+        return x;
+    }
+
+    template<class T>
+    inline T (changesign_impl)(T x, ieee_copy_leading_bits_tag const&)
+    {
+        typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::sign_change_type traits;
+
+        BOOST_DEDUCED_TYPENAME traits::bits a;
+        traits::get_bits(x,a);
+        a ^= traits::sign;
+        traits::set_bits(x,a);
+        return x;
+    }
+
+
+}   // namespace detail
+
+template<class T> int (signbit)(T x)
+{ 
+   typedef typename detail::fp_traits<T>::type traits;
+   typedef typename traits::method method;
+   typedef typename boost::is_floating_point<T>::type fp_tag;
+   return detail::signbit_impl(x, method());
+}
+
+template <class T>
+inline int sign BOOST_NO_MACRO_EXPAND(const T& z)
+{
+   return (z == 0) ? 0 : (boost::math::signbit)(z) ? -1 : 1;
+}
+
+template<class T> T (changesign)(const T& x)
+{ //!< \brief return unchanged binary pattern of x, except for change of sign bit. 
+   typedef typename detail::fp_traits<T>::sign_change_type traits;
+   typedef typename traits::method method;
+   typedef typename boost::is_floating_point<T>::type fp_tag;
+
+   return detail::changesign_impl(x, method());
+}
+
+template <class T>
+inline T copysign BOOST_NO_MACRO_EXPAND(const T& x, const T& y)
+{
+   BOOST_MATH_STD_USING
+   return (boost::math::signbit)(x) != (boost::math::signbit)(y) ? (boost::math::changesign)(x) : x;
+}
+
+} // namespace math
+} // namespace boost
+
+
+#endif // BOOST_MATH_TOOLS_SIGN_HPP
+
+
diff --git a/boost/boost/math/tools/config.hpp b/boost/boost/math/tools/config.hpp
new file mode 100644 (file)
index 0000000..2dc7bf9
--- /dev/null
@@ -0,0 +1,310 @@
+//  Copyright (c) 2006-7 John Maddock
+//  Use, modification and distribution are subject to 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)
+
+#ifndef BOOST_MATH_TOOLS_CONFIG_HPP
+#define BOOST_MATH_TOOLS_CONFIG_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/cstdint.hpp> // for boost::uintmax_t
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <algorithm>  // for min and max
+#include <boost/config/no_tr1/cmath.hpp>
+#include <climits>
+#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
+#  include <math.h>
+#endif
+
+#include <boost/math/tools/user.hpp>
+#include <boost/math/special_functions/detail/round_fwd.hpp>
+
+#if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \
+   || (defined(__hppa) && !defined(__OpenBSD__)) || defined(__NO_LONG_DOUBLE_MATH)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+//
+// Borland post 5.8.2 uses Dinkumware's std C lib which
+// doesn't have true long double precision.  Earlier
+// versions are problematic too:
+//
+#  define BOOST_MATH_NO_REAL_CONCEPT_TESTS
+#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#  define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
+#  include <float.h>
+#endif
+#if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+//
+// Darwin's rather strange "double double" is rather hard to
+// support, it should be possible given enough effort though...
+//
+#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if defined(unix) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1000) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
+//
+// Intel compiler prior to version 10 has sporadic problems
+// calling the long double overloads of the std lib math functions:
+// calling ::powl is OK, but std::pow(long double, long double) 
+// may segfault depending upon the value of the arguments passed 
+// and the specific Linux distribution.
+//
+// We'll be conservative and disable long double support for this compiler.
+//
+// Comment out this #define and try building the tests to determine whether
+// your Intel compiler version has this issue or not.
+//
+#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#endif
+#if defined(unix) && defined(__INTEL_COMPILER)
+//
+// Intel compiler has sporadic issues compiling std::fpclassify depending on
+// the exact OS version used.  Use our own code for this as we know it works
+// well on Intel processors:
+//
+#define BOOST_MATH_DISABLE_STD_FPCLASSIFY
+#endif
+
+#if defined(BOOST_MSVC) && !defined(_WIN32_WCE)
+   // Better safe than sorry, our tests don't support hardware exceptions:
+#  define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
+#endif
+
+#ifdef __IBMCPP__
+#  define BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS
+#endif
+
+#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901))
+#  define BOOST_MATH_USE_C99
+#endif
+
+#if (defined(__hpux) && !defined(__hppa))
+#  define BOOST_MATH_USE_C99
+#endif
+
+#if defined(__GNUC__) && defined(_GLIBCXX_USE_C99)
+#  define BOOST_MATH_USE_C99
+#endif
+
+#if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \
+  || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \
+  || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))
+#  define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY
+#endif
+
+#if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590)
+
+#  include "boost/type.hpp"
+#  include "boost/non_type.hpp"
+
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)         boost::type<t>* = 0
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)    boost::type<t>*
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)  boost::non_type<t, v>* = 0
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)  boost::non_type<t, v>*
+
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t)         \
+             , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)    \
+             , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)  \
+             , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)  \
+             , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+#else
+
+// no workaround needed: expand to nothing
+
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t)
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+#  define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+#  define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+
+#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
+
+#if defined(__SUNPRO_CC) || defined(__hppa) || defined(__GNUC__)
+// Sun's compiler emits a hard error if a constant underflows,
+// as does aCC on PA-RISC, while gcc issues a large number of warnings:
+#  define BOOST_MATH_SMALL_CONSTANT(x) 0
+#else
+#  define BOOST_MATH_SMALL_CONSTANT(x) x
+#endif
+
+
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
+//
+// Define if constants too large for a float cause "bad"
+// values to be stored in the data, rather than infinity
+// or a suitably large value.
+//
+#  define BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS
+#endif
+//
+// Tune performance options for specific compilers:
+//
+#ifdef BOOST_MSVC
+#  define BOOST_MATH_POLY_METHOD 2
+#elif defined(BOOST_INTEL)
+#  define BOOST_MATH_POLY_METHOD 2
+#  define BOOST_MATH_RATIONAL_METHOD 2
+#elif defined(__GNUC__)
+#  define BOOST_MATH_POLY_METHOD 3
+#  define BOOST_MATH_RATIONAL_METHOD 3
+#  define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
+#  define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
+#endif
+
+#if defined(BOOST_NO_LONG_LONG) && !defined(BOOST_MATH_INT_TABLE_TYPE)
+#  define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT
+#  define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L
+#endif
+
+//
+// The maximum order of polynomial that will be evaluated 
+// via an unrolled specialisation:
+//
+#ifndef BOOST_MATH_MAX_POLY_ORDER
+#  define BOOST_MATH_MAX_POLY_ORDER 17
+#endif 
+//
+// Set the method used to evaluate polynomials and rationals:
+//
+#ifndef BOOST_MATH_POLY_METHOD
+#  define BOOST_MATH_POLY_METHOD 1
+#endif 
+#ifndef BOOST_MATH_RATIONAL_METHOD
+#  define BOOST_MATH_RATIONAL_METHOD 0
+#endif 
+//
+// decide whether to store constants as integers or reals:
+//
+#ifndef BOOST_MATH_INT_TABLE_TYPE
+#  define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
+#endif
+#ifndef BOOST_MATH_INT_VALUE_SUFFIX
+#  define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF
+#endif
+
+//
+// Helper macro for controlling the FP behaviour:
+//
+#ifndef BOOST_MATH_CONTROL_FP
+#  define BOOST_MATH_CONTROL_FP
+#endif
+//
+// Helper macro for using statements:
+//
+#define BOOST_MATH_STD_USING \
+   using std::abs;\
+   using std::acos;\
+   using std::cos;\
+   using std::fmod;\
+   using std::modf;\
+   using std::tan;\
+   using std::asin;\
+   using std::cosh;\
+   using std::frexp;\
+   using std::pow;\
+   using std::tanh;\
+   using std::atan;\
+   using std::exp;\
+   using std::ldexp;\
+   using std::sin;\
+   using std::atan2;\
+   using std::fabs;\
+   using std::log;\
+   using std::sinh;\
+   using std::ceil;\
+   using std::floor;\
+   using std::log10;\
+   using std::sqrt;\
+   using boost::math::round;\
+   using boost::math::iround;\
+   using boost::math::lround;\
+   using boost::math::trunc;\
+   using boost::math::itrunc;\
+   using boost::math::ltrunc;\
+   using boost::math::modf;
+
+
+namespace boost{ namespace math{
+namespace tools
+{
+
+template <class T>
+inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c)
+{
+   return (std::max)((std::max)(a, b), c);
+}
+
+template <class T>
+inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d)
+{
+   return (std::max)((std::max)(a, b), (std::max)(c, d));
+}
+} // namespace tools
+
+template <class T>
+void suppress_unused_variable_warning(const T&)
+{
+}
+
+}} // namespace boost namespace math
+
+#if ((defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H)
+
+   #include <boost/detail/fenv.hpp>
+
+   namespace boost{ namespace math{
+   namespace detail
+   {
+   struct fpu_guard
+   {
+      fpu_guard()
+      {
+         fegetexceptflag(&m_flags, FE_ALL_EXCEPT);
+         feclearexcept(FE_ALL_EXCEPT);
+      }
+      ~fpu_guard()
+      {
+         fesetexceptflag(&m_flags, FE_ALL_EXCEPT);
+      }
+   private:
+      fexcept_t m_flags;
+   };
+
+   } // namespace detail
+   }} // namespaces
+
+#  define BOOST_FPU_EXCEPTION_GUARD boost::math::detail::fpu_guard local_guard_object;
+#  define BOOST_MATH_INSTRUMENT_FPU do{ fexcept_t cpu_flags; fegetexceptflag(&cpu_flags, FE_ALL_EXCEPT); BOOST_MATH_INSTRUMENT_VARIABLE(cpu_flags); } while(0); 
+#else // All other platforms.
+#  define BOOST_FPU_EXCEPTION_GUARD
+#  define BOOST_MATH_INSTRUMENT_FPU
+#endif
+
+#ifdef BOOST_MATH_INSTRUMENT
+#define BOOST_MATH_INSTRUMENT_CODE(x) \
+   std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl;
+#define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name)
+#else
+#define BOOST_MATH_INSTRUMENT_CODE(x)
+#define BOOST_MATH_INSTRUMENT_VARIABLE(name)
+#endif
+
+#endif // BOOST_MATH_TOOLS_CONFIG_HPP
+
+
+
+
+
diff --git a/boost/boost/math/tools/promotion.hpp b/boost/boost/math/tools/promotion.hpp
new file mode 100644 (file)
index 0000000..728aaf1
--- /dev/null
@@ -0,0 +1,150 @@
+// boost\math\tools\promotion.hpp
+
+// Copyright John Maddock 2006.
+// Copyright Paul A. Bristow 2006.
+
+// Use, modification and distribution are subject to 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)
+
+// Promote arguments functions to allow math functions to have arguments
+// provided as integer OR real (floating-point, built-in or UDT)
+// (called ArithmeticType in functions that use promotion)
+// that help to reduce the risk of creating multiple instantiations.
+// Allows creation of an inline wrapper that forwards to a foo(RT, RT) function,
+// so you never get to instantiate any mixed foo(RT, IT) functions.
+
+#ifndef BOOST_MATH_PROMOTION_HPP
+#define BOOST_MATH_PROMOTION_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+// Boost type traits:
+#include <boost/math/tools/config.hpp>
+#include <boost/type_traits/is_floating_point.hpp> // for boost::is_floating_point;
+#include <boost/type_traits/is_integral.hpp> // for boost::is_integral
+#include <boost/type_traits/is_convertible.hpp> // for boost::is_convertible
+#include <boost/type_traits/is_same.hpp>// for boost::is_same
+#include <boost/type_traits/remove_cv.hpp>// for boost::remove_cv
+// Boost Template meta programming:
+#include <boost/mpl/if.hpp> // for boost::mpl::if_c.
+#include <boost/mpl/and.hpp> // for boost::mpl::if_c.
+#include <boost/mpl/or.hpp> // for boost::mpl::if_c.
+#include <boost/mpl/not.hpp> // for boost::mpl::if_c.
+
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+#include <boost/static_assert.hpp>
+#endif
+
+namespace boost
+{
+  namespace math
+  {
+    namespace tools
+    {
+      // If either T1 or T2 is an integer type,
+      // pretend it was a double (for the purposes of further analysis).
+      // Then pick the wider of the two floating-point types
+      // as the actual signature to forward to.
+      // For example:
+      // foo(int, short) -> double foo(double, double);
+      // foo(int, float) -> double foo(double, double);
+      // Note: NOT float foo(float, float)
+      // foo(int, double) -> foo(double, double);
+      // foo(double, float) -> double foo(double, double);
+      // foo(double, float) -> double foo(double, double);
+      // foo(any-int-or-float-type, long double) -> foo(long double, long double);
+      // but ONLY float foo(float, float) is unchanged.
+      // So the only way to get an entirely float version is to call foo(1.F, 2.F),
+      // But since most (all?) the math functions convert to double internally,
+      // probably there would not be the hoped-for gain by using float here.
+
+      // This follows the C-compatible conversion rules of pow, etc
+      // where pow(int, float) is converted to pow(double, double).
+
+      template <class T>
+      struct promote_arg
+      { // If T is integral type, then promote to double.
+        typedef typename mpl::if_<is_integral<T>, double, T>::type type;
+      };
+      // These full specialisations reduce mpl::if_ usage and speed up
+      // compilation:
+      template <> struct promote_arg<float> { typedef float type; };
+      template <> struct promote_arg<double>{ typedef double type; };
+      template <> struct promote_arg<long double> { typedef long double type; };
+      template <> struct promote_arg<int> {  typedef double type; };
+
+      template <class T1, class T2>
+      struct promote_args_2
+      { // Promote, if necessary, & pick the wider of the two floating-point types.
+        // for both parameter types, if integral promote to double.
+        typedef typename promote_arg<T1>::type T1P; // T1 perhaps promoted.
+        typedef typename promote_arg<T2>::type T2P; // T2 perhaps promoted.
+
+        typedef typename mpl::if_<
+          typename mpl::and_<is_floating_point<T1P>, is_floating_point<T2P> >::type, // both T1P and T2P are floating-point?
+          typename mpl::if_< typename mpl::or_<is_same<long double, T1P>, is_same<long double, T2P> >::type, // either long double?
+            long double, // then result type is long double.
+            typename mpl::if_< typename mpl::or_<is_same<double, T1P>, is_same<double, T2P> >::type, // either double?
+            double, // result type is double.
+          float // else result type is float.
+          >::type
+          >::type,
+          // else one or the other is a user-defined type:
+          typename mpl::if_< typename mpl::and_<mpl::not_<is_floating_point<T2P> >, ::boost::is_convertible<T1P, T2P> >, T2P, T1P>::type>::type type;
+      }; // promote_arg2
+      // These full specialisations reduce mpl::if_ usage and speed up
+      // compilation:
+      template <> struct promote_args_2<float, float> { typedef float type; };
+      template <> struct promote_args_2<double, double>{ typedef double type; };
+      template <> struct promote_args_2<long double, long double> { typedef long double type; };
+      template <> struct promote_args_2<int, int> {  typedef double type; };
+      template <> struct promote_args_2<int, float> {  typedef double type; };
+      template <> struct promote_args_2<float, int> {  typedef double type; };
+      template <> struct promote_args_2<int, double> {  typedef double type; };
+      template <> struct promote_args_2<double, int> {  typedef double type; };
+      template <> struct promote_args_2<int, long double> {  typedef long double type; };
+      template <> struct promote_args_2<long double, int> {  typedef long double type; };
+      template <> struct promote_args_2<float, double> {  typedef double type; };
+      template <> struct promote_args_2<double, float> {  typedef double type; };
+      template <> struct promote_args_2<float, long double> {  typedef long double type; };
+      template <> struct promote_args_2<long double, float> {  typedef long double type; };
+      template <> struct promote_args_2<double, long double> {  typedef long double type; };
+      template <> struct promote_args_2<long double, double> {  typedef long double type; };
+
+      template <class T1, class T2=float, class T3=float, class T4=float, class T5=float, class T6=float>
+      struct promote_args
+      {
+         typedef typename promote_args_2<
+            typename remove_cv<T1>::type,
+            typename promote_args_2<
+               typename remove_cv<T2>::type,
+               typename promote_args_2<
+                  typename remove_cv<T3>::type,
+                  typename promote_args_2<
+                     typename remove_cv<T4>::type,
+                     typename promote_args_2<
+                        typename remove_cv<T5>::type, typename remove_cv<T6>::type
+                     >::type
+                  >::type
+               >::type
+            >::type
+         >::type type;
+
+#ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+         //
+         // Guard against use of long double if it's not supported:
+         //
+         BOOST_STATIC_ASSERT((0 == ::boost::is_same<type, long double>::value));
+#endif
+      };
+
+    } // namespace tools
+  } // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_PROMOTION_HPP
+
diff --git a/boost/boost/math/tools/real_cast.hpp b/boost/boost/math/tools/real_cast.hpp
new file mode 100644 (file)
index 0000000..9b854e3
--- /dev/null
@@ -0,0 +1,29 @@
+//  Copyright John Maddock 2006.
+//  Use, modification and distribution are subject to 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)
+
+#ifndef BOOST_MATH_TOOLS_REAL_CAST_HPP
+#define BOOST_MATH_TOOLS_REAL_CAST_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+namespace boost{ namespace math
+{
+  namespace tools
+  {
+    template <class To, class T>
+    inline To real_cast(T t)
+    {
+       return static_cast<To>(t);
+    }
+  } // namespace tools
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_TOOLS_REAL_CAST_HPP
+
+
+
diff --git a/boost/boost/math/tools/user.hpp b/boost/boost/math/tools/user.hpp
new file mode 100644 (file)
index 0000000..c1bdaf7
--- /dev/null
@@ -0,0 +1,97 @@
+// Copyright John Maddock 2007.
+// Copyright Paul A. Bristow 2007.
+
+// Use, modification and distribution are subject to 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)
+
+#ifndef BOOST_MATH_TOOLS_USER_HPP
+#define BOOST_MATH_TOOLS_USER_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+// This file can be modified by the user to change the default policies.
+// See "Changing the Policy Defaults" in documentation.
+
+// define this if the platform has no long double functions,
+// or if the long double versions have only double precision:
+//
+// #define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+//
+// Performance tuning options:
+//
+// #define BOOST_MATH_POLY_METHOD 3
+// #define BOOST_MATH_RATIONAL_METHOD 3
+//
+// The maximum order of polynomial that will be evaluated
+// via an unrolled specialisation:
+//
+// #define BOOST_MATH_MAX_POLY_ORDER 17
+//
+// decide whether to store constants as integers or reals:
+//
+// #define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
+
+//
+// Default policies follow:
+//
+// Domain errors:
+//
+// #define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error
+//
+// Pole errors:
+//
+// #define BOOST_MATH_POLE_ERROR_POLICY throw_on_error
+//
+// Overflow Errors:
+//
+// #define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error
+//
+// Internal Evaluation Errors:
+//
+// #define BOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error
+//
+// Underfow:
+//
+// #define BOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error
+//
+// Denorms:
+//
+// #define BOOST_MATH_DENORM_ERROR_POLICY ignore_error
+//
+// Max digits to use for internal calculations:
+//
+// #define BOOST_MATH_DIGITS10_POLICY 0
+//
+// Promote floats to doubles internally?
+//
+// #define BOOST_MATH_PROMOTE_FLOAT_POLICY true
+//
+// Promote doubles to long double internally:
+//
+// #define BOOST_MATH_PROMOTE_DOUBLE_POLICY true
+//
+// What do discrete quantiles return?
+//
+// #define BOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards
+//
+// If a function is mathematically undefined
+// (for example the Cauchy distribution has no mean),
+// then do we stop the code from compiling?
+//
+// #define BOOST_MATH_ASSERT_UNDEFINED_POLICY true
+//
+// Maximum series iterstions permitted:
+//
+// #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
+//
+// Maximum root finding steps permitted:
+//
+// define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
+
+#endif // BOOST_MATH_TOOLS_USER_HPP
+
+
diff --git a/boost/boost/mpl/comparison.hpp b/boost/boost/mpl/comparison.hpp
new file mode 100644 (file)
index 0000000..005d280
--- /dev/null
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_COMPARISON_HPP_INCLUDED
+#define BOOST_MPL_COMPARISON_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: comparison.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/not_equal_to.hpp>
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/greater.hpp>
+#include <boost/mpl/less_equal.hpp>
+#include <boost/mpl/greater_equal.hpp>
+
+#endif // BOOST_MPL_COMPARISON_HPP_INCLUDED
diff --git a/boost/boost/mpl/greater.hpp b/boost/boost/mpl/greater.hpp
new file mode 100644 (file)
index 0000000..e33ae48
--- /dev/null
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_GREATER_HPP_INCLUDED
+#define BOOST_MPL_GREATER_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: greater.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME greater
+#define AUX778076_OP_TOKEN >
+#include <boost/mpl/aux_/comparison_op.hpp>
+
+#endif // BOOST_MPL_GREATER_HPP_INCLUDED
diff --git a/boost/boost/mpl/greater_equal.hpp b/boost/boost/mpl/greater_equal.hpp
new file mode 100644 (file)
index 0000000..91ccf83
--- /dev/null
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED
+#define BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: greater_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME greater_equal
+#define AUX778076_OP_TOKEN >=
+#include <boost/mpl/aux_/comparison_op.hpp>
+
+#endif // BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED
diff --git a/boost/boost/mpl/less_equal.hpp b/boost/boost/mpl/less_equal.hpp
new file mode 100644 (file)
index 0000000..2284d1d
--- /dev/null
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_LESS_EQUAL_HPP_INCLUDED
+#define BOOST_MPL_LESS_EQUAL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: less_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME less_equal
+#define AUX778076_OP_TOKEN <=
+#include <boost/mpl/aux_/comparison_op.hpp>
+
+#endif // BOOST_MPL_LESS_EQUAL_HPP_INCLUDED
diff --git a/boost/boost/mpl/limits/list.hpp b/boost/boost/mpl/limits/list.hpp
new file mode 100644 (file)
index 0000000..ee9c7aa
--- /dev/null
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_LIMITS_LIST_HPP_INCLUDED
+#define BOOST_MPL_LIMITS_LIST_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_LIMIT_LIST_SIZE)
+#   define BOOST_MPL_LIMIT_LIST_SIZE 20
+#endif
+
+#endif // BOOST_MPL_LIMITS_LIST_HPP_INCLUDED
diff --git a/boost/boost/mpl/list.hpp b/boost/boost/mpl/list.hpp
new file mode 100644 (file)
index 0000000..838b8f4
--- /dev/null
@@ -0,0 +1,57 @@
+
+#ifndef BOOST_MPL_LIST_HPP_INCLUDED
+#define BOOST_MPL_LIST_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/limits/list.hpp>
+#   include <boost/mpl/aux_/na.hpp>
+#   include <boost/mpl/aux_/config/preprocessor.hpp>
+
+#   include <boost/preprocessor/inc.hpp>
+#   include <boost/preprocessor/cat.hpp>
+#   include <boost/preprocessor/stringize.hpp>
+
+#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING)
+#   define AUX778076_LIST_HEADER \
+    BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE).hpp \
+    /**/
+#else
+#   define AUX778076_LIST_HEADER \
+    BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE)##.hpp \
+    /**/
+#endif
+
+#   include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_LIST_HEADER)
+#   undef AUX778076_LIST_HEADER
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list.hpp
+#   include <boost/mpl/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/mpl/limits/list.hpp>
+
+#   define AUX778076_SEQUENCE_NAME list
+#   define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_LIST_SIZE
+#   include <boost/mpl/aux_/sequence_wrapper.hpp>
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif // BOOST_MPL_LIST_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/aux_/O1_size.hpp b/boost/boost/mpl/list/aux_/O1_size.hpp
new file mode 100644 (file)
index 0000000..6ef2cf7
--- /dev/null
@@ -0,0 +1,33 @@
+
+#ifndef BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/O1_size_fwd.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct O1_size_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+        : List::size
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/aux_/begin_end.hpp b/boost/boost/mpl/list/aux_/begin_end.hpp
new file mode 100644 (file)
index 0000000..dab60f3
--- /dev/null
@@ -0,0 +1,44 @@
+
+#ifndef BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/begin_end_fwd.hpp>
+#include <boost/mpl/list/aux_/iterator.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+#include <boost/mpl/list/aux_/item.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct begin_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+    {
+        typedef l_iter<typename List::type> type;
+    };
+};
+
+template<>
+struct end_impl< aux::list_tag >
+{
+    template< typename > struct apply
+    {
+        typedef l_iter<l_end> type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/aux_/clear.hpp b/boost/boost/mpl/list/aux_/clear.hpp
new file mode 100644 (file)
index 0000000..247a4de
--- /dev/null
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/clear_fwd.hpp>
+#include <boost/mpl/list/aux_/item.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct clear_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+    {
+        typedef l_end type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/aux_/empty.hpp b/boost/boost/mpl/list/aux_/empty.hpp
new file mode 100644 (file)
index 0000000..6ab60cf
--- /dev/null
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/empty_fwd.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct empty_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+        : not_<typename List::size>
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/aux_/front.hpp b/boost/boost/mpl/list/aux_/front.hpp
new file mode 100644 (file)
index 0000000..8defa99
--- /dev/null
@@ -0,0 +1,33 @@
+
+#ifndef BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/front_fwd.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct front_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+    {
+        typedef typename List::item type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/aux_/include_preprocessed.hpp b/boost/boost/mpl/list/aux_/include_preprocessed.hpp
new file mode 100644 (file)
index 0000000..431b51f
--- /dev/null
@@ -0,0 +1,35 @@
+
+// Copyright Aleksey Gurtovoy 2001-2006
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
+
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/stringize.hpp>
+
+#   define AUX778076_HEADER \
+    aux_/preprocessed/plain/BOOST_MPL_PREPROCESSED_HEADER \
+/**/
+
+#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700))
+#   define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER)
+#   include AUX778076_INCLUDE_STRING
+#   undef AUX778076_INCLUDE_STRING
+#else
+#   include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER)
+#endif
+
+#   undef AUX778076_HEADER
+
+#undef BOOST_MPL_PREPROCESSED_HEADER
diff --git a/boost/boost/mpl/list/aux_/item.hpp b/boost/boost/mpl/list/aux_/item.hpp
new file mode 100644 (file)
index 0000000..37ddff7
--- /dev/null
@@ -0,0 +1,55 @@
+
+#ifndef BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+#include <boost/mpl/aux_/config/msvc.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+      typename Size
+    , typename T
+    , typename Next
+    >
+struct l_item
+{
+// agurt, 17/jul/03: to facilitate the deficient 'is_sequence' implementation 
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+    typedef int begin;
+#endif
+    typedef aux::list_tag tag;
+    typedef l_item type;
+
+    typedef Size size;
+    typedef T item;
+    typedef Next next;
+};
+
+struct l_end
+{
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+    typedef int begin;
+#endif
+    typedef aux::list_tag tag;
+    typedef l_end type;
+    typedef long_<0> size;
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/aux_/iterator.hpp b/boost/boost/mpl/list/aux_/iterator.hpp
new file mode 100644 (file)
index 0000000..b94126c
--- /dev/null
@@ -0,0 +1,76 @@
+
+#ifndef BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/list/aux_/item.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/aux_/lambda_spec.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+namespace boost { namespace mpl {
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template< typename Node >
+struct l_iter
+{
+    typedef aux::l_iter_tag tag;
+    typedef forward_iterator_tag category;
+};
+
+template< typename Node >
+struct deref< l_iter<Node> >
+{
+    typedef typename Node::item type;
+};
+
+template< typename Node >
+struct next< l_iter<Node> >
+{
+    typedef l_iter< typename Node::next > type;
+};
+
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+template< typename Node >
+struct l_iter
+{
+    typedef aux::l_iter_tag tag;
+    typedef forward_iterator_tag category;
+    typedef typename Node::item type;
+    typedef l_iter< typename mpl::next<Node>::type > next;
+};
+
+#endif
+
+
+template<> struct l_iter<l_end>
+{
+    typedef aux::l_iter_tag tag;
+    typedef forward_iterator_tag category;
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+    typedef na type;
+    typedef l_iter next;
+#endif
+};
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, l_iter)
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/aux_/numbered.hpp b/boost/boost/mpl/list/aux_/numbered.hpp
new file mode 100644 (file)
index 0000000..de8d404
--- /dev/null
@@ -0,0 +1,68 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+// Copyright Peter Dimov 2000-2002
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#if defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/enum_params.hpp>
+#include <boost/preprocessor/enum_shifted_params.hpp>
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+#define i BOOST_PP_FRAME_ITERATION(1)
+
+#if i == 1
+
+template<
+      BOOST_PP_ENUM_PARAMS(i, typename T)
+    >
+struct list1
+    : l_item<
+          long_<1>
+        , T0
+        , l_end
+        >
+{
+    typedef list1 type;
+};
+
+#else
+
+#   define MPL_AUX_LIST_TAIL(list, i, T) \
+    BOOST_PP_CAT(list,BOOST_PP_DEC(i))< \
+      BOOST_PP_ENUM_SHIFTED_PARAMS(i, T) \
+    > \
+    /**/
+    
+template<
+      BOOST_PP_ENUM_PARAMS(i, typename T)
+    >
+struct BOOST_PP_CAT(list,i)
+    : l_item<
+          long_<i>
+        , T0
+        , MPL_AUX_LIST_TAIL(list,i,T)
+        >
+{
+    typedef BOOST_PP_CAT(list,i) type;
+};
+
+#   undef MPL_AUX_LIST_TAIL
+
+#endif // i == 1
+
+#undef i
+
+#endif // BOOST_PP_IS_ITERATING
diff --git a/boost/boost/mpl/list/aux_/numbered_c.hpp b/boost/boost/mpl/list/aux_/numbered_c.hpp
new file mode 100644 (file)
index 0000000..f304382
--- /dev/null
@@ -0,0 +1,71 @@
+
+// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: numbered_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#if defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/enum_params.hpp>
+#include <boost/preprocessor/enum_shifted_params.hpp>
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+#define i BOOST_PP_FRAME_ITERATION(1)
+
+#if i == 1
+
+template<
+      typename T
+    , BOOST_PP_ENUM_PARAMS(i, T C)
+    >
+struct list1_c
+    : l_item<
+          long_<1>
+        , integral_c<T,C0>
+        , l_end
+        >
+{
+    typedef list1_c type;
+    typedef T value_type;
+};
+
+#else
+
+#   define MPL_AUX_LIST_C_TAIL(list, i, C) \
+    BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_PP_DEC(i)),_c)<T, \
+      BOOST_PP_ENUM_SHIFTED_PARAMS(i, C) \
+    > \
+    /**/
+    
+template<
+      typename T
+    , BOOST_PP_ENUM_PARAMS(i, T C)
+    >
+struct BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c)
+    : l_item<
+          long_<i>
+        , integral_c<T,C0>
+        , MPL_AUX_LIST_C_TAIL(list,i,C)
+        >
+{
+    typedef BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) type;
+    typedef T value_type;
+};
+
+#   undef MPL_AUX_LIST_C_TAIL
+
+#endif // i == 1
+
+#undef i
+
+#endif // BOOST_PP_IS_ITERATING
diff --git a/boost/boost/mpl/list/aux_/pop_front.hpp b/boost/boost/mpl/list/aux_/pop_front.hpp
new file mode 100644 (file)
index 0000000..e053391
--- /dev/null
@@ -0,0 +1,34 @@
+
+#ifndef BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: pop_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/pop_front_fwd.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct pop_front_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+    {
+        typedef typename mpl::next<List>::type type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/aux_/preprocessed/plain/list10.hpp b/boost/boost/mpl/list/aux_/preprocessed/plain/list10.hpp
new file mode 100644 (file)
index 0000000..99368d2
--- /dev/null
@@ -0,0 +1,149 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+
+// Preprocessed version of "boost/mpl/list/list10.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0
+    >
+struct list1
+    : l_item<
+          long_<1>
+        , T0
+        , l_end
+        >
+{
+    typedef list1 type;
+};
+
+template<
+      typename T0, typename T1
+    >
+struct list2
+    : l_item<
+          long_<2>
+        , T0
+        , list1<T1>
+        >
+{
+    typedef list2 type;
+};
+
+template<
+      typename T0, typename T1, typename T2
+    >
+struct list3
+    : l_item<
+          long_<3>
+        , T0
+        , list2< T1,T2 >
+        >
+{
+    typedef list3 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3
+    >
+struct list4
+    : l_item<
+          long_<4>
+        , T0
+        , list3< T1,T2,T3 >
+        >
+{
+    typedef list4 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    >
+struct list5
+    : l_item<
+          long_<5>
+        , T0
+        , list4< T1,T2,T3,T4 >
+        >
+{
+    typedef list5 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5
+    >
+struct list6
+    : l_item<
+          long_<6>
+        , T0
+        , list5< T1,T2,T3,T4,T5 >
+        >
+{
+    typedef list6 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6
+    >
+struct list7
+    : l_item<
+          long_<7>
+        , T0
+        , list6< T1,T2,T3,T4,T5,T6 >
+        >
+{
+    typedef list7 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7
+    >
+struct list8
+    : l_item<
+          long_<8>
+        , T0
+        , list7< T1,T2,T3,T4,T5,T6,T7 >
+        >
+{
+    typedef list8 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8
+    >
+struct list9
+    : l_item<
+          long_<9>
+        , T0
+        , list8< T1,T2,T3,T4,T5,T6,T7,T8 >
+        >
+{
+    typedef list9 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    >
+struct list10
+    : l_item<
+          long_<10>
+        , T0
+        , list9< T1,T2,T3,T4,T5,T6,T7,T8,T9 >
+        >
+{
+    typedef list10 type;
+};
+
+}}
diff --git a/boost/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp b/boost/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp
new file mode 100644 (file)
index 0000000..7133d71
--- /dev/null
@@ -0,0 +1,164 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+
+// Preprocessed version of "boost/mpl/list/list10_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0
+    >
+struct list1_c
+    : l_item<
+          long_<1>
+        , integral_c< T,C0 >
+        , l_end
+        >
+{
+    typedef list1_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1
+    >
+struct list2_c
+    : l_item<
+          long_<2>
+        , integral_c< T,C0 >
+        , list1_c< T,C1 >
+        >
+{
+    typedef list2_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2
+    >
+struct list3_c
+    : l_item<
+          long_<3>
+        , integral_c< T,C0 >
+        , list2_c< T,C1,C2 >
+        >
+{
+    typedef list3_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3
+    >
+struct list4_c
+    : l_item<
+          long_<4>
+        , integral_c< T,C0 >
+        , list3_c< T,C1,C2,C3 >
+        >
+{
+    typedef list4_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4
+    >
+struct list5_c
+    : l_item<
+          long_<5>
+        , integral_c< T,C0 >
+        , list4_c< T,C1,C2,C3,C4 >
+        >
+{
+    typedef list5_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5
+    >
+struct list6_c
+    : l_item<
+          long_<6>
+        , integral_c< T,C0 >
+        , list5_c< T,C1,C2,C3,C4,C5 >
+        >
+{
+    typedef list6_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6
+    >
+struct list7_c
+    : l_item<
+          long_<7>
+        , integral_c< T,C0 >
+        , list6_c< T,C1,C2,C3,C4,C5,C6 >
+        >
+{
+    typedef list7_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7
+    >
+struct list8_c
+    : l_item<
+          long_<8>
+        , integral_c< T,C0 >
+        , list7_c< T,C1,C2,C3,C4,C5,C6,C7 >
+        >
+{
+    typedef list8_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8
+    >
+struct list9_c
+    : l_item<
+          long_<9>
+        , integral_c< T,C0 >
+        , list8_c< T,C1,C2,C3,C4,C5,C6,C7,C8 >
+        >
+{
+    typedef list9_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9
+    >
+struct list10_c
+    : l_item<
+          long_<10>
+        , integral_c< T,C0 >
+        , list9_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9 >
+        >
+{
+    typedef list10_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/boost/boost/mpl/list/aux_/preprocessed/plain/list20.hpp b/boost/boost/mpl/list/aux_/preprocessed/plain/list20.hpp
new file mode 100644 (file)
index 0000000..750e495
--- /dev/null
@@ -0,0 +1,169 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+
+// Preprocessed version of "boost/mpl/list/list20.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10
+    >
+struct list11
+    : l_item<
+          long_<11>
+        , T0
+        , list10< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
+        >
+{
+    typedef list11 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11
+    >
+struct list12
+    : l_item<
+          long_<12>
+        , T0
+        , list11< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
+        >
+{
+    typedef list12 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12
+    >
+struct list13
+    : l_item<
+          long_<13>
+        , T0
+        , list12< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
+        >
+{
+    typedef list13 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13
+    >
+struct list14
+    : l_item<
+          long_<14>
+        , T0
+        , list13< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
+        >
+{
+    typedef list14 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    >
+struct list15
+    : l_item<
+          long_<15>
+        , T0
+        , list14< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >
+        >
+{
+    typedef list15 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15
+    >
+struct list16
+    : l_item<
+          long_<16>
+        , T0
+        , list15< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >
+        >
+{
+    typedef list16 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16
+    >
+struct list17
+    : l_item<
+          long_<17>
+        , T0
+        , list16< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >
+        >
+{
+    typedef list17 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17
+    >
+struct list18
+    : l_item<
+          long_<18>
+        , T0
+        , list17< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >
+        >
+{
+    typedef list18 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18
+    >
+struct list19
+    : l_item<
+          long_<19>
+        , T0
+        , list18< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >
+        >
+{
+    typedef list19 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    >
+struct list20
+    : l_item<
+          long_<20>
+        , T0
+        , list19< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >
+        >
+{
+    typedef list20 type;
+};
+
+}}
diff --git a/boost/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp b/boost/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp
new file mode 100644 (file)
index 0000000..7f15acf
--- /dev/null
@@ -0,0 +1,173 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+
+// Preprocessed version of "boost/mpl/list/list20_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    >
+struct list11_c
+    : l_item<
+          long_<11>
+        , integral_c< T,C0 >
+        , list10_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >
+        >
+{
+    typedef list11_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11
+    >
+struct list12_c
+    : l_item<
+          long_<12>
+        , integral_c< T,C0 >
+        , list11_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >
+        >
+{
+    typedef list12_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12
+    >
+struct list13_c
+    : l_item<
+          long_<13>
+        , integral_c< T,C0 >
+        , list12_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >
+        >
+{
+    typedef list13_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13
+    >
+struct list14_c
+    : l_item<
+          long_<14>
+        , integral_c< T,C0 >
+        , list13_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >
+        >
+{
+    typedef list14_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14
+    >
+struct list15_c
+    : l_item<
+          long_<15>
+        , integral_c< T,C0 >
+        , list14_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >
+        >
+{
+    typedef list15_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15
+    >
+struct list16_c
+    : l_item<
+          long_<16>
+        , integral_c< T,C0 >
+        , list15_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >
+        >
+{
+    typedef list16_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16
+    >
+struct list17_c
+    : l_item<
+          long_<17>
+        , integral_c< T,C0 >
+        , list16_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >
+        >
+{
+    typedef list17_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17
+    >
+struct list18_c
+    : l_item<
+          long_<18>
+        , integral_c< T,C0 >
+        , list17_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >
+        >
+{
+    typedef list18_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18
+    >
+struct list19_c
+    : l_item<
+          long_<19>
+        , integral_c< T,C0 >
+        , list18_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >
+        >
+{
+    typedef list19_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19
+    >
+struct list20_c
+    : l_item<
+          long_<20>
+        , integral_c< T,C0 >
+        , list19_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >
+        >
+{
+    typedef list20_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/boost/boost/mpl/list/aux_/preprocessed/plain/list30.hpp b/boost/boost/mpl/list/aux_/preprocessed/plain/list30.hpp
new file mode 100644 (file)
index 0000000..5459101
--- /dev/null
@@ -0,0 +1,189 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+
+// Preprocessed version of "boost/mpl/list/list30.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20
+    >
+struct list21
+    : l_item<
+          long_<21>
+        , T0
+        , list20< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 >
+        >
+{
+    typedef list21 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21
+    >
+struct list22
+    : l_item<
+          long_<22>
+        , T0
+        , list21< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 >
+        >
+{
+    typedef list22 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22
+    >
+struct list23
+    : l_item<
+          long_<23>
+        , T0
+        , list22< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 >
+        >
+{
+    typedef list23 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23
+    >
+struct list24
+    : l_item<
+          long_<24>
+        , T0
+        , list23< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 >
+        >
+{
+    typedef list24 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    >
+struct list25
+    : l_item<
+          long_<25>
+        , T0
+        , list24< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 >
+        >
+{
+    typedef list25 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25
+    >
+struct list26
+    : l_item<
+          long_<26>
+        , T0
+        , list25< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 >
+        >
+{
+    typedef list26 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26
+    >
+struct list27
+    : l_item<
+          long_<27>
+        , T0
+        , list26< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 >
+        >
+{
+    typedef list27 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27
+    >
+struct list28
+    : l_item<
+          long_<28>
+        , T0
+        , list27< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 >
+        >
+{
+    typedef list28 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28
+    >
+struct list29
+    : l_item<
+          long_<29>
+        , T0
+        , list28< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 >
+        >
+{
+    typedef list29 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    >
+struct list30
+    : l_item<
+          long_<30>
+        , T0
+        , list29< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 >
+        >
+{
+    typedef list30 type;
+};
+
+}}
diff --git a/boost/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp b/boost/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp
new file mode 100644 (file)
index 0000000..5393d79
--- /dev/null
@@ -0,0 +1,183 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+
+// Preprocessed version of "boost/mpl/list/list30_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    >
+struct list21_c
+    : l_item<
+          long_<21>
+        , integral_c< T,C0 >
+        , list20_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 >
+        >
+{
+    typedef list21_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21
+    >
+struct list22_c
+    : l_item<
+          long_<22>
+        , integral_c< T,C0 >
+        , list21_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 >
+        >
+{
+    typedef list22_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22
+    >
+struct list23_c
+    : l_item<
+          long_<23>
+        , integral_c< T,C0 >
+        , list22_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 >
+        >
+{
+    typedef list23_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23
+    >
+struct list24_c
+    : l_item<
+          long_<24>
+        , integral_c< T,C0 >
+        , list23_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 >
+        >
+{
+    typedef list24_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24
+    >
+struct list25_c
+    : l_item<
+          long_<25>
+        , integral_c< T,C0 >
+        , list24_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 >
+        >
+{
+    typedef list25_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25
+    >
+struct list26_c
+    : l_item<
+          long_<26>
+        , integral_c< T,C0 >
+        , list25_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 >
+        >
+{
+    typedef list26_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26
+    >
+struct list27_c
+    : l_item<
+          long_<27>
+        , integral_c< T,C0 >
+        , list26_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 >
+        >
+{
+    typedef list27_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27
+    >
+struct list28_c
+    : l_item<
+          long_<28>
+        , integral_c< T,C0 >
+        , list27_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 >
+        >
+{
+    typedef list28_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28
+    >
+struct list29_c
+    : l_item<
+          long_<29>
+        , integral_c< T,C0 >
+        , list28_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 >
+        >
+{
+    typedef list29_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29
+    >
+struct list30_c
+    : l_item<
+          long_<30>
+        , integral_c< T,C0 >
+        , list29_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 >
+        >
+{
+    typedef list30_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/boost/boost/mpl/list/aux_/preprocessed/plain/list40.hpp b/boost/boost/mpl/list/aux_/preprocessed/plain/list40.hpp
new file mode 100644 (file)
index 0000000..68c6761
--- /dev/null
@@ -0,0 +1,209 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+
+// Preprocessed version of "boost/mpl/list/list40.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30
+    >
+struct list31
+    : l_item<
+          long_<31>
+        , T0
+        , list30< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 >
+        >
+{
+    typedef list31 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31
+    >
+struct list32
+    : l_item<
+          long_<32>
+        , T0
+        , list31< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 >
+        >
+{
+    typedef list32 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32
+    >
+struct list33
+    : l_item<
+          long_<33>
+        , T0
+        , list32< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 >
+        >
+{
+    typedef list33 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33
+    >
+struct list34
+    : l_item<
+          long_<34>
+        , T0
+        , list33< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 >
+        >
+{
+    typedef list34 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    >
+struct list35
+    : l_item<
+          long_<35>
+        , T0
+        , list34< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 >
+        >
+{
+    typedef list35 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35
+    >
+struct list36
+    : l_item<
+          long_<36>
+        , T0
+        , list35< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 >
+        >
+{
+    typedef list36 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36
+    >
+struct list37
+    : l_item<
+          long_<37>
+        , T0
+        , list36< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 >
+        >
+{
+    typedef list37 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37
+    >
+struct list38
+    : l_item<
+          long_<38>
+        , T0
+        , list37< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 >
+        >
+{
+    typedef list38 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38
+    >
+struct list39
+    : l_item<
+          long_<39>
+        , T0
+        , list38< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 >
+        >
+{
+    typedef list39 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    >
+struct list40
+    : l_item<
+          long_<40>
+        , T0
+        , list39< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 >
+        >
+{
+    typedef list40 type;
+};
+
+}}
diff --git a/boost/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp b/boost/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp
new file mode 100644 (file)
index 0000000..0c51ba2
--- /dev/null
@@ -0,0 +1,193 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+
+// Preprocessed version of "boost/mpl/list/list40_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    >
+struct list31_c
+    : l_item<
+          long_<31>
+        , integral_c< T,C0 >
+        , list30_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 >
+        >
+{
+    typedef list31_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31
+    >
+struct list32_c
+    : l_item<
+          long_<32>
+        , integral_c< T,C0 >
+        , list31_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 >
+        >
+{
+    typedef list32_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32
+    >
+struct list33_c
+    : l_item<
+          long_<33>
+        , integral_c< T,C0 >
+        , list32_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 >
+        >
+{
+    typedef list33_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33
+    >
+struct list34_c
+    : l_item<
+          long_<34>
+        , integral_c< T,C0 >
+        , list33_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 >
+        >
+{
+    typedef list34_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34
+    >
+struct list35_c
+    : l_item<
+          long_<35>
+        , integral_c< T,C0 >
+        , list34_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 >
+        >
+{
+    typedef list35_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35
+    >
+struct list36_c
+    : l_item<
+          long_<36>
+        , integral_c< T,C0 >
+        , list35_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 >
+        >
+{
+    typedef list36_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36
+    >
+struct list37_c
+    : l_item<
+          long_<37>
+        , integral_c< T,C0 >
+        , list36_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 >
+        >
+{
+    typedef list37_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37
+    >
+struct list38_c
+    : l_item<
+          long_<38>
+        , integral_c< T,C0 >
+        , list37_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 >
+        >
+{
+    typedef list38_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38
+    >
+struct list39_c
+    : l_item<
+          long_<39>
+        , integral_c< T,C0 >
+        , list38_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 >
+        >
+{
+    typedef list39_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39
+    >
+struct list40_c
+    : l_item<
+          long_<40>
+        , integral_c< T,C0 >
+        , list39_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 >
+        >
+{
+    typedef list40_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/boost/boost/mpl/list/aux_/preprocessed/plain/list50.hpp b/boost/boost/mpl/list/aux_/preprocessed/plain/list50.hpp
new file mode 100644 (file)
index 0000000..4cc22da
--- /dev/null
@@ -0,0 +1,229 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+
+// Preprocessed version of "boost/mpl/list/list50.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40
+    >
+struct list41
+    : l_item<
+          long_<41>
+        , T0
+        , list40< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 >
+        >
+{
+    typedef list41 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41
+    >
+struct list42
+    : l_item<
+          long_<42>
+        , T0
+        , list41< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 >
+        >
+{
+    typedef list42 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42
+    >
+struct list43
+    : l_item<
+          long_<43>
+        , T0
+        , list42< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 >
+        >
+{
+    typedef list43 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43
+    >
+struct list44
+    : l_item<
+          long_<44>
+        , T0
+        , list43< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 >
+        >
+{
+    typedef list44 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    >
+struct list45
+    : l_item<
+          long_<45>
+        , T0
+        , list44< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 >
+        >
+{
+    typedef list45 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45
+    >
+struct list46
+    : l_item<
+          long_<46>
+        , T0
+        , list45< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 >
+        >
+{
+    typedef list46 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46
+    >
+struct list47
+    : l_item<
+          long_<47>
+        , T0
+        , list46< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 >
+        >
+{
+    typedef list47 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47
+    >
+struct list48
+    : l_item<
+          long_<48>
+        , T0
+        , list47< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 >
+        >
+{
+    typedef list48 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47, typename T48
+    >
+struct list49
+    : l_item<
+          long_<49>
+        , T0
+        , list48< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 >
+        >
+{
+    typedef list49 type;
+};
+
+template<
+      typename T0, typename T1, typename T2, typename T3, typename T4
+    , typename T5, typename T6, typename T7, typename T8, typename T9
+    , typename T10, typename T11, typename T12, typename T13, typename T14
+    , typename T15, typename T16, typename T17, typename T18, typename T19
+    , typename T20, typename T21, typename T22, typename T23, typename T24
+    , typename T25, typename T26, typename T27, typename T28, typename T29
+    , typename T30, typename T31, typename T32, typename T33, typename T34
+    , typename T35, typename T36, typename T37, typename T38, typename T39
+    , typename T40, typename T41, typename T42, typename T43, typename T44
+    , typename T45, typename T46, typename T47, typename T48, typename T49
+    >
+struct list50
+    : l_item<
+          long_<50>
+        , T0
+        , list49< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49 >
+        >
+{
+    typedef list50 type;
+};
+
+}}
diff --git a/boost/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp b/boost/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp
new file mode 100644 (file)
index 0000000..28c061d
--- /dev/null
@@ -0,0 +1,203 @@
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+
+// Preprocessed version of "boost/mpl/list/list50_c.hpp" header
+// -- DO NOT modify by hand!
+
+namespace boost { namespace mpl {
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    >
+struct list41_c
+    : l_item<
+          long_<41>
+        , integral_c< T,C0 >
+        , list40_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 >
+        >
+{
+    typedef list41_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41
+    >
+struct list42_c
+    : l_item<
+          long_<42>
+        , integral_c< T,C0 >
+        , list41_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 >
+        >
+{
+    typedef list42_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42
+    >
+struct list43_c
+    : l_item<
+          long_<43>
+        , integral_c< T,C0 >
+        , list42_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 >
+        >
+{
+    typedef list43_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43
+    >
+struct list44_c
+    : l_item<
+          long_<44>
+        , integral_c< T,C0 >
+        , list43_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 >
+        >
+{
+    typedef list44_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44
+    >
+struct list45_c
+    : l_item<
+          long_<45>
+        , integral_c< T,C0 >
+        , list44_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 >
+        >
+{
+    typedef list45_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45
+    >
+struct list46_c
+    : l_item<
+          long_<46>
+        , integral_c< T,C0 >
+        , list45_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 >
+        >
+{
+    typedef list46_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46
+    >
+struct list47_c
+    : l_item<
+          long_<47>
+        , integral_c< T,C0 >
+        , list46_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 >
+        >
+{
+    typedef list47_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47
+    >
+struct list48_c
+    : l_item<
+          long_<48>
+        , integral_c< T,C0 >
+        , list47_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 >
+        >
+{
+    typedef list48_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48
+    >
+struct list49_c
+    : l_item<
+          long_<49>
+        , integral_c< T,C0 >
+        , list48_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 >
+        >
+{
+    typedef list49_c type;
+    typedef T value_type;
+};
+
+template<
+      typename T
+    , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
+    , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
+    , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30
+    , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40
+    , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49
+    >
+struct list50_c
+    : l_item<
+          long_<50>
+        , integral_c< T,C0 >
+        , list49_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48,C49 >
+        >
+{
+    typedef list50_c type;
+    typedef T value_type;
+};
+
+}}
diff --git a/boost/boost/mpl/list/aux_/push_back.hpp b/boost/boost/mpl/list/aux_/push_back.hpp
new file mode 100644 (file)
index 0000000..6adb7db
--- /dev/null
@@ -0,0 +1,36 @@
+
+#ifndef BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: push_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/push_back_fwd.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename Tag > struct has_push_back_impl;
+
+template<>
+struct has_push_back_impl< aux::list_tag >
+{
+    template< typename Seq > struct apply
+        : false_
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/aux_/push_front.hpp b/boost/boost/mpl/list/aux_/push_front.hpp
new file mode 100644 (file)
index 0000000..a601fea
--- /dev/null
@@ -0,0 +1,39 @@
+
+#ifndef BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/push_front_fwd.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/list/aux_/item.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct push_front_impl< aux::list_tag >
+{
+    template< typename List, typename T > struct apply
+    {
+        typedef l_item<
+              typename next<typename List::size>::type
+            , T
+            , typename List::type
+            > type;
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/aux_/size.hpp b/boost/boost/mpl/list/aux_/size.hpp
new file mode 100644 (file)
index 0000000..4ecbab8
--- /dev/null
@@ -0,0 +1,33 @@
+
+#ifndef BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/size_fwd.hpp>
+#include <boost/mpl/list/aux_/tag.hpp>
+
+namespace boost { namespace mpl {
+
+template<>
+struct size_impl< aux::list_tag >
+{
+    template< typename List > struct apply
+        : List::size
+    {
+    };
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/aux_/tag.hpp b/boost/boost/mpl/list/aux_/tag.hpp
new file mode 100644 (file)
index 0000000..d44bfe4
--- /dev/null
@@ -0,0 +1,24 @@
+
+#ifndef BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED
+#define BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+namespace boost { namespace mpl { namespace aux {
+
+struct list_tag;
+struct l_iter_tag;
+
+}}}
+
+#endif // BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/list0.hpp b/boost/boost/mpl/list/list0.hpp
new file mode 100644 (file)
index 0000000..58e93cf
--- /dev/null
@@ -0,0 +1,42 @@
+
+#ifndef BOOST_MPL_LIST_LIST0_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST0_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/list/aux_/push_front.hpp>
+#include <boost/mpl/list/aux_/pop_front.hpp>
+#include <boost/mpl/list/aux_/push_back.hpp>
+#include <boost/mpl/list/aux_/front.hpp>
+#include <boost/mpl/list/aux_/clear.hpp>
+#include <boost/mpl/list/aux_/O1_size.hpp>
+#include <boost/mpl/list/aux_/size.hpp>
+#include <boost/mpl/list/aux_/empty.hpp>
+#include <boost/mpl/list/aux_/begin_end.hpp>
+#include <boost/mpl/list/aux_/item.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename Dummy = na > struct list0;
+
+template<> struct list0<na>
+    : l_end
+{
+    typedef l_end type;
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_LIST0_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/list0_c.hpp b/boost/boost/mpl/list/list0_c.hpp
new file mode 100644 (file)
index 0000000..ed9bca5
--- /dev/null
@@ -0,0 +1,31 @@
+
+#ifndef BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list0_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/list/list0.hpp>
+#include <boost/mpl/integral_c.hpp>
+
+namespace boost { namespace mpl {
+
+template< typename T > struct list0_c
+    : l_end
+{
+    typedef l_end type;
+    typedef T value_type;
+};
+
+}}
+
+#endif // BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/list10.hpp b/boost/boost/mpl/list/list10.hpp
new file mode 100644 (file)
index 0000000..4a4ee19
--- /dev/null
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST10_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST10_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list10.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list0.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+    && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list10.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(1, 10, <boost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST10_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/list10_c.hpp b/boost/boost/mpl/list/list10_c.hpp
new file mode 100644 (file)
index 0000000..e05ef87
--- /dev/null
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list10_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list0_c.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list10_c.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(1, 10, <boost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/list20.hpp b/boost/boost/mpl/list/list20.hpp
new file mode 100644 (file)
index 0000000..9321192
--- /dev/null
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST20_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST20_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list20.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list10.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list20.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(11, 20, <boost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST20_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/list20_c.hpp b/boost/boost/mpl/list/list20_c.hpp
new file mode 100644 (file)
index 0000000..bc807e6
--- /dev/null
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list20_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list10_c.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list20_c.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(11, 20, <boost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/list30.hpp b/boost/boost/mpl/list/list30.hpp
new file mode 100644 (file)
index 0000000..f736f8c
--- /dev/null
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST30_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST30_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list30.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list20.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list30.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(21, 30, <boost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST30_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/list30_c.hpp b/boost/boost/mpl/list/list30_c.hpp
new file mode 100644 (file)
index 0000000..e682086
--- /dev/null
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list30_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list20_c.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list30_c.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(21, 30, <boost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/list40.hpp b/boost/boost/mpl/list/list40.hpp
new file mode 100644 (file)
index 0000000..8560d8f
--- /dev/null
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST40_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST40_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list40.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list30.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list40.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(31, 40, <boost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST40_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/list40_c.hpp b/boost/boost/mpl/list/list40_c.hpp
new file mode 100644 (file)
index 0000000..5c5bfdf
--- /dev/null
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list40_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list30_c.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list40_c.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(31, 40, <boost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/list50.hpp b/boost/boost/mpl/list/list50.hpp
new file mode 100644 (file)
index 0000000..dcaf18e
--- /dev/null
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST50_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST50_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list50.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list40.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list50.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(41, 50, <boost/mpl/list/aux_/numbered.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST50_HPP_INCLUDED
diff --git a/boost/boost/mpl/list/list50_c.hpp b/boost/boost/mpl/list/list50_c.hpp
new file mode 100644 (file)
index 0000000..0f38e07
--- /dev/null
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED
+#define BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: list50_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#if !defined(BOOST_MPL_PREPROCESSING_MODE)
+#   include <boost/mpl/list/list40_c.hpp>
+#endif
+
+#include <boost/mpl/aux_/config/use_preprocessed.hpp>
+
+#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
+ && !defined(BOOST_MPL_PREPROCESSING_MODE)
+
+#   define BOOST_MPL_PREPROCESSED_HEADER list50_c.hpp
+#   include <boost/mpl/list/aux_/include_preprocessed.hpp>
+
+#else
+
+#   include <boost/preprocessor/iterate.hpp>
+
+namespace boost { namespace mpl {
+
+#   define BOOST_PP_ITERATION_PARAMS_1 \
+    (3,(41, 50, <boost/mpl/list/aux_/numbered_c.hpp>))
+#   include BOOST_PP_ITERATE()
+
+}}
+
+#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+#endif // BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED
diff --git a/boost/boost/mpl/not_equal_to.hpp b/boost/boost/mpl/not_equal_to.hpp
new file mode 100644 (file)
index 0000000..00132b1
--- /dev/null
@@ -0,0 +1,21 @@
+
+#ifndef BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED
+#define BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: not_equal_to.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#define AUX778076_OP_NAME not_equal_to
+#define AUX778076_OP_TOKEN !=
+#include <boost/mpl/aux_/comparison_op.hpp>
+
+#endif // BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED
diff --git a/boost/boost/mpl/remove_if.hpp b/boost/boost/mpl/remove_if.hpp
new file mode 100644 (file)
index 0000000..f707abd
--- /dev/null
@@ -0,0 +1,83 @@
+
+#ifndef BOOST_MPL_REMOVE_IF_HPP_INCLUDED
+#define BOOST_MPL_REMOVE_IF_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+// Copyright David Abrahams 2003-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id: remove_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
+// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
+// $Revision: 49267 $
+
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/reverse_fold.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/protect.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/aux_/inserter_algorithm.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+
+template< typename Pred, typename InsertOp > struct remove_if_helper
+{
+    template< typename Sequence, typename U > struct apply
+    {
+        typedef typename eval_if<
+              typename apply1<Pred,U>::type
+            , identity<Sequence>
+            , apply2<InsertOp,Sequence,U>
+            >::type type;
+    };
+};
+
+template<
+      typename Sequence
+    , typename Predicate
+    , typename Inserter
+    >
+struct remove_if_impl
+    : fold<
+          Sequence
+        , typename Inserter::state
+        , protect< aux::remove_if_helper<
+              typename lambda<Predicate>::type
+            , typename Inserter::operation
+            > >
+        >
+{
+};
+
+template<
+      typename Sequence
+    , typename Predicate
+    , typename Inserter
+    >
+struct reverse_remove_if_impl
+    : reverse_fold<
+          Sequence
+        , typename Inserter::state
+        , protect< aux::remove_if_helper<
+              typename lambda<Predicate>::type
+            , typename Inserter::operation
+            > >
+        >
+{
+};
+
+} // namespace aux
+
+BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, remove_if)
+
+}}
+
+#endif // BOOST_MPL_REMOVE_IF_HPP_INCLUDED
index aa518e8cf8591c048cc5e7492651b06f0a4393cf..1ee02518bcd012778d0fda37586f6b0a9ce43d44 100644 (file)
@@ -16,6 +16,7 @@
 //    30 Oct 2001 Some fixes suggested by Daryle Walker (Fernando Cacciola)
 //    25 Oct 2001 Initial boostification (Fernando Cacciola)
 //    23 Jan 2004 Inital add to cvs (post review)s
+//    22 Jun 2011 Added support for specializing cast policies via numeric_cast_traits (Brandon Kohn).
 //
 #ifndef BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP
 #define BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP
 
 #include <boost/type.hpp>
 #include <boost/numeric/conversion/converter.hpp>
+#include <boost/numeric/conversion/numeric_cast_traits.hpp>
 
 namespace boost
 {
-  template<typename Target, typename Source>
-  inline
-  Target numeric_cast ( Source arg )
-  {
-    typedef boost::numeric::converter<Target,Source> Converter ;
-    return Converter::convert(arg);
-  }
-
-  using numeric::bad_numeric_cast;
-
+    template <typename Target, typename Source> 
+    inline Target numeric_cast( Source arg )
+    {
+        typedef numeric::conversion_traits<Target, Source>   conv_traits;
+        typedef numeric::numeric_cast_traits<Target, Source> cast_traits;
+        typedef boost::numeric::converter
+            <
+                Target,
+                Source, 
+                conv_traits,
+                typename cast_traits::overflow_policy, 
+                typename cast_traits::rounding_policy, 
+                boost::numeric::raw_converter< conv_traits >,
+                typename cast_traits::range_checking_policy
+            > converter;
+        return converter::convert(arg);
+    }
+    
+    using numeric::bad_numeric_cast;
 } // namespace boost
 
 #endif
 
-
 #endif
diff --git a/boost/boost/numeric/conversion/detail/numeric_cast_traits.hpp b/boost/boost/numeric/conversion/detail/numeric_cast_traits.hpp
new file mode 100644 (file)
index 0000000..9ac7950
--- /dev/null
@@ -0,0 +1,105 @@
+//
+//! 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)
+//
+#if !defined(BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES)
+    #include <boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp>
+#else
+#if !BOOST_PP_IS_ITERATING
+
+    #include <boost/preprocessor/iteration/iterate.hpp>
+    #include <boost/preprocessor/seq/elem.hpp>
+    #include <boost/preprocessor/seq/size.hpp>
+
+    #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+        #pragma wave option(preserve: 2, line: 0, output: "preprocessed/numeric_cast_traits.hpp")
+    #endif
+
+//
+//! 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)
+//
+    #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
+
+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>))
+    #include BOOST_PP_ITERATE()    
+
+}}//namespace boost::numeric;
+
+    #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES)
+        #pragma wave option(output: null)
+    #endif   
+
+    #undef BOOST_NUMERIC_CONVERSION_BUILTIN_TYPES
+
+#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()
+       
+#elif BOOST_PP_ITERATION_DEPTH() == 2
+
+    //! Generate default traits for the specified source and target.
+    #define BOOST_NUMERIC_CONVERSION_A BOOST_PP_FRAME_ITERATION(1)
+    #define BOOST_NUMERIC_CONVERSION_B BOOST_PP_FRAME_ITERATION(2)
+
+    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())
+        >
+    {
+        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;
+    };     
+
+    #undef BOOST_NUMERIC_CONVERSION_A
+    #undef BOOST_NUMERIC_CONVERSION_B
+
+#endif//! Depth 2.
+#endif// BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES
diff --git a/boost/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp b/boost/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits.hpp
new file mode 100644 (file)
index 0000000..8259097
--- /dev/null
@@ -0,0 +1,1751 @@
+//
+//! 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;
+    }; 
+       
+}}
diff --git a/boost/boost/numeric/conversion/numeric_cast_traits.hpp b/boost/boost/numeric/conversion/numeric_cast_traits.hpp
new file mode 100644 (file)
index 0000000..e24296b
--- /dev/null
@@ -0,0 +1,31 @@
+//
+//! 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)
+//
+#ifndef BOOST_NUMERIC_CAST_TRAITS_HPP
+#define BOOST_NUMERIC_CAST_TRAITS_HPP
+
+#include <boost/numeric/conversion/converter_policies.hpp>
+
+namespace boost { namespace numeric {
+
+    template <typename Target, typename Source, typename EnableIf = void>
+    struct numeric_cast_traits
+    {
+        typedef def_overflow_handler    overflow_policy;
+        typedef UseInternalRangeChecker range_checking_policy;
+        typedef Trunc<Source>           rounding_policy;
+    };
+
+}}//namespace boost::numeric;
+
+#if !defined( BOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS )
+#include <boost/cstdint.hpp>
+#include <boost/numeric/conversion/detail/numeric_cast_traits.hpp>
+#endif//!defined BOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS
+
+#endif//BOOST_NUMERIC_CAST_TRAITS_HPP
index e9a55c0c48481d6cdd2b8ee68d54d1b69fe42f48..772806e97c43d47c72e0e0debb705bd1233ddf50 100644 (file)
@@ -251,7 +251,7 @@ inline u32regex do_make_u32regex(InputIterator i,
                               const boost::mpl::int_<1>*)
 {
    typedef boost::u8_to_u32_iterator<InputIterator, UChar32> conv_type;
-   return u32regex(conv_type(i), conv_type(j), opt);
+   return u32regex(conv_type(i, i, j), conv_type(j, i, j), opt);
 }
 
 template <class InputIterator>
@@ -261,7 +261,7 @@ inline u32regex do_make_u32regex(InputIterator i,
                               const boost::mpl::int_<2>*)
 {
    typedef boost::u16_to_u32_iterator<InputIterator, UChar32> conv_type;
-   return u32regex(conv_type(i), conv_type(j), opt);
+   return u32regex(conv_type(i, i, j), conv_type(j, i, j), opt);
 }
 
 template <class InputIterator>
@@ -282,7 +282,7 @@ inline u32regex do_make_u32regex(InputIterator i,
    typedef boost::u8_to_u32_iterator<InputIterator, UChar32> conv_type;
    typedef std::vector<UChar32> vector_type;
    vector_type v;
-   conv_type a(i), b(j);
+   conv_type a(i, i, j), b(j, i, j);
    while(a != b)
    {
       v.push_back(*a);
@@ -302,7 +302,7 @@ inline u32regex do_make_u32regex(InputIterator i,
    typedef boost::u16_to_u32_iterator<InputIterator, UChar32> conv_type;
    typedef std::vector<UChar32> vector_type;
    vector_type v;
-   conv_type a(i), b(j);
+   conv_type a(i, i, j), b(j, i, j);
    while(a != b)
    {
       v.push_back(*a);
@@ -425,7 +425,7 @@ bool do_regex_match(BidiIterator first, BidiIterator last,
    typedef match_results<conv_type>                   match_type;
    typedef typename match_type::allocator_type        alloc_type;
    match_type what;
-   bool result = ::boost::regex_match(conv_type(first), conv_type(last), what, e, flags);
+   bool result = ::boost::regex_match(conv_type(first, first, last), conv_type(last, first, last), what, e, flags);
    // copy results across to m:
    if(result) copy_results(m, what);
    return result;
@@ -441,7 +441,7 @@ bool do_regex_match(BidiIterator first, BidiIterator last,
    typedef match_results<conv_type>                   match_type;
    typedef typename match_type::allocator_type        alloc_type;
    match_type what;
-   bool result = ::boost::regex_match(conv_type(first), conv_type(last), what, e, flags);
+   bool result = ::boost::regex_match(conv_type(first, first, last), conv_type(last, first, last), what, e, flags);
    // copy results across to m:
    if(result) copy_results(m, what);
    return result;
@@ -600,7 +600,7 @@ bool do_regex_search(BidiIterator first, BidiIterator last,
    typedef match_results<conv_type>                   match_type;
    typedef typename match_type::allocator_type        alloc_type;
    match_type what;
-   bool result = ::boost::regex_search(conv_type(first), conv_type(last), what, e, flags, conv_type(base));
+   bool result = ::boost::regex_search(conv_type(first, first, last), conv_type(last, first, last), what, e, flags, conv_type(base));
    // copy results across to m:
    if(result) copy_results(m, what);
    return result;
@@ -617,7 +617,7 @@ bool do_regex_search(BidiIterator first, BidiIterator last,
    typedef match_results<conv_type>                   match_type;
    typedef typename match_type::allocator_type        alloc_type;
    match_type what;
-   bool result = ::boost::regex_search(conv_type(first), conv_type(last), what, e, flags, conv_type(base));
+   bool result = ::boost::regex_search(conv_type(first, first, last), conv_type(last, first, last), what, e, flags, conv_type(base));
    // copy results across to m:
    if(result) copy_results(m, what);
    return result;
@@ -764,13 +764,13 @@ template <class I>
 inline std::pair< boost::u8_to_u32_iterator<I>, boost::u8_to_u32_iterator<I> >
    make_utf32_seq(I i, I j, mpl::int_<1> const*)
 {
-   return std::pair< boost::u8_to_u32_iterator<I>, boost::u8_to_u32_iterator<I> >(boost::u8_to_u32_iterator<I>(i), boost::u8_to_u32_iterator<I>(j));
+   return std::pair< boost::u8_to_u32_iterator<I>, boost::u8_to_u32_iterator<I> >(boost::u8_to_u32_iterator<I>(i, i, j), boost::u8_to_u32_iterator<I>(j, i, j));
 }
 template <class I>
 inline std::pair< boost::u16_to_u32_iterator<I>, boost::u16_to_u32_iterator<I> >
    make_utf32_seq(I i, I j, mpl::int_<2> const*)
 {
-   return std::pair< boost::u16_to_u32_iterator<I>, boost::u16_to_u32_iterator<I> >(boost::u16_to_u32_iterator<I>(i), boost::u16_to_u32_iterator<I>(j));
+   return std::pair< boost::u16_to_u32_iterator<I>, boost::u16_to_u32_iterator<I> >(boost::u16_to_u32_iterator<I>(i, i, j), boost::u16_to_u32_iterator<I>(j, i, j));
 }
 template <class I>
 inline std::pair< I, I >
@@ -782,13 +782,15 @@ template <class charT>
 inline std::pair< boost::u8_to_u32_iterator<const charT*>, boost::u8_to_u32_iterator<const charT*> >
    make_utf32_seq(const charT* p, mpl::int_<1> const*)
 {
-   return std::pair< boost::u8_to_u32_iterator<const charT*>, boost::u8_to_u32_iterator<const charT*> >(boost::u8_to_u32_iterator<const charT*>(p), boost::u8_to_u32_iterator<const charT*>(p+std::strlen((const char*)p)));
+   std::size_t len = std::strlen((const char*)p);
+   return std::pair< boost::u8_to_u32_iterator<const charT*>, boost::u8_to_u32_iterator<const charT*> >(boost::u8_to_u32_iterator<const charT*>(p, p, p+len), boost::u8_to_u32_iterator<const charT*>(p+len, p, p+len));
 }
 template <class charT>
 inline std::pair< boost::u16_to_u32_iterator<const charT*>, boost::u16_to_u32_iterator<const charT*> >
    make_utf32_seq(const charT* p, mpl::int_<2> const*)
 {
-   return std::pair< boost::u16_to_u32_iterator<const charT*>, boost::u16_to_u32_iterator<const charT*> >(boost::u16_to_u32_iterator<const charT*>(p), boost::u16_to_u32_iterator<const charT*>(p+u_strlen((const UChar*)p)));
+   std::size_t len = u_strlen((const UChar*)p);
+   return std::pair< boost::u16_to_u32_iterator<const charT*>, boost::u16_to_u32_iterator<const charT*> >(boost::u16_to_u32_iterator<const charT*>(p, p, p + len), boost::u16_to_u32_iterator<const charT*>(p+len, p, p + len));
 }
 template <class charT>
 inline std::pair< const charT*, const charT* >
index a8faefd5de0a594adcea963733f70228380e8ab9..e6399b50b316eda98e2f8487ba0aee934d086184 100644 (file)
@@ -82,16 +82,16 @@ static const ::boost::uint32_t ten_bit_mask = 0x3FFu;
 
 inline bool is_high_surrogate(::boost::uint16_t v)
 {
-   return (v & 0xFC00u) == 0xd800u;
+   return (v & 0xFFFFFC00u) == 0xd800u;
 }
 inline bool is_low_surrogate(::boost::uint16_t v)
 {
-   return (v & 0xFC00u) == 0xdc00u;
+   return (v & 0xFFFFFC00u) == 0xdc00u;
 }
 template <class T>
 inline bool is_surrogate(T v)
 {
-   return (v & 0xF800u) == 0xd800;
+   return (v & 0xFFFFF800u) == 0xd800;
 }
 
 inline unsigned utf8_byte_count(boost::uint8_t c)
@@ -303,6 +303,34 @@ public:
    {
       m_value = pending_read;
    }
+   //
+   // Range checked version:
+   //
+   u16_to_u32_iterator(BaseIterator b, BaseIterator start, BaseIterator end) : m_position(b)
+   {
+      m_value = pending_read;
+      //
+      // The range must not start with a low surrogate, or end in a high surrogate,
+      // otherwise we run the risk of running outside the underlying input range.
+      // Likewise b must not be located at a low surrogate.
+      //
+      boost::uint16_t val;
+      if(start != end)
+      {
+         if((b != start) && (b != end))
+         {
+            val = *b;
+            if(detail::is_surrogate(val) && ((val & 0xFC00u) == 0xDC00u))
+               invalid_code_point(val);
+         }
+         val = *start;
+         if(detail::is_surrogate(val) && ((val & 0xFC00u) == 0xDC00u))
+            invalid_code_point(val);
+         val = *--end;
+         if(detail::is_high_surrogate(val))
+            invalid_code_point(val);
+      }
+   }
 private:
    static void invalid_code_point(::boost::uint16_t val)
    {
@@ -504,7 +532,7 @@ public:
       while((*--m_position & 0xC0u) == 0x80u) ++count;
       // now check that the sequence was valid:
       if(count != detail::utf8_trailing_byte_count(*m_position))
-         invalid_sequnce();
+         invalid_sequence();
       m_value = pending_read;
    }
    BaseIterator base()const
@@ -520,8 +548,37 @@ public:
    {
       m_value = pending_read;
    }
+   //
+   // Checked constructor:
+   //
+   u8_to_u32_iterator(BaseIterator b, BaseIterator start, BaseIterator end) : m_position(b)
+   {
+      m_value = pending_read;
+      //
+      // We must not start with a continuation character, or end with a 
+      // truncated UTF-8 sequence otherwise we run the risk of going past
+      // the start/end of the underlying sequence:
+      //
+      if(start != end)
+      {
+         unsigned char v = *start;
+         if((v & 0xC0u) == 0x80u)
+            invalid_sequence();
+         if((b != start) && (b != end) && ((*b & 0xC0u) == 0x80u))
+            invalid_sequence();
+         BaseIterator pos = end;
+         do
+         {
+            v = *--pos;
+         }
+         while((start != pos) && ((v & 0xC0u) == 0x80u));
+         std::ptrdiff_t extra = detail::utf8_byte_count(v);
+         if(std::distance(pos, end) < extra)
+            invalid_sequence();
+      }
+   }
 private:
-   static void invalid_sequnce()
+   static void invalid_sequence()
    {
       std::out_of_range e("Invalid UTF-8 sequence encountered while trying to encode UTF-32 character");
       boost::throw_exception(e);
@@ -531,7 +588,7 @@ private:
       m_value = static_cast<U32Type>(static_cast< ::boost::uint8_t>(*m_position));
       // we must not have a continuation character:
       if((m_value & 0xC0u) == 0x80u)
-         invalid_sequnce();
+         invalid_sequence();
       // see how many extra byts we have:
       unsigned extra = detail::utf8_trailing_byte_count(*m_position);
       // extract the extra bits, 6 from each extra byte:
@@ -554,7 +611,7 @@ private:
       m_value &= masks[extra];
       // check the result:
       if(m_value > static_cast<U32Type>(0x10FFFFu))
-         invalid_sequnce();
+         invalid_sequence();
    }
    BaseIterator m_position;
    mutable U32Type m_value;
index 53b7bcaa235114b89ba0a53dabb4ac4daf8d386d..1e71877ef43830685096870073049f5bbdab70f3 100644 (file)
@@ -398,7 +398,7 @@ public:
       typedef typename traits::string_type seq_type;
       seq_type a(arg_first, arg_last);
       if(a.size())
-         assign(&*a.begin(), &*a.begin() + a.size(), f);
+         assign(static_cast<const charT*>(&*a.begin()), static_cast<const charT*>(&*a.begin() + a.size()), f);
       else
          assign(static_cast<const charT*>(0), static_cast<const charT*>(0), f);
    }
index efa9f7dd8ec8d3be3c0f419380d2f44c5863ee61..c4b1c048d097247c0229a4d7d1f2b69f9d6a626b 100644 (file)
@@ -241,6 +241,7 @@ protected:
    unsigned                      m_backrefs;           // bitmask of permitted backrefs
    boost::uintmax_t              m_bad_repeats;        // bitmask of repeats we can't deduce a startmap for;
    bool                          m_has_recursions;     // set when we have recursive expresisons to fixup
+   std::vector<bool>             m_recursion_checks;   // notes which recursions we've followed while analysing this expression
    typename traits::char_class_type m_word_mask;       // mask used to determine if a character is a word character
    typename traits::char_class_type m_mask_space;      // mask used to determine if a character is a word character
    typename traits::char_class_type m_lower_mask;       // mask used to determine if a character is a lowercase character
@@ -712,6 +713,8 @@ void basic_regex_creator<charT, traits>::finalize(const charT* p1, const charT*
    m_pdata->m_can_be_null = 0;
 
    m_bad_repeats = 0;
+   if(m_has_recursions)
+      m_recursion_checks.assign(1 + m_pdata->m_mark_count, false);
    create_startmap(m_pdata->m_first_state, m_pdata->m_startmap, &(m_pdata->m_can_be_null), mask_all);
    // get the restart type:
    m_pdata->m_restart_type = get_restart_type(m_pdata->m_first_state);
@@ -948,9 +951,14 @@ void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state)
          state = state->next.p;
       }
    }
+
    // now work through our list, building all the maps as we go:
    while(v.size())
    {
+      // Initialize m_recursion_checks if we need it:
+      if(m_has_recursions)
+         m_recursion_checks.assign(1 + m_pdata->m_mark_count, false);
+
       const std::pair<bool, re_syntax_base*>& p = v.back();
       m_icase = p.first;
       state = p.second;
@@ -960,6 +968,9 @@ void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state)
       m_bad_repeats = 0;
       create_startmap(state->next.p, static_cast<re_alt*>(state)->_map, &static_cast<re_alt*>(state)->can_be_null, mask_take);
       m_bad_repeats = 0;
+
+      if(m_has_recursions)
+         m_recursion_checks.assign(1 + m_pdata->m_mark_count, false);
       create_startmap(static_cast<re_alt*>(state)->alt.p, static_cast<re_alt*>(state)->_map, &static_cast<re_alt*>(state)->can_be_null, mask_skip);
       // adjust the type of the state to allow for faster matching:
       state->type = this->get_repeat_type(state);
@@ -1114,7 +1125,11 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
       }
       case syntax_element_recurse:
          {
-            if(recursion_start == state)
+            if(state->type == syntax_element_startmark)
+               recursion_sub = static_cast<re_brace*>(state)->index;
+            else
+               recursion_sub = 0;
+            if(m_recursion_checks[recursion_sub])
             {
                // Infinite recursion!!
                if(0 == this->m_pdata->m_status) // update the error code if not already set
@@ -1139,12 +1154,10 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
                recursion_start = state;
                recursion_restart = state->next.p;
                state = static_cast<re_jump*>(state)->alt.p;
-               if(state->type == syntax_element_startmark)
-                  recursion_sub = static_cast<re_brace*>(state)->index;
-               else
-                  recursion_sub = 0;
+               m_recursion_checks[recursion_sub] = true;
                break;
             }
+            m_recursion_checks[recursion_sub] = true;
             // fall through, can't handle nested recursion here...
          }
       case syntax_element_backref:
@@ -1213,7 +1226,7 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
                for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i)
                {
                   charT c = static_cast<charT>(i);
-                  if(&c != re_is_set_member(&c, &c + 1, static_cast<re_set_long<mask_type>*>(state), *m_pdata, m_icase))
+                  if(&c != re_is_set_member(&c, &c + 1, static_cast<re_set_long<mask_type>*>(state), *m_pdata, l_icase))
                      l_map[i] |= mask;
                }
             }
index 0192a9f1e1598a63c19415aea2657dc64322a09f..87ff6e204227a1e50d1ac4b38fa7ada3ed60599b 100644 (file)
@@ -941,7 +941,8 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
          ++m_position;
       }
       // for perl regexes only check for pocessive ++ repeats.
-      if((0 == (this->flags() & regbase::main_option_type)) 
+      if((m_position != m_end)
+         && (0 == (this->flags() & regbase::main_option_type)) 
          && (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus))
       {
          pocessive = true;
@@ -1025,13 +1026,14 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
       {
          //
          // Check for illegal following quantifier, we have to do this here, because
-         // the extra states we insert below circumvents are usual error checking :-(
+         // the extra states we insert below circumvents our usual error checking :-(
          //
          switch(this->m_traits.syntax_type(*m_position))
          {
          case regex_constants::syntax_star:
          case regex_constants::syntax_plus:
          case regex_constants::syntax_question:
+         case regex_constants::syntax_open_brace:
             fail(regex_constants::error_badrepeat, m_position - m_base);
             return false;
          }
index 4406839f35ca85daf3fdfd681f8db5810ca12e40..e05862fa607e8b41616ae75e45b0072548aefc93 100644 (file)
@@ -842,7 +842,15 @@ OutputIterator regex_format_imp(OutputIterator out,
 
 BOOST_MPL_HAS_XXX_TRAIT_DEF(const_iterator)
 
-struct any_type { any_type(...); };
+struct any_type 
+{
+   template <class T>
+   any_type(const T&); 
+   template <class T, class U>
+   any_type(const T&, const U&); 
+   template <class T, class U, class V>
+   any_type(const T&, const U&, const V&); 
+};
 typedef char no_type;
 typedef char (&unary_type)[2];
 typedef char (&binary_type)[3];
index 0c69b0b891f2d62c261d39d40bcfeb1311bcc335..3f1f44991217f876c55a69722a63c91298b8ad82 100644 (file)
@@ -37,9 +37,12 @@ inline void atomic_increment( int * pw )
     __asm__ __volatile__
     (
         "0:\n\t"
+        ".set push\n\t"
+        ".set mips2\n\t"
         "ll %0, %1\n\t"
         "addiu %0, 1\n\t"
         "sc %0, %1\n\t"
+        ".set pop\n\t"
         "beqz %0, 0b":
         "=&r"( tmp ), "=m"( *pw ):
         "m"( *pw )
@@ -55,9 +58,12 @@ inline int atomic_decrement( int * pw )
     __asm__ __volatile__
     (
         "0:\n\t"
+        ".set push\n\t"
+        ".set mips2\n\t"
         "ll %1, %2\n\t"
         "addiu %0, %1, -1\n\t"
         "sc %0, %2\n\t"
+        ".set pop\n\t"
         "beqz %0, 0b\n\t"
         "addiu %0, %1, -1":
         "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ):
@@ -78,10 +84,13 @@ inline int atomic_conditional_increment( int * pw )
     __asm__ __volatile__
     (
         "0:\n\t"
+        ".set push\n\t"
+        ".set mips2\n\t"
         "ll %0, %2\n\t"
         "beqz %0, 1f\n\t"
         "addiu %1, %0, 1\n\t"
         "sc %1, %2\n\t"
+        ".set pop\n\t"
         "beqz %1, 0b\n\t"
         "addiu %0, %0, 1\n\t"
         "1:":
index 31cedbce3dce296e61ad44a661184edbb7066ed1..12acea8455b45ef31a1b504cd67d686875a5e8d4 100644 (file)
 #undef BOOST_SP_HAS_SYNC
 #endif
 
+#if defined( __sh__ )
+#undef BOOST_SP_HAS_SYNC
+#endif
+
 #if defined( __sparc__ )
 #undef BOOST_SP_HAS_SYNC
 #endif
index 1f50403a3825b3fe5a60b89b7cdd0e85f4669b93..0acdff7d5e7dc0c37b7703a3b88f82ccc70ec445 100644 (file)
@@ -69,7 +69,25 @@ public:
     {
     }
 
-//  generated copy constructor, assignment, destructor are fine
+//  generated copy constructor, destructor are fine...
+
+#if defined( BOOST_HAS_RVALUE_REFS )
+
+// ... except in C++0x, move disables the implicit copy
+
+    shared_array( shared_array const & r ): px( r.px ), pn( r.pn ) // never throws
+    {
+    }
+
+#endif
+
+    // assignment
+
+    shared_array & operator=( shared_array const & r ) // never throws
+    {
+        this_type( r ).swap( *this );
+        return *this;
+    }
 
     void reset(T * p = 0)
     {
index 100f1a888bd2e294523dac4f36056851bca4e12e..9ead1ba1dd77e019db810201a83ae0f23f8c69bb 100644 (file)
@@ -203,7 +203,17 @@ public:
         boost::detail::sp_enable_shared_from_this( this, p, p );
     }
 
-//  generated copy constructor, destructor are fine
+//  generated copy constructor, destructor are fine...
+
+#if defined( BOOST_HAS_RVALUE_REFS )
+
+// ... except in C++0x, move disables the implicit copy
+
+    shared_ptr( shared_ptr const & r ): px( r.px ), pn( r.pn ) // never throws
+    {
+    }
+
+#endif
 
     template<class Y>
     explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn) // may throw
index d314b0df3eabca979f96ab0041250ff38335273b..34b0d1e0576071125d5d4410d018e6fe64362765 100644 (file)
@@ -40,8 +40,24 @@ public:
     {
     }
 
-//  generated copy constructor, assignment, destructor are fine
+//  generated copy constructor, assignment, destructor are fine...
 
+#if defined( BOOST_HAS_RVALUE_REFS )
+
+// ... except in C++0x, move disables the implicit copy
+
+    weak_ptr( weak_ptr const & r ): px( r.px ), pn( r.pn ) // never throws
+    {
+    }
+
+    weak_ptr & operator=( weak_ptr const & r ) // never throws
+    {
+        px = r.px;
+        pn = r.pn;
+        return *this;
+    }
+
+#endif
 
 //
 //  The "obvious" converting constructor implementation:
index c725296b9020006fe1147a8ffb65b2055d1d6397..acd5aff672b7920e299b98393fa64f70a21b2029 100644 (file)
@@ -1,4 +1,4 @@
-//  (C) Copyright John Maddock 2000. 
+//  (C) Copyright John Maddock 2000.
 //  Use, modification and distribution are subject to 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).
@@ -32,6 +32,7 @@
 #include "boost/type_traits/has_nothrow_constructor.hpp"
 #include "boost/type_traits/has_nothrow_copy.hpp"
 #include "boost/type_traits/has_nothrow_destructor.hpp"
+#include <boost/type_traits/has_operator.hpp>
 #include "boost/type_traits/has_trivial_assign.hpp"
 #include "boost/type_traits/has_trivial_constructor.hpp"
 #include "boost/type_traits/has_trivial_copy.hpp"
@@ -93,7 +94,3 @@
 #include "boost/type_traits/ice.hpp"
 
 #endif // BOOST_TYPE_TRAITS_HPP
-
-
-
-
index 2be58f6a9825374433e14cefd6baad56bfbc2228..f0e9925a34711db011bf4eecd31681d35825ed09 100644 (file)
@@ -39,15 +39,13 @@ namespace type_traits_detail {
     struct add_rvalue_reference_helper
     { typedef T   type; };
 
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
     template <typename T>
     struct add_rvalue_reference_helper<T, true>
     {
-#if !defined(BOOST_NO_RVALUE_REFERENCES)
         typedef T&&   type;
-#else
-        typedef T   type;
-#endif
     };
+#endif
 
     template <typename T>
     struct add_rvalue_reference_imp
index 88c6899753ca244ba08f4d3693dcaaa042b48db0..0935c607279e3164381e37a5ee1e8b58f64b7edb 100644 (file)
@@ -8,8 +8,8 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 
 // $Source$
-// $Date: 2011-04-25 08:26:48 -0400 (Mon, 25 Apr 2011) $
-// $Revision: 71481 $
+// $Date: 2011-10-09 18:28:33 -0400 (Sun, 09 Oct 2011) $
+// $Revision: 74865 $
 
 #include <boost/type_traits/detail/template_arity_spec.hpp>
 #include <boost/type_traits/integral_constant.hpp>
@@ -89,6 +89,18 @@ public:\
 BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,trait) \
 /**/
 
+#define BOOST_TT_AUX_BOOL_TRAIT_DEF3(trait,T1,T2,T3,C) \
+template< typename T1, typename T2, typename T3 > struct trait \
+    BOOST_TT_AUX_BOOL_C_BASE(C) \
+{ \
+public:\
+    BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \
+    BOOST_MPL_AUX_LAMBDA_SUPPORT(3,trait,(T1,T2,T3)) \
+}; \
+\
+BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(3,trait) \
+/**/
+
 #define BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,C) \
 template<> struct trait< sp > \
     BOOST_TT_AUX_BOOL_C_BASE(C) \
index 2259c644f2d61a42fb9cd515123cf7c61e5e0824..6daba04cfe2b5b832a8c3a6b9dd637dc0064a822 100644 (file)
@@ -8,13 +8,14 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 
 // $Source$
-// $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $
-// $Revision: 24874 $
+// $Date: 2011-10-09 18:28:33 -0400 (Sun, 09 Oct 2011) $
+// $Revision: 74865 $
 
 #undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL
 #undef BOOST_TT_AUX_BOOL_C_BASE
 #undef BOOST_TT_AUX_BOOL_TRAIT_DEF1
 #undef BOOST_TT_AUX_BOOL_TRAIT_DEF2
+#undef BOOST_TT_AUX_BOOL_TRAIT_DEF3
 #undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1
 #undef BOOST_TT_AUX_BOOL_TRAIT_SPEC2
 #undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1
diff --git a/boost/boost/type_traits/detail/has_binary_operator.hpp b/boost/boost/type_traits/detail/has_binary_operator.hpp
new file mode 100644 (file)
index 0000000..9257bc2
--- /dev/null
@@ -0,0 +1,229 @@
+//  (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#include <boost/config.hpp>
+#include <boost/type_traits/ice.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_fundamental.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+// cannot include this header without getting warnings of the kind:
+// gcc:
+//    warning: value computed is not used
+//    warning: comparison between signed and unsigned integer expressions
+// msvc:
+//    warning C4018: '<' : signed/unsigned mismatch
+//    warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data
+//    warning C4547: '*' : operator before comma has no effect; expected operator with side-effect
+//    warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
+//    warning C4804: '<' : unsafe use of type 'bool' in operation
+//    warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation
+// cannot find another implementation -> declared as system header to suppress these warnings.
+#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
+#   pragma GCC system_header
+#elif defined(BOOST_MSVC)
+#   pragma warning ( push )
+#   pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913 )
+#endif
+
+namespace boost {
+namespace detail {
+
+// This namespace ensures that argument-dependent name lookup does not mess things up.
+namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
+
+// 1. a function to have an instance of type T without requiring T to be default
+// constructible
+template <typename T> T &make();
+
+
+// 2. we provide our operator definition for types that do not have one already
+
+// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
+// found in the type's own namespace (our own operator is used) so that we have
+// a means to know that our operator was used
+struct no_operator { };
+
+// this class allows implicit conversions and makes the following operator
+// definition less-preferred than any other such operators that might be found
+// via argument-dependent name lookup
+struct any { template <class T> any(T const&); };
+
+// when operator BOOST_TT_TRAIT_OP is not available, this one is used
+no_operator operator BOOST_TT_TRAIT_OP (const any&, const any&);
+
+
+// 3. checks if the operator returns void or not
+// conditions: Lhs!=void and Rhs!=void
+
+// we first redefine "operator," so that we have no compilation error if
+// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of
+// (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if
+// operator BOOST_TT_TRAIT_OP returns void or not:
+// - operator BOOST_TT_TRAIT_OP returns void   -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t
+// - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int
+struct returns_void_t { };
+template <typename T> int operator,(const T&, returns_void_t);
+template <typename T> int operator,(const volatile T&, returns_void_t);
+
+// this intermediate trait has member value of type bool:
+// - value==true -> operator BOOST_TT_TRAIT_OP returns void
+// - value==false -> operator BOOST_TT_TRAIT_OP does not return void
+template < typename Lhs, typename Rhs >
+struct operator_returns_void {
+   // overloads of function returns_void make the difference
+   // yes_type and no_type have different size by construction
+   static ::boost::type_traits::yes_type returns_void(returns_void_t);
+   static ::boost::type_traits::no_type returns_void(int);
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>(),returns_void_t())))));
+};
+
+
+// 4. checks if the return type is Ret or Ret==dont_care
+// conditions: Lhs!=void and Rhs!=void
+
+struct dont_care { };
+
+template < typename Lhs, typename Rhs, typename Ret, bool Returns_void >
+struct operator_returns_Ret;
+
+template < typename Lhs, typename Rhs >
+struct operator_returns_Ret < Lhs, Rhs, dont_care, true > {
+   BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs, typename Rhs >
+struct operator_returns_Ret < Lhs, Rhs, dont_care, false > {
+   BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs, typename Rhs >
+struct operator_returns_Ret < Lhs, Rhs, void, true > {
+   BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs, typename Rhs >
+struct operator_returns_Ret < Lhs, Rhs, void, false > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Lhs, typename Rhs, typename Ret >
+struct operator_returns_Ret < Lhs, Rhs, Ret, true > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// otherwise checks if it is convertible to Ret using the sizeof trick
+// based on overload resolution
+// condition: Ret!=void and Ret!=dont_care and the operator does not return void
+template < typename Lhs, typename Rhs, typename Ret >
+struct operator_returns_Ret < Lhs, Rhs, Ret, false > {
+   static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret
+   static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise
+
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()))==sizeof(::boost::type_traits::yes_type)));
+};
+
+
+// 5. checks for operator existence
+// condition: Lhs!=void and Rhs!=void
+
+// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other
+// existing one;
+// this is done with redefinition of "operator," that returns no_operator or has_operator
+struct has_operator { };
+no_operator operator,(no_operator, has_operator);
+
+template < typename Lhs, typename Rhs >
+struct operator_exists {
+   static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists
+   static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise
+
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
+};
+
+
+// 6. main trait: to avoid any compilation error, this class behaves
+// differently when operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the
+// standard.
+// Forbidden_if is a bool that is:
+// - true when the operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the standard
+//   (would yield compilation error if used)
+// - false otherwise
+template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if >
+struct trait_impl1;
+
+template < typename Lhs, typename Rhs, typename Ret >
+struct trait_impl1 < Lhs, Rhs, Ret, true > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Lhs, typename Rhs, typename Ret >
+struct trait_impl1 < Lhs, Rhs, Ret, false > {
+   BOOST_STATIC_CONSTANT(bool,
+      value = (
+         ::boost::type_traits::ice_and<
+            operator_exists < Lhs, Rhs >::value,
+            operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value
+         >::value
+      )
+   );
+};
+
+// some specializations needs to be declared for the special void case
+template < typename Rhs, typename Ret >
+struct trait_impl1 < void, Rhs, Ret, false > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Lhs, typename Ret >
+struct trait_impl1 < Lhs, void, Ret, false > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Ret >
+struct trait_impl1 < void, void, Ret, false > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// defines some typedef for convenience
+template < typename Lhs, typename Rhs, typename Ret >
+struct trait_impl {
+   typedef typename ::boost::remove_reference<Lhs>::type Lhs_noref;
+   typedef typename ::boost::remove_reference<Rhs>::type Rhs_noref;
+   typedef typename ::boost::remove_cv<Lhs_noref>::type Lhs_nocv;
+   typedef typename ::boost::remove_cv<Rhs_noref>::type Rhs_nocv;
+   typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Lhs_noref>::type >::type >::type Lhs_noptr;
+   typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Rhs_noref>::type >::type >::type Rhs_noptr;
+   BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value));
+};
+
+} // namespace impl
+} // namespace detail
+
+// this is the accessible definition of the trait to end user
+BOOST_TT_AUX_BOOL_TRAIT_DEF3(BOOST_TT_TRAIT_NAME, Lhs, Rhs=Lhs, Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl < Lhs, Rhs, Ret >::value))
+
+} // namespace boost
+
+#if defined(BOOST_MSVC)
+#   pragma warning ( pop )
+#endif
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
diff --git a/boost/boost/type_traits/detail/has_postfix_operator.hpp b/boost/boost/type_traits/detail/has_postfix_operator.hpp
new file mode 100644 (file)
index 0000000..5c52b07
--- /dev/null
@@ -0,0 +1,202 @@
+//  (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#include <boost/config.hpp>
+#include <boost/type_traits/ice.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_fundamental.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+// avoid warnings
+#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
+#   pragma GCC system_header
+#elif defined(BOOST_MSVC)
+#   pragma warning ( push )
+#   pragma warning ( disable : 4244 4913 )
+#endif
+
+namespace boost {
+namespace detail {
+
+// This namespace ensures that argument-dependent name lookup does not mess things up.
+namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
+
+// 1. a function to have an instance of type T without requiring T to be default
+// constructible
+template <typename T> T &make();
+
+
+// 2. we provide our operator definition for types that do not have one already
+
+// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
+// found in the type's own namespace (our own operator is used) so that we have
+// a means to know that our operator was used
+struct no_operator { };
+
+// this class allows implicit conversions and makes the following operator
+// definition less-preferred than any other such operators that might be found
+// via argument-dependent name lookup
+struct any { template <class T> any(T const&); };
+
+// when operator BOOST_TT_TRAIT_OP is not available, this one is used
+no_operator operator BOOST_TT_TRAIT_OP (const any&, int);
+
+
+// 3. checks if the operator returns void or not
+// conditions: Lhs!=void
+
+// we first redefine "operator," so that we have no compilation error if
+// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of
+// (lhs BOOST_TT_TRAIT_OP, returns_void_t()) to deduce if
+// operator BOOST_TT_TRAIT_OP returns void or not:
+// - operator BOOST_TT_TRAIT_OP returns void   -> (lhs BOOST_TT_TRAIT_OP, returns_void_t()) returns returns_void_t
+// - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs BOOST_TT_TRAIT_OP, returns_void_t()) returns int
+struct returns_void_t { };
+template <typename T> int operator,(const T&, returns_void_t);
+template <typename T> int operator,(const volatile T&, returns_void_t);
+
+// this intermediate trait has member value of type bool:
+// - value==true -> operator BOOST_TT_TRAIT_OP returns void
+// - value==false -> operator BOOST_TT_TRAIT_OP does not return void
+template < typename Lhs >
+struct operator_returns_void {
+   // overloads of function returns_void make the difference
+   // yes_type and no_type have different size by construction
+   static ::boost::type_traits::yes_type returns_void(returns_void_t);
+   static ::boost::type_traits::no_type returns_void(int);
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make<Lhs>() BOOST_TT_TRAIT_OP,returns_void_t())))));
+};
+
+
+// 4. checks if the return type is Ret or Ret==dont_care
+// conditions: Lhs!=void
+
+struct dont_care { };
+
+template < typename Lhs, typename Ret, bool Returns_void >
+struct operator_returns_Ret;
+
+template < typename Lhs >
+struct operator_returns_Ret < Lhs, dont_care, true > {
+   BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs >
+struct operator_returns_Ret < Lhs, dont_care, false > {
+   BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs >
+struct operator_returns_Ret < Lhs, void, true > {
+   BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs >
+struct operator_returns_Ret < Lhs, void, false > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Lhs, typename Ret >
+struct operator_returns_Ret < Lhs, Ret, true > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// otherwise checks if it is convertible to Ret using the sizeof trick
+// based on overload resolution
+// condition: Ret!=void and Ret!=dont_care and the operator does not return void
+template < typename Lhs, typename Ret >
+struct operator_returns_Ret < Lhs, Ret, false > {
+   static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret
+   static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise
+
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make<Lhs>() BOOST_TT_TRAIT_OP))==sizeof(::boost::type_traits::yes_type)));
+};
+
+
+// 5. checks for operator existence
+// condition: Lhs!=void
+
+// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other
+// existing one;
+// this is done with redefinition of "operator," that returns no_operator or has_operator
+struct has_operator { };
+no_operator operator,(no_operator, has_operator);
+
+template < typename Lhs >
+struct operator_exists {
+   static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists
+   static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise
+
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
+};
+
+
+// 6. main trait: to avoid any compilation error, this class behaves
+// differently when operator BOOST_TT_TRAIT_OP(Lhs) is forbidden by the
+// standard.
+// Forbidden_if is a bool that is:
+// - true when the operator BOOST_TT_TRAIT_OP(Lhs) is forbidden by the standard
+//   (would yield compilation error if used)
+// - false otherwise
+template < typename Lhs, typename Ret, bool Forbidden_if >
+struct trait_impl1;
+
+template < typename Lhs, typename Ret >
+struct trait_impl1 < Lhs, Ret, true > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Lhs, typename Ret >
+struct trait_impl1 < Lhs, Ret, false > {
+   BOOST_STATIC_CONSTANT(bool,
+      value = (
+         ::boost::type_traits::ice_and<
+            operator_exists < Lhs >::value,
+            operator_returns_Ret < Lhs, Ret, operator_returns_void < Lhs >::value >::value
+         >::value
+      )
+   );
+};
+
+// specialization needs to be declared for the special void case
+template < typename Ret >
+struct trait_impl1 < void, Ret, false > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// defines some typedef for convenience
+template < typename Lhs, typename Ret >
+struct trait_impl {
+   typedef typename ::boost::remove_reference<Lhs>::type Lhs_noref;
+   typedef typename ::boost::remove_cv<Lhs_noref>::type Lhs_nocv;
+   typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Lhs_noref>::type >::type >::type Lhs_noptr;
+   BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value));
+};
+
+} // namespace impl
+} // namespace detail
+
+// this is the accessible definition of the trait to end user
+BOOST_TT_AUX_BOOL_TRAIT_DEF2(BOOST_TT_TRAIT_NAME, Lhs, Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl< Lhs, Ret >::value))
+
+} // namespace boost
+
+#if defined(BOOST_MSVC)
+#   pragma warning ( pop )
+#endif
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
diff --git a/boost/boost/type_traits/detail/has_prefix_operator.hpp b/boost/boost/type_traits/detail/has_prefix_operator.hpp
new file mode 100644 (file)
index 0000000..ac30e4d
--- /dev/null
@@ -0,0 +1,210 @@
+//  (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#include <boost/config.hpp>
+#include <boost/type_traits/ice.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_fundamental.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+// cannot include this header without getting warnings of the kind:
+// gcc:
+//    warning: value computed is not used
+//    warning: comparison between signed and unsigned integer expressions
+// msvc:
+//    warning C4146: unary minus operator applied to unsigned type, result still unsigned
+//    warning C4804: '-' : unsafe use of type 'bool' in operation
+// cannot find another implementation -> declared as system header to suppress these warnings.
+#if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3))
+#   pragma GCC system_header
+#elif defined(BOOST_MSVC)
+#   pragma warning ( push )
+#   pragma warning ( disable : 4146 4804 4913 4244 )
+#endif
+
+namespace boost {
+namespace detail {
+
+// This namespace ensures that argument-dependent name lookup does not mess things up.
+namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
+
+// 1. a function to have an instance of type T without requiring T to be default
+// constructible
+template <typename T> T &make();
+
+
+// 2. we provide our operator definition for types that do not have one already
+
+// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
+// found in the type's own namespace (our own operator is used) so that we have
+// a means to know that our operator was used
+struct no_operator { };
+
+// this class allows implicit conversions and makes the following operator
+// definition less-preferred than any other such operators that might be found
+// via argument-dependent name lookup
+struct any { template <class T> any(T const&); };
+
+// when operator BOOST_TT_TRAIT_OP is not available, this one is used
+no_operator operator BOOST_TT_TRAIT_OP (const any&);
+
+
+// 3. checks if the operator returns void or not
+// conditions: Rhs!=void
+
+// we first redefine "operator," so that we have no compilation error if
+// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of
+// (BOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if
+// operator BOOST_TT_TRAIT_OP returns void or not:
+// - operator BOOST_TT_TRAIT_OP returns void   -> (BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t
+// - operator BOOST_TT_TRAIT_OP returns !=void -> (BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int
+struct returns_void_t { };
+template <typename T> int operator,(const T&, returns_void_t);
+template <typename T> int operator,(const volatile T&, returns_void_t);
+
+// this intermediate trait has member value of type bool:
+// - value==true -> operator BOOST_TT_TRAIT_OP returns void
+// - value==false -> operator BOOST_TT_TRAIT_OP does not return void
+template < typename Rhs >
+struct operator_returns_void {
+   // overloads of function returns_void make the difference
+   // yes_type and no_type have different size by construction
+   static ::boost::type_traits::yes_type returns_void(returns_void_t);
+   static ::boost::type_traits::no_type returns_void(int);
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((BOOST_TT_TRAIT_OP make<Rhs>(),returns_void_t())))));
+};
+
+
+// 4. checks if the return type is Ret or Ret==dont_care
+// conditions: Rhs!=void
+
+struct dont_care { };
+
+template < typename Rhs, typename Ret, bool Returns_void >
+struct operator_returns_Ret;
+
+template < typename Rhs >
+struct operator_returns_Ret < Rhs, dont_care, true > {
+   BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Rhs >
+struct operator_returns_Ret < Rhs, dont_care, false > {
+   BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Rhs >
+struct operator_returns_Ret < Rhs, void, true > {
+   BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Rhs >
+struct operator_returns_Ret < Rhs, void, false > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Rhs, typename Ret >
+struct operator_returns_Ret < Rhs, Ret, true > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// otherwise checks if it is convertible to Ret using the sizeof trick
+// based on overload resolution
+// condition: Ret!=void and Ret!=dont_care and the operator does not return void
+template < typename Rhs, typename Ret >
+struct operator_returns_Ret < Rhs, Ret, false > {
+   static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret
+   static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise
+
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(BOOST_TT_TRAIT_OP make<Rhs>()))==sizeof(::boost::type_traits::yes_type)));
+};
+
+
+// 5. checks for operator existence
+// condition: Rhs!=void
+
+// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other
+// existing one;
+// this is done with redefinition of "operator," that returns no_operator or has_operator
+struct has_operator { };
+no_operator operator,(no_operator, has_operator);
+
+template < typename Rhs >
+struct operator_exists {
+   static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists
+   static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise
+
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
+};
+
+
+// 6. main trait: to avoid any compilation error, this class behaves
+// differently when operator BOOST_TT_TRAIT_OP(Rhs) is forbidden by the
+// standard.
+// Forbidden_if is a bool that is:
+// - true when the operator BOOST_TT_TRAIT_OP(Rhs) is forbidden by the standard
+//   (would yield compilation error if used)
+// - false otherwise
+template < typename Rhs, typename Ret, bool Forbidden_if >
+struct trait_impl1;
+
+template < typename Rhs, typename Ret >
+struct trait_impl1 < Rhs, Ret, true > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Rhs, typename Ret >
+struct trait_impl1 < Rhs, Ret, false > {
+   BOOST_STATIC_CONSTANT(bool,
+      value = (
+         ::boost::type_traits::ice_and<
+            operator_exists < Rhs >::value,
+            operator_returns_Ret < Rhs, Ret, operator_returns_void < Rhs >::value >::value
+         >::value
+      )
+   );
+};
+
+// specialization needs to be declared for the special void case
+template < typename Ret >
+struct trait_impl1 < void, Ret, false > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// defines some typedef for convenience
+template < typename Rhs, typename Ret >
+struct trait_impl {
+   typedef typename ::boost::remove_reference<Rhs>::type Rhs_noref;
+   typedef typename ::boost::remove_cv<Rhs_noref>::type Rhs_nocv;
+   typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Rhs_noref>::type >::type >::type Rhs_noptr;
+   BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value));
+};
+
+} // namespace impl
+} // namespace detail
+
+// this is the accessible definition of the trait to end user
+BOOST_TT_AUX_BOOL_TRAIT_DEF2(BOOST_TT_TRAIT_NAME, Rhs, Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl < Rhs, Ret >::value))
+
+} // namespace boost
+
+#if defined(BOOST_MSVC)
+#   pragma warning ( pop )
+#endif
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
diff --git a/boost/boost/type_traits/has_bit_and.hpp b/boost/boost/type_traits/has_bit_and.hpp
new file mode 100644 (file)
index 0000000..ee3307f
--- /dev/null
@@ -0,0 +1,49 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_BIT_AND_HPP_INCLUDED
+#define BOOST_TT_HAS_BIT_AND_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_bit_and
+#define BOOST_TT_TRAIT_OP &
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+         >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Rhs==fundamental and Lhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_pointer< Lhs_noref >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_bit_and_assign.hpp b/boost/boost/type_traits/has_bit_and_assign.hpp
new file mode 100644 (file)
index 0000000..5b3112a
--- /dev/null
@@ -0,0 +1,55 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_BIT_AND_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_BIT_AND_ASSIGN_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_bit_and_assign
+#define BOOST_TT_TRAIT_OP &=
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+         >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Rhs==fundamental and Lhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_pointer< Lhs_noref >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==fundamental and Lhs==const */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_const< Lhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_bit_or.hpp b/boost/boost/type_traits/has_bit_or.hpp
new file mode 100644 (file)
index 0000000..922b4ce
--- /dev/null
@@ -0,0 +1,49 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_BIT_OR_HPP_INCLUDED
+#define BOOST_TT_HAS_BIT_OR_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_bit_or
+#define BOOST_TT_TRAIT_OP |
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+         >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Rhs==fundamental and Lhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_pointer< Lhs_noref >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_bit_or_assign.hpp b/boost/boost/type_traits/has_bit_or_assign.hpp
new file mode 100644 (file)
index 0000000..5481b92
--- /dev/null
@@ -0,0 +1,55 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_BIT_OR_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_BIT_OR_ASSIGN_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_bit_or_assign
+#define BOOST_TT_TRAIT_OP |=
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+         >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Rhs==fundamental and Lhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_pointer< Lhs_noref >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==fundamental and Lhs==const */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_const< Lhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_bit_xor.hpp b/boost/boost/type_traits/has_bit_xor.hpp
new file mode 100644 (file)
index 0000000..883dcf6
--- /dev/null
@@ -0,0 +1,49 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_BIT_XOR_HPP_INCLUDED
+#define BOOST_TT_HAS_BIT_XOR_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_bit_xor
+#define BOOST_TT_TRAIT_OP ^
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+         >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Rhs==fundamental and Lhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_pointer< Lhs_noref >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_bit_xor_assign.hpp b/boost/boost/type_traits/has_bit_xor_assign.hpp
new file mode 100644 (file)
index 0000000..e2767cc
--- /dev/null
@@ -0,0 +1,55 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_BIT_XOR_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_BIT_XOR_ASSIGN_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_bit_xor_assign
+#define BOOST_TT_TRAIT_OP ^=
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+         >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Rhs==fundamental and Lhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_pointer< Lhs_noref >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==fundamental and Lhs==const */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_const< Lhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_complement.hpp b/boost/boost/type_traits/has_complement.hpp
new file mode 100644 (file)
index 0000000..dafd9f5
--- /dev/null
@@ -0,0 +1,32 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_COMPLEMENT_HPP_INCLUDED
+#define BOOST_TT_HAS_COMPLEMENT_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_complement
+#define BOOST_TT_TRAIT_OP ~
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* pointer */\
+      ::boost::is_pointer< Rhs_noref >::value,\
+      /* fundamental non integral */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Rhs_noref >::value,\
+         ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_prefix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_dereference.hpp b/boost/boost/type_traits/has_dereference.hpp
new file mode 100644 (file)
index 0000000..fe48e11
--- /dev/null
@@ -0,0 +1,31 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_DEREFERENCE_HPP_INCLUDED
+#define BOOST_TT_HAS_DEREFERENCE_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_dereference
+#define BOOST_TT_TRAIT_OP *
+#define BOOST_TT_FORBIDDEN_IF\
+   /* void* or fundamental */\
+   ::boost::type_traits::ice_or<\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_void< Rhs_noptr >::value\
+      >::value,\
+      ::boost::is_fundamental< Rhs_nocv >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_prefix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_divides.hpp b/boost/boost/type_traits/has_divides.hpp
new file mode 100644 (file)
index 0000000..277c2da
--- /dev/null
@@ -0,0 +1,40 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_DIVIDES_HPP_INCLUDED
+#define BOOST_TT_HAS_DIVIDES_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_divides
+#define BOOST_TT_TRAIT_OP /
+#define BOOST_TT_FORBIDDEN_IF\
+   /* pointer with pointer or fundamental */\
+   ::boost::type_traits::ice_or<\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Rhs_nocv >::value,\
+            ::boost::is_pointer< Rhs_noref >::value\
+         >::value\
+      >::value,\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Lhs_nocv >::value,\
+            ::boost::is_pointer< Lhs_noref >::value\
+         >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_divides_assign.hpp b/boost/boost/type_traits/has_divides_assign.hpp
new file mode 100644 (file)
index 0000000..b21a05a
--- /dev/null
@@ -0,0 +1,47 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_DIVIDES_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_DIVIDES_ASSIGN_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_divides_assign
+#define BOOST_TT_TRAIT_OP /=
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==fundamental and Lhs==const and Rhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_const< Lhs_noref >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value\
+      >::value,\
+      /* Lhs==pointer and (Rhs==fundamental or Rhs==pointer) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Rhs_nocv >::value,\
+            ::boost::is_pointer< Rhs_noref >::value\
+         >::value\
+      >::value,\
+      /* Rhs==pointer and (Lhs==fundamental or Lhs==pointer) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Lhs_nocv >::value,\
+            ::boost::is_pointer< Lhs_noref >::value\
+         >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_equal_to.hpp b/boost/boost/type_traits/has_equal_to.hpp
new file mode 100644 (file)
index 0000000..c2245c2
--- /dev/null
@@ -0,0 +1,49 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_EQUAL_TO_HPP_INCLUDED
+#define BOOST_TT_HAS_EQUAL_TO_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_equal_to
+#define BOOST_TT_TRAIT_OP ==
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==pointer and Rhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value\
+      >::value,\
+      /* Rhs==pointer and Lhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_fundamental< Lhs_nocv >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::type_traits::ice_not<\
+            ::boost::type_traits::ice_or<\
+               ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value,\
+               ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value,\
+               ::boost::is_same< Lhs_noptr, Rhs_noptr >::value,\
+               ::boost::is_void< Lhs_noptr >::value,\
+               ::boost::is_void< Rhs_noptr >::value\
+            >::value\
+         >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_greater.hpp b/boost/boost/type_traits/has_greater.hpp
new file mode 100644 (file)
index 0000000..ce32658
--- /dev/null
@@ -0,0 +1,49 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_GREATER_HPP_INCLUDED
+#define BOOST_TT_HAS_GREATER_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_greater
+#define BOOST_TT_TRAIT_OP >
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==pointer and Rhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value\
+      >::value,\
+      /* Rhs==pointer and Lhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_fundamental< Lhs_nocv >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::type_traits::ice_not<\
+            ::boost::type_traits::ice_or<\
+               ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value,\
+               ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value,\
+               ::boost::is_same< Lhs_noptr, Rhs_noptr >::value,\
+               ::boost::is_void< Lhs_noptr >::value,\
+               ::boost::is_void< Rhs_noptr >::value\
+            >::value\
+         >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_greater_equal.hpp b/boost/boost/type_traits/has_greater_equal.hpp
new file mode 100644 (file)
index 0000000..681685a
--- /dev/null
@@ -0,0 +1,49 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_GREATER_EQUAL_HPP_INCLUDED
+#define BOOST_TT_HAS_GREATER_EQUAL_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_greater_equal
+#define BOOST_TT_TRAIT_OP >=
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==pointer and Rhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value\
+      >::value,\
+      /* Rhs==pointer and Lhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_fundamental< Lhs_nocv >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::type_traits::ice_not<\
+            ::boost::type_traits::ice_or<\
+               ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value,\
+               ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value,\
+               ::boost::is_same< Lhs_noptr, Rhs_noptr >::value,\
+               ::boost::is_void< Lhs_noptr >::value,\
+               ::boost::is_void< Rhs_noptr >::value\
+            >::value\
+         >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_left_shift.hpp b/boost/boost/type_traits/has_left_shift.hpp
new file mode 100644 (file)
index 0000000..88205d9
--- /dev/null
@@ -0,0 +1,49 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_LEFT_SHIFT_HPP_INCLUDED
+#define BOOST_TT_HAS_LEFT_SHIFT_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_left_shift
+#define BOOST_TT_TRAIT_OP <<
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+         >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Rhs==fundamental and Lhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_pointer< Lhs_noref >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_left_shift_assign.hpp b/boost/boost/type_traits/has_left_shift_assign.hpp
new file mode 100644 (file)
index 0000000..0b3b9b1
--- /dev/null
@@ -0,0 +1,55 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_LEFT_SHIFT_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_LEFT_SHIFT_ASSIGN_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_left_shift_assign
+#define BOOST_TT_TRAIT_OP <<=
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+         >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Rhs==fundamental and Lhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_pointer< Lhs_noref >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==fundamental and Lhs==const */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_const< Lhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_less.hpp b/boost/boost/type_traits/has_less.hpp
new file mode 100644 (file)
index 0000000..e1a045e
--- /dev/null
@@ -0,0 +1,49 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_LESS_HPP_INCLUDED
+#define BOOST_TT_HAS_LESS_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_less
+#define BOOST_TT_TRAIT_OP <
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==pointer and Rhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value\
+      >::value,\
+      /* Rhs==pointer and Lhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_fundamental< Lhs_nocv >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::type_traits::ice_not<\
+            ::boost::type_traits::ice_or<\
+               ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value,\
+               ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value,\
+               ::boost::is_same< Lhs_noptr, Rhs_noptr >::value,\
+               ::boost::is_void< Lhs_noptr >::value,\
+               ::boost::is_void< Rhs_noptr >::value\
+            >::value\
+         >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_less_equal.hpp b/boost/boost/type_traits/has_less_equal.hpp
new file mode 100644 (file)
index 0000000..c633b8b
--- /dev/null
@@ -0,0 +1,49 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_LESS_EQUAL_HPP_INCLUDED
+#define BOOST_TT_HAS_LESS_EQUAL_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_less_equal
+#define BOOST_TT_TRAIT_OP <=
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==pointer and Rhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value\
+      >::value,\
+      /* Rhs==pointer and Lhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_fundamental< Lhs_nocv >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::type_traits::ice_not<\
+            ::boost::type_traits::ice_or<\
+               ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value,\
+               ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value,\
+               ::boost::is_same< Lhs_noptr, Rhs_noptr >::value,\
+               ::boost::is_void< Lhs_noptr >::value,\
+               ::boost::is_void< Rhs_noptr >::value\
+            >::value\
+         >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_logical_and.hpp b/boost/boost/type_traits/has_logical_and.hpp
new file mode 100644 (file)
index 0000000..5bfa1c3
--- /dev/null
@@ -0,0 +1,40 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_LOGICAL_AND_HPP_INCLUDED
+#define BOOST_TT_HAS_LOGICAL_AND_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_logical_and
+#define BOOST_TT_TRAIT_OP &&
+#define BOOST_TT_FORBIDDEN_IF\
+   /* pointer with fundamental non convertible to bool */\
+   ::boost::type_traits::ice_or<\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::type_traits::ice_and<\
+            ::boost::is_fundamental< Rhs_nocv >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_convertible< Rhs_nocv, bool >::value >::value\
+         >::value\
+      >::value,\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::type_traits::ice_and<\
+            ::boost::is_fundamental< Lhs_nocv >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_convertible< Lhs_nocv, bool >::value >::value\
+         >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_logical_not.hpp b/boost/boost/type_traits/has_logical_not.hpp
new file mode 100644 (file)
index 0000000..fd99d3c
--- /dev/null
@@ -0,0 +1,23 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_LOGICAL_NOT_HPP_INCLUDED
+#define BOOST_TT_HAS_LOGICAL_NOT_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_logical_not
+#define BOOST_TT_TRAIT_OP !
+#define BOOST_TT_FORBIDDEN_IF\
+   false
+
+#include <boost/type_traits/detail/has_prefix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_logical_or.hpp b/boost/boost/type_traits/has_logical_or.hpp
new file mode 100644 (file)
index 0000000..a4ae6c5
--- /dev/null
@@ -0,0 +1,40 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_LOGICAL_OR_HPP_INCLUDED
+#define BOOST_TT_HAS_LOGICAL_OR_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_logical_or
+#define BOOST_TT_TRAIT_OP ||
+#define BOOST_TT_FORBIDDEN_IF\
+   /* pointer with fundamental non convertible to bool */\
+   ::boost::type_traits::ice_or<\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::type_traits::ice_and<\
+            ::boost::is_fundamental< Rhs_nocv >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_convertible< Rhs_nocv, bool >::value >::value\
+         >::value\
+      >::value,\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::type_traits::ice_and<\
+            ::boost::is_fundamental< Lhs_nocv >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_convertible< Lhs_nocv, bool >::value >::value\
+         >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_minus.hpp b/boost/boost/type_traits/has_minus.hpp
new file mode 100644 (file)
index 0000000..cc1d06b
--- /dev/null
@@ -0,0 +1,60 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_MINUS_HPP_INCLUDED
+#define BOOST_TT_HAS_MINUS_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_minus
+#define BOOST_TT_TRAIT_OP -
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+      >::value,\
+      /* Lhs==void* and (Rhs==fundamental or Rhs==pointer) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_void< Lhs_noptr >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Rhs_nocv >::value,\
+            ::boost::is_pointer< Rhs_noref >::value\
+         >::value\
+      >::value,\
+      /* Rhs==void* and (Lhs==fundamental or Lhs==pointer) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_void< Rhs_noptr >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Lhs_nocv >::value,\
+            ::boost::is_pointer< Lhs_noref >::value\
+         >::value\
+      >::value,\
+      /* Lhs=fundamental and Rhs=pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* two different pointers */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::type_traits::ice_not< ::boost::is_same< Lhs_nocv, Rhs_nocv >::value >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_minus_assign.hpp b/boost/boost/type_traits/has_minus_assign.hpp
new file mode 100644 (file)
index 0000000..84ba359
--- /dev/null
@@ -0,0 +1,65 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_MINUS_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_MINUS_ASSIGN_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_minus_assign
+#define BOOST_TT_TRAIT_OP -=
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+      >::value,\
+      /* Lhs==void* and Rhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_void< Lhs_noptr >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value\
+      >::value,\
+      /* Rhs==void* and Lhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_void< Rhs_noptr >::value,\
+         ::boost::is_fundamental< Lhs_nocv >::value\
+      >::value,\
+      /* Lhs=fundamental and Rhs=pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* (Lhs==fundamental or Lhs==pointer) and (Rhs==fundamental or Rhs==pointer) and (Lhs==const) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Lhs_nocv >::value,\
+            ::boost::is_pointer< Lhs_noref >::value\
+         >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Rhs_nocv >::value,\
+            ::boost::is_pointer< Rhs_noref >::value\
+         >::value,\
+         ::boost::is_const< Lhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_modulus.hpp b/boost/boost/type_traits/has_modulus.hpp
new file mode 100644 (file)
index 0000000..6948728
--- /dev/null
@@ -0,0 +1,49 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_MODULUS_HPP_INCLUDED
+#define BOOST_TT_HAS_MODULUS_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_modulus
+#define BOOST_TT_TRAIT_OP %
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+         >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Rhs==fundamental and Lhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_pointer< Lhs_noref >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_modulus_assign.hpp b/boost/boost/type_traits/has_modulus_assign.hpp
new file mode 100644 (file)
index 0000000..f0531f0
--- /dev/null
@@ -0,0 +1,55 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_MODULUS_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_MODULUS_ASSIGN_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_modulus_assign
+#define BOOST_TT_TRAIT_OP %=
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+         >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Rhs==fundamental and Lhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_pointer< Lhs_noref >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==fundamental and Lhs==const */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_const< Lhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_multiplies.hpp b/boost/boost/type_traits/has_multiplies.hpp
new file mode 100644 (file)
index 0000000..4b578c5
--- /dev/null
@@ -0,0 +1,40 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_MULTIPLIES_HPP_INCLUDED
+#define BOOST_TT_HAS_MULTIPLIES_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_multiplies
+#define BOOST_TT_TRAIT_OP *
+#define BOOST_TT_FORBIDDEN_IF\
+   /* pointer with pointer or fundamental */\
+   ::boost::type_traits::ice_or<\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Rhs_nocv >::value,\
+            ::boost::is_pointer< Rhs_noref >::value\
+         >::value\
+      >::value,\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Lhs_nocv >::value,\
+            ::boost::is_pointer< Lhs_noref >::value\
+         >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_multiplies_assign.hpp b/boost/boost/type_traits/has_multiplies_assign.hpp
new file mode 100644 (file)
index 0000000..1678b7b
--- /dev/null
@@ -0,0 +1,47 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_MULTIPLIES_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_MULTIPLIES_ASSIGN_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_multiplies_assign
+#define BOOST_TT_TRAIT_OP *=
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==fundamental and Lhs==const and Rhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_const< Lhs_noref >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value\
+      >::value,\
+      /* Lhs==pointer and (Rhs==fundamental or Rhs==pointer) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Rhs_nocv >::value,\
+            ::boost::is_pointer< Rhs_noref >::value\
+         >::value\
+      >::value,\
+      /* Rhs==pointer and (Lhs==fundamental or Lhs==pointer) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Lhs_nocv >::value,\
+            ::boost::is_pointer< Lhs_noref >::value\
+         >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_negate.hpp b/boost/boost/type_traits/has_negate.hpp
new file mode 100644 (file)
index 0000000..452e54a
--- /dev/null
@@ -0,0 +1,25 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_NEGATE_HPP_INCLUDED
+#define BOOST_TT_HAS_NEGATE_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_negate
+#define BOOST_TT_TRAIT_OP -
+#define BOOST_TT_FORBIDDEN_IF\
+   /* pointer */\
+   ::boost::is_pointer< Rhs_noref >::value
+
+
+#include <boost/type_traits/detail/has_prefix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_not_equal_to.hpp b/boost/boost/type_traits/has_not_equal_to.hpp
new file mode 100644 (file)
index 0000000..e7e3700
--- /dev/null
@@ -0,0 +1,49 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_NOT_EQUAL_TO_HPP_INCLUDED
+#define BOOST_TT_HAS_NOT_EQUAL_TO_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_not_equal_to
+#define BOOST_TT_TRAIT_OP !=
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==pointer and Rhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value\
+      >::value,\
+      /* Rhs==pointer and Lhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_fundamental< Lhs_nocv >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer and Lhs!=base(Rhs) and Rhs!=base(Lhs) and Lhs!=void* and Rhs!=void* */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::type_traits::ice_not<\
+            ::boost::type_traits::ice_or<\
+               ::boost::is_base_of< Lhs_noptr, Rhs_noptr >::value,\
+               ::boost::is_base_of< Rhs_noptr, Lhs_noptr >::value,\
+               ::boost::is_same< Lhs_noptr, Rhs_noptr >::value,\
+               ::boost::is_void< Lhs_noptr >::value,\
+               ::boost::is_void< Rhs_noptr >::value\
+            >::value\
+         >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_operator.hpp b/boost/boost/type_traits/has_operator.hpp
new file mode 100644 (file)
index 0000000..c97a90f
--- /dev/null
@@ -0,0 +1,51 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
+#define BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
+
+#include <boost/type_traits/has_bit_and.hpp>
+#include <boost/type_traits/has_bit_and_assign.hpp>
+#include <boost/type_traits/has_bit_or.hpp>
+#include <boost/type_traits/has_bit_or_assign.hpp>
+#include <boost/type_traits/has_bit_xor.hpp>
+#include <boost/type_traits/has_bit_xor_assign.hpp>
+#include <boost/type_traits/has_complement.hpp>
+#include <boost/type_traits/has_dereference.hpp>
+#include <boost/type_traits/has_divides.hpp>
+#include <boost/type_traits/has_divides_assign.hpp>
+#include <boost/type_traits/has_equal_to.hpp>
+#include <boost/type_traits/has_greater.hpp>
+#include <boost/type_traits/has_greater_equal.hpp>
+#include <boost/type_traits/has_left_shift.hpp>
+#include <boost/type_traits/has_left_shift_assign.hpp>
+#include <boost/type_traits/has_less.hpp>
+#include <boost/type_traits/has_less_equal.hpp>
+#include <boost/type_traits/has_logical_and.hpp>
+#include <boost/type_traits/has_logical_not.hpp>
+#include <boost/type_traits/has_logical_or.hpp>
+#include <boost/type_traits/has_minus.hpp>
+#include <boost/type_traits/has_minus_assign.hpp>
+#include <boost/type_traits/has_modulus.hpp>
+#include <boost/type_traits/has_modulus_assign.hpp>
+#include <boost/type_traits/has_multiplies.hpp>
+#include <boost/type_traits/has_multiplies_assign.hpp>
+#include <boost/type_traits/has_negate.hpp>
+#include <boost/type_traits/has_not_equal_to.hpp>
+#include <boost/type_traits/has_plus.hpp>
+#include <boost/type_traits/has_plus_assign.hpp>
+#include <boost/type_traits/has_post_decrement.hpp>
+#include <boost/type_traits/has_post_increment.hpp>
+#include <boost/type_traits/has_pre_decrement.hpp>
+#include <boost/type_traits/has_pre_increment.hpp>
+#include <boost/type_traits/has_right_shift.hpp>
+#include <boost/type_traits/has_right_shift_assign.hpp>
+#include <boost/type_traits/has_unary_minus.hpp>
+#include <boost/type_traits/has_unary_plus.hpp>
+
+#endif
diff --git a/boost/boost/type_traits/has_plus.hpp b/boost/boost/type_traits/has_plus.hpp
new file mode 100644 (file)
index 0000000..70c1200
--- /dev/null
@@ -0,0 +1,54 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_PLUS_HPP_INCLUDED
+#define BOOST_TT_HAS_PLUS_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_plus
+#define BOOST_TT_TRAIT_OP +
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Lhs==void* and Rhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_void< Lhs_noptr >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value\
+      >::value,\
+      /* Rhs==void* and Lhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_void< Rhs_noptr >::value,\
+         ::boost::is_fundamental< Lhs_nocv >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+      >::value,\
+      /* Rhs==pointer and Lhs==fundamental and Lhs!=integral */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_plus_assign.hpp b/boost/boost/type_traits/has_plus_assign.hpp
new file mode 100644 (file)
index 0000000..6d65204
--- /dev/null
@@ -0,0 +1,66 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_PLUS_ASSIGN_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_plus_assign
+#define BOOST_TT_TRAIT_OP +=
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Lhs==void* and Rhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_void< Lhs_noptr >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value\
+      >::value,\
+      /* Rhs==void* and Lhs==fundamental */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_void< Rhs_noptr >::value,\
+         ::boost::is_fundamental< Lhs_nocv >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==fundamental and Rhs!=integral */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+      >::value,\
+      /* Rhs==pointer and Lhs==fundamental and Lhs!=bool */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::type_traits::ice_not< ::boost::is_same< Lhs_nocv, bool >::value >::value\
+      >::value,\
+      /* (Lhs==fundamental or Lhs==pointer) and (Rhs==fundamental or Rhs==pointer) and (Lhs==const) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Lhs_nocv >::value,\
+            ::boost::is_pointer< Lhs_noref >::value\
+         >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Rhs_nocv >::value,\
+            ::boost::is_pointer< Rhs_noref >::value\
+         >::value,\
+         ::boost::is_const< Lhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_post_decrement.hpp b/boost/boost/type_traits/has_post_decrement.hpp
new file mode 100644 (file)
index 0000000..e277eaf
--- /dev/null
@@ -0,0 +1,40 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_POST_DECREMENT_HPP_INCLUDED
+#define BOOST_TT_HAS_POST_DECREMENT_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_post_decrement
+#define BOOST_TT_TRAIT_OP --
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* bool */\
+      ::boost::is_same< bool, Lhs_nocv >::value,\
+      /* void* */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_void< Lhs_noptr >::value\
+      >::value,\
+      /* (fundamental or pointer) and const */\
+      ::boost::type_traits::ice_and<\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Lhs_nocv >::value,\
+            ::boost::is_pointer< Lhs_noref >::value\
+         >::value,\
+         ::boost::is_const< Lhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_postfix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_post_increment.hpp b/boost/boost/type_traits/has_post_increment.hpp
new file mode 100644 (file)
index 0000000..085b2d5
--- /dev/null
@@ -0,0 +1,40 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_POST_INCREMENT_HPP_INCLUDED
+#define BOOST_TT_HAS_POST_INCREMENT_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_post_increment
+#define BOOST_TT_TRAIT_OP ++
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* bool */\
+      ::boost::is_same< bool, Lhs_nocv >::value,\
+      /* void* */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_void< Lhs_noptr >::value\
+      >::value,\
+      /* (fundamental or pointer) and const */\
+      ::boost::type_traits::ice_and<\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Lhs_nocv >::value,\
+            ::boost::is_pointer< Lhs_noref >::value\
+         >::value,\
+         ::boost::is_const< Lhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_postfix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_pre_decrement.hpp b/boost/boost/type_traits/has_pre_decrement.hpp
new file mode 100644 (file)
index 0000000..8f08291
--- /dev/null
@@ -0,0 +1,40 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_PRE_DECREMENT_HPP_INCLUDED
+#define BOOST_TT_HAS_PRE_DECREMENT_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_pre_decrement
+#define BOOST_TT_TRAIT_OP --
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* bool */\
+      ::boost::is_same< bool, Rhs_nocv >::value,\
+      /* void* */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_void< Rhs_noptr >::value\
+      >::value,\
+      /* (fundamental or pointer) and const */\
+      ::boost::type_traits::ice_and<\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Rhs_nocv >::value,\
+            ::boost::is_pointer< Rhs_noref >::value\
+         >::value,\
+         ::boost::is_const< Rhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_prefix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_pre_increment.hpp b/boost/boost/type_traits/has_pre_increment.hpp
new file mode 100644 (file)
index 0000000..fcb946d
--- /dev/null
@@ -0,0 +1,40 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_PRE_INCREMENT_HPP_INCLUDED
+#define BOOST_TT_HAS_PRE_INCREMENT_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_pre_increment
+#define BOOST_TT_TRAIT_OP ++
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* bool */\
+      ::boost::is_same< bool, Rhs_nocv >::value,\
+      /* void* */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Rhs_noref >::value,\
+         ::boost::is_void< Rhs_noptr >::value\
+      >::value,\
+      /* (fundamental or pointer) and const */\
+      ::boost::type_traits::ice_and<\
+         ::boost::type_traits::ice_or<\
+            ::boost::is_fundamental< Rhs_nocv >::value,\
+            ::boost::is_pointer< Rhs_noref >::value\
+         >::value,\
+         ::boost::is_const< Rhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_prefix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_right_shift.hpp b/boost/boost/type_traits/has_right_shift.hpp
new file mode 100644 (file)
index 0000000..5735870
--- /dev/null
@@ -0,0 +1,49 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_RIGHT_SHIFT_HPP_INCLUDED
+#define BOOST_TT_HAS_RIGHT_SHIFT_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_right_shift
+#define BOOST_TT_TRAIT_OP >>
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+         >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Rhs==fundamental and Lhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_pointer< Lhs_noref >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_right_shift_assign.hpp b/boost/boost/type_traits/has_right_shift_assign.hpp
new file mode 100644 (file)
index 0000000..0536e71
--- /dev/null
@@ -0,0 +1,55 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_RIGHT_SHIFT_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_RIGHT_SHIFT_ASSIGN_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_right_shift_assign
+#define BOOST_TT_TRAIT_OP >>=
+#define BOOST_TT_FORBIDDEN_IF\
+   ::boost::type_traits::ice_or<\
+      /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::type_traits::ice_or<\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\
+            ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\
+         >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Rhs==fundamental and Lhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_pointer< Lhs_noref >::value\
+      >::value,\
+      /* Lhs==pointer and Rhs==pointer */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_pointer< Lhs_noref >::value,\
+         ::boost::is_pointer< Rhs_noref >::value\
+      >::value,\
+      /* Lhs==fundamental and Rhs==fundamental and Lhs==const */\
+      ::boost::type_traits::ice_and<\
+         ::boost::is_fundamental< Lhs_nocv >::value,\
+         ::boost::is_fundamental< Rhs_nocv >::value,\
+         ::boost::is_const< Lhs_noref >::value\
+      >::value\
+   >::value
+
+
+#include <boost/type_traits/detail/has_binary_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_unary_minus.hpp b/boost/boost/type_traits/has_unary_minus.hpp
new file mode 100644 (file)
index 0000000..6b3157f
--- /dev/null
@@ -0,0 +1,25 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_UNARY_MINUS_HPP_INCLUDED
+#define BOOST_TT_HAS_UNARY_MINUS_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_unary_minus
+#define BOOST_TT_TRAIT_OP -
+#define BOOST_TT_FORBIDDEN_IF\
+   /* pointer */\
+   ::boost::is_pointer< Rhs_noref >::value
+
+
+#include <boost/type_traits/detail/has_prefix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
diff --git a/boost/boost/type_traits/has_unary_plus.hpp b/boost/boost/type_traits/has_unary_plus.hpp
new file mode 100644 (file)
index 0000000..a61770f
--- /dev/null
@@ -0,0 +1,23 @@
+//  (C) Copyright 2009-2011 Frederic Bron.
+//
+//  Use, modification and distribution are subject to 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).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_UNARY_PLUS_HPP_INCLUDED
+#define BOOST_TT_HAS_UNARY_PLUS_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_unary_plus
+#define BOOST_TT_TRAIT_OP +
+#define BOOST_TT_FORBIDDEN_IF\
+   false
+
+#include <boost/type_traits/detail/has_prefix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#endif
index 6057249755c26976678e1b5f8576217a06b22aa0..d47b33ee473eb7583516a4e0187b0b88b9b8ddab 100644 (file)
@@ -1,4 +1,3 @@
-
 //  (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
 //  Use, modification and distribution are subject to the Boost Software License,
 //  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -22,7 +21,7 @@
 // (these should largely ignore cv-qualifiers)
 // BOOST_IS_UNION(T) should evaluate to true if T is a union type
 // BOOST_IS_POD(T) should evaluate to true if T is a POD type
-// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty struct or union
+// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty class type (and not a union)
 // BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
 // BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
 // BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
@@ -36,7 +35,7 @@
 //
 // BOOST_IS_ABSTRACT(T) true if T is an abstract type
 // BOOST_IS_BASE_OF(T,U) true if T is a base class of U
-// BOOST_IS_CLASS(T) true if T is a class type
+// BOOST_IS_CLASS(T) true if T is a class type (and not a union)
 // BOOST_IS_CONVERTIBLE(T,U) true if T is convertible to U
 // BOOST_IS_ENUM(T) true is T is an enum
 // BOOST_IS_POLYMORPHIC(T) true if T is a polymorphic type
 #   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
 #endif
 
+#if defined(BOOST_CLANG) && defined(__has_feature)
+#   include <boost/type_traits/is_same.hpp>
+#   include <boost/type_traits/is_reference.hpp>
+#   include <boost/type_traits/is_volatile.hpp>
+
+#   if __has_feature(is_union)
+#     define BOOST_IS_UNION(T) __is_union(T)
+#   endif
+#   if __has_feature(is_pod) && defined(_LIBCPP_VERSION)
+#     define BOOST_IS_POD(T) __is_pod(T)
+#   endif
+#   if __has_feature(is_empty) && defined(_LIBCPP_VERSION)
+#     define BOOST_IS_EMPTY(T) __is_empty(T)
+#   endif
+#   if __has_feature(has_trivial_constructor)
+#     define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
+#   endif
+#   if __has_feature(has_trivial_copy)
+#     define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value && !is_volatile<T>::value)
+#   endif
+#   if __has_feature(has_trivial_assign)
+#     define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value)
+#   endif
+#   if __has_feature(has_trivial_destructor)
+#     define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
+#   endif
+#   if __has_feature(has_nothrow_constructor)
+#     define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
+#   endif
+#   if __has_feature(has_nothrow_copy)
+#     define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile<T>::value && !is_reference<T>::value)
+#   endif
+#   if __has_feature(has_nothrow_assign)
+#     define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile<T>::value)
+#   endif
+#   if __has_feature(has_virtual_destructor)
+#     define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
+#   endif
+#   if __has_feature(is_abstract)
+#     define BOOST_IS_ABSTRACT(T) __is_abstract(T)
+#   endif
+#   if __has_feature(is_base_of)
+#     define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
+#   endif
+#   if __has_feature(is_class)
+#     define BOOST_IS_CLASS(T) __is_class(T)
+#   endif
+#   if __has_feature(is_convertible_to)
+#     include <boost/type_traits/is_abstract.hpp>
+#     define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible_to(T,U) && !::boost::is_abstract<U>::value)
+#   endif
+#   if __has_feature(is_enum)
+#     define BOOST_IS_ENUM(T) __is_enum(T)
+#   endif
+#   if __has_feature(is_polymorphic)
+#     define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
+#   endif
+#   define BOOST_ALIGNMENT_OF(T) __alignof(T)
+
+#   define BOOST_HAS_TYPE_TRAITS_INTRINSICS
+#endif
+
 #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__)))
 #   include <boost/type_traits/is_same.hpp>
 #   include <boost/type_traits/is_reference.hpp>
 #   define BOOST_IS_POD(T) __is_pod(T)
 #   define BOOST_IS_EMPTY(T) __is_empty(T)
 #   define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
-#   define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value && && !is_volatile<T>::value)
+#   define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference<T>::value && !is_volatile<T>::value)
 #   define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile<T>::value)
 #   define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
 #   define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
 
 
 
+
index d8e5a89d9d2fee55dba4549705e9195b8ab158fd..0602838a33fca4725ed9b96792caec59420f9ad8 100644 (file)
@@ -109,7 +109,7 @@ template <> struct is_unsigned_imp<const char> : public true_type{};
 template <> struct is_unsigned_imp<volatile char> : public true_type{};
 template <> struct is_unsigned_imp<const volatile char> : public true_type{};
 #endif
-#if defined(WCHAR_MIN) && (WCHAR_MIN == 0)
+#if defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
 template <> struct is_unsigned_imp<wchar_t> : public true_type{};
 template <> struct is_unsigned_imp<const wchar_t> : public true_type{};
 template <> struct is_unsigned_imp<volatile wchar_t> : public true_type{};
index 4061fd2b4c1e89b47e33ea51937414c719bbf04f..ee6d8f969179f276f4f530095369e8163655ee7a 100644 (file)
@@ -27,6 +27,8 @@
 
 namespace boost {
 
+#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
 namespace detail{
 
 template <class T>
@@ -49,7 +51,6 @@ struct rvalue_ref_filter_rem_cv<T&&>
 
 }
 
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
 //  convert a type T to a non-cv-qualified type - remove_cv<T>
 BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename boost::detail::rvalue_ref_filter_rem_cv<T>::type)
index 3e91649e2e1872bd28f233a3d1fe5ea30b0a9efd..4d569649804ab68076801e8e03016fe4993d5667 100644 (file)
 #   else
 #       error native typeof is not supported
 #   endif
-
+#elif defined(__SUNPRO_CC)
+#   if (__SUNPRO_CC < 0x590 )
+#     ifdef BOOST_TYPEOF_NATIVE
+#         error native typeof is not supported
+#     endif
+#     ifndef BOOST_TYPEOF_EMULATION
+#         define BOOST_TYPEOF_EMULATION
+#     endif
+#   else
+#     ifndef BOOST_TYPEOF_EMULATION
+#         ifndef BOOST_TYPEOF_NATIVE
+#             define BOOST_TYPEOF_NATIVE
+#         endif
+#         define BOOST_TYPEOF_KEYWORD __typeof__
+#     endif
+#   endif
 #else //unknown compiler
 #   ifndef BOOST_TYPEOF_NATIVE
 #       ifndef BOOST_TYPEOF_EMULATION
index 041e37d697b70c6e8f89cceca77e31e3fb7416e9..d15482fee9a5012787a0e58f94998368384ae83d 100644 (file)
@@ -19,7 +19,7 @@
 //  BOOST_VERSION / 100 % 1000 is the minor version
 //  BOOST_VERSION / 100000 is the major version
 
-#define BOOST_VERSION 104700
+#define BOOST_VERSION 104800
 
 //
 //  BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
@@ -27,7 +27,7 @@
 //  number, y is the minor version number, and z is the patch level if not 0.
 //  This is used by <config/auto_link.hpp> to select which library version to link to.
 
-#define BOOST_LIB_VERSION "1_47"
+#define BOOST_LIB_VERSION "1_48"
 
 #endif
 
index a99de14c62db209f4811385894b0286d3416edd4..6701020105a07bba99b71d35c6c41e8acd10cbdf 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
+#include "internals.hpp"
 
 #if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
 
@@ -107,26 +108,6 @@ c_regex_traits<char>::string_type BOOST_REGEX_CALL c_regex_traits<char>::transfo
    return result;
 }
 
-enum
-{
-   char_class_space=1<<0, 
-   char_class_print=1<<1, 
-   char_class_cntrl=1<<2, 
-   char_class_upper=1<<3, 
-   char_class_lower=1<<4,
-   char_class_alpha=1<<5, 
-   char_class_digit=1<<6, 
-   char_class_punct=1<<7, 
-   char_class_xdigit=1<<8,
-   char_class_alnum=char_class_alpha|char_class_digit, 
-   char_class_graph=char_class_alnum|char_class_punct,
-   char_class_blank=1<<9,
-   char_class_word=1<<10,
-   char_class_unicode=1<<11,
-   char_class_horizontal=1<<12,
-   char_class_vertical=1<<13
-};
-
 c_regex_traits<char>::char_class_type BOOST_REGEX_CALL c_regex_traits<char>::lookup_classname(const char* p1, const char* p2)
 {
    static const char_class_type masks[] = 
index 5c27330c8ee8995842e2111be1c1f659dcea7113..8d69139f963e4c1222325209f4a39c6d6637dbaf 100644 (file)
@@ -361,11 +361,24 @@ void BuildFileList(std::list<std::string>* pl, const char* files, bool recurse)
 
       while(dstart != dend)
       {
+         // Verify that sprintf will not overflow:
+         if(std::strlen(dstart.path()) + std::strlen(directory_iterator::separator()) + std::strlen(ptr) >= MAX_PATH)
+         {
+            // Oops overflow, skip this item:
+            ++dstart;
+            continue;
+         }
 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
-         (::sprintf_s)(buf, sizeof(buf), "%s%s%s", dstart.path(), directory_iterator::separator(), ptr);
+         int r = (::sprintf_s)(buf, sizeof(buf), "%s%s%s", dstart.path(), directory_iterator::separator(), ptr);
 #else
-         (std::sprintf)(buf, "%s%s%s", dstart.path(), directory_iterator::separator(), ptr);
+         int r = (std::sprintf)(buf, "%s%s%s", dstart.path(), directory_iterator::separator(), ptr);
 #endif
+         if(r < 0)
+         {
+            // sprintf failed, skip this item:
+            ++dstart;
+            continue;
+         }
          BuildFileList(pl, buf, recurse);
          ++dstart;
       }
index ff1d11198fb36a4a876553352062cdcc5054bdd3..38c0d2c3a5307967b65dab5767f4f4b182a584eb 100644 (file)
@@ -847,10 +847,16 @@ bool iswild(const char* mask, const char* name)
 unsigned _fi_attributes(const char* root, const char* name)
 {
    char buf[MAX_PATH];
+   // verify that we can not overflow:
+   if(std::strlen(root) + std::strlen(_fi_sep) + std::strlen(name) >= MAX_PATH)
+      return 0;
+   int r;
    if( ( (root[0] == *_fi_sep) || (root[0] == *_fi_sep_alt) ) && (root[1] == '\0') )
-      (std::sprintf)(buf, "%s%s", root, name);
+      r = (std::sprintf)(buf, "%s%s", root, name);
    else
-      (std::sprintf)(buf, "%s%s%s", root, _fi_sep, name);
+      r = (std::sprintf)(buf, "%s%s%s", root, _fi_sep, name);
+   if(r < 0)
+      return 0; // sprintf failed
    DIR* d = opendir(buf);
    if(d)
    {
diff --git a/boost/libs/regex/src/internals.hpp b/boost/libs/regex/src/internals.hpp
new file mode 100644 (file)
index 0000000..3a15cc6
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (c) 2011
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to 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)
+ *
+ */
+
+#ifndef BOOST_REGEX_SRC_INTERNALS_HPP
+#define BOOST_REGEX_SRC_INTERNALS_HPP
+
+enum
+{
+   char_class_space=1<<0, 
+   char_class_print=1<<1, 
+   char_class_cntrl=1<<2, 
+   char_class_upper=1<<3, 
+   char_class_lower=1<<4,
+   char_class_alpha=1<<5, 
+   char_class_digit=1<<6, 
+   char_class_punct=1<<7, 
+   char_class_xdigit=1<<8,
+   char_class_alnum=char_class_alpha|char_class_digit, 
+   char_class_graph=char_class_alnum|char_class_punct,
+   char_class_blank=1<<9,
+   char_class_word=1<<10,
+   char_class_unicode=1<<11,
+   char_class_horizontal=1<<12,
+   char_class_vertical=1<<13
+};
+
+#endif // BOOST_REGEX_SRC_INTERNALS_HPP
index 37ed4221be3400a0ba9967d8d2b6a77413b7a872..abafd8f23190c36c78cd675941ba67a7199e75df 100644 (file)
@@ -167,11 +167,17 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int code, const regex_tA*
       {
          if(std::strcmp(e->re_endp, names[i]) == 0)
          {
+            //
+            // We're converting an integer i to a string, and since i <= REG_E_UNKNOWN
+            // a five character string is *always* large enough:
+            //
 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
-            (::sprintf_s)(localbuf, 5, "%d", i);
+            int r = (::sprintf_s)(localbuf, 5, "%d", i);
 #else
-            (std::sprintf)(localbuf, "%d", i);
+            int r = (std::sprintf)(localbuf, "%d", i);
 #endif
+            if(r < 0)
+               return 0; // sprintf failed
             if(std::strlen(localbuf) < buf_size)
                re_detail::strcpy_s(buf, buf_size, localbuf);
             return std::strlen(localbuf) + 1;
index a9e96d9ec8ac88fc57791db02519602003dafd19..b3d2c5a2c7ffcead84a83fac6167894237070e37 100755 (executable)
@@ -22,6 +22,7 @@
 #include <boost/detail/workaround.hpp>
 #include <memory>
 #include <string>
+#include "internals.hpp"
 
 #if defined(_DLL_CPPLIB) && !defined(_M_CEE_PURE) && defined(_NATIVE_WCHAR_T_DEFINED) \
    && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) || defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))\
@@ -147,26 +148,6 @@ c_regex_traits<wchar_t>::string_type BOOST_REGEX_CALL c_regex_traits<wchar_t>::t
    return result;
 }
 
-enum
-{
-   char_class_space=1<<0, 
-   char_class_print=1<<1, 
-   char_class_cntrl=1<<2, 
-   char_class_upper=1<<3, 
-   char_class_lower=1<<4,
-   char_class_alpha=1<<5, 
-   char_class_digit=1<<6, 
-   char_class_punct=1<<7, 
-   char_class_xdigit=1<<8,
-   char_class_alnum=char_class_alpha|char_class_digit, 
-   char_class_graph=char_class_alnum|char_class_punct,
-   char_class_blank=1<<9,
-   char_class_word=1<<10,
-   char_class_unicode=1<<11,
-   char_class_horizontal=1<<12,
-   char_class_vertical=1<<13
-};
-
 c_regex_traits<wchar_t>::char_class_type BOOST_REGEX_CALL c_regex_traits<wchar_t>::lookup_classname(const wchar_t* p1, const wchar_t* p2) 
 {
    static const char_class_type masks[] = 
index 3c693c67201df8b70cc10de77a1c7d3dd0ff32d1..ff5c90d89a72dfc22de09b743183e815af4a51bf 100644 (file)
@@ -74,7 +74,7 @@ const wchar_t* wnames[] = {
 };
 }
 
-typedef boost::basic_regex<wchar_t, c_regex_traits<wchar_t> > c_regex_type;
+typedef boost::basic_regex<wchar_t, c_regex_traits<wchar_t> > wc_regex_type;
 
 BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW* expression, const wchar_t* ptr, int f)
 {
@@ -84,7 +84,7 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW* expression, const wcha
 #ifndef BOOST_NO_EXCEPTIONS
       try{
 #endif
-      expression->guts = new c_regex_type();
+      expression->guts = new wc_regex_type();
 #ifndef BOOST_NO_EXCEPTIONS
       } catch(...)
       {
@@ -134,9 +134,9 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW* expression, const wcha
    try{
 #endif
       expression->re_magic = wmagic_value;
-      static_cast<c_regex_type*>(expression->guts)->set_expression(ptr, p2, flags);
-      expression->re_nsub = static_cast<c_regex_type*>(expression->guts)->mark_count() - 1;
-      result = static_cast<c_regex_type*>(expression->guts)->error_code();
+      static_cast<wc_regex_type*>(expression->guts)->set_expression(ptr, p2, flags);
+      expression->re_nsub = static_cast<wc_regex_type*>(expression->guts)->mark_count() - 1;
+      result = static_cast<wc_regex_type*>(expression->guts)->error_code();
 #ifndef BOOST_NO_EXCEPTIONS
    } 
    catch(const boost::regex_error& be)
@@ -215,7 +215,7 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW*
    {
       std::string p;
       if((e) && (e->re_magic == wmagic_value))
-         p = static_cast<c_regex_type*>(e->guts)->get_traits().error_string(static_cast< ::boost::regex_constants::error_type>(code));
+         p = static_cast<wc_regex_type*>(e->guts)->get_traits().error_string(static_cast< ::boost::regex_constants::error_type>(code));
       else
       {
          p = re_detail::get_default_error_string(static_cast< ::boost::regex_constants::error_type>(code));
@@ -264,7 +264,7 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecW(const regex_tW* expression, cons
 #endif
    if(expression->re_magic == wmagic_value)
    {
-      result = regex_search(start, end, m, *static_cast<c_regex_type*>(expression->guts), flags);
+      result = regex_search(start, end, m, *static_cast<wc_regex_type*>(expression->guts), flags);
    }
    else
       return result;
@@ -301,7 +301,7 @@ BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeW(regex_tW* expression)
 {
    if(expression->re_magic == wmagic_value)
    {
-      delete static_cast<c_regex_type*>(expression->guts);
+      delete static_cast<wc_regex_type*>(expression->guts);
    }
    expression->re_magic = 0;
 }