update boost to version 1.48

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40230 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2011-11-20 18:58:15 +00:00
parent 74ee5c0e69
commit 0f2eab3665
156 changed files with 13301 additions and 1094 deletions

View 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")

View File

@ -172,6 +172,7 @@
#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

View 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)

View 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

View File

@ -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

View 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

View File

@ -217,6 +217,10 @@
#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

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View File

@ -105,6 +105,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

View 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

View File

@ -194,6 +194,7 @@
#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

View File

@ -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>

View File

@ -55,6 +55,8 @@
#ifdef _WIN32_WCE
# define BOOST_NO_ANSI_APIS
#else
# define BOOST_HAS_GETSYSTEMTIMEASFILETIME
#endif
#ifndef BOOST_HAS_PTHREADS

View File

@ -17,6 +17,10 @@
// 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"

View 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"
@ -69,6 +69,10 @@
// 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"

View File

@ -359,6 +359,13 @@
#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:

View 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

View 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>
@ -34,17 +93,6 @@
#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

View File

@ -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 */

View File

@ -858,7 +858,7 @@ namespace boost {
#else
private:
struct dummy {
void nonnull() {};
void nonnull() {}
};
typedef void (dummy::*safe_bool)();

View 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
*/

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

57
boost/boost/mpl/list.hpp Normal file
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;
};
}}

View File

@ -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;
};
}}

View File

@ -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;
};
}}

View File

@ -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;
};
}}

View File

@ -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;
};
}}

View File

@ -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;
};
}}

View File

@ -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;
};
}}

View File

@ -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;
};
}}

View File

@ -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;
};
}}

View File

@ -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;
};
}}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View 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
@ -30,22 +31,31 @@
#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

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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

View 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* >

View 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;

View 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);
}

View 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;
}
}

View 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;
}

View 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];

View 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:":

View File

@ -36,6 +36,10 @@
#undef BOOST_SP_HAS_SYNC
#endif
#if defined( __sh__ )
#undef BOOST_SP_HAS_SYNC
#endif
#if defined( __sparc__ )
#undef BOOST_SP_HAS_SYNC
#endif

View 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)
{

View 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

View 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:

View 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

View 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

Some files were not shown because too many files have changed in this diff Show More