mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2026-10-26 06:38:16 +08:00
Apply consistent code formatting across the repo. Add clang-format and pre-commit hooks.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// Boost config.hpp configuration header file ------------------------------//
|
||||
|
||||
// (C) Copyright John Maddock 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org/libs/config for most recent version.
|
||||
@@ -19,52 +19,41 @@
|
||||
|
||||
// if we don't have a user config, then use the default location:
|
||||
#if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG)
|
||||
# define BOOST_USER_CONFIG <boost/config/user.hpp>
|
||||
#define BOOST_USER_CONFIG <boost/config/user.hpp>
|
||||
#endif
|
||||
// include it first:
|
||||
#ifdef BOOST_USER_CONFIG
|
||||
# include BOOST_USER_CONFIG
|
||||
#include BOOST_USER_CONFIG
|
||||
#endif
|
||||
|
||||
// if we don't have a compiler config set, try and find one:
|
||||
#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG)
|
||||
# include <boost/config/select_compiler_config.hpp>
|
||||
#include <boost/config/select_compiler_config.hpp>
|
||||
#endif
|
||||
// if we have a compiler config, include it now:
|
||||
#ifdef BOOST_COMPILER_CONFIG
|
||||
# include BOOST_COMPILER_CONFIG
|
||||
#include BOOST_COMPILER_CONFIG
|
||||
#endif
|
||||
|
||||
// if we don't have a std library config set, try and find one:
|
||||
#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG)
|
||||
# include <boost/config/select_stdlib_config.hpp>
|
||||
#include <boost/config/select_stdlib_config.hpp>
|
||||
#endif
|
||||
// if we have a std library config, include it now:
|
||||
#ifdef BOOST_STDLIB_CONFIG
|
||||
# include BOOST_STDLIB_CONFIG
|
||||
#include BOOST_STDLIB_CONFIG
|
||||
#endif
|
||||
|
||||
// if we don't have a platform config set, try and find one:
|
||||
#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG)
|
||||
# include <boost/config/select_platform_config.hpp>
|
||||
#include <boost/config/select_platform_config.hpp>
|
||||
#endif
|
||||
// if we have a platform config, include it now:
|
||||
#ifdef BOOST_PLATFORM_CONFIG
|
||||
# include BOOST_PLATFORM_CONFIG
|
||||
#include BOOST_PLATFORM_CONFIG
|
||||
#endif
|
||||
|
||||
// get config suffix code:
|
||||
#include <boost/config/suffix.hpp>
|
||||
|
||||
#endif // BOOST_CONFIG_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // BOOST_CONFIG_HPP
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright John Maddock 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2003.
|
||||
// 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)
|
||||
|
||||
// for C++ Builder the following options effect the ABI:
|
||||
@@ -21,7 +21,4 @@
|
||||
// 8026 - functions taking class by value arguments are not expanded inline
|
||||
|
||||
#pragma nopushoptwarn
|
||||
# pragma option push -Vx -Ve -a8 -b -pc -Vmv -VC- -Vl- -w-8027 -w-8026
|
||||
|
||||
|
||||
|
||||
#pragma option push -Vx -Ve -a8 -b -pc -Vmv -VC- -Vl - -w -8027 -w-8026
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// (C) Copyright John Maddock 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2003.
|
||||
// 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)
|
||||
|
||||
# pragma option pop
|
||||
#pragma option pop
|
||||
#pragma nopushoptwarn
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright John Maddock 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2003.
|
||||
// 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)
|
||||
|
||||
//
|
||||
@@ -9,14 +9,12 @@
|
||||
// code will no longer be binary compatible with the bjam built binaries
|
||||
// unless this header is included to force Boost code into a consistent ABI.
|
||||
//
|
||||
// Note that inclusion of this header is only necessary for libraries with
|
||||
// Note that inclusion of this header is only necessary for libraries with
|
||||
// separate source, header only libraries DO NOT need this as long as all
|
||||
// translation units are built with the same options.
|
||||
//
|
||||
#if defined(_M_X64)
|
||||
# pragma pack(push,16)
|
||||
#pragma pack(push, 16)
|
||||
#else
|
||||
# pragma pack(push,8)
|
||||
#pragma pack(push, 8)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
// (C) Copyright John Maddock 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2003.
|
||||
// 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)
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
|
||||
@@ -1,25 +1,24 @@
|
||||
// abi_prefix header -------------------------------------------------------//
|
||||
|
||||
// (c) Copyright John Maddock 2003
|
||||
|
||||
|
||||
// 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_CONFIG_ABI_PREFIX_HPP
|
||||
# define BOOST_CONFIG_ABI_PREFIX_HPP
|
||||
#define BOOST_CONFIG_ABI_PREFIX_HPP
|
||||
#else
|
||||
# error double inclusion of header boost/config/abi_prefix.hpp is an error
|
||||
#error double inclusion of header boost/config/abi_prefix.hpp is an error
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
// this must occur after all other includes and before any code appears:
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
#if defined( __BORLANDC__ )
|
||||
#if defined(__BORLANDC__)
|
||||
#pragma nopushoptwarn
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// abi_sufffix header -------------------------------------------------------//
|
||||
|
||||
// (c) Copyright John Maddock 2003
|
||||
|
||||
|
||||
// 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).
|
||||
@@ -10,18 +10,16 @@
|
||||
// <boost/config/abi_prefix.hpp>.
|
||||
|
||||
#ifndef BOOST_CONFIG_ABI_PREFIX_HPP
|
||||
# error Header boost/config/abi_suffix.hpp must only be used after boost/config/abi_prefix.hpp
|
||||
#error Header boost/config/abi_suffix.hpp must only be used after boost/config/abi_prefix.hpp
|
||||
#else
|
||||
# undef BOOST_CONFIG_ABI_PREFIX_HPP
|
||||
#undef BOOST_CONFIG_ABI_PREFIX_HPP
|
||||
#endif
|
||||
|
||||
// the suffix header occurs after all of our code:
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#if defined( __BORLANDC__ )
|
||||
#if defined(__BORLANDC__)
|
||||
#pragma nopushoptwarn
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE auto_link.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
|
||||
*/
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE auto_link.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
|
||||
*/
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
@@ -70,40 +70,38 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
# ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
# endif
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
#include <boost/config.hpp>
|
||||
#endif
|
||||
#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__)
|
||||
//
|
||||
// C language compatability (no, honestly)
|
||||
//
|
||||
# define BOOST_MSVC _MSC_VER
|
||||
# define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
|
||||
# define BOOST_DO_STRINGIZE(X) #X
|
||||
#define BOOST_MSVC _MSC_VER
|
||||
#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
|
||||
#define BOOST_DO_STRINGIZE(X) #X
|
||||
#endif
|
||||
//
|
||||
// Only include what follows for known and supported compilers:
|
||||
//
|
||||
#if defined(BOOST_MSVC) \
|
||||
|| defined(__BORLANDC__) \
|
||||
|| (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
|
||||
#if defined(BOOST_MSVC) || defined(__BORLANDC__) || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
|
||||
|| (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
|
||||
|
||||
#ifndef BOOST_VERSION_HPP
|
||||
# include <boost/version.hpp>
|
||||
#include <boost/version.hpp>
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_LIB_NAME
|
||||
# error "Macro BOOST_LIB_NAME not set (internal error)"
|
||||
#error "Macro BOOST_LIB_NAME not set (internal error)"
|
||||
#endif
|
||||
|
||||
//
|
||||
// error check:
|
||||
//
|
||||
#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG)
|
||||
# pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors")
|
||||
# pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes")
|
||||
# error "Incompatible build options"
|
||||
#pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors")
|
||||
#pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes")
|
||||
#error "Incompatible build options"
|
||||
#endif
|
||||
//
|
||||
// select toolset if not defined already:
|
||||
@@ -112,58 +110,58 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
||||
// Note: no compilers before 1200 are supported
|
||||
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
|
||||
|
||||
# ifdef UNDER_CE
|
||||
// vc6:
|
||||
# define BOOST_LIB_TOOLSET "evc4"
|
||||
# else
|
||||
// vc6:
|
||||
# define BOOST_LIB_TOOLSET "vc6"
|
||||
# endif
|
||||
#ifdef UNDER_CE
|
||||
// vc6:
|
||||
#define BOOST_LIB_TOOLSET "evc4"
|
||||
#else
|
||||
// vc6:
|
||||
#define BOOST_LIB_TOOLSET "vc6"
|
||||
#endif
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300)
|
||||
|
||||
// vc7:
|
||||
# define BOOST_LIB_TOOLSET "vc7"
|
||||
// vc7:
|
||||
#define BOOST_LIB_TOOLSET "vc7"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
|
||||
|
||||
// vc71:
|
||||
# define BOOST_LIB_TOOLSET "vc71"
|
||||
// vc71:
|
||||
#define BOOST_LIB_TOOLSET "vc71"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1400)
|
||||
|
||||
// vc80:
|
||||
# define BOOST_LIB_TOOLSET "vc80"
|
||||
// vc80:
|
||||
#define BOOST_LIB_TOOLSET "vc80"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1500)
|
||||
|
||||
// vc90:
|
||||
# define BOOST_LIB_TOOLSET "vc90"
|
||||
// vc90:
|
||||
#define BOOST_LIB_TOOLSET "vc90"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1600)
|
||||
|
||||
// vc10:
|
||||
# define BOOST_LIB_TOOLSET "vc100"
|
||||
// vc10:
|
||||
#define BOOST_LIB_TOOLSET "vc100"
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
|
||||
// CBuilder 6:
|
||||
# define BOOST_LIB_TOOLSET "bcb"
|
||||
// CBuilder 6:
|
||||
#define BOOST_LIB_TOOLSET "bcb"
|
||||
|
||||
#elif defined(__ICL)
|
||||
|
||||
// Intel C++, no version number:
|
||||
# define BOOST_LIB_TOOLSET "iw"
|
||||
// Intel C++, no version number:
|
||||
#define BOOST_LIB_TOOLSET "iw"
|
||||
|
||||
#elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )
|
||||
#elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF)
|
||||
|
||||
// Metrowerks CodeWarrior 8.x
|
||||
# define BOOST_LIB_TOOLSET "cw8"
|
||||
// Metrowerks CodeWarrior 8.x
|
||||
#define BOOST_LIB_TOOLSET "cw8"
|
||||
|
||||
#elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )
|
||||
#elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF)
|
||||
|
||||
// Metrowerks CodeWarrior 9.x
|
||||
# define BOOST_LIB_TOOLSET "cw9"
|
||||
// Metrowerks CodeWarrior 9.x
|
||||
#define BOOST_LIB_TOOLSET "cw9"
|
||||
|
||||
#endif
|
||||
#endif // BOOST_LIB_TOOLSET
|
||||
@@ -172,86 +170,88 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
||||
// select thread opt:
|
||||
//
|
||||
#if defined(_MT) || defined(__MT__)
|
||||
# define BOOST_LIB_THREAD_OPT "-mt"
|
||||
#define BOOST_LIB_THREAD_OPT "-mt"
|
||||
#else
|
||||
# define BOOST_LIB_THREAD_OPT
|
||||
#define BOOST_LIB_THREAD_OPT
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MWERKS__)
|
||||
|
||||
# ifdef _DLL
|
||||
#ifdef _DLL
|
||||
|
||||
# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
|
||||
#if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) \
|
||||
&& (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
|
||||
|
||||
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
# define BOOST_LIB_RT_OPT "-gdp"
|
||||
# elif defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-gdp"
|
||||
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-p"
|
||||
# endif
|
||||
#if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
#define BOOST_LIB_RT_OPT "-gdp"
|
||||
#elif defined(_DEBUG)
|
||||
#define BOOST_LIB_RT_OPT "-gdp"
|
||||
#pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
|
||||
#error "Build options aren't compatible with pre-built libraries"
|
||||
#else
|
||||
#define BOOST_LIB_RT_OPT "-p"
|
||||
#endif
|
||||
|
||||
# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
#elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
|
||||
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
# define BOOST_LIB_RT_OPT "-gdpn"
|
||||
# elif defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-gdpn"
|
||||
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-pn"
|
||||
# endif
|
||||
#if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
#define BOOST_LIB_RT_OPT "-gdpn"
|
||||
#elif defined(_DEBUG)
|
||||
#define BOOST_LIB_RT_OPT "-gdpn"
|
||||
#pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
|
||||
#error "Build options aren't compatible with pre-built libraries"
|
||||
#else
|
||||
#define BOOST_LIB_RT_OPT "-pn"
|
||||
#endif
|
||||
|
||||
# else
|
||||
#else
|
||||
|
||||
# if defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-gd"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT
|
||||
# endif
|
||||
#if defined(_DEBUG)
|
||||
#define BOOST_LIB_RT_OPT "-gd"
|
||||
#else
|
||||
#define BOOST_LIB_RT_OPT
|
||||
#endif
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# else
|
||||
#else
|
||||
|
||||
# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
|
||||
#if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) \
|
||||
&& (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
|
||||
|
||||
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
# define BOOST_LIB_RT_OPT "-sgdp"
|
||||
# elif defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-sgdp"
|
||||
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-sp"
|
||||
# endif
|
||||
#if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
#define BOOST_LIB_RT_OPT "-sgdp"
|
||||
#elif defined(_DEBUG)
|
||||
#define BOOST_LIB_RT_OPT "-sgdp"
|
||||
#pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
|
||||
#error "Build options aren't compatible with pre-built libraries"
|
||||
#else
|
||||
#define BOOST_LIB_RT_OPT "-sp"
|
||||
#endif
|
||||
|
||||
# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
#elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
|
||||
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
# define BOOST_LIB_RT_OPT "-sgdpn"
|
||||
# elif defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-sgdpn"
|
||||
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-spn"
|
||||
# endif
|
||||
#if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
#define BOOST_LIB_RT_OPT "-sgdpn"
|
||||
#elif defined(_DEBUG)
|
||||
#define BOOST_LIB_RT_OPT "-sgdpn"
|
||||
#pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
|
||||
#error "Build options aren't compatible with pre-built libraries"
|
||||
#else
|
||||
#define BOOST_LIB_RT_OPT "-spn"
|
||||
#endif
|
||||
|
||||
# else
|
||||
#else
|
||||
|
||||
# if defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-sgd"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-s"
|
||||
# endif
|
||||
#if defined(_DEBUG)
|
||||
#define BOOST_LIB_RT_OPT "-sgd"
|
||||
#else
|
||||
#define BOOST_LIB_RT_OPT "-s"
|
||||
#endif
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
|
||||
@@ -259,7 +259,7 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
||||
// figure out whether we want the debug builds or not:
|
||||
//
|
||||
#if __BORLANDC__ > 0x561
|
||||
#pragma defineonoption BOOST_BORLAND_DEBUG -v
|
||||
#pragma defineonoption BOOST_BORLAND_DEBUG - v
|
||||
#endif
|
||||
//
|
||||
// sanity check:
|
||||
@@ -268,23 +268,23 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
||||
#error "Pre-built versions of the Boost libraries are not provided in STLPort-debug form"
|
||||
#endif
|
||||
|
||||
# ifdef _RTLDLL
|
||||
#ifdef _RTLDLL
|
||||
|
||||
# ifdef BOOST_BORLAND_DEBUG
|
||||
# define BOOST_LIB_RT_OPT "-d"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT
|
||||
# endif
|
||||
#ifdef BOOST_BORLAND_DEBUG
|
||||
#define BOOST_LIB_RT_OPT "-d"
|
||||
#else
|
||||
#define BOOST_LIB_RT_OPT
|
||||
#endif
|
||||
|
||||
# else
|
||||
#else
|
||||
|
||||
# ifdef BOOST_BORLAND_DEBUG
|
||||
# define BOOST_LIB_RT_OPT "-sd"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-s"
|
||||
# endif
|
||||
#ifdef BOOST_BORLAND_DEBUG
|
||||
#define BOOST_LIB_RT_OPT "-sd"
|
||||
#else
|
||||
#define BOOST_LIB_RT_OPT "-s"
|
||||
#endif
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -292,37 +292,37 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
||||
// select linkage opt:
|
||||
//
|
||||
#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK)
|
||||
# define BOOST_LIB_PREFIX
|
||||
#define BOOST_LIB_PREFIX
|
||||
#elif defined(BOOST_DYN_LINK)
|
||||
# error "Mixing a dll boost library with a static runtime is a really bad idea..."
|
||||
#error "Mixing a dll boost library with a static runtime is a really bad idea..."
|
||||
#else
|
||||
# define BOOST_LIB_PREFIX "lib"
|
||||
#define BOOST_LIB_PREFIX "lib"
|
||||
#endif
|
||||
|
||||
//
|
||||
// now include the lib:
|
||||
//
|
||||
#if defined(BOOST_LIB_NAME) \
|
||||
&& defined(BOOST_LIB_PREFIX) \
|
||||
&& defined(BOOST_LIB_TOOLSET) \
|
||||
&& defined(BOOST_LIB_THREAD_OPT) \
|
||||
&& defined(BOOST_LIB_RT_OPT) \
|
||||
&& defined(BOOST_LIB_VERSION)
|
||||
#if defined(BOOST_LIB_NAME) && defined(BOOST_LIB_PREFIX) && defined(BOOST_LIB_TOOLSET) \
|
||||
&& defined(BOOST_LIB_THREAD_OPT) && defined(BOOST_LIB_RT_OPT) && defined(BOOST_LIB_VERSION)
|
||||
|
||||
#ifndef BOOST_AUTO_LINK_NOMANGLE
|
||||
# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".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")
|
||||
# endif
|
||||
#pragma comment( \
|
||||
lib, \
|
||||
BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT \
|
||||
"-" BOOST_LIB_VERSION ".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")
|
||||
#endif
|
||||
#else
|
||||
# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
|
||||
# ifdef BOOST_LIB_DIAGNOSTIC
|
||||
# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
|
||||
# endif
|
||||
#pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
|
||||
#ifdef BOOST_LIB_DIAGNOSTIC
|
||||
#pragma message("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
# error "some required macros where not defined (internal logic error)."
|
||||
#error "some required macros where not defined (internal logic error)."
|
||||
#endif
|
||||
|
||||
|
||||
@@ -332,42 +332,31 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
||||
// finally undef any macros we may have set:
|
||||
//
|
||||
#ifdef BOOST_LIB_PREFIX
|
||||
# undef BOOST_LIB_PREFIX
|
||||
#undef BOOST_LIB_PREFIX
|
||||
#endif
|
||||
#if defined(BOOST_LIB_NAME)
|
||||
# undef BOOST_LIB_NAME
|
||||
#undef BOOST_LIB_NAME
|
||||
#endif
|
||||
// Don't undef this one: it can be set by the user and should be the
|
||||
// Don't undef this one: it can be set by the user and should be the
|
||||
// same for all libraries:
|
||||
//#if defined(BOOST_LIB_TOOLSET)
|
||||
//# undef BOOST_LIB_TOOLSET
|
||||
//#endif
|
||||
// #if defined(BOOST_LIB_TOOLSET)
|
||||
// # undef BOOST_LIB_TOOLSET
|
||||
// #endif
|
||||
#if defined(BOOST_LIB_THREAD_OPT)
|
||||
# undef BOOST_LIB_THREAD_OPT
|
||||
#undef BOOST_LIB_THREAD_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_RT_OPT)
|
||||
# undef BOOST_LIB_RT_OPT
|
||||
#undef BOOST_LIB_RT_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_LINK_OPT)
|
||||
# undef BOOST_LIB_LINK_OPT
|
||||
#undef BOOST_LIB_LINK_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_DEBUG_OPT)
|
||||
# undef BOOST_LIB_DEBUG_OPT
|
||||
#undef BOOST_LIB_DEBUG_OPT
|
||||
#endif
|
||||
#if defined(BOOST_DYN_LINK)
|
||||
# undef BOOST_DYN_LINK
|
||||
#undef BOOST_DYN_LINK
|
||||
#endif
|
||||
#if defined(BOOST_AUTO_LINK_NOMANGLE)
|
||||
# undef BOOST_AUTO_LINK_NOMANGLE
|
||||
#undef BOOST_AUTO_LINK_NOMANGLE
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,123 +13,123 @@
|
||||
// versions check:
|
||||
// we don't support Borland prior to version 5.4:
|
||||
#if __BORLANDC__ < 0x540
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
|
||||
// last known compiler version:
|
||||
#if (__BORLANDC__ > 0x613)
|
||||
//# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
//# else
|
||||
//# pragma message( "Unknown compiler version - please run the configure tests and report the results")
|
||||
//# endif
|
||||
// # if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown compiler version - please run the configure tests and report the results"
|
||||
// # else
|
||||
// # pragma message( "Unknown compiler version - please run the configure tests and report the results")
|
||||
// # endif
|
||||
#elif (__BORLANDC__ == 0x600)
|
||||
# error "CBuilderX preview compiler is no longer supported"
|
||||
#error "CBuilderX preview compiler is no longer supported"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Support macros to help with standard library detection
|
||||
#if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL)
|
||||
# define BOOST_BCB_WITH_ROGUE_WAVE
|
||||
#define BOOST_BCB_WITH_ROGUE_WAVE
|
||||
#elif __BORLANDC__ < 0x570
|
||||
# define BOOST_BCB_WITH_STLPORT
|
||||
#define BOOST_BCB_WITH_STLPORT
|
||||
#else
|
||||
# define BOOST_BCB_WITH_DINKUMWARE
|
||||
#define BOOST_BCB_WITH_DINKUMWARE
|
||||
#endif
|
||||
|
||||
//
|
||||
// Version 5.0 and below:
|
||||
# if __BORLANDC__ <= 0x0550
|
||||
#if __BORLANDC__ <= 0x0550
|
||||
// Borland C++Builder 4 and 5:
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# if __BORLANDC__ == 0x0550
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#if __BORLANDC__ == 0x0550
|
||||
// Borland C++Builder 5, command-line compiler 5.5:
|
||||
# define BOOST_NO_OPERATORS_IN_NAMESPACE
|
||||
# endif
|
||||
# endif
|
||||
#define BOOST_NO_OPERATORS_IN_NAMESPACE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Version 5.51 and below:
|
||||
#if (__BORLANDC__ <= 0x551)
|
||||
# define BOOST_NO_CV_SPECIALIZATIONS
|
||||
# define BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
# define BOOST_NO_DEDUCED_TYPENAME
|
||||
#define BOOST_NO_CV_SPECIALIZATIONS
|
||||
#define BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
#define BOOST_NO_DEDUCED_TYPENAME
|
||||
// workaround for missing WCHAR_MAX/WCHAR_MIN:
|
||||
#include <climits>
|
||||
#include <cwchar>
|
||||
#ifndef WCHAR_MAX
|
||||
# define WCHAR_MAX 0xffff
|
||||
#define WCHAR_MAX 0xffff
|
||||
#endif
|
||||
#ifndef WCHAR_MIN
|
||||
# define WCHAR_MIN 0
|
||||
#define WCHAR_MIN 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Borland C++ Builder 6 and below:
|
||||
#if (__BORLANDC__ <= 0x564)
|
||||
|
||||
# ifdef NDEBUG
|
||||
// fix broken <cstring> so that Boost.test works:
|
||||
# include <cstring>
|
||||
# undef strcmp
|
||||
# endif
|
||||
// fix broken errno declaration:
|
||||
# include <errno.h>
|
||||
# ifndef errno
|
||||
# define errno errno
|
||||
# endif
|
||||
#ifdef NDEBUG
|
||||
// fix broken <cstring> so that Boost.test works:
|
||||
#include <cstring>
|
||||
#undef strcmp
|
||||
#endif
|
||||
// fix broken errno declaration:
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
#define errno errno
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// new bug in 5.61:
|
||||
#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580)
|
||||
// this seems to be needed by the command line compiler, but not the IDE:
|
||||
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
// this seems to be needed by the command line compiler, but not the IDE:
|
||||
#define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
#endif
|
||||
|
||||
// Borland C++ Builder 2006 Update 2 and below:
|
||||
#if (__BORLANDC__ <= 0x582)
|
||||
# define BOOST_NO_SFINAE
|
||||
# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
#define BOOST_NO_SFINAE
|
||||
#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
|
||||
#define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
|
||||
# define BOOST_NO_PRIVATE_IN_AGGREGATE
|
||||
#define BOOST_NO_PRIVATE_IN_AGGREGATE
|
||||
|
||||
# ifdef _WIN32
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# elif defined(linux) || defined(__linux__) || defined(__linux)
|
||||
// we should really be able to do without this
|
||||
// but the wcs* functions aren't imported into std::
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
// _CPPUNWIND doesn't get automatically set for some reason:
|
||||
# pragma defineonoption BOOST_CPPUNWIND -x
|
||||
# endif
|
||||
#ifdef _WIN32
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#elif defined(linux) || defined(__linux__) || defined(__linux)
|
||||
// we should really be able to do without this
|
||||
// but the wcs* functions aren't imported into std::
|
||||
#define BOOST_NO_STDC_NAMESPACE
|
||||
// _CPPUNWIND doesn't get automatically set for some reason:
|
||||
#pragma defineonoption BOOST_CPPUNWIND - x
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info
|
||||
// we shouldn't really need this - but too many things choke
|
||||
// without it, this needs more investigation:
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
|
||||
# define BOOST_NO_USING_TEMPLATE
|
||||
# define BOOST_SP_NO_SP_CONVERTIBLE
|
||||
#if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info
|
||||
// we shouldn't really need this - but too many things choke
|
||||
// without it, this needs more investigation:
|
||||
#define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
#define BOOST_NO_IS_ABSTRACT
|
||||
#define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
|
||||
#define BOOST_NO_USING_TEMPLATE
|
||||
#define BOOST_SP_NO_SP_CONVERTIBLE
|
||||
|
||||
// Temporary workaround
|
||||
#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
#endif
|
||||
|
||||
// Borland C++ Builder 2008 and below:
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
# define BOOST_NO_NESTED_FRIENDSHIP
|
||||
# define BOOST_NO_TYPENAME_WITH_CTOR
|
||||
#define BOOST_NO_INTEGRAL_INT64_T
|
||||
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
#define BOOST_NO_NESTED_FRIENDSHIP
|
||||
#define BOOST_NO_TYPENAME_WITH_CTOR
|
||||
#if (__BORLANDC__ < 0x600)
|
||||
# define BOOST_ILLEGAL_CV_REFERENCES
|
||||
#define BOOST_ILLEGAL_CV_REFERENCES
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -137,29 +137,29 @@
|
||||
//
|
||||
// Borland C++ Builder 2008 and below:
|
||||
#if (__BORLANDC__ >= 0x599)
|
||||
# pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax
|
||||
#pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT - Ax
|
||||
#endif
|
||||
//
|
||||
// C++0x Macros:
|
||||
//
|
||||
#if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610)
|
||||
# define BOOST_NO_CHAR16_T
|
||||
# define BOOST_NO_CHAR32_T
|
||||
# define BOOST_NO_DECLTYPE
|
||||
# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
# define BOOST_NO_EXTERN_TEMPLATE
|
||||
# define BOOST_NO_RVALUE_REFERENCES
|
||||
# define BOOST_NO_SCOPED_ENUMS
|
||||
# define BOOST_NO_STATIC_ASSERT
|
||||
#if !defined(BOOST_CODEGEAR_0X_SUPPORT) || (__BORLANDC__ < 0x610)
|
||||
#define BOOST_NO_CHAR16_T
|
||||
#define BOOST_NO_CHAR32_T
|
||||
#define BOOST_NO_DECLTYPE
|
||||
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_EXTERN_TEMPLATE
|
||||
#define BOOST_NO_RVALUE_REFERENCES
|
||||
#define BOOST_NO_SCOPED_ENUMS
|
||||
#define BOOST_NO_STATIC_ASSERT
|
||||
#else
|
||||
# define BOOST_HAS_ALIGNOF
|
||||
# define BOOST_HAS_CHAR16_T
|
||||
# define BOOST_HAS_CHAR32_T
|
||||
# define BOOST_HAS_DECLTYPE
|
||||
# define BOOST_HAS_EXPLICIT_CONVERSION_OPS
|
||||
# define BOOST_HAS_REF_QUALIFIER
|
||||
# define BOOST_HAS_RVALUE_REFS
|
||||
# define BOOST_HAS_STATIC_ASSERT
|
||||
#define BOOST_HAS_ALIGNOF
|
||||
#define BOOST_HAS_CHAR16_T
|
||||
#define BOOST_HAS_CHAR32_T
|
||||
#define BOOST_HAS_DECLTYPE
|
||||
#define BOOST_HAS_EXPLICIT_CONVERSION_OPS
|
||||
#define BOOST_HAS_REF_QUALIFIER
|
||||
#define BOOST_HAS_RVALUE_REFS
|
||||
#define BOOST_HAS_STATIC_ASSERT
|
||||
#endif
|
||||
|
||||
#define BOOST_NO_AUTO_DECLARATIONS
|
||||
@@ -177,33 +177,33 @@
|
||||
#define BOOST_NO_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_UNICODE_LITERALS // UTF-8 still not supported
|
||||
#define BOOST_NO_UNICODE_LITERALS // UTF-8 still not supported
|
||||
#define BOOST_NO_VARIADIC_TEMPLATES
|
||||
|
||||
#if __BORLANDC__ >= 0x590
|
||||
# define BOOST_HAS_TR1_HASH
|
||||
#define BOOST_HAS_TR1_HASH
|
||||
|
||||
# define BOOST_HAS_MACRO_USE_FACET
|
||||
#define BOOST_HAS_MACRO_USE_FACET
|
||||
#endif
|
||||
|
||||
//
|
||||
// Post 0x561 we have long long and stdint.h:
|
||||
#if __BORLANDC__ >= 0x561
|
||||
# ifndef __NO_LONG_LONG
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
# else
|
||||
# define BOOST_NO_LONG_LONG
|
||||
# endif
|
||||
// On non-Win32 platforms let the platform config figure this out:
|
||||
# ifdef _WIN32
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# endif
|
||||
#ifndef __NO_LONG_LONG
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
#else
|
||||
#define BOOST_NO_LONG_LONG
|
||||
#endif
|
||||
// On non-Win32 platforms let the platform config figure this out:
|
||||
#ifdef _WIN32
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is
|
||||
// defined, then we have 0x560 or greater with the Rogue Wave implementation
|
||||
// which presumably has the std::DBL_MAX bug.
|
||||
#if defined( BOOST_BCB_WITH_ROGUE_WAVE )
|
||||
#if defined(BOOST_BCB_WITH_ROGUE_WAVE)
|
||||
// <climits> is partly broken, some macros define symbols that are really in
|
||||
// namespace std, so you end up having to use illegal constructs like
|
||||
// std::DBL_MAX, as a fix we'll just include float.h and have done with:
|
||||
@@ -213,55 +213,52 @@
|
||||
// __int64:
|
||||
//
|
||||
#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)
|
||||
# define BOOST_HAS_MS_INT64
|
||||
#define BOOST_HAS_MS_INT64
|
||||
#endif
|
||||
//
|
||||
// check for exception handling support:
|
||||
//
|
||||
#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
//
|
||||
// all versions have a <dirent.h>:
|
||||
//
|
||||
#ifndef __STRICT_ANSI__
|
||||
# define BOOST_HAS_DIRENT_H
|
||||
#define BOOST_HAS_DIRENT_H
|
||||
#endif
|
||||
//
|
||||
// all versions support __declspec:
|
||||
//
|
||||
#ifndef __STRICT_ANSI__
|
||||
# define BOOST_HAS_DECLSPEC
|
||||
#define BOOST_HAS_DECLSPEC
|
||||
#endif
|
||||
//
|
||||
// ABI fixing headers:
|
||||
//
|
||||
#if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet
|
||||
#ifndef BOOST_ABI_PREFIX
|
||||
# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
|
||||
#define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
|
||||
#endif
|
||||
#ifndef BOOST_ABI_SUFFIX
|
||||
# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
|
||||
#define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
// Disable Win32 support in ANSI mode:
|
||||
//
|
||||
#if __BORLANDC__ < 0x600
|
||||
# pragma defineonoption BOOST_DISABLE_WIN32 -A
|
||||
#pragma defineonoption BOOST_DISABLE_WIN32 - A
|
||||
#elif defined(__STRICT_ANSI__)
|
||||
# define BOOST_DISABLE_WIN32
|
||||
#define BOOST_DISABLE_WIN32
|
||||
#endif
|
||||
//
|
||||
// MSVC compatibility mode does some nasty things:
|
||||
// TODO: look up if this doesn't apply to the whole 12xx range
|
||||
//
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
|
||||
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
#define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
#define BOOST_NO_VOID_RETURNS
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,58 +9,58 @@
|
||||
|
||||
// CodeGear C++ compiler setup:
|
||||
|
||||
#if !defined( BOOST_WITH_CODEGEAR_WARNINGS )
|
||||
#if !defined(BOOST_WITH_CODEGEAR_WARNINGS)
|
||||
// these warnings occur frequently in optimized template code
|
||||
# pragma warn -8004 // var assigned value, but never used
|
||||
# pragma warn -8008 // condition always true/false
|
||||
# pragma warn -8066 // dead code can never execute
|
||||
# pragma warn -8104 // static members with ctors not threadsafe
|
||||
# pragma warn -8105 // reference member in class without ctors
|
||||
#pragma warn - 8004 // var assigned value, but never used
|
||||
#pragma warn - 8008 // condition always true/false
|
||||
#pragma warn - 8066 // dead code can never execute
|
||||
#pragma warn - 8104 // static members with ctors not threadsafe
|
||||
#pragma warn - 8105 // reference member in class without ctors
|
||||
#endif
|
||||
//
|
||||
// versions check:
|
||||
// last known and checked version is 0x620
|
||||
#if (__CODEGEARC__ > 0x620)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# else
|
||||
# pragma message( "Unknown compiler version - please run the configure tests and report the results")
|
||||
# endif
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown compiler version - please run the configure tests and report the results"
|
||||
#else
|
||||
#pragma message("Unknown compiler version - please run the configure tests and report the results")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// CodeGear C++ Builder 2009
|
||||
#if (__CODEGEARC__ <= 0x613)
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
# define BOOST_NO_PRIVATE_IN_AGGREGATE
|
||||
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
// we shouldn't really need this - but too many things choke
|
||||
// without it, this needs more investigation:
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
# define BOOST_SP_NO_SP_CONVERTIBLE
|
||||
#define BOOST_NO_INTEGRAL_INT64_T
|
||||
#define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
#define BOOST_NO_PRIVATE_IN_AGGREGATE
|
||||
#define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
// we shouldn't really need this - but too many things choke
|
||||
// without it, this needs more investigation:
|
||||
#define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
#define BOOST_SP_NO_SP_CONVERTIBLE
|
||||
#endif
|
||||
|
||||
// CodeGear C++ Builder 2010
|
||||
#if (__CODEGEARC__ <= 0x620)
|
||||
# define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type
|
||||
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member
|
||||
# define BOOST_NO_USING_TEMPLATE
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type
|
||||
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member
|
||||
#define BOOST_NO_USING_TEMPLATE
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
// Temporary hack, until specific MPL preprocessed headers are generated
|
||||
# define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
|
||||
# ifdef NDEBUG
|
||||
// fix broken <cstring> so that Boost.test works:
|
||||
# include <cstring>
|
||||
# undef strcmp
|
||||
# endif
|
||||
// fix broken errno declaration:
|
||||
# include <errno.h>
|
||||
# ifndef errno
|
||||
# define errno errno
|
||||
# endif
|
||||
#ifdef NDEBUG
|
||||
// fix broken <cstring> so that Boost.test works:
|
||||
#include <cstring>
|
||||
#undef strcmp
|
||||
#endif
|
||||
// fix broken errno declaration:
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
#define errno errno
|
||||
#endif
|
||||
|
||||
#endif
|
||||
//
|
||||
@@ -110,54 +110,53 @@
|
||||
|
||||
// On non-Win32 platforms let the platform config figure this out:
|
||||
#ifdef _WIN32
|
||||
# define BOOST_HAS_STDINT_H
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#endif
|
||||
|
||||
//
|
||||
// __int64:
|
||||
//
|
||||
#if !defined(__STRICT_ANSI__)
|
||||
# define BOOST_HAS_MS_INT64
|
||||
#define BOOST_HAS_MS_INT64
|
||||
#endif
|
||||
//
|
||||
// check for exception handling support:
|
||||
//
|
||||
#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
//
|
||||
// all versions have a <dirent.h>:
|
||||
//
|
||||
#if !defined(__STRICT_ANSI__)
|
||||
# define BOOST_HAS_DIRENT_H
|
||||
#define BOOST_HAS_DIRENT_H
|
||||
#endif
|
||||
//
|
||||
// all versions support __declspec:
|
||||
//
|
||||
#if !defined(__STRICT_ANSI__)
|
||||
# define BOOST_HAS_DECLSPEC
|
||||
#define BOOST_HAS_DECLSPEC
|
||||
#endif
|
||||
//
|
||||
// ABI fixing headers:
|
||||
//
|
||||
#ifndef BOOST_ABI_PREFIX
|
||||
# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
|
||||
#define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
|
||||
#endif
|
||||
#ifndef BOOST_ABI_SUFFIX
|
||||
# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
|
||||
#define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
|
||||
#endif
|
||||
//
|
||||
// Disable Win32 support in ANSI mode:
|
||||
//
|
||||
# pragma defineonoption BOOST_DISABLE_WIN32 -A
|
||||
#pragma defineonoption BOOST_DISABLE_WIN32 - A
|
||||
//
|
||||
// MSVC compatibility mode does some nasty things:
|
||||
// TODO: look up if this doesn't apply to the whole 12xx range
|
||||
//
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
|
||||
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
#define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
#define BOOST_NO_VOID_RETURNS
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__)
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Douglas Gregor 2001.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright Aleksey Gurtovoy 2003.
|
||||
// (C) Copyright Beman Dawes 2003.
|
||||
// (C) Copyright Jens Maurer 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Douglas Gregor 2001.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright Aleksey Gurtovoy 2003.
|
||||
// (C) Copyright Beman Dawes 2003.
|
||||
// (C) Copyright Jens Maurer 2003.
|
||||
// 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.
|
||||
@@ -16,27 +16,27 @@
|
||||
|
||||
#if (__COMO_VERSION__ <= 4245)
|
||||
|
||||
# if defined(_MSC_VER) && _MSC_VER <= 1300
|
||||
# if _MSC_VER > 100
|
||||
// only set this in non-strict mode:
|
||||
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
# endif
|
||||
# endif
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1300
|
||||
#if _MSC_VER > 100
|
||||
// only set this in non-strict mode:
|
||||
#define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Void returns don't work when emulating VC 6 (Peter Dimov)
|
||||
// TODO: look up if this doesn't apply to the whole 12xx range
|
||||
# if defined(_MSC_VER) && (_MSC_VER < 1300)
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
# endif
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1300)
|
||||
#define BOOST_NO_VOID_RETURNS
|
||||
#endif
|
||||
|
||||
#endif // version 4245
|
||||
#endif // version 4245
|
||||
|
||||
//
|
||||
// enable __int64 support in VC emulation mode
|
||||
//
|
||||
# if defined(_MSC_VER) && (_MSC_VER >= 1200)
|
||||
# define BOOST_HAS_MS_INT64
|
||||
# endif
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
|
||||
#define BOOST_HAS_MS_INT64
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__)
|
||||
|
||||
@@ -44,16 +44,12 @@
|
||||
// versions check:
|
||||
// we don't know Comeau prior to version 4245:
|
||||
#if __COMO_VERSION__ < 4245
|
||||
# error "Compiler not configured - please reconfigure"
|
||||
#error "Compiler not configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 4245:
|
||||
#if (__COMO_VERSION__ > 4245)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown compiler version - please run the configure tests and report the results"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// (C) Copyright Markus Schoepflin 2005.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// 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.
|
||||
@@ -14,45 +14,45 @@
|
||||
//
|
||||
// This is included from within the individual compiler mini-configs.
|
||||
|
||||
#ifndef __EDG_VERSION__
|
||||
# error This file requires that __EDG_VERSION__ be defined.
|
||||
#ifndef __EDG_VERSION__
|
||||
#error This file requires that __EDG_VERSION__ be defined.
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 238)
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_NO_SFINAE
|
||||
#define BOOST_NO_INTEGRAL_INT64_T
|
||||
#define BOOST_NO_SFINAE
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 240)
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
#define BOOST_NO_VOID_RETURNS
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 241) && !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
|
||||
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
#define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES)
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
#endif
|
||||
#define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ < 300) && !defined(BOOST_NO_IS_ABSTRACT)
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
#endif
|
||||
#define BOOST_NO_IS_ABSTRACT
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 303) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
|
||||
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#endif
|
||||
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#endif
|
||||
|
||||
// See also kai.hpp which checks a Kai-specific symbol for EH
|
||||
# if !defined(__KCC) && !defined(__EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
# endif
|
||||
#if !defined(__KCC) && !defined(__EXCEPTIONS)
|
||||
#define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
# if !defined(__NO_LONG_LONG)
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
# else
|
||||
# define BOOST_NO_LONG_LONG
|
||||
# endif
|
||||
#if !defined(__NO_LONG_LONG)
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
#else
|
||||
#define BOOST_NO_LONG_LONG
|
||||
#endif
|
||||
|
||||
//
|
||||
// C++0x features
|
||||
@@ -61,7 +61,7 @@
|
||||
//
|
||||
#if (__EDG_VERSION__ <= 310) || !defined(BOOST_STRICT_CONFIG)
|
||||
// No support for initializer lists
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#endif
|
||||
|
||||
#define BOOST_NO_AUTO_DECLARATIONS
|
||||
@@ -92,6 +92,3 @@
|
||||
// However, some libraries have insufficient "long long" support
|
||||
// #define BOOST_HAS_LONG_LONG
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// 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.
|
||||
@@ -14,6 +14,3 @@
|
||||
//
|
||||
// versions check:
|
||||
// Nothing to do here?
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright (C) Christof Meerwald 2003
|
||||
// Copyright (C) Dan Watkins 2003
|
||||
//
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// 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)
|
||||
|
||||
// Digital Mars C++ compiler setup:
|
||||
@@ -46,13 +46,13 @@
|
||||
//
|
||||
#include <cstddef>
|
||||
#if !defined(__STL_IMPORT_VENDOR_CSTD) && !defined(_STLP_IMPORT_VENDOR_CSTD)
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
#define BOOST_NO_STDC_NAMESPACE
|
||||
#endif
|
||||
|
||||
|
||||
// check for exception handling support:
|
||||
#ifndef _CPPUNWIND
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -87,7 +87,7 @@
|
||||
//
|
||||
// last known and checked version is ...:
|
||||
#if (__DMC__ > 0x848)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown compiler version - please run the configure tests and report the results"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001 - 2002.
|
||||
// (C) Copyright Jens Maurer 2001 - 2002.
|
||||
// (C) Copyright Beman Dawes 2001 - 2003.
|
||||
// (C) Copyright Douglas Gregor 2002.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Synge Todo 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001 - 2002.
|
||||
// (C) Copyright Jens Maurer 2001 - 2002.
|
||||
// (C) Copyright Beman Dawes 2001 - 2003.
|
||||
// (C) Copyright Douglas Gregor 2002.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Synge Todo 2003.
|
||||
// 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.
|
||||
@@ -14,63 +14,63 @@
|
||||
// GNU C++ compiler setup:
|
||||
|
||||
#if __GNUC__ < 3
|
||||
# if __GNUC_MINOR__ == 91
|
||||
// egcs 1.1 won't parse shared_ptr.hpp without this:
|
||||
# define BOOST_NO_AUTO_PTR
|
||||
# endif
|
||||
# if __GNUC_MINOR__ < 95
|
||||
//
|
||||
// Prior to gcc 2.95 member templates only partly
|
||||
// work - define BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
// instead since inline member templates mostly work.
|
||||
//
|
||||
# define BOOST_NO_MEMBER_TEMPLATES
|
||||
# if __GNUC_MINOR__ >= 9
|
||||
# define BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
# endif
|
||||
# endif
|
||||
#if __GNUC_MINOR__ == 91
|
||||
// egcs 1.1 won't parse shared_ptr.hpp without this:
|
||||
#define BOOST_NO_AUTO_PTR
|
||||
#endif
|
||||
#if __GNUC_MINOR__ < 95
|
||||
//
|
||||
// Prior to gcc 2.95 member templates only partly
|
||||
// work - define BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
// instead since inline member templates mostly work.
|
||||
//
|
||||
#define BOOST_NO_MEMBER_TEMPLATES
|
||||
#if __GNUC_MINOR__ >= 9
|
||||
#define BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
#endif
|
||||
#endif
|
||||
|
||||
# if __GNUC_MINOR__ < 96
|
||||
# define BOOST_NO_SFINAE
|
||||
# endif
|
||||
#if __GNUC_MINOR__ < 96
|
||||
#define BOOST_NO_SFINAE
|
||||
#endif
|
||||
|
||||
# if __GNUC_MINOR__ <= 97
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# define BOOST_NO_OPERATORS_IN_NAMESPACE
|
||||
# endif
|
||||
#if __GNUC_MINOR__ <= 97
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#define BOOST_NO_OPERATORS_IN_NAMESPACE
|
||||
#endif
|
||||
|
||||
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
#define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#define BOOST_NO_IS_ABSTRACT
|
||||
#elif __GNUC__ == 3
|
||||
# if defined (__PATHSCALE__)
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
//
|
||||
// gcc-3.x problems:
|
||||
//
|
||||
// Bug specific to gcc 3.1 and 3.2:
|
||||
//
|
||||
# if ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2))
|
||||
# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
# endif
|
||||
# if __GNUC_MINOR__ < 4
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
#if defined(__PATHSCALE__)
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_NO_IS_ABSTRACT
|
||||
#endif
|
||||
//
|
||||
// gcc-3.x problems:
|
||||
//
|
||||
// Bug specific to gcc 3.1 and 3.2:
|
||||
//
|
||||
#if ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2))
|
||||
#define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
#endif
|
||||
#if __GNUC_MINOR__ < 4
|
||||
#define BOOST_NO_IS_ABSTRACT
|
||||
#endif
|
||||
#endif
|
||||
#if __GNUC__ < 4
|
||||
//
|
||||
// All problems to gcc-3.x and earlier here:
|
||||
//
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
# ifdef __OPEN64__
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
#ifdef __OPEN64__
|
||||
#define BOOST_NO_IS_ABSTRACT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __EXCEPTIONS
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@
|
||||
// later if no threading API is detected.
|
||||
//
|
||||
#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__)
|
||||
# define BOOST_HAS_THREADS
|
||||
#endif
|
||||
#define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// gcc has "long long"
|
||||
@@ -91,17 +91,17 @@
|
||||
//
|
||||
// gcc implements the named return value optimization since version 3.1
|
||||
//
|
||||
#if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 )
|
||||
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
|
||||
#define BOOST_HAS_NRVO
|
||||
#endif
|
||||
//
|
||||
// RTTI and typeinfo detection is possible post gcc-4.3:
|
||||
//
|
||||
#if __GNUC__ * 100 + __GNUC_MINOR__ >= 403
|
||||
# ifndef __GXX_RTTI
|
||||
# define BOOST_NO_TYPEID
|
||||
# define BOOST_NO_RTTI
|
||||
# endif
|
||||
#ifndef __GXX_RTTI
|
||||
#define BOOST_NO_TYPEID
|
||||
#define BOOST_NO_RTTI
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// C++0x features not implemented in any GCC version
|
||||
@@ -120,85 +120,83 @@
|
||||
// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are
|
||||
// passed on the command line, which in turn defines
|
||||
// __GXX_EXPERIMENTAL_CXX0X__.
|
||||
# define BOOST_HAS_DECLTYPE
|
||||
# define BOOST_HAS_RVALUE_REFS
|
||||
# define BOOST_HAS_STATIC_ASSERT
|
||||
# define BOOST_HAS_VARIADIC_TMPL
|
||||
#define BOOST_HAS_DECLTYPE
|
||||
#define BOOST_HAS_RVALUE_REFS
|
||||
#define BOOST_HAS_STATIC_ASSERT
|
||||
#define BOOST_HAS_VARIADIC_TMPL
|
||||
#else
|
||||
# define BOOST_NO_DECLTYPE
|
||||
# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
# define BOOST_NO_RVALUE_REFERENCES
|
||||
# define BOOST_NO_STATIC_ASSERT
|
||||
#define BOOST_NO_DECLTYPE
|
||||
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
#define BOOST_NO_RVALUE_REFERENCES
|
||||
#define BOOST_NO_STATIC_ASSERT
|
||||
|
||||
// Variadic templates compiler:
|
||||
// Variadic templates compiler:
|
||||
// http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html
|
||||
# ifdef __VARIADIC_TEMPLATES
|
||||
# define BOOST_HAS_VARIADIC_TMPL
|
||||
# else
|
||||
# define BOOST_NO_VARIADIC_TEMPLATES
|
||||
# endif
|
||||
#ifdef __VARIADIC_TEMPLATES
|
||||
#define BOOST_HAS_VARIADIC_TMPL
|
||||
#else
|
||||
#define BOOST_NO_VARIADIC_TEMPLATES
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// C++0x features in 4.4.n and later
|
||||
//
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_AUTO_DECLARATIONS
|
||||
# define BOOST_NO_AUTO_MULTIDECLARATIONS
|
||||
# define BOOST_NO_CHAR16_T
|
||||
# define BOOST_NO_CHAR32_T
|
||||
# define BOOST_NO_DEFAULTED_FUNCTIONS
|
||||
# define BOOST_NO_DELETED_FUNCTIONS
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
# define BOOST_NO_SCOPED_ENUMS
|
||||
#define BOOST_NO_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_AUTO_MULTIDECLARATIONS
|
||||
#define BOOST_NO_CHAR16_T
|
||||
#define BOOST_NO_CHAR32_T
|
||||
#define BOOST_NO_DEFAULTED_FUNCTIONS
|
||||
#define BOOST_NO_DELETED_FUNCTIONS
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_SCOPED_ENUMS
|
||||
#endif
|
||||
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)
|
||||
# define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#endif
|
||||
|
||||
// C++0x features in 4.4.1 and later
|
||||
//
|
||||
#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40401) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ < 40401) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_SCOPED_ENUMS before 4.4.1
|
||||
// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
|
||||
# define BOOST_NO_SCOPED_ENUMS
|
||||
#define BOOST_NO_SCOPED_ENUMS
|
||||
#endif
|
||||
|
||||
// C++0x features in 4.5.n and later
|
||||
//
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
|
||||
#endif
|
||||
|
||||
// ConceptGCC compiler:
|
||||
// http://www.generic-programming.org/software/ConceptGCC/
|
||||
#ifdef __GXX_CONCEPTS__
|
||||
# define BOOST_HAS_CONCEPTS
|
||||
# define BOOST_COMPILER "ConceptGCC version " __VERSION__
|
||||
#define BOOST_HAS_CONCEPTS
|
||||
#define BOOST_COMPILER "ConceptGCC version " __VERSION__
|
||||
#else
|
||||
# define BOOST_NO_CONCEPTS
|
||||
#define BOOST_NO_CONCEPTS
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_COMPILER
|
||||
# define BOOST_COMPILER "GNU C++ version " __VERSION__
|
||||
#define BOOST_COMPILER "GNU C++ version " __VERSION__
|
||||
#endif
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't know gcc prior to version 2.90:
|
||||
#if (__GNUC__ == 2) && (__GNUC_MINOR__ < 90)
|
||||
# error "Compiler not configured - please reconfigure"
|
||||
#error "Compiler not configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 4.4 (Pre-release):
|
||||
#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 4))
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# else
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown compiler version - please run the configure tests and report the results"
|
||||
#else
|
||||
// we don't emit warnings here anymore since there are no defect macros defined for
|
||||
// gcc post 3.4, so any failures are gcc regressions...
|
||||
//# warning "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
// # warning "Unknown compiler version - please run the configure tests and report the results"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
// (C) Copyright John Maddock 2006.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) 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)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// GCC-XML C++ compiler setup:
|
||||
|
||||
# if !defined(__GCCXML_GNUC__) || ((__GCCXML_GNUC__ <= 3) && (__GCCXML_GNUC_MINOR__ <= 3))
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
#if !defined(__GCCXML_GNUC__) || ((__GCCXML_GNUC__ <= 3) && (__GCCXML_GNUC_MINOR__ <= 3))
|
||||
#define BOOST_NO_IS_ABSTRACT
|
||||
#endif
|
||||
|
||||
//
|
||||
// Threading support: Turn this on unconditionally here (except for
|
||||
@@ -17,8 +17,8 @@
|
||||
// later if no threading API is detected.
|
||||
//
|
||||
#if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(linux) && !defined(__linux) && !defined(__linux__)
|
||||
# define BOOST_HAS_THREADS
|
||||
#endif
|
||||
#define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// gcc has "long long"
|
||||
@@ -26,5 +26,3 @@
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
|
||||
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// 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.
|
||||
@@ -15,14 +15,12 @@
|
||||
// versions check:
|
||||
// we don't support Greenhills prior to version 0:
|
||||
#if __ghs < 0
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 0:
|
||||
#if (__ghs > 0)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown compiler version - please run the configure tests and report the results"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Toon Knapen 2003.
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Toon Knapen 2003.
|
||||
// (C) Copyright Boris Gubenko 2006 - 2007.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// 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.
|
||||
@@ -17,42 +17,42 @@
|
||||
#endif
|
||||
|
||||
#if (__HP_aCC <= 33100)
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_NO_OPERATORS_IN_NAMESPACE
|
||||
# if !defined(_NAMESPACE_STD)
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
# define BOOST_NO_STRINGSTREAM
|
||||
# endif
|
||||
#define BOOST_NO_INTEGRAL_INT64_T
|
||||
#define BOOST_NO_OPERATORS_IN_NAMESPACE
|
||||
#if !defined(_NAMESPACE_STD)
|
||||
#define BOOST_NO_STD_LOCALE
|
||||
#define BOOST_NO_STRINGSTREAM
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (__HP_aCC <= 33300)
|
||||
// member templates are sufficiently broken that we disable them for now
|
||||
# define BOOST_NO_MEMBER_TEMPLATES
|
||||
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
#define BOOST_NO_MEMBER_TEMPLATES
|
||||
#define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
#define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
#endif
|
||||
|
||||
#if (__HP_aCC <= 38000)
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#endif
|
||||
|
||||
#if (__HP_aCC > 50000) && (__HP_aCC < 60000)
|
||||
# define BOOST_NO_UNREACHABLE_RETURN_DETECTION
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#endif
|
||||
#define BOOST_NO_UNREACHABLE_RETURN_DETECTION
|
||||
#define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
#define BOOST_NO_IS_ABSTRACT
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#endif
|
||||
|
||||
// optional features rather than defects:
|
||||
#if (__HP_aCC >= 33900)
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
#define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
#if (__HP_aCC >= 50000 ) && (__HP_aCC <= 53800 ) || (__HP_aCC < 31300 )
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
|
||||
#if (__HP_aCC >= 50000) && (__HP_aCC <= 53800) || (__HP_aCC < 31300)
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
|
||||
#endif
|
||||
|
||||
// This macro should not be defined when compiling in strict ansi
|
||||
@@ -61,7 +61,7 @@
|
||||
// of aCC6 compiler will provide predefined macros reflecting the
|
||||
// compilation options, including the standard mode.
|
||||
#if (__HP_aCC >= 60000) || ((__HP_aCC > 38000) && defined(__hpxstd98))
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC)
|
||||
@@ -70,19 +70,19 @@
|
||||
// versions check:
|
||||
// we don't support HP aCC prior to version 33000:
|
||||
#if __HP_aCC < 33000
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Extended checks for supporting aCC on PA-RISC
|
||||
#if __HP_aCC > 30000 && __HP_aCC < 50000
|
||||
# if __HP_aCC < 38000
|
||||
// versions prior to version A.03.80 not supported
|
||||
# error "Compiler version not supported - version A.03.80 or higher is required"
|
||||
# elif !defined(__hpxstd98)
|
||||
// must compile using the option +hpxstd98 with version A.03.80 and above
|
||||
# error "Compiler option '+hpxstd98' is required for proper support"
|
||||
# endif //PA-RISC
|
||||
#if __HP_aCC < 38000
|
||||
// versions prior to version A.03.80 not supported
|
||||
#error "Compiler version not supported - version A.03.80 or higher is required"
|
||||
#elif !defined(__hpxstd98)
|
||||
// must compile using the option +hpxstd98 with version A.03.80 and above
|
||||
#error "Compiler option '+hpxstd98' is required for proper support"
|
||||
#endif // PA-RISC
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -121,7 +121,7 @@
|
||||
// last known and checked version for HP-UX/ia64 is 61300
|
||||
// last known and checked version for PA-RISC is 38000
|
||||
#if ((__HP_aCC > 61300) || ((__HP_aCC > 38000) && defined(__hpxstd98)))
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown compiler version - please run the configure tests and report the results"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -17,32 +17,32 @@
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
#if defined(__INTEL_COMPILER)
|
||||
# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER
|
||||
#define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER
|
||||
#elif defined(__ICL)
|
||||
# define BOOST_INTEL_CXX_VERSION __ICL
|
||||
#define BOOST_INTEL_CXX_VERSION __ICL
|
||||
#elif defined(__ICC)
|
||||
# define BOOST_INTEL_CXX_VERSION __ICC
|
||||
#define BOOST_INTEL_CXX_VERSION __ICC
|
||||
#elif defined(__ECC)
|
||||
# define BOOST_INTEL_CXX_VERSION __ECC
|
||||
#define BOOST_INTEL_CXX_VERSION __ECC
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
|
||||
#define BOOST_INTEL BOOST_INTEL_CXX_VERSION
|
||||
#define BOOST_INTEL BOOST_INTEL_CXX_VERSION
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
# define BOOST_INTEL_WIN BOOST_INTEL
|
||||
#define BOOST_INTEL_WIN BOOST_INTEL
|
||||
#else
|
||||
# define BOOST_INTEL_LINUX BOOST_INTEL
|
||||
#define BOOST_INTEL_LINUX BOOST_INTEL
|
||||
#endif
|
||||
|
||||
#if (BOOST_INTEL_CXX_VERSION <= 500) && defined(_MSC_VER)
|
||||
# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
#define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
#define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
#endif
|
||||
|
||||
#if (BOOST_INTEL_CXX_VERSION <= 600)
|
||||
|
||||
# if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov)
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov)
|
||||
|
||||
// Boost libraries assume strong standard conformance unless otherwise
|
||||
// indicated by a config macro. As configured by Intel, the EDG front-end
|
||||
@@ -55,25 +55,25 @@
|
||||
// Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if
|
||||
// the compiler option is not enabled.
|
||||
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# endif
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
|
||||
// Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov)
|
||||
|
||||
# if defined(_MSC_VER) && (_MSC_VER <= 1200)
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# endif
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
|
||||
#define BOOST_NO_VOID_RETURNS
|
||||
#define BOOST_NO_INTEGRAL_INT64_T
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32)
|
||||
# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
|
||||
#endif
|
||||
|
||||
// See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864
|
||||
#if BOOST_INTEL_CXX_VERSION < 600
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#else
|
||||
// We should test the macro _WCHAR_T_DEFINED to check if the compiler
|
||||
// supports wchar_t natively. *BUT* there is a problem here: the standard
|
||||
@@ -83,9 +83,9 @@
|
||||
// or not.
|
||||
// Under UNIX, the situation is exactly the same, but the macro _WCHAR_T
|
||||
// is used instead.
|
||||
# if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0)
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
# endif
|
||||
#if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0)
|
||||
#define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
|
||||
@@ -95,9 +95,9 @@
|
||||
// later than that if they are set up to emulate gcc 3.2
|
||||
// or earlier):
|
||||
//
|
||||
# if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912)
|
||||
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
# endif
|
||||
#if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912)
|
||||
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#endif
|
||||
#endif
|
||||
#if (defined(__GNUC__) && (__GNUC__ < 4)) || defined(_WIN32) || (BOOST_INTEL_CXX_VERSION <= 1110)
|
||||
// GCC or VC emulation:
|
||||
@@ -111,63 +111,69 @@
|
||||
//
|
||||
#if defined(BOOST_NO_INTRINSIC_WCHAR_T)
|
||||
#include <cwchar>
|
||||
template< typename T > struct assert_no_intrinsic_wchar_t;
|
||||
template<> struct assert_no_intrinsic_wchar_t<wchar_t> { typedef void type; };
|
||||
template <typename T> struct assert_no_intrinsic_wchar_t;
|
||||
template <> struct assert_no_intrinsic_wchar_t<wchar_t>
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
// if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T
|
||||
// where it is defined above:
|
||||
typedef assert_no_intrinsic_wchar_t<unsigned short>::type assert_no_intrinsic_wchar_t_;
|
||||
#else
|
||||
template< typename T > struct assert_intrinsic_wchar_t;
|
||||
template<> struct assert_intrinsic_wchar_t<wchar_t> {};
|
||||
template <typename T> struct assert_intrinsic_wchar_t;
|
||||
template <> struct assert_intrinsic_wchar_t<wchar_t>
|
||||
{
|
||||
};
|
||||
// if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line:
|
||||
template<> struct assert_intrinsic_wchar_t<unsigned short> {};
|
||||
template <> struct assert_intrinsic_wchar_t<unsigned short>
|
||||
{
|
||||
};
|
||||
#endif
|
||||
|
||||
#if _MSC_VER+0 >= 1000
|
||||
# if _MSC_VER >= 1200
|
||||
# define BOOST_HAS_MS_INT64
|
||||
# endif
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#if _MSC_VER + 0 >= 1000
|
||||
#if _MSC_VER >= 1200
|
||||
#define BOOST_HAS_MS_INT64
|
||||
#endif
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#elif defined(_WIN32)
|
||||
# define BOOST_DISABLE_WIN32
|
||||
#define BOOST_DISABLE_WIN32
|
||||
#endif
|
||||
|
||||
// I checked version 6.0 build 020312Z, it implements the NRVO.
|
||||
// Correct this as you find out which version of the compiler
|
||||
// implemented the NRVO first. (Daniel Frey)
|
||||
#if (BOOST_INTEL_CXX_VERSION >= 600)
|
||||
# define BOOST_HAS_NRVO
|
||||
#define BOOST_HAS_NRVO
|
||||
#endif
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support Intel prior to version 5.0:
|
||||
#if BOOST_INTEL_CXX_VERSION < 500
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
|
||||
// Intel on MacOS requires
|
||||
#if defined(__APPLE__) && defined(__INTEL_COMPILER)
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#endif
|
||||
|
||||
// Intel on Altix Itanium
|
||||
#if defined(__itanium__) && defined(__INTEL_COMPILER)
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#endif
|
||||
|
||||
//
|
||||
// last known and checked version:
|
||||
#if (BOOST_INTEL_CXX_VERSION > 1110)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# elif defined(_MSC_VER)
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown compiler version - please run the configure tests and report the results"
|
||||
#elif defined(_MSC_VER)
|
||||
//
|
||||
// We don't emit this warning any more, since we have so few
|
||||
// defect macros set anyway (just the one).
|
||||
//
|
||||
//# pragma message("Unknown compiler version - please run the configure tests and report the results")
|
||||
# endif
|
||||
// # pragma message("Unknown compiler version - please run the configure tests and report the results")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// 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.
|
||||
@@ -11,23 +11,20 @@
|
||||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
# if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG)
|
||||
// at least on Sun, the contents of <cwchar> is not in namespace std
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
# endif
|
||||
#if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG)
|
||||
// at least on Sun, the contents of <cwchar> is not in namespace std
|
||||
#define BOOST_NO_STDC_NAMESPACE
|
||||
#endif
|
||||
|
||||
// see also common_edg.hpp which needs a special check for __KCC
|
||||
# if !defined(_EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
# endif
|
||||
#if !defined(_EXCEPTIONS)
|
||||
#define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
//
|
||||
// last known and checked version is 4001:
|
||||
#if (__KCC_VERSION > 4001)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown compiler version - please run the configure tests and report the results"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright David Abrahams 2001 - 2002.
|
||||
// (C) Copyright Beman Dawes 2001 - 2003.
|
||||
// (C) Copyright Stefan Slapeta 2004.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright David Abrahams 2001 - 2002.
|
||||
// (C) Copyright Beman Dawes 2001 - 2003.
|
||||
// (C) Copyright Stefan Slapeta 2004.
|
||||
// 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.
|
||||
@@ -13,73 +13,73 @@
|
||||
// Metrowerks C++ compiler setup:
|
||||
|
||||
// locale support is disabled when linking with the dynamic runtime
|
||||
# ifdef _MSL_NO_LOCALE
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
# endif
|
||||
#ifdef _MSL_NO_LOCALE
|
||||
#define BOOST_NO_STD_LOCALE
|
||||
#endif
|
||||
|
||||
# if __MWERKS__ <= 0x2301 // 5.3
|
||||
# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
# define BOOST_NO_POINTER_TO_MEMBER_CONST
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
|
||||
# endif
|
||||
#if __MWERKS__ <= 0x2301 // 5.3
|
||||
#define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
#define BOOST_NO_POINTER_TO_MEMBER_CONST
|
||||
#define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
|
||||
#endif
|
||||
|
||||
# if __MWERKS__ <= 0x2401 // 6.2
|
||||
//# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
# endif
|
||||
#if __MWERKS__ <= 0x2401 // 6.2
|
||||
// # define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
#endif
|
||||
|
||||
# if(__MWERKS__ <= 0x2407) // 7.x
|
||||
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
# define BOOST_NO_UNREACHABLE_RETURN_DETECTION
|
||||
# endif
|
||||
#if (__MWERKS__ <= 0x2407) // 7.x
|
||||
#define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
#define BOOST_NO_UNREACHABLE_RETURN_DETECTION
|
||||
#endif
|
||||
|
||||
# if(__MWERKS__ <= 0x3003) // 8.x
|
||||
# define BOOST_NO_SFINAE
|
||||
# endif
|
||||
#if (__MWERKS__ <= 0x3003) // 8.x
|
||||
#define BOOST_NO_SFINAE
|
||||
#endif
|
||||
|
||||
// the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last
|
||||
// tested version *only*:
|
||||
# if(__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
#if (__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#define BOOST_NO_IS_ABSTRACT
|
||||
#endif
|
||||
|
||||
#if !__option(wchar_type)
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#endif
|
||||
|
||||
#if !__option(exceptions)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
#if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh)
|
||||
# if __MWERKS__ == 0x3000
|
||||
# define BOOST_COMPILER_VERSION 8.0
|
||||
# elif __MWERKS__ == 0x3001
|
||||
# define BOOST_COMPILER_VERSION 8.1
|
||||
# elif __MWERKS__ == 0x3002
|
||||
# define BOOST_COMPILER_VERSION 8.2
|
||||
# elif __MWERKS__ == 0x3003
|
||||
# define BOOST_COMPILER_VERSION 8.3
|
||||
# elif __MWERKS__ == 0x3200
|
||||
# define BOOST_COMPILER_VERSION 9.0
|
||||
# elif __MWERKS__ == 0x3201
|
||||
# define BOOST_COMPILER_VERSION 9.1
|
||||
# elif __MWERKS__ == 0x3202
|
||||
# define BOOST_COMPILER_VERSION 9.2
|
||||
# elif __MWERKS__ == 0x3204
|
||||
# define BOOST_COMPILER_VERSION 9.3
|
||||
# elif __MWERKS__ == 0x3205
|
||||
# define BOOST_COMPILER_VERSION 9.4
|
||||
# elif __MWERKS__ == 0x3206
|
||||
# define BOOST_COMPILER_VERSION 9.5
|
||||
# elif __MWERKS__ == 0x3207
|
||||
# define BOOST_COMPILER_VERSION 9.6
|
||||
# else
|
||||
# define BOOST_COMPILER_VERSION __MWERKS__
|
||||
# endif
|
||||
#if __MWERKS__ == 0x3000
|
||||
#define BOOST_COMPILER_VERSION 8.0
|
||||
#elif __MWERKS__ == 0x3001
|
||||
#define BOOST_COMPILER_VERSION 8.1
|
||||
#elif __MWERKS__ == 0x3002
|
||||
#define BOOST_COMPILER_VERSION 8.2
|
||||
#elif __MWERKS__ == 0x3003
|
||||
#define BOOST_COMPILER_VERSION 8.3
|
||||
#elif __MWERKS__ == 0x3200
|
||||
#define BOOST_COMPILER_VERSION 9.0
|
||||
#elif __MWERKS__ == 0x3201
|
||||
#define BOOST_COMPILER_VERSION 9.1
|
||||
#elif __MWERKS__ == 0x3202
|
||||
#define BOOST_COMPILER_VERSION 9.2
|
||||
#elif __MWERKS__ == 0x3204
|
||||
#define BOOST_COMPILER_VERSION 9.3
|
||||
#elif __MWERKS__ == 0x3205
|
||||
#define BOOST_COMPILER_VERSION 9.4
|
||||
#elif __MWERKS__ == 0x3206
|
||||
#define BOOST_COMPILER_VERSION 9.5
|
||||
#elif __MWERKS__ == 0x3207
|
||||
#define BOOST_COMPILER_VERSION 9.6
|
||||
#else
|
||||
# define BOOST_COMPILER_VERSION __MWERKS__
|
||||
#define BOOST_COMPILER_VERSION __MWERKS__
|
||||
#endif
|
||||
#else
|
||||
#define BOOST_COMPILER_VERSION __MWERKS__
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -88,9 +88,9 @@
|
||||
// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
|
||||
//
|
||||
#if __MWERKS__ > 0x3206 && __option(rvalue_refs)
|
||||
# define BOOST_HAS_RVALUE_REFS
|
||||
#define BOOST_HAS_RVALUE_REFS
|
||||
#else
|
||||
# define BOOST_NO_RVALUE_REFERENCES
|
||||
#define BOOST_NO_RVALUE_REFERENCES
|
||||
#endif
|
||||
#define BOOST_NO_AUTO_DECLARATIONS
|
||||
#define BOOST_NO_AUTO_MULTIDECLARATIONS
|
||||
@@ -121,19 +121,12 @@
|
||||
// versions check:
|
||||
// we don't support Metrowerks prior to version 5.3:
|
||||
#if __MWERKS__ < 0x2301
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version:
|
||||
#if (__MWERKS__ > 0x3205)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown compiler version - please run the configure tests and report the results"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// 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.
|
||||
|
||||
// MPW C++ compilers setup:
|
||||
|
||||
# if defined(__SC__)
|
||||
# define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__)
|
||||
# elif defined(__MRC__)
|
||||
# define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__)
|
||||
# else
|
||||
# error "Using MPW compiler configuration by mistake. Please update."
|
||||
# endif
|
||||
#if defined(__SC__)
|
||||
#define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__)
|
||||
#elif defined(__MRC__)
|
||||
#define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__)
|
||||
#else
|
||||
#error "Using MPW compiler configuration by mistake. Please update."
|
||||
#endif
|
||||
|
||||
//
|
||||
// MPW 8.90:
|
||||
//
|
||||
#if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG)
|
||||
# define BOOST_NO_CV_SPECIALIZATIONS
|
||||
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
# define BOOST_NO_USING_TEMPLATE
|
||||
#define BOOST_NO_CV_SPECIALIZATIONS
|
||||
#define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
#define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
#define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
#define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
#define BOOST_NO_USING_TEMPLATE
|
||||
|
||||
# define BOOST_NO_CWCHAR
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
#define BOOST_NO_CWCHAR
|
||||
#define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
|
||||
# define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */
|
||||
#define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -68,14 +68,12 @@
|
||||
// versions check:
|
||||
// we don't support MPW prior to version 8.9:
|
||||
#if MPW_CPLUS < 0x890
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 0x890:
|
||||
#if (MPW_CPLUS > 0x890)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown compiler version - please run the configure tests and report the results"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright Noel Belcourt 2007.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// 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.
|
||||
@@ -8,7 +8,7 @@
|
||||
// PGI C++ compiler setup:
|
||||
|
||||
#define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__
|
||||
#define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(_COMPILER_VERSION)
|
||||
#define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(_COMPILER_VERSION)
|
||||
|
||||
//
|
||||
// Threading support:
|
||||
@@ -18,13 +18,13 @@
|
||||
|
||||
#if (__PGIC__ >= 7)
|
||||
|
||||
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#define BOOST_NO_SWPRINTF
|
||||
|
||||
#else
|
||||
|
||||
# error "Pgi compiler not configured - please reconfigure"
|
||||
#error "Pgi compiler not configured - please reconfigure"
|
||||
|
||||
#endif
|
||||
//
|
||||
@@ -59,4 +59,3 @@
|
||||
//
|
||||
// version check:
|
||||
// probably nothing to do here?
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// 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.
|
||||
@@ -25,5 +25,3 @@
|
||||
//
|
||||
// version check:
|
||||
// probably nothing to do here?
|
||||
|
||||
|
||||
|
||||
@@ -1,73 +1,73 @@
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// (C) Copyright Peter Dimov 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002 - 2003.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// (C) Copyright Peter Dimov 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002 - 2003.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// 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.
|
||||
|
||||
// Sun C++ compiler setup:
|
||||
|
||||
# if __SUNPRO_CC <= 0x500
|
||||
# define BOOST_NO_MEMBER_TEMPLATES
|
||||
# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
# endif
|
||||
#if __SUNPRO_CC <= 0x500
|
||||
#define BOOST_NO_MEMBER_TEMPLATES
|
||||
#define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
#endif
|
||||
|
||||
# if (__SUNPRO_CC <= 0x520)
|
||||
//
|
||||
// Sunpro 5.2 and earler:
|
||||
//
|
||||
// although sunpro 5.2 supports the syntax for
|
||||
// inline initialization it often gets the value
|
||||
// wrong, especially where the value is computed
|
||||
// from other constants (J Maddock 6th May 2001)
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
#if (__SUNPRO_CC <= 0x520)
|
||||
//
|
||||
// Sunpro 5.2 and earler:
|
||||
//
|
||||
// although sunpro 5.2 supports the syntax for
|
||||
// inline initialization it often gets the value
|
||||
// wrong, especially where the value is computed
|
||||
// from other constants (J Maddock 6th May 2001)
|
||||
#define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
|
||||
// Although sunpro 5.2 supports the syntax for
|
||||
// partial specialization, it often seems to
|
||||
// bind to the wrong specialization. Better
|
||||
// to disable it until suppport becomes more stable
|
||||
// (J Maddock 6th May 2001).
|
||||
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
# endif
|
||||
// Although sunpro 5.2 supports the syntax for
|
||||
// partial specialization, it often seems to
|
||||
// bind to the wrong specialization. Better
|
||||
// to disable it until suppport becomes more stable
|
||||
// (J Maddock 6th May 2001).
|
||||
#define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
#endif
|
||||
|
||||
# if (__SUNPRO_CC <= 0x530)
|
||||
// Requesting debug info (-g) with Boost.Python results
|
||||
// in an internal compiler error for "static const"
|
||||
// initialized in-class.
|
||||
// >> Assertion: (../links/dbg_cstabs.cc, line 611)
|
||||
// while processing ../test.cpp at line 0.
|
||||
// (Jens Maurer according to Gottfried Ganssauge 04 Mar 2002)
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
#if (__SUNPRO_CC <= 0x530)
|
||||
// Requesting debug info (-g) with Boost.Python results
|
||||
// in an internal compiler error for "static const"
|
||||
// initialized in-class.
|
||||
// >> Assertion: (../links/dbg_cstabs.cc, line 611)
|
||||
// while processing ../test.cpp at line 0.
|
||||
// (Jens Maurer according to Gottfried Ganssauge 04 Mar 2002)
|
||||
#define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
|
||||
// SunPro 5.3 has better support for partial specialization,
|
||||
// but breaks when compiling std::less<shared_ptr<T> >
|
||||
// (Jens Maurer 4 Nov 2001).
|
||||
// SunPro 5.3 has better support for partial specialization,
|
||||
// but breaks when compiling std::less<shared_ptr<T> >
|
||||
// (Jens Maurer 4 Nov 2001).
|
||||
|
||||
// std::less specialization fixed as reported by George
|
||||
// Heintzelman; partial specialization re-enabled
|
||||
// (Peter Dimov 17 Jan 2002)
|
||||
// std::less specialization fixed as reported by George
|
||||
// Heintzelman; partial specialization re-enabled
|
||||
// (Peter Dimov 17 Jan 2002)
|
||||
|
||||
//# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
// # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
// integral constant expressions with 64 bit numbers fail
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# endif
|
||||
// integral constant expressions with 64 bit numbers fail
|
||||
#define BOOST_NO_INTEGRAL_INT64_T
|
||||
#endif
|
||||
|
||||
# if (__SUNPRO_CC < 0x570)
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
// see http://lists.boost.org/MailArchives/boost/msg47184.php
|
||||
// and http://lists.boost.org/MailArchives/boost/msg47220.php
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
# define BOOST_NO_SFINAE
|
||||
# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
|
||||
# endif
|
||||
# if (__SUNPRO_CC <= 0x580)
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
#if (__SUNPRO_CC < 0x570)
|
||||
#define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
// see http://lists.boost.org/MailArchives/boost/msg47184.php
|
||||
// and http://lists.boost.org/MailArchives/boost/msg47220.php
|
||||
#define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
#define BOOST_NO_SFINAE
|
||||
#define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
|
||||
#endif
|
||||
#if (__SUNPRO_CC <= 0x580)
|
||||
#define BOOST_NO_IS_ABSTRACT
|
||||
#endif
|
||||
|
||||
//
|
||||
// Issues that effect all known versions:
|
||||
@@ -79,10 +79,10 @@
|
||||
// C++0x features
|
||||
//
|
||||
|
||||
#if(__SUNPRO_CC >= 0x590)
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
#if (__SUNPRO_CC >= 0x590)
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
#else
|
||||
# define BOOST_NO_LONG_LONG
|
||||
#define BOOST_NO_LONG_LONG
|
||||
#endif
|
||||
|
||||
#define BOOST_NO_AUTO_DECLARATIONS
|
||||
@@ -124,7 +124,7 @@
|
||||
//
|
||||
// last known and checked version is 0x590:
|
||||
#if (__SUNPRO_CC > 0x590)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown compiler version - please run the configure tests and report the results"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Toon Knapen 2001 - 2003.
|
||||
// (C) Copyright Lie-Quan Lee 2001.
|
||||
// (C) Copyright Markus Schoepflin 2002 - 2003.
|
||||
// (C) Copyright Beman Dawes 2002 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Toon Knapen 2001 - 2003.
|
||||
// (C) Copyright Lie-Quan Lee 2001.
|
||||
// (C) Copyright Markus Schoepflin 2002 - 2003.
|
||||
// (C) Copyright Beman Dawes 2002 - 2003.
|
||||
// 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.
|
||||
@@ -12,29 +12,29 @@
|
||||
// Visual Age (IBM) C++ compiler setup:
|
||||
|
||||
#if __IBMCPP__ <= 501
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
#endif
|
||||
|
||||
#if (__IBMCPP__ <= 502)
|
||||
#if (__IBMCPP__ <= 502)
|
||||
// Actually the compiler supports inclass member initialization but it
|
||||
// requires a definition for the class member and it doesn't recognize
|
||||
// it as an integral constant expression when used as a template argument.
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
|
||||
#define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
#define BOOST_NO_INTEGRAL_INT64_T
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
|
||||
#endif
|
||||
|
||||
#if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG)
|
||||
# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#endif
|
||||
|
||||
//
|
||||
// On AIX thread support seems to be indicated by _THREAD_SAFE:
|
||||
//
|
||||
#ifdef _THREAD_SAFE
|
||||
# define BOOST_HAS_THREADS
|
||||
#define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "IBM Visual Age version " BOOST_STRINGIZE(__IBMCPP__)
|
||||
@@ -48,9 +48,9 @@
|
||||
//
|
||||
// last known and checked version is 600:
|
||||
#if (__IBMCPP__ > 1010)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown compiler version - please run the configure tests and report the results"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Some versions of the compiler have issues with default arguments on partial specializations
|
||||
@@ -83,6 +83,3 @@
|
||||
#define BOOST_NO_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_UNICODE_LITERALS
|
||||
#define BOOST_NO_VARIADIC_TEMPLATES
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001 - 2002.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Beman Dawes 2002 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001 - 2002.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Beman Dawes 2002 - 2003.
|
||||
// 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.
|
||||
@@ -15,133 +15,133 @@
|
||||
#define BOOST_MSVC _MSC_VER
|
||||
|
||||
#if _MSC_FULL_VER > 100000000
|
||||
# define BOOST_MSVC_FULL_VER _MSC_FULL_VER
|
||||
#define BOOST_MSVC_FULL_VER _MSC_FULL_VER
|
||||
#else
|
||||
# define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10)
|
||||
#define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10)
|
||||
#endif
|
||||
|
||||
// turn off the warnings before we #include anything
|
||||
#pragma warning( disable : 4503 ) // warning: decorated name length exceeded
|
||||
#pragma warning(disable : 4503) // warning: decorated name length exceeded
|
||||
|
||||
#if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1200-1202 == eVC++4
|
||||
# pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
# define BOOST_NO_EXCEPTION_STD_NAMESPACE
|
||||
#if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1200-1202 == eVC++4
|
||||
#pragma warning(disable : 4786) // ident trunc to '255' chars in debug info
|
||||
#define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
#define BOOST_NO_VOID_RETURNS
|
||||
#define BOOST_NO_EXCEPTION_STD_NAMESPACE
|
||||
|
||||
# if BOOST_MSVC == 1202
|
||||
# define BOOST_NO_STD_TYPEINFO
|
||||
# endif
|
||||
|
||||
// disable min/max macro defines on vc6:
|
||||
//
|
||||
#if BOOST_MSVC == 1202
|
||||
#define BOOST_NO_STD_TYPEINFO
|
||||
#endif
|
||||
|
||||
#if (_MSC_VER <= 1300) // 1300 == VC++ 7.0
|
||||
// disable min/max macro defines on vc6:
|
||||
//
|
||||
#endif
|
||||
|
||||
# if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
# endif
|
||||
#if (_MSC_VER <= 1300) // 1300 == VC++ 7.0
|
||||
|
||||
# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
# define BOOST_NO_PRIVATE_IN_AGGREGATE
|
||||
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_NO_DEDUCED_TYPENAME
|
||||
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za
|
||||
#define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
#endif
|
||||
|
||||
#define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
#define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
#define BOOST_NO_PRIVATE_IN_AGGREGATE
|
||||
#define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
#define BOOST_NO_INTEGRAL_INT64_T
|
||||
#define BOOST_NO_DEDUCED_TYPENAME
|
||||
#define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
|
||||
// VC++ 6/7 has member templates but they have numerous problems including
|
||||
// cases of silent failure, so for safety we define:
|
||||
# define BOOST_NO_MEMBER_TEMPLATES
|
||||
#define BOOST_NO_MEMBER_TEMPLATES
|
||||
// For VC++ experts wishing to attempt workarounds, we define:
|
||||
# define BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
#define BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
# define BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
# define BOOST_NO_USING_TEMPLATE
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
# define BOOST_NO_SFINAE
|
||||
# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
#define BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
#define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
#define BOOST_NO_USING_TEMPLATE
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
#define BOOST_NO_SFINAE
|
||||
#define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
|
||||
#define BOOST_NO_IS_ABSTRACT
|
||||
#define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
|
||||
// TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)?
|
||||
# if (_MSC_VER > 1200)
|
||||
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
# endif
|
||||
#if (_MSC_VER > 1200)
|
||||
#define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if _MSC_VER < 1400
|
||||
#if _MSC_VER < 1400
|
||||
// although a conforming signature for swprint exists in VC7.1
|
||||
// it appears not to actually work:
|
||||
# define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
|
||||
#if defined(UNDER_CE)
|
||||
// Windows CE does not have a conforming signature for swprintf
|
||||
# define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
|
||||
#if _MSC_VER <= 1400 // 1400 == VC++ 8.0
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#if _MSC_VER <= 1400 // 1400 == VC++ 8.0
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#endif
|
||||
|
||||
#if _MSC_VER <= 1600 // 1600 == VC++ 10.0
|
||||
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#if _MSC_VER <= 1600 // 1600 == VC++ 10.0
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
#endif
|
||||
|
||||
#if _MSC_VER == 1500 // 1500 == VC++ 9.0
|
||||
// A bug in VC9:
|
||||
# define BOOST_NO_ADL_BARRIER
|
||||
#if _MSC_VER == 1500 // 1500 == VC++ 9.0
|
||||
// A bug in VC9:
|
||||
#define BOOST_NO_ADL_BARRIER
|
||||
#endif
|
||||
|
||||
#if _MSC_VER <= 1500 || !defined(BOOST_STRICT_CONFIG) // 1500 == VC++ 9.0
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
#if _MSC_VER <= 1500 || !defined(BOOST_STRICT_CONFIG) // 1500 == VC++ 9.0
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#endif
|
||||
|
||||
#ifndef _NATIVE_WCHAR_T_DEFINED
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32_WCE) || defined(UNDER_CE)
|
||||
# define BOOST_NO_THREADEX
|
||||
# define BOOST_NO_GETSYSTEMTIMEASFILETIME
|
||||
# define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_THREADEX
|
||||
#define BOOST_NO_GETSYSTEMTIMEASFILETIME
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
|
||||
//
|
||||
// check for exception handling support:
|
||||
#ifndef _CPPUNWIND
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
//
|
||||
// check for exception handling support:
|
||||
#ifndef _CPPUNWIND
|
||||
#define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
//
|
||||
// __int64 support:
|
||||
//
|
||||
#if (_MSC_VER >= 1200)
|
||||
# define BOOST_HAS_MS_INT64
|
||||
#define BOOST_HAS_MS_INT64
|
||||
#endif
|
||||
#if (_MSC_VER >= 1310) && (defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1500))
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
#else
|
||||
# define BOOST_NO_LONG_LONG
|
||||
#define BOOST_NO_LONG_LONG
|
||||
#endif
|
||||
#if (_MSC_VER >= 1400) && !defined(_DEBUG)
|
||||
# define BOOST_HAS_NRVO
|
||||
#define BOOST_HAS_NRVO
|
||||
#endif
|
||||
//
|
||||
// disable Win32 API's if compiler extentions are
|
||||
// turned off:
|
||||
//
|
||||
#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32)
|
||||
# define BOOST_DISABLE_WIN32
|
||||
#define BOOST_DISABLE_WIN32
|
||||
#endif
|
||||
#if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI)
|
||||
# define BOOST_NO_RTTI
|
||||
#define BOOST_NO_RTTI
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -188,56 +188,56 @@
|
||||
// prefix and suffix headers:
|
||||
//
|
||||
#ifndef BOOST_ABI_PREFIX
|
||||
# define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp"
|
||||
#define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp"
|
||||
#endif
|
||||
#ifndef BOOST_ABI_SUFFIX
|
||||
# define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp"
|
||||
#define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp"
|
||||
#endif
|
||||
|
||||
// TODO:
|
||||
// these things are mostly bogus. 1200 means version 12.0 of the compiler. The
|
||||
// these things are mostly bogus. 1200 means version 12.0 of the compiler. The
|
||||
// artificial versions assigned to them only refer to the versions of some IDE
|
||||
// these compilers have been shipped with, and even that is not all of it. Some
|
||||
// were shipped with freely downloadable SDKs, others as crosscompilers in eVC.
|
||||
// IOW, you can't use these 'versions' in any sensible way. Sorry.
|
||||
# if defined(UNDER_CE)
|
||||
# if _MSC_VER < 1200
|
||||
// Note: these are so far off, they are not really supported
|
||||
# elif _MSC_VER < 1300 // eVC++ 4 comes with 1200-1202
|
||||
# define BOOST_COMPILER_VERSION evc4.0
|
||||
# elif _MSC_VER == 1400
|
||||
# define BOOST_COMPILER_VERSION evc8
|
||||
# elif _MSC_VER == 1500
|
||||
# define BOOST_COMPILER_VERSION evc9
|
||||
# elif _MSC_VER == 1600
|
||||
# define BOOST_COMPILER_VERSION evc10
|
||||
# else
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown EVC++ compiler version - please run the configure tests and report the results"
|
||||
# else
|
||||
# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
# if _MSC_VER < 1200
|
||||
// Note: these are so far off, they are not really supported
|
||||
# define BOOST_COMPILER_VERSION 5.0
|
||||
# elif _MSC_VER < 1300
|
||||
# define BOOST_COMPILER_VERSION 6.0
|
||||
# elif _MSC_VER == 1300
|
||||
# define BOOST_COMPILER_VERSION 7.0
|
||||
# elif _MSC_VER == 1310
|
||||
# define BOOST_COMPILER_VERSION 7.1
|
||||
# elif _MSC_VER == 1400
|
||||
# define BOOST_COMPILER_VERSION 8.0
|
||||
# elif _MSC_VER == 1500
|
||||
# define BOOST_COMPILER_VERSION 9.0
|
||||
# elif _MSC_VER == 1600
|
||||
# define BOOST_COMPILER_VERSION 10.0
|
||||
# else
|
||||
# define BOOST_COMPILER_VERSION _MSC_VER
|
||||
# endif
|
||||
# endif
|
||||
#if defined(UNDER_CE)
|
||||
#if _MSC_VER < 1200
|
||||
// Note: these are so far off, they are not really supported
|
||||
#elif _MSC_VER < 1300 // eVC++ 4 comes with 1200-1202
|
||||
#define BOOST_COMPILER_VERSION evc4.0
|
||||
#elif _MSC_VER == 1400
|
||||
#define BOOST_COMPILER_VERSION evc8
|
||||
#elif _MSC_VER == 1500
|
||||
#define BOOST_COMPILER_VERSION evc9
|
||||
#elif _MSC_VER == 1600
|
||||
#define BOOST_COMPILER_VERSION evc10
|
||||
#else
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown EVC++ compiler version - please run the configure tests and report the results"
|
||||
#else
|
||||
#pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if _MSC_VER < 1200
|
||||
// Note: these are so far off, they are not really supported
|
||||
#define BOOST_COMPILER_VERSION 5.0
|
||||
#elif _MSC_VER < 1300
|
||||
#define BOOST_COMPILER_VERSION 6.0
|
||||
#elif _MSC_VER == 1300
|
||||
#define BOOST_COMPILER_VERSION 7.0
|
||||
#elif _MSC_VER == 1310
|
||||
#define BOOST_COMPILER_VERSION 7.1
|
||||
#elif _MSC_VER == 1400
|
||||
#define BOOST_COMPILER_VERSION 8.0
|
||||
#elif _MSC_VER == 1500
|
||||
#define BOOST_COMPILER_VERSION 9.0
|
||||
#elif _MSC_VER == 1600
|
||||
#define BOOST_COMPILER_VERSION 10.0
|
||||
#else
|
||||
#define BOOST_COMPILER_VERSION _MSC_VER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
|
||||
|
||||
@@ -250,9 +250,9 @@
|
||||
//
|
||||
// last known and checked version is 1600 (VC10, aka 2010):
|
||||
#if (_MSC_VER > 1600)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# else
|
||||
# pragma message("Unknown compiler version - please run the configure tests and report the results")
|
||||
# endif
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
#error "Unknown compiler version - please run the configure tests and report the results"
|
||||
#else
|
||||
#pragma message("Unknown compiler version - please run the configure tests and report the results")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -11,18 +11,18 @@
|
||||
//
|
||||
|
||||
#ifndef BOOST_CONFIG_CMATH
|
||||
# define BOOST_CONFIG_CMATH
|
||||
#define BOOST_CONFIG_CMATH
|
||||
|
||||
# ifndef BOOST_TR1_NO_RECURSION
|
||||
# define BOOST_TR1_NO_RECURSION
|
||||
# define BOOST_CONFIG_NO_CMATH_RECURSION
|
||||
# endif
|
||||
#ifndef BOOST_TR1_NO_RECURSION
|
||||
#define BOOST_TR1_NO_RECURSION
|
||||
#define BOOST_CONFIG_NO_CMATH_RECURSION
|
||||
#endif
|
||||
|
||||
# include <cmath>
|
||||
#include <cmath>
|
||||
|
||||
# ifdef BOOST_CONFIG_NO_CMATH_RECURSION
|
||||
# undef BOOST_TR1_NO_RECURSION
|
||||
# undef BOOST_CONFIG_NO_CMATH_RECURSION
|
||||
# endif
|
||||
#ifdef BOOST_CONFIG_NO_CMATH_RECURSION
|
||||
#undef BOOST_TR1_NO_RECURSION
|
||||
#undef BOOST_CONFIG_NO_CMATH_RECURSION
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,18 +11,18 @@
|
||||
//
|
||||
|
||||
#ifndef BOOST_CONFIG_COMPLEX
|
||||
# define BOOST_CONFIG_COMPLEX
|
||||
#define BOOST_CONFIG_COMPLEX
|
||||
|
||||
# ifndef BOOST_TR1_NO_RECURSION
|
||||
# define BOOST_TR1_NO_RECURSION
|
||||
# define BOOST_CONFIG_NO_COMPLEX_RECURSION
|
||||
# endif
|
||||
#ifndef BOOST_TR1_NO_RECURSION
|
||||
#define BOOST_TR1_NO_RECURSION
|
||||
#define BOOST_CONFIG_NO_COMPLEX_RECURSION
|
||||
#endif
|
||||
|
||||
# include <complex>
|
||||
#include <complex>
|
||||
|
||||
# ifdef BOOST_CONFIG_NO_COMPLEX_RECURSION
|
||||
# undef BOOST_TR1_NO_RECURSION
|
||||
# undef BOOST_CONFIG_NO_COMPLEX_RECURSION
|
||||
# endif
|
||||
#ifdef BOOST_CONFIG_NO_COMPLEX_RECURSION
|
||||
#undef BOOST_TR1_NO_RECURSION
|
||||
#undef BOOST_CONFIG_NO_COMPLEX_RECURSION
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,18 +11,18 @@
|
||||
//
|
||||
|
||||
#ifndef BOOST_CONFIG_FUNCTIONAL
|
||||
# define BOOST_CONFIG_FUNCTIONAL
|
||||
#define BOOST_CONFIG_FUNCTIONAL
|
||||
|
||||
# ifndef BOOST_TR1_NO_RECURSION
|
||||
# define BOOST_TR1_NO_RECURSION
|
||||
# define BOOST_CONFIG_NO_FUNCTIONAL_RECURSION
|
||||
# endif
|
||||
#ifndef BOOST_TR1_NO_RECURSION
|
||||
#define BOOST_TR1_NO_RECURSION
|
||||
#define BOOST_CONFIG_NO_FUNCTIONAL_RECURSION
|
||||
#endif
|
||||
|
||||
# include <functional>
|
||||
#include <functional>
|
||||
|
||||
# ifdef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION
|
||||
# undef BOOST_TR1_NO_RECURSION
|
||||
# undef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION
|
||||
# endif
|
||||
#ifdef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION
|
||||
#undef BOOST_TR1_NO_RECURSION
|
||||
#undef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,18 +11,18 @@
|
||||
//
|
||||
|
||||
#ifndef BOOST_CONFIG_MEMORY
|
||||
# define BOOST_CONFIG_MEMORY
|
||||
#define BOOST_CONFIG_MEMORY
|
||||
|
||||
# ifndef BOOST_TR1_NO_RECURSION
|
||||
# define BOOST_TR1_NO_RECURSION
|
||||
# define BOOST_CONFIG_NO_MEMORY_RECURSION
|
||||
# endif
|
||||
#ifndef BOOST_TR1_NO_RECURSION
|
||||
#define BOOST_TR1_NO_RECURSION
|
||||
#define BOOST_CONFIG_NO_MEMORY_RECURSION
|
||||
#endif
|
||||
|
||||
# include <memory>
|
||||
#include <memory>
|
||||
|
||||
# ifdef BOOST_CONFIG_NO_MEMORY_RECURSION
|
||||
# undef BOOST_TR1_NO_RECURSION
|
||||
# undef BOOST_CONFIG_NO_MEMORY_RECURSION
|
||||
# endif
|
||||
#ifdef BOOST_CONFIG_NO_MEMORY_RECURSION
|
||||
#undef BOOST_TR1_NO_RECURSION
|
||||
#undef BOOST_CONFIG_NO_MEMORY_RECURSION
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,18 +11,18 @@
|
||||
//
|
||||
|
||||
#ifndef BOOST_CONFIG_UTILITY
|
||||
# define BOOST_CONFIG_UTILITY
|
||||
#define BOOST_CONFIG_UTILITY
|
||||
|
||||
# ifndef BOOST_TR1_NO_RECURSION
|
||||
# define BOOST_TR1_NO_RECURSION
|
||||
# define BOOST_CONFIG_NO_UTILITY_RECURSION
|
||||
# endif
|
||||
#ifndef BOOST_TR1_NO_RECURSION
|
||||
#define BOOST_TR1_NO_RECURSION
|
||||
#define BOOST_CONFIG_NO_UTILITY_RECURSION
|
||||
#endif
|
||||
|
||||
# include <utility>
|
||||
#include <utility>
|
||||
|
||||
# ifdef BOOST_CONFIG_NO_UTILITY_RECURSION
|
||||
# undef BOOST_TR1_NO_RECURSION
|
||||
# undef BOOST_CONFIG_NO_UTILITY_RECURSION
|
||||
# endif
|
||||
#ifdef BOOST_CONFIG_NO_UTILITY_RECURSION
|
||||
#undef BOOST_TR1_NO_RECURSION
|
||||
#undef BOOST_CONFIG_NO_UTILITY_RECURSION
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// 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.
|
||||
@@ -23,11 +23,7 @@
|
||||
#define BOOST_HAS_PTHREADS
|
||||
#define BOOST_HAS_PTHREAD_DELAY_NP
|
||||
#define BOOST_HAS_SCHED_YIELD
|
||||
//#define BOOST_HAS_PTHREAD_YIELD
|
||||
// #define BOOST_HAS_PTHREAD_YIELD
|
||||
|
||||
// boilerplate code:
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright John Maddock 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2002.
|
||||
// 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.
|
||||
@@ -11,5 +11,3 @@
|
||||
#define BOOST_NO_CWCHAR
|
||||
#define BOOST_NO_STD_WSTRING
|
||||
#define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// 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.
|
||||
@@ -16,11 +16,8 @@
|
||||
#define BOOST_HAS_BETHREADS
|
||||
|
||||
#ifndef BOOST_DISABLE_THREADS
|
||||
# define BOOST_HAS_THREADS
|
||||
#define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
// boilerplate code:
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// (C) Copyright Douglas Gregor 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// (C) Copyright Douglas Gregor 2002.
|
||||
// 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.
|
||||
@@ -29,25 +29,22 @@
|
||||
// advertise the fact in <unistd.h>:
|
||||
//
|
||||
#if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) || defined(__DragonFly__)
|
||||
# define BOOST_HAS_NL_TYPES_H
|
||||
#define BOOST_HAS_NL_TYPES_H
|
||||
#endif
|
||||
|
||||
//
|
||||
// FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in <pthread.h>
|
||||
// and not in <unistd.h>
|
||||
//
|
||||
#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3))\
|
||||
|| defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
# define BOOST_HAS_PTHREADS
|
||||
#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3)) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
#define BOOST_HAS_PTHREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// No wide character support in the BSD header files:
|
||||
//
|
||||
#if defined(__NetBSD__)
|
||||
#define __NetBSD_GCC__ (__GNUC__ * 1000000 \
|
||||
+ __GNUC_MINOR__ * 1000 \
|
||||
+ __GNUC_PATCHLEVEL__)
|
||||
#define __NetBSD_GCC__ (__GNUC__ * 1000000 + __GNUC_MINOR__ * 1000 + __GNUC_PATCHLEVEL__)
|
||||
// XXX - the following is required until c++config.h
|
||||
// defines _GLIBCXX_HAVE_SWPRINTF and friends
|
||||
// or the preprocessor conditionals are removed
|
||||
@@ -55,15 +52,14 @@
|
||||
#define _GLIBCXX_HAVE_SWPRINTF 1
|
||||
#endif
|
||||
|
||||
#if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \
|
||||
|| (__NetBSD_GCC__ >= 2095003) || defined(__DragonFly__))
|
||||
# define BOOST_NO_CWCHAR
|
||||
#if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) || (__NetBSD_GCC__ >= 2095003) || defined(__DragonFly__))
|
||||
#define BOOST_NO_CWCHAR
|
||||
#endif
|
||||
//
|
||||
// The BSD <ctype.h> has macros only, no functions:
|
||||
//
|
||||
#if !defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
# define BOOST_NO_CTYPE_FUNCTIONS
|
||||
#define BOOST_NO_CTYPE_FUNCTIONS
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -78,9 +74,3 @@
|
||||
// boilerplate code:
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// 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.
|
||||
@@ -21,17 +21,17 @@
|
||||
// revert to native Win threads.
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS)
|
||||
# define BOOST_HAS_PTHREADS
|
||||
# define BOOST_HAS_SCHED_YIELD
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
# define BOOST_HAS_SIGACTION
|
||||
#if defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0) && !defined(BOOST_HAS_WINTHREADS)
|
||||
#define BOOST_HAS_PTHREADS
|
||||
#define BOOST_HAS_SCHED_YIELD
|
||||
#define BOOST_HAS_GETTIMEOFDAY
|
||||
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
#define BOOST_HAS_SIGACTION
|
||||
#else
|
||||
# if !defined(BOOST_HAS_WINTHREADS)
|
||||
# define BOOST_HAS_WINTHREADS
|
||||
# endif
|
||||
# define BOOST_HAS_FTIME
|
||||
#if !defined(BOOST_HAS_WINTHREADS)
|
||||
#define BOOST_HAS_WINTHREADS
|
||||
#endif
|
||||
#define BOOST_HAS_FTIME
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -44,8 +44,3 @@
|
||||
|
||||
// boilerplate code:
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Toon Knapen 2003.
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Toon Knapen 2003.
|
||||
// (C) Copyright Boris Gubenko 2006 - 2007.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// 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.
|
||||
@@ -18,27 +18,27 @@
|
||||
// Use of UINT32_C(0) results in "0u l" for the preprocessed source
|
||||
// (verifyable with gcc 2.95.3)
|
||||
#if (defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__HP_aCC)
|
||||
# define BOOST_HAS_STDINT_H
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#endif
|
||||
|
||||
#if !(defined(__HP_aCC) || !defined(_INCLUDE__STDC_A1_SOURCE))
|
||||
# define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
#if defined(__HP_aCC) && !defined(_INCLUDE__STDC_A1_SOURCE)
|
||||
# define BOOST_NO_CWCTYPE
|
||||
#define BOOST_NO_CWCTYPE
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3))
|
||||
// GNU C on HP-UX does not support threads (checked up to gcc 3.3)
|
||||
# define BOOST_DISABLE_THREADS
|
||||
# elif !defined(BOOST_DISABLE_THREADS)
|
||||
// threads supported from gcc-3.3 onwards:
|
||||
# define BOOST_HAS_THREADS
|
||||
# define BOOST_HAS_PTHREADS
|
||||
# endif
|
||||
#if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3))
|
||||
// GNU C on HP-UX does not support threads (checked up to gcc 3.3)
|
||||
#define BOOST_DISABLE_THREADS
|
||||
#elif !defined(BOOST_DISABLE_THREADS)
|
||||
// threads supported from gcc-3.3 onwards:
|
||||
#define BOOST_HAS_THREADS
|
||||
#define BOOST_HAS_PTHREADS
|
||||
#endif
|
||||
#elif defined(__HP_aCC) && !defined(BOOST_DISABLE_THREADS)
|
||||
# define BOOST_HAS_PTHREADS
|
||||
#define BOOST_HAS_PTHREADS
|
||||
#endif
|
||||
|
||||
// boilerplate code:
|
||||
@@ -47,41 +47,40 @@
|
||||
|
||||
// the following are always available:
|
||||
#ifndef BOOST_HAS_GETTIMEOFDAY
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
#define BOOST_HAS_GETTIMEOFDAY
|
||||
#endif
|
||||
#ifndef BOOST_HAS_SCHED_YIELD
|
||||
# define BOOST_HAS_SCHED_YIELD
|
||||
#define BOOST_HAS_SCHED_YIELD
|
||||
#endif
|
||||
#ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
#endif
|
||||
#ifndef BOOST_HAS_NL_TYPES_H
|
||||
# define BOOST_HAS_NL_TYPES_H
|
||||
#define BOOST_HAS_NL_TYPES_H
|
||||
#endif
|
||||
#ifndef BOOST_HAS_NANOSLEEP
|
||||
# define BOOST_HAS_NANOSLEEP
|
||||
#define BOOST_HAS_NANOSLEEP
|
||||
#endif
|
||||
#ifndef BOOST_HAS_GETTIMEOFDAY
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
#define BOOST_HAS_GETTIMEOFDAY
|
||||
#endif
|
||||
#ifndef BOOST_HAS_DIRENT_H
|
||||
# define BOOST_HAS_DIRENT_H
|
||||
#define BOOST_HAS_DIRENT_H
|
||||
#endif
|
||||
#ifndef BOOST_HAS_CLOCK_GETTIME
|
||||
# define BOOST_HAS_CLOCK_GETTIME
|
||||
#define BOOST_HAS_CLOCK_GETTIME
|
||||
#endif
|
||||
#ifndef BOOST_HAS_SIGACTION
|
||||
# define BOOST_HAS_SIGACTION
|
||||
#define BOOST_HAS_SIGACTION
|
||||
#endif
|
||||
#ifndef BOOST_HAS_NRVO
|
||||
# ifndef __parisc
|
||||
# define BOOST_HAS_NRVO
|
||||
# endif
|
||||
#ifndef BOOST_HAS_NRVO
|
||||
#ifndef __parisc
|
||||
#define BOOST_HAS_NRVO
|
||||
#endif
|
||||
#ifndef BOOST_HAS_LOG1P
|
||||
# define BOOST_HAS_LOG1P
|
||||
#endif
|
||||
#ifndef BOOST_HAS_LOG1P
|
||||
#define BOOST_HAS_LOG1P
|
||||
#endif
|
||||
#ifndef BOOST_HAS_EXPM1
|
||||
# define BOOST_HAS_EXPM1
|
||||
#define BOOST_HAS_EXPM1
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2003.
|
||||
// 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)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#define BOOST_PLATFORM "SGI Irix"
|
||||
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_SWPRINTF
|
||||
//
|
||||
// these are not auto detected by POSIX feature tests:
|
||||
//
|
||||
@@ -19,13 +19,10 @@
|
||||
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
|
||||
#ifdef __GNUC__
|
||||
// GNU C on IRIX does not support threads (checked up to gcc 3.3)
|
||||
# define BOOST_DISABLE_THREADS
|
||||
// GNU C on IRIX does not support threads (checked up to gcc 3.3)
|
||||
#define BOOST_DISABLE_THREADS
|
||||
#endif
|
||||
|
||||
// boilerplate code:
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// 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.
|
||||
@@ -18,27 +18,27 @@
|
||||
// We can only test for 2.1 though:
|
||||
//
|
||||
#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1)))
|
||||
// <stdint.h> defines int64_t unconditionally, but <sys/types.h> defines
|
||||
// int64_t only if __GNUC__. Thus, assume a fully usable <stdint.h>
|
||||
// only when using GCC.
|
||||
# if defined __GNUC__
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# endif
|
||||
// <stdint.h> defines int64_t unconditionally, but <sys/types.h> defines
|
||||
// int64_t only if __GNUC__. Thus, assume a fully usable <stdint.h>
|
||||
// only when using GCC.
|
||||
#if defined __GNUC__
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__LIBCOMO__)
|
||||
//
|
||||
// como on linux doesn't have std:: c functions:
|
||||
// NOTE: versions of libcomo prior to beta28 have octal version numbering,
|
||||
// e.g. version 25 is 21 (dec)
|
||||
//
|
||||
# if __LIBCOMO_VERSION__ <= 20
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
# endif
|
||||
//
|
||||
// como on linux doesn't have std:: c functions:
|
||||
// NOTE: versions of libcomo prior to beta28 have octal version numbering,
|
||||
// e.g. version 25 is 21 (dec)
|
||||
//
|
||||
#if __LIBCOMO_VERSION__ <= 20
|
||||
#define BOOST_NO_STDC_NAMESPACE
|
||||
#endif
|
||||
|
||||
# if __LIBCOMO_VERSION__ <= 21
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# endif
|
||||
#if __LIBCOMO_VERSION__ <= 21
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -47,22 +47,22 @@
|
||||
// gettimeofday, earlier versions may or may not have it:
|
||||
//
|
||||
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
#define BOOST_HAS_GETTIMEOFDAY
|
||||
#endif
|
||||
|
||||
#ifdef __USE_POSIX199309
|
||||
# define BOOST_HAS_NANOSLEEP
|
||||
#define BOOST_HAS_NANOSLEEP
|
||||
#endif
|
||||
|
||||
#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
||||
// __GLIBC_PREREQ is available since 2.1.2
|
||||
|
||||
// swprintf is available since glibc 2.2.0
|
||||
# if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98))
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# endif
|
||||
// swprintf is available since glibc 2.2.0
|
||||
#if !__GLIBC_PREREQ(2, 2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98))
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
#else
|
||||
# define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
|
||||
// boilerplate code:
|
||||
@@ -75,24 +75,22 @@
|
||||
// the GNU system headers, some of which (mainly <stdint.h>)
|
||||
// use GNU specific extensions:
|
||||
//
|
||||
# ifndef __extension__
|
||||
# define __extension__
|
||||
# endif
|
||||
# ifndef __const__
|
||||
# define __const__ const
|
||||
# endif
|
||||
# ifndef __volatile__
|
||||
# define __volatile__ volatile
|
||||
# endif
|
||||
# ifndef __signed__
|
||||
# define __signed__ signed
|
||||
# endif
|
||||
# ifndef __typeof__
|
||||
# define __typeof__ typeof
|
||||
# endif
|
||||
# ifndef __inline__
|
||||
# define __inline__ inline
|
||||
# endif
|
||||
#ifndef __extension__
|
||||
#define __extension__
|
||||
#endif
|
||||
#ifndef __const__
|
||||
#define __const__ const
|
||||
#endif
|
||||
#ifndef __volatile__
|
||||
#define __volatile__ volatile
|
||||
#endif
|
||||
#ifndef __signed__
|
||||
#define __signed__ signed
|
||||
#endif
|
||||
#ifndef __typeof__
|
||||
#define __typeof__ typeof
|
||||
#endif
|
||||
#ifndef __inline__
|
||||
#define __inline__ inline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001 - 2002.
|
||||
// (C) Copyright Bill Kempf 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001 - 2002.
|
||||
// (C) Copyright Bill Kempf 2002.
|
||||
// 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.
|
||||
@@ -15,9 +15,9 @@
|
||||
|
||||
// Using the Mac OS X system BSD-style C library.
|
||||
|
||||
# ifndef BOOST_HAS_UNISTD_H
|
||||
# define BOOST_HAS_UNISTD_H
|
||||
# endif
|
||||
#ifndef BOOST_HAS_UNISTD_H
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#endif
|
||||
//
|
||||
// Begin by including our boilerplate code for POSIX
|
||||
// feature detection, this is safe even when using
|
||||
@@ -25,35 +25,35 @@
|
||||
// to replace the platform-native BSD one. G++ users
|
||||
// should also always be able to do this on MaxOS X.
|
||||
//
|
||||
# include <boost/config/posix_features.hpp>
|
||||
# ifndef BOOST_HAS_STDINT_H
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# endif
|
||||
#include <boost/config/posix_features.hpp>
|
||||
#ifndef BOOST_HAS_STDINT_H
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#endif
|
||||
|
||||
//
|
||||
// BSD runtime has pthreads, sigaction, sched_yield and gettimeofday,
|
||||
// of these only pthreads are advertised in <unistd.h>, so set the
|
||||
// of these only pthreads are advertised in <unistd.h>, so set the
|
||||
// other options explicitly:
|
||||
//
|
||||
# define BOOST_HAS_SCHED_YIELD
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
# define BOOST_HAS_SIGACTION
|
||||
#define BOOST_HAS_SCHED_YIELD
|
||||
#define BOOST_HAS_GETTIMEOFDAY
|
||||
#define BOOST_HAS_SIGACTION
|
||||
|
||||
# if (__GNUC__ < 3) && !defined( __APPLE_CC__)
|
||||
#if (__GNUC__ < 3) && !defined(__APPLE_CC__)
|
||||
|
||||
// GCC strange "ignore std" mode works better if you pretend everything
|
||||
// is in the std namespace, for the most part.
|
||||
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
# endif
|
||||
#define BOOST_NO_STDC_NAMESPACE
|
||||
#endif
|
||||
|
||||
# if (__GNUC__ == 4)
|
||||
#if (__GNUC__ == 4)
|
||||
|
||||
// Both gcc and intel require these.
|
||||
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
# define BOOST_HAS_NANOSLEEP
|
||||
// Both gcc and intel require these.
|
||||
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
#define BOOST_HAS_NANOSLEEP
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
@@ -61,26 +61,23 @@
|
||||
|
||||
// We will eventually support threads in non-Carbon builds, but we do
|
||||
// not support this yet.
|
||||
# if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON )
|
||||
#if (defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON) || (defined(TARGET_CARBON) && TARGET_CARBON)
|
||||
|
||||
# if !defined(BOOST_HAS_PTHREADS)
|
||||
# define BOOST_HAS_MPTASKS
|
||||
# elif ( __dest_os == __mac_os_x )
|
||||
#if !defined(BOOST_HAS_PTHREADS)
|
||||
#define BOOST_HAS_MPTASKS
|
||||
#elif (__dest_os == __mac_os_x)
|
||||
// We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the
|
||||
// gettimeofday and no posix.
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
# endif
|
||||
#define BOOST_HAS_GETTIMEOFDAY
|
||||
#endif
|
||||
|
||||
// The MP task implementation of Boost Threads aims to replace MP-unsafe
|
||||
// parts of the MSL, so we turn on threads unconditionally.
|
||||
# define BOOST_HAS_THREADS
|
||||
#define BOOST_HAS_THREADS
|
||||
|
||||
// The remote call manager depends on this.
|
||||
# define BOOST_BIND_ENABLE_PASCAL
|
||||
|
||||
# endif
|
||||
#define BOOST_BIND_ENABLE_PASCAL
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright Jim Douglas 2005.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright Jim Douglas 2005.
|
||||
// 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.
|
||||
@@ -14,9 +14,9 @@
|
||||
|
||||
// QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h
|
||||
// or log1p and expm1:
|
||||
#undef BOOST_HAS_NL_TYPES_H
|
||||
#undef BOOST_HAS_LOG1P
|
||||
#undef BOOST_HAS_EXPM1
|
||||
#undef BOOST_HAS_NL_TYPES_H
|
||||
#undef BOOST_HAS_LOG1P
|
||||
#undef BOOST_HAS_EXPM1
|
||||
|
||||
#define BOOST_HAS_PTHREADS
|
||||
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
@@ -24,8 +24,3 @@
|
||||
#define BOOST_HAS_GETTIMEOFDAY
|
||||
#define BOOST_HAS_CLOCK_GETTIME
|
||||
#define BOOST_HAS_NANOSLEEP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2003.
|
||||
// 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.
|
||||
@@ -20,9 +20,5 @@
|
||||
// pthreads don't actually work with gcc unless _PTHREADS is defined:
|
||||
//
|
||||
#if defined(__GNUC__) && defined(_POSIX_THREADS) && !defined(_PTHREADS)
|
||||
# undef BOOST_HAS_PTHREADS
|
||||
#undef BOOST_HAS_PTHREADS
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright Dustin Spicuzza 2009.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright Dustin Spicuzza 2009.
|
||||
// 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.
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
// these allow posix_features to work, since vxWorks doesn't
|
||||
// define them itself
|
||||
#define _POSIX_TIMERS 1
|
||||
#define _POSIX_TIMERS 1
|
||||
#define _POSIX_THREADS 1
|
||||
|
||||
// vxworks doesn't work with asio serial ports
|
||||
@@ -28,4 +28,3 @@
|
||||
|
||||
// boilerplate code:
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Bill Kempf 2001.
|
||||
// (C) Copyright Aleksey Gurtovoy 2003.
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Bill Kempf 2001.
|
||||
// (C) Copyright Aleksey Gurtovoy 2003.
|
||||
// (C) Copyright Rene Rivera 2005.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// 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.
|
||||
@@ -14,28 +14,29 @@
|
||||
|
||||
// Get the information about the MinGW runtime, i.e. __MINGW32_*VERSION.
|
||||
#if defined(__MINGW32__)
|
||||
# include <_mingw.h>
|
||||
#include <_mingw.h>
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF)
|
||||
# define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
|
||||
#if !defined(__GNUC__) && !defined(BOOST_HAS_DECLSPEC)
|
||||
# define BOOST_HAS_DECLSPEC
|
||||
#define BOOST_HAS_DECLSPEC
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0)))
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# define __STDC_LIMIT_MACROS
|
||||
# define BOOST_HAS_DIRENT_H
|
||||
# define BOOST_HAS_UNISTD_H
|
||||
#if defined(__MINGW32__) \
|
||||
&& ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0)))
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#define __STDC_LIMIT_MACROS
|
||||
#define BOOST_HAS_DIRENT_H
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#endif
|
||||
|
||||
//
|
||||
// Win32 will normally be using native Win32 threads,
|
||||
// but there is a pthread library avaliable as an option,
|
||||
// we used to disable this when BOOST_DISABLE_WIN32 was
|
||||
// we used to disable this when BOOST_DISABLE_WIN32 was
|
||||
// defined but no longer - this should allow some
|
||||
// files to be compiled in strict mode - while maintaining
|
||||
// a consistent setting of BOOST_HAS_THREADS across
|
||||
@@ -43,11 +44,11 @@
|
||||
//
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
# define BOOST_NO_ANSI_APIS
|
||||
#define BOOST_NO_ANSI_APIS
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_HAS_PTHREADS
|
||||
# define BOOST_HAS_WINTHREADS
|
||||
#define BOOST_HAS_WINTHREADS
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_DISABLE_WIN32
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// 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)
|
||||
|
||||
|
||||
@@ -14,82 +14,78 @@
|
||||
// to the user to do this *before* including any header, although
|
||||
// in most cases the compiler will do this for you).
|
||||
|
||||
# if defined(BOOST_HAS_UNISTD_H)
|
||||
# include <unistd.h>
|
||||
#if defined(BOOST_HAS_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
|
||||
// XOpen has <nl_types.h>, but is this the correct version check?
|
||||
# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3)
|
||||
# define BOOST_HAS_NL_TYPES_H
|
||||
# endif
|
||||
// XOpen has <nl_types.h>, but is this the correct version check?
|
||||
#if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3)
|
||||
#define BOOST_HAS_NL_TYPES_H
|
||||
#endif
|
||||
|
||||
// POSIX version 6 requires <stdint.h>
|
||||
# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100)
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# endif
|
||||
// POSIX version 6 requires <stdint.h>
|
||||
#if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100)
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#endif
|
||||
|
||||
// POSIX version 2 requires <dirent.h>
|
||||
# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L)
|
||||
# define BOOST_HAS_DIRENT_H
|
||||
# endif
|
||||
// POSIX version 2 requires <dirent.h>
|
||||
#if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L)
|
||||
#define BOOST_HAS_DIRENT_H
|
||||
#endif
|
||||
|
||||
// POSIX version 3 requires <signal.h> to have sigaction:
|
||||
# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L)
|
||||
# define BOOST_HAS_SIGACTION
|
||||
# endif
|
||||
// POSIX defines _POSIX_THREADS > 0 for pthread support,
|
||||
// however some platforms define _POSIX_THREADS without
|
||||
// a value, hence the (_POSIX_THREADS+0 >= 0) check.
|
||||
// Strictly speaking this may catch platforms with a
|
||||
// non-functioning stub <pthreads.h>, but such occurrences should
|
||||
// occur very rarely if at all.
|
||||
# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS)
|
||||
# define BOOST_HAS_PTHREADS
|
||||
# endif
|
||||
// POSIX version 3 requires <signal.h> to have sigaction:
|
||||
#if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L)
|
||||
#define BOOST_HAS_SIGACTION
|
||||
#endif
|
||||
// POSIX defines _POSIX_THREADS > 0 for pthread support,
|
||||
// however some platforms define _POSIX_THREADS without
|
||||
// a value, hence the (_POSIX_THREADS+0 >= 0) check.
|
||||
// Strictly speaking this may catch platforms with a
|
||||
// non-functioning stub <pthreads.h>, but such occurrences should
|
||||
// occur very rarely if at all.
|
||||
#if defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0) && !defined(BOOST_HAS_WINTHREADS) \
|
||||
&& !defined(BOOST_HAS_MPTASKS)
|
||||
#define BOOST_HAS_PTHREADS
|
||||
#endif
|
||||
|
||||
// BOOST_HAS_NANOSLEEP:
|
||||
// This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME:
|
||||
# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \
|
||||
|| (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
|
||||
# define BOOST_HAS_NANOSLEEP
|
||||
# endif
|
||||
|
||||
// BOOST_HAS_CLOCK_GETTIME:
|
||||
// This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME
|
||||
// but at least one platform - linux - defines that flag without
|
||||
// defining clock_gettime):
|
||||
# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0))
|
||||
# define BOOST_HAS_CLOCK_GETTIME
|
||||
# endif
|
||||
|
||||
// BOOST_HAS_SCHED_YIELD:
|
||||
// This is predicated on _POSIX_PRIORITY_SCHEDULING or
|
||||
// on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME.
|
||||
# if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\
|
||||
|| (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\
|
||||
|| (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
|
||||
# define BOOST_HAS_SCHED_YIELD
|
||||
# endif
|
||||
|
||||
// BOOST_HAS_GETTIMEOFDAY:
|
||||
// BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE:
|
||||
// These are predicated on _XOPEN_VERSION, and appears to be first released
|
||||
// in issue 4, version 2 (_XOPEN_VERSION > 500).
|
||||
// Likewise for the functions log1p and expm1.
|
||||
# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500)
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
# if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500)
|
||||
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
# endif
|
||||
# ifndef BOOST_HAS_LOG1P
|
||||
# define BOOST_HAS_LOG1P
|
||||
# endif
|
||||
# ifndef BOOST_HAS_EXPM1
|
||||
# define BOOST_HAS_EXPM1
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# endif
|
||||
// BOOST_HAS_NANOSLEEP:
|
||||
// This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME:
|
||||
#if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS + 0 >= 0)) || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME + 0 >= 0))
|
||||
#define BOOST_HAS_NANOSLEEP
|
||||
#endif
|
||||
|
||||
// BOOST_HAS_CLOCK_GETTIME:
|
||||
// This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME
|
||||
// but at least one platform - linux - defines that flag without
|
||||
// defining clock_gettime):
|
||||
#if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS + 0 >= 0))
|
||||
#define BOOST_HAS_CLOCK_GETTIME
|
||||
#endif
|
||||
|
||||
// BOOST_HAS_SCHED_YIELD:
|
||||
// This is predicated on _POSIX_PRIORITY_SCHEDULING or
|
||||
// on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME.
|
||||
#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING + 0 > 0) \
|
||||
|| (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING + 0 > 0)) \
|
||||
|| (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME + 0 >= 0))
|
||||
#define BOOST_HAS_SCHED_YIELD
|
||||
#endif
|
||||
|
||||
// BOOST_HAS_GETTIMEOFDAY:
|
||||
// BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE:
|
||||
// These are predicated on _XOPEN_VERSION, and appears to be first released
|
||||
// in issue 4, version 2 (_XOPEN_VERSION > 500).
|
||||
// Likewise for the functions log1p and expm1.
|
||||
#if defined(_XOPEN_VERSION) && (_XOPEN_VERSION + 0 >= 500)
|
||||
#define BOOST_HAS_GETTIMEOFDAY
|
||||
#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE + 0 >= 500)
|
||||
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
#endif
|
||||
#ifndef BOOST_HAS_LOG1P
|
||||
#define BOOST_HAS_LOG1P
|
||||
#endif
|
||||
#ifndef BOOST_HAS_EXPM1
|
||||
#define BOOST_HAS_EXPM1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright John Maddock 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2003.
|
||||
// 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)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#define BOOST_CONFIG_REQUIRES_THREADS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_DISABLE_THREADS)
|
||||
@@ -21,69 +21,77 @@
|
||||
// this is checked up to gcc 3.3:
|
||||
//
|
||||
#if defined(__sgi) || defined(__hpux)
|
||||
# error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)"
|
||||
#error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
# error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
|
||||
#error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
|
||||
|
||||
#elif !defined(BOOST_HAS_THREADS)
|
||||
|
||||
# if defined __COMO__
|
||||
#if defined __COMO__
|
||||
// Comeau C++
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_MT (Windows) or -D_REENTRANT (Unix)"
|
||||
#error \
|
||||
"Compiler threading support is not turned on. Please set the correct command line options for threading: -D_MT (Windows) or -D_REENTRANT (Unix)"
|
||||
|
||||
#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
|
||||
// Intel
|
||||
#ifdef _WIN32
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"
|
||||
#error \
|
||||
"Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"
|
||||
#else
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp"
|
||||
#error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp"
|
||||
#endif
|
||||
|
||||
# elif defined __GNUC__
|
||||
#elif defined __GNUC__
|
||||
// GNU C++:
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
|
||||
#error \
|
||||
"Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
|
||||
|
||||
#elif defined __sgi
|
||||
// SGI MIPSpro C++
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE"
|
||||
#error \
|
||||
"Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE"
|
||||
|
||||
#elif defined __DECCXX
|
||||
// Compaq Tru64 Unix cxx
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread"
|
||||
#error \
|
||||
"Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread"
|
||||
|
||||
#elif defined __BORLANDC__
|
||||
// Borland
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM"
|
||||
#error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM"
|
||||
|
||||
#elif defined __MWERKS__
|
||||
#elif defined __MWERKS__
|
||||
// Metrowerks CodeWarrior
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either -runtime sm, -runtime smd, -runtime dm, or -runtime dmd"
|
||||
#error \
|
||||
"Compiler threading support is not turned on. Please set the correct command line options for threading: either -runtime sm, -runtime smd, -runtime dm, or -runtime dmd"
|
||||
|
||||
#elif defined __SUNPRO_CC
|
||||
#elif defined __SUNPRO_CC
|
||||
// Sun Workshop Compiler C++
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt"
|
||||
#error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt"
|
||||
|
||||
#elif defined __HP_aCC
|
||||
// HP aCC
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt"
|
||||
#error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt"
|
||||
|
||||
#elif defined(__IBMCPP__)
|
||||
// IBM Visual Age
|
||||
# error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler"
|
||||
#error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler"
|
||||
|
||||
#elif defined _MSC_VER
|
||||
// Microsoft Visual C++
|
||||
//
|
||||
// Must remain the last #elif since some other vendors (Metrowerks, for
|
||||
// example) also #define _MSC_VER
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"
|
||||
#error \
|
||||
"Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"
|
||||
|
||||
#else
|
||||
|
||||
# error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use"
|
||||
#error \
|
||||
"Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use"
|
||||
|
||||
#endif // compilers
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost compiler configuration selection header file
|
||||
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Martin Wille 2003.
|
||||
// (C) Copyright Guillaume Melquiond 2003.
|
||||
//
|
||||
@@ -14,106 +14,107 @@
|
||||
// one identification macro for each of the
|
||||
// compilers we support:
|
||||
|
||||
# define BOOST_CXX_GCCXML 0
|
||||
# define BOOST_CXX_COMO 0
|
||||
# define BOOST_CXX_DMC 0
|
||||
# define BOOST_CXX_INTEL 0
|
||||
# define BOOST_CXX_GNUC 0
|
||||
# define BOOST_CXX_KCC 0
|
||||
# define BOOST_CXX_SGI 0
|
||||
# define BOOST_CXX_TRU64 0
|
||||
# define BOOST_CXX_GHS 0
|
||||
# define BOOST_CXX_BORLAND 0
|
||||
# define BOOST_CXX_CW 0
|
||||
# define BOOST_CXX_SUNPRO 0
|
||||
# define BOOST_CXX_HPACC 0
|
||||
# define BOOST_CXX_MPW 0
|
||||
# define BOOST_CXX_IBMCPP 0
|
||||
# define BOOST_CXX_MSVC 0
|
||||
# define BOOST_CXX_PGI 0
|
||||
#define BOOST_CXX_GCCXML 0
|
||||
#define BOOST_CXX_COMO 0
|
||||
#define BOOST_CXX_DMC 0
|
||||
#define BOOST_CXX_INTEL 0
|
||||
#define BOOST_CXX_GNUC 0
|
||||
#define BOOST_CXX_KCC 0
|
||||
#define BOOST_CXX_SGI 0
|
||||
#define BOOST_CXX_TRU64 0
|
||||
#define BOOST_CXX_GHS 0
|
||||
#define BOOST_CXX_BORLAND 0
|
||||
#define BOOST_CXX_CW 0
|
||||
#define BOOST_CXX_SUNPRO 0
|
||||
#define BOOST_CXX_HPACC 0
|
||||
#define BOOST_CXX_MPW 0
|
||||
#define BOOST_CXX_IBMCPP 0
|
||||
#define BOOST_CXX_MSVC 0
|
||||
#define BOOST_CXX_PGI 0
|
||||
|
||||
|
||||
// locate which compiler we are using and define
|
||||
// BOOST_COMPILER_CONFIG as needed:
|
||||
// BOOST_COMPILER_CONFIG as needed:
|
||||
|
||||
#if defined(__GCCXML__)
|
||||
// GCC-XML emulates other compilers, it has to appear first here!
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
|
||||
|
||||
#elif defined __COMO__
|
||||
// Comeau C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
|
||||
|
||||
#elif defined __DMC__
|
||||
// Digital Mars C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp"
|
||||
|
||||
#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
|
||||
// Intel
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp"
|
||||
|
||||
# elif defined __GNUC__
|
||||
#elif defined __GNUC__
|
||||
// GNU C++:
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp"
|
||||
|
||||
#elif defined __KCC
|
||||
// Kai C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp"
|
||||
|
||||
#elif defined __sgi
|
||||
// SGI MIPSpro C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp"
|
||||
|
||||
#elif defined __DECCXX
|
||||
// Compaq Tru64 Unix cxx
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp"
|
||||
|
||||
#elif defined __ghs
|
||||
// Greenhills C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp"
|
||||
|
||||
#elif defined __CODEGEARC__
|
||||
// CodeGear - must be checked for before Borland
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp"
|
||||
|
||||
#elif defined __BORLANDC__
|
||||
// Borland
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp"
|
||||
|
||||
#elif defined __MWERKS__
|
||||
#elif defined __MWERKS__
|
||||
// Metrowerks CodeWarrior
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp"
|
||||
|
||||
#elif defined __SUNPRO_CC
|
||||
#elif defined __SUNPRO_CC
|
||||
// Sun Workshop Compiler C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp"
|
||||
|
||||
#elif defined __HP_aCC
|
||||
// HP aCC
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp"
|
||||
|
||||
#elif defined(__MRC__) || defined(__SC__)
|
||||
// MPW MrCpp or SCpp
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp"
|
||||
|
||||
#elif defined(__IBMCPP__)
|
||||
// IBM Visual Age
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp"
|
||||
|
||||
#elif defined(__PGI)
|
||||
// Portland Group Inc.
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp"
|
||||
|
||||
#elif defined _MSC_VER
|
||||
// Microsoft Visual C++
|
||||
//
|
||||
// Must remain the last #elif since some other vendors (Metrowerks, for
|
||||
// example) also #define _MSC_VER
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp"
|
||||
#define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp"
|
||||
|
||||
#elif defined (BOOST_ASSERT_CONFIG)
|
||||
#elif defined(BOOST_ASSERT_CONFIG)
|
||||
// this must come last - generate an error if we don't
|
||||
// recognise the compiler:
|
||||
# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)"
|
||||
#error \
|
||||
"Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Boost compiler configuration selection header file
|
||||
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// 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.
|
||||
@@ -13,82 +13,76 @@
|
||||
// <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__)
|
||||
// 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"
|
||||
#define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp"
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
// BSD:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp"
|
||||
#define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp"
|
||||
|
||||
#elif defined(sun) || defined(__sun)
|
||||
// solaris:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp"
|
||||
#define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp"
|
||||
|
||||
#elif defined(__sgi)
|
||||
// SGI Irix:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp"
|
||||
#define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp"
|
||||
|
||||
#elif defined(__hpux)
|
||||
// hp unix:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp"
|
||||
#define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp"
|
||||
|
||||
#elif defined(__CYGWIN__)
|
||||
// cygwin is not win32:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp"
|
||||
#define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp"
|
||||
|
||||
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||
// win32:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp"
|
||||
#define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp"
|
||||
|
||||
#elif defined(__BEOS__)
|
||||
// BeOS
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"
|
||||
#define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"
|
||||
|
||||
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
|
||||
// MacOS
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp"
|
||||
#define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp"
|
||||
|
||||
#elif defined(__IBMCPP__) || defined(_AIX)
|
||||
// IBM
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp"
|
||||
#define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp"
|
||||
|
||||
#elif defined(__amigaos__)
|
||||
// AmigaOS
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp"
|
||||
#define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp"
|
||||
|
||||
#elif defined(__QNXNTO__)
|
||||
// QNX:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp"
|
||||
#define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp"
|
||||
|
||||
#elif defined(__VXWORKS__)
|
||||
// vxWorks:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp"
|
||||
#define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp"
|
||||
|
||||
#else
|
||||
|
||||
# if defined(unix) \
|
||||
|| defined(__unix) \
|
||||
|| defined(_XOPEN_SOURCE) \
|
||||
|| defined(_POSIX_SOURCE)
|
||||
#if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)
|
||||
|
||||
// generic unix platform:
|
||||
// generic unix platform:
|
||||
|
||||
# ifndef BOOST_HAS_UNISTD_H
|
||||
# define BOOST_HAS_UNISTD_H
|
||||
# endif
|
||||
#ifndef BOOST_HAS_UNISTD_H
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#endif
|
||||
|
||||
# include <boost/config/posix_features.hpp>
|
||||
|
||||
# endif
|
||||
|
||||
# if defined (BOOST_ASSERT_CONFIG)
|
||||
// this must come last - generate an error if we don't
|
||||
// recognise the platform:
|
||||
# error "Unknown platform - please configure and report the results to boost.org"
|
||||
# endif
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_ASSERT_CONFIG)
|
||||
// this must come last - generate an error if we don't
|
||||
// recognise the platform:
|
||||
#error "Unknown platform - please configure and report the results to boost.org"
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Boost compiler configuration selection header file
|
||||
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001 - 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001 - 2002.
|
||||
// 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)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed:
|
||||
|
||||
// First include <cstddef> to determine if some version of STLport is in use as the std lib
|
||||
// (do not rely on this header being included since users can short-circuit this header
|
||||
// (do not rely on this header being included since users can short-circuit this header
|
||||
// if they know whose std lib they are using.)
|
||||
#include <cstddef>
|
||||
|
||||
@@ -20,15 +20,15 @@
|
||||
// STLPort library; this _must_ come first, otherwise since
|
||||
// STLport typically sits on top of some other library, we
|
||||
// can end up detecting that first rather than STLport:
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp"
|
||||
#define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp"
|
||||
|
||||
#else
|
||||
|
||||
// If our std lib was not some version of STLport, then include <utility> as it is about
|
||||
// If our std lib was not some version of STLport, then include <utility> as it is about
|
||||
// the smallest of the std lib headers that includes real C++ stuff. (Some std libs do not
|
||||
// include their C++-related macros in <cstddef> so this additional include makes sure
|
||||
// we get those definitions)
|
||||
// (again do not rely on this header being included since users can short-circuit this
|
||||
// (again do not rely on this header being included since users can short-circuit this
|
||||
// header if they know whose std lib they are using.)
|
||||
#include <boost/config/no_tr1/utility.hpp>
|
||||
|
||||
@@ -38,40 +38,37 @@
|
||||
|
||||
#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
|
||||
// Rogue Wave library:
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp"
|
||||
#define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp"
|
||||
|
||||
#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
|
||||
// GNU libstdc++ 3
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp"
|
||||
#define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp"
|
||||
|
||||
#elif defined(__STL_CONFIG_H)
|
||||
// generic SGI STL
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp"
|
||||
#define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp"
|
||||
|
||||
#elif defined(__MSL_CPP__)
|
||||
// MSL standard lib:
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp"
|
||||
#define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp"
|
||||
|
||||
#elif defined(__IBMCPP__)
|
||||
// take the default VACPP std lib
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp"
|
||||
#define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp"
|
||||
|
||||
#elif defined(MSIPL_COMPILE_H)
|
||||
// Modena C++ standard library
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp"
|
||||
#define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp"
|
||||
|
||||
#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
|
||||
// Dinkumware Library (this has to appear after any possible replacement libraries):
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp"
|
||||
#define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp"
|
||||
|
||||
#elif defined (BOOST_ASSERT_CONFIG)
|
||||
#elif defined(BOOST_ASSERT_CONFIG)
|
||||
// this must come last - generate an error if we don't
|
||||
// recognise the library:
|
||||
# error "Unknown standard library - please configure and report the results to boost.org"
|
||||
#error "Unknown standard library - please configure and report the results to boost.org"
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,119 +20,112 @@
|
||||
|
||||
|
||||
#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306)
|
||||
// full dinkumware 3.06 and above
|
||||
// fully conforming provided the compiler supports it:
|
||||
# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
# endif
|
||||
# if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC)
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
# endif
|
||||
# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
||||
# if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
|
||||
// if this lib version is set up for vc6 then there is no std::use_facet:
|
||||
# define BOOST_NO_STD_USE_FACET
|
||||
# define BOOST_HAS_TWO_ARG_USE_FACET
|
||||
// C lib functions aren't in namespace std either:
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
// and nor is <exception>
|
||||
# define BOOST_NO_EXCEPTION_STD_NAMESPACE
|
||||
# endif
|
||||
// full dinkumware 3.06 and above
|
||||
// fully conforming provided the compiler supports it:
|
||||
#if !(defined(_GLOBAL_USING) && (_GLOBAL_USING + 0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) \
|
||||
&& !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h
|
||||
#define BOOST_NO_STDC_NAMESPACE
|
||||
#endif
|
||||
#if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND + 0 > 0)) \
|
||||
&& !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC)
|
||||
#define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
#define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
||||
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
|
||||
// if this lib version is set up for vc6 then there is no std::use_facet:
|
||||
#define BOOST_NO_STD_USE_FACET
|
||||
#define BOOST_HAS_TWO_ARG_USE_FACET
|
||||
// C lib functions aren't in namespace std either:
|
||||
#define BOOST_NO_STDC_NAMESPACE
|
||||
// and nor is <exception>
|
||||
#define BOOST_NO_EXCEPTION_STD_NAMESPACE
|
||||
#endif
|
||||
// There's no numeric_limits<long long> support unless _LONGLONG is defined:
|
||||
# if !defined(_LONGLONG) && (_CPPLIB_VER <= 310)
|
||||
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
# endif
|
||||
#if !defined(_LONGLONG) && (_CPPLIB_VER <= 310)
|
||||
#define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
#endif
|
||||
// 3.06 appears to have (non-sgi versions of) <hash_set> & <hash_map>,
|
||||
// and no <slist> at all
|
||||
#else
|
||||
# define BOOST_MSVC_STD_ITERATOR 1
|
||||
# define BOOST_NO_STD_ITERATOR
|
||||
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
# define BOOST_NO_STD_USE_FACET
|
||||
# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
|
||||
# define BOOST_HAS_MACRO_USE_FACET
|
||||
# ifndef _CPPLIB_VER
|
||||
// Updated Dinkum library defines this, and provides
|
||||
// its own min and max definitions, as does MTA version.
|
||||
# ifndef __MTA__
|
||||
# define BOOST_NO_STD_MIN_MAX
|
||||
# endif
|
||||
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
# endif
|
||||
#define BOOST_MSVC_STD_ITERATOR 1
|
||||
#define BOOST_NO_STD_ITERATOR
|
||||
#define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
#define BOOST_NO_STD_ALLOCATOR
|
||||
#define BOOST_NO_STDC_NAMESPACE
|
||||
#define BOOST_NO_STD_USE_FACET
|
||||
#define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
|
||||
#define BOOST_HAS_MACRO_USE_FACET
|
||||
#ifndef _CPPLIB_VER
|
||||
// Updated Dinkum library defines this, and provides
|
||||
// its own min and max definitions, as does MTA version.
|
||||
#ifndef __MTA__
|
||||
#define BOOST_NO_STD_MIN_MAX
|
||||
#endif
|
||||
#define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// std extension namespace is stdext for vc7.1 and later,
|
||||
// std extension namespace is stdext for vc7.1 and later,
|
||||
// the same applies to other compilers that sit on top
|
||||
// of vc7.1 (Intel and Comeau):
|
||||
//
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__)
|
||||
# define BOOST_STD_EXTENSION_NAMESPACE stdext
|
||||
#define BOOST_STD_EXTENSION_NAMESPACE stdext
|
||||
#endif
|
||||
|
||||
|
||||
#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306)
|
||||
// if we're using a dinkum lib that's
|
||||
// been configured for VC6/7 then there is
|
||||
// no iterator traits (true even for icl)
|
||||
# define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
// if we're using a dinkum lib that's
|
||||
// been configured for VC6/7 then there is
|
||||
// no iterator traits (true even for icl)
|
||||
#define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
#endif
|
||||
|
||||
#if defined(__ICL) && (__ICL < 800) && defined(_CPPLIB_VER) && (_CPPLIB_VER <= 310)
|
||||
// Intel C++ chokes over any non-trivial use of <locale>
|
||||
// this may be an overly restrictive define, but regex fails without it:
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
#define BOOST_NO_STD_LOCALE
|
||||
#endif
|
||||
|
||||
// C++0x headers implemented in 520 (as shipped by Microsoft)
|
||||
//
|
||||
#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
#define BOOST_NO_0X_HDR_ARRAY
|
||||
#define BOOST_NO_0X_HDR_CODECVT
|
||||
#define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
#define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_0X_HDR_RANDOM
|
||||
#define BOOST_NO_0X_HDR_REGEX
|
||||
#define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
#define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
#define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
#endif
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_THREAD
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
#define BOOST_NO_0X_HDR_CHRONO
|
||||
#define BOOST_NO_0X_HDR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_FUTURE
|
||||
#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MUTEX
|
||||
#define BOOST_NO_0X_HDR_RATIO
|
||||
#define BOOST_NO_0X_HDR_THREAD
|
||||
#define BOOST_NO_0X_HDR_TUPLE
|
||||
|
||||
#ifdef _CPPLIB_VER
|
||||
# define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER
|
||||
#define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER
|
||||
#else
|
||||
# define BOOST_DINKUMWARE_STDLIB 1
|
||||
#define BOOST_DINKUMWARE_STDLIB 1
|
||||
#endif
|
||||
|
||||
#ifdef _CPPLIB_VER
|
||||
# define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER)
|
||||
#define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER)
|
||||
#else
|
||||
# define BOOST_STDLIB "Dinkumware standard library version 1.x"
|
||||
#define BOOST_STDLIB "Dinkumware standard library version 1.x"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// (C) Copyright John Maddock 2002 - 2003.
|
||||
// (C) Copyright Jens Maurer 2002 - 2003.
|
||||
// (C) Copyright Beman Dawes 2002 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2002 - 2003.
|
||||
// (C) Copyright Jens Maurer 2002 - 2003.
|
||||
// (C) Copyright Beman Dawes 2002 - 2003.
|
||||
// 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.
|
||||
@@ -10,10 +10,10 @@
|
||||
// Comeau STL:
|
||||
|
||||
#if !defined(__LIBCOMO__)
|
||||
# include <boost/config/no_tr1/utility.hpp>
|
||||
# if !defined(__LIBCOMO__)
|
||||
# error "This is not the Comeau STL!"
|
||||
# endif
|
||||
#include <boost/config/no_tr1/utility.hpp>
|
||||
#if !defined(__LIBCOMO__)
|
||||
#error "This is not the Comeau STL!"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -21,7 +21,7 @@
|
||||
// NOTE: versions of libcomo prior to beta28 have octal version numbering,
|
||||
// e.g. version 25 is 21 (dec)
|
||||
#if __LIBCOMO_VERSION__ <= 22
|
||||
# define BOOST_NO_STD_WSTREAMBUF
|
||||
#define BOOST_NO_STD_WSTREAMBUF
|
||||
#endif
|
||||
|
||||
#if (__LIBCOMO_VERSION__ <= 31) && defined(_WIN32)
|
||||
@@ -29,34 +29,34 @@
|
||||
#endif
|
||||
|
||||
#if __LIBCOMO_VERSION__ >= 31
|
||||
# define BOOST_HAS_HASH
|
||||
# define BOOST_HAS_SLIST
|
||||
#define BOOST_HAS_HASH
|
||||
#define BOOST_HAS_SLIST
|
||||
#endif
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_0X_HDR_THREAD
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
# define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
#define BOOST_NO_0X_HDR_ARRAY
|
||||
#define BOOST_NO_0X_HDR_CHRONO
|
||||
#define BOOST_NO_0X_HDR_CODECVT
|
||||
#define BOOST_NO_0X_HDR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
#define BOOST_NO_0X_HDR_FUTURE
|
||||
#define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MUTEX
|
||||
#define BOOST_NO_0X_HDR_RANDOM
|
||||
#define BOOST_NO_0X_HDR_RATIO
|
||||
#define BOOST_NO_0X_HDR_REGEX
|
||||
#define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
#define BOOST_NO_0X_HDR_THREAD
|
||||
#define BOOST_NO_0X_HDR_TUPLE
|
||||
#define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
#define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
|
||||
//
|
||||
// Intrinsic type_traits support.
|
||||
@@ -67,5 +67,3 @@
|
||||
#define BOOST_HAS_SGI_TYPE_TRAITS
|
||||
|
||||
#define BOOST_STDLIB "Comeau standard library " BOOST_STRINGIZE(__LIBCOMO_VERSION__)
|
||||
|
||||
|
||||
|
||||
@@ -16,65 +16,61 @@
|
||||
#endif
|
||||
|
||||
#if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T)
|
||||
# define BOOST_NO_CWCHAR
|
||||
# define BOOST_NO_CWCTYPE
|
||||
# define BOOST_NO_STD_WSTRING
|
||||
# define BOOST_NO_STD_WSTREAMBUF
|
||||
#define BOOST_NO_CWCHAR
|
||||
#define BOOST_NO_CWCTYPE
|
||||
#define BOOST_NO_STD_WSTRING
|
||||
#define BOOST_NO_STD_WSTREAMBUF
|
||||
#endif
|
||||
|
||||
#if defined(__osf__) && !defined(_REENTRANT) \
|
||||
&& ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) )
|
||||
&& (defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT))
|
||||
// GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header
|
||||
// file is included, therefore for consistency we define it here as well.
|
||||
# define _REENTRANT
|
||||
#define _REENTRANT
|
||||
#endif
|
||||
|
||||
#ifdef __GLIBCXX__ // gcc 3.4 and greater:
|
||||
# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
|
||||
|| defined(_GLIBCXX__PTHREADS)
|
||||
//
|
||||
// If the std lib has thread support turned on, then turn it on in Boost
|
||||
// as well. We do this because some gcc-3.4 std lib headers define _REENTANT
|
||||
// while others do not...
|
||||
//
|
||||
# define BOOST_HAS_THREADS
|
||||
# else
|
||||
# define BOOST_DISABLE_THREADS
|
||||
# endif
|
||||
#elif defined(__GLIBCPP__) \
|
||||
&& !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \
|
||||
&& !defined(_GLIBCPP__PTHREADS)
|
||||
// disable thread support if the std lib was built single threaded:
|
||||
# define BOOST_DISABLE_THREADS
|
||||
#if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCXX__PTHREADS)
|
||||
//
|
||||
// If the std lib has thread support turned on, then turn it on in Boost
|
||||
// as well. We do this because some gcc-3.4 std lib headers define _REENTANT
|
||||
// while others do not...
|
||||
//
|
||||
#define BOOST_HAS_THREADS
|
||||
#else
|
||||
#define BOOST_DISABLE_THREADS
|
||||
#endif
|
||||
#elif defined(__GLIBCPP__) && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) && !defined(_GLIBCPP__PTHREADS)
|
||||
// disable thread support if the std lib was built single threaded:
|
||||
#define BOOST_DISABLE_THREADS
|
||||
#endif
|
||||
|
||||
#if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT)
|
||||
#if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) \
|
||||
&& defined(_GLIBCPP_HAVE_GTHR_DEFAULT)
|
||||
// linux on arm apparently doesn't define _REENTRANT
|
||||
// so just turn on threading support whenever the std lib is thread safe:
|
||||
# define BOOST_HAS_THREADS
|
||||
#define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(_GLIBCPP_USE_LONG_LONG) \
|
||||
&& !defined(_GLIBCXX_USE_LONG_LONG)\
|
||||
&& defined(BOOST_HAS_LONG_LONG)
|
||||
#if !defined(_GLIBCPP_USE_LONG_LONG) && !defined(_GLIBCXX_USE_LONG_LONG) && defined(BOOST_HAS_LONG_LONG)
|
||||
// May have been set by compiler/*.hpp, but "long long" without library
|
||||
// support is useless.
|
||||
# undef BOOST_HAS_LONG_LONG
|
||||
#undef BOOST_HAS_LONG_LONG
|
||||
#endif
|
||||
|
||||
#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0
|
||||
# define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx
|
||||
# define BOOST_HAS_SLIST
|
||||
# define BOOST_HAS_HASH
|
||||
# define BOOST_SLIST_HEADER <ext/slist>
|
||||
# if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
|
||||
# define BOOST_HASH_SET_HEADER <ext/hash_set>
|
||||
# define BOOST_HASH_MAP_HEADER <ext/hash_map>
|
||||
# else
|
||||
# define BOOST_HASH_SET_HEADER <backward/hash_set>
|
||||
# define BOOST_HASH_MAP_HEADER <backward/hash_map>
|
||||
# endif
|
||||
#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__ >= 20020514) // GCC >= 3.1.0
|
||||
#define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx
|
||||
#define BOOST_HAS_SLIST
|
||||
#define BOOST_HAS_HASH
|
||||
#define BOOST_SLIST_HEADER <ext/slist>
|
||||
#if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
|
||||
#define BOOST_HASH_SET_HEADER <ext/hash_set>
|
||||
#define BOOST_HASH_MAP_HEADER <ext/hash_map>
|
||||
#else
|
||||
#define BOOST_HASH_SET_HEADER <backward/hash_set>
|
||||
#define BOOST_HASH_MAP_HEADER <backward/hash_map>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly
|
||||
@@ -92,36 +88,36 @@
|
||||
// C++0x headers in GCC 4.3.0 and later
|
||||
//
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
# define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
#define BOOST_NO_0X_HDR_ARRAY
|
||||
#define BOOST_NO_0X_HDR_RANDOM
|
||||
#define BOOST_NO_0X_HDR_REGEX
|
||||
#define BOOST_NO_0X_HDR_TUPLE
|
||||
#define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
#define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
#endif
|
||||
|
||||
// C++0x headers in GCC 4.4.0 and later
|
||||
//
|
||||
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_0X_HDR_THREAD
|
||||
#define BOOST_NO_0X_HDR_CHRONO
|
||||
#define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
#define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
#define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_0X_HDR_MUTEX
|
||||
#define BOOST_NO_0X_HDR_RATIO
|
||||
#define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
#define BOOST_NO_0X_HDR_THREAD
|
||||
#endif
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_CODECVT
|
||||
#define BOOST_NO_0X_HDR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_FUTURE
|
||||
#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
|
||||
// --- end ---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// 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.
|
||||
@@ -8,10 +8,10 @@
|
||||
// Modena C++ standard library (comes with KAI C++)
|
||||
|
||||
#if !defined(MSIPL_COMPILE_H)
|
||||
# include <boost/config/no_tr1/utility.hpp>
|
||||
# if !defined(__MSIPL_COMPILE_H)
|
||||
# error "This is not the Modena C++ library!"
|
||||
# endif
|
||||
#include <boost/config/no_tr1/utility.hpp>
|
||||
#if !defined(__MSIPL_COMPILE_H)
|
||||
#error "This is not the Modena C++ library!"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef MSIPL_NL_TYPES
|
||||
@@ -24,32 +24,27 @@
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_0X_HDR_THREAD
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
# define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
#define BOOST_NO_0X_HDR_ARRAY
|
||||
#define BOOST_NO_0X_HDR_CHRONO
|
||||
#define BOOST_NO_0X_HDR_CODECVT
|
||||
#define BOOST_NO_0X_HDR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
#define BOOST_NO_0X_HDR_FUTURE
|
||||
#define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MUTEX
|
||||
#define BOOST_NO_0X_HDR_RANDOM
|
||||
#define BOOST_NO_0X_HDR_RATIO
|
||||
#define BOOST_NO_0X_HDR_REGEX
|
||||
#define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
#define BOOST_NO_0X_HDR_THREAD
|
||||
#define BOOST_NO_0X_HDR_TUPLE
|
||||
#define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
#define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
|
||||
#define BOOST_STDLIB "Modena C++ standard library"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// 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.
|
||||
@@ -9,75 +9,66 @@
|
||||
// Metrowerks standard library:
|
||||
|
||||
#ifndef __MSL_CPP__
|
||||
# include <boost/config/no_tr1/utility.hpp>
|
||||
# ifndef __MSL_CPP__
|
||||
# error This is not the MSL standard library!
|
||||
# endif
|
||||
#include <boost/config/no_tr1/utility.hpp>
|
||||
#ifndef __MSL_CPP__
|
||||
#error This is not the MSL standard library!
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if __MSL_CPP__ >= 0x6000 // Pro 6
|
||||
# define BOOST_HAS_HASH
|
||||
# define BOOST_STD_EXTENSION_NAMESPACE Metrowerks
|
||||
#if __MSL_CPP__ >= 0x6000 // Pro 6
|
||||
#define BOOST_HAS_HASH
|
||||
#define BOOST_STD_EXTENSION_NAMESPACE Metrowerks
|
||||
#endif
|
||||
#define BOOST_HAS_SLIST
|
||||
|
||||
#if __MSL_CPP__ < 0x6209
|
||||
# define BOOST_NO_STD_MESSAGES
|
||||
#define BOOST_NO_STD_MESSAGES
|
||||
#endif
|
||||
|
||||
// check C lib version for <stdint.h>
|
||||
#include <cstddef>
|
||||
|
||||
#if defined(__MSL__) && (__MSL__ >= 0x5000)
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# if !defined(__PALMOS_TRAPS__)
|
||||
# define BOOST_HAS_UNISTD_H
|
||||
# endif
|
||||
// boilerplate code:
|
||||
# include <boost/config/posix_features.hpp>
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#if !defined(__PALMOS_TRAPS__)
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#endif
|
||||
// boilerplate code:
|
||||
#include <boost/config/posix_features.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(_MWMT) || _MSL_THREADSAFE
|
||||
# define BOOST_HAS_THREADS
|
||||
#define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
#ifdef _MSL_NO_EXPLICIT_FUNC_TEMPLATE_ARG
|
||||
# define BOOST_NO_STD_USE_FACET
|
||||
# define BOOST_HAS_TWO_ARG_USE_FACET
|
||||
#define BOOST_NO_STD_USE_FACET
|
||||
#define BOOST_HAS_TWO_ARG_USE_FACET
|
||||
#endif
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_0X_HDR_THREAD
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
# define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
#define BOOST_NO_0X_HDR_ARRAY
|
||||
#define BOOST_NO_0X_HDR_CHRONO
|
||||
#define BOOST_NO_0X_HDR_CODECVT
|
||||
#define BOOST_NO_0X_HDR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
#define BOOST_NO_0X_HDR_FUTURE
|
||||
#define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MUTEX
|
||||
#define BOOST_NO_0X_HDR_RANDOM
|
||||
#define BOOST_NO_0X_HDR_RATIO
|
||||
#define BOOST_NO_0X_HDR_REGEX
|
||||
#define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
#define BOOST_NO_0X_HDR_THREAD
|
||||
#define BOOST_NO_0X_HDR_TUPLE
|
||||
#define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
#define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
|
||||
#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// (C) Copyright David Abrahams 2003.
|
||||
// (C) Copyright Boris Gubenko 2007.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// (C) Copyright David Abrahams 2003.
|
||||
// (C) Copyright Boris Gubenko 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)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
@@ -11,32 +11,32 @@
|
||||
// Rogue Wave std lib:
|
||||
|
||||
#if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)
|
||||
# include <boost/config/no_tr1/utility.hpp>
|
||||
# if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)
|
||||
# error This is not the Rogue Wave standard library
|
||||
# endif
|
||||
#include <boost/config/no_tr1/utility.hpp>
|
||||
#if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)
|
||||
#error This is not the Rogue Wave standard library
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
// figure out a consistent version number:
|
||||
//
|
||||
#ifndef _RWSTD_VER
|
||||
# define BOOST_RWSTD_VER 0x010000
|
||||
#define BOOST_RWSTD_VER 0x010000
|
||||
#elif _RWSTD_VER < 0x010000
|
||||
# define BOOST_RWSTD_VER (_RWSTD_VER << 8)
|
||||
#define BOOST_RWSTD_VER (_RWSTD_VER << 8)
|
||||
#else
|
||||
# define BOOST_RWSTD_VER _RWSTD_VER
|
||||
#define BOOST_RWSTD_VER _RWSTD_VER
|
||||
#endif
|
||||
|
||||
#ifndef _RWSTD_VER
|
||||
# define BOOST_STDLIB "Rogue Wave standard library version (Unknown version)"
|
||||
#define BOOST_STDLIB "Rogue Wave standard library version (Unknown version)"
|
||||
#elif _RWSTD_VER < 0x04010200
|
||||
# define BOOST_STDLIB "Rogue Wave standard library version " BOOST_STRINGIZE(_RWSTD_VER)
|
||||
#define BOOST_STDLIB "Rogue Wave standard library version " BOOST_STRINGIZE(_RWSTD_VER)
|
||||
#else
|
||||
# ifdef _RWSTD_VER_STR
|
||||
# define BOOST_STDLIB "Apache STDCXX standard library version " _RWSTD_VER_STR
|
||||
# else
|
||||
# define BOOST_STDLIB "Apache STDCXX standard library version " BOOST_STRINGIZE(_RWSTD_VER)
|
||||
# endif
|
||||
#ifdef _RWSTD_VER_STR
|
||||
#define BOOST_STDLIB "Apache STDCXX standard library version " _RWSTD_VER_STR
|
||||
#else
|
||||
#define BOOST_STDLIB "Apache STDCXX standard library version " BOOST_STRINGIZE(_RWSTD_VER)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -45,34 +45,35 @@
|
||||
// template do:
|
||||
//
|
||||
#if BOOST_RWSTD_VER < 0x020200
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
#define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
#endif
|
||||
|
||||
// Sun CC 5.5 patch 113817-07 adds long long specialization, but does not change the
|
||||
// library version number (http://sunsolve6.sun.com/search/document.do?assetkey=1-21-113817):
|
||||
#if BOOST_RWSTD_VER <= 0x020101 && (!defined(__SUNPRO_CC) || (__SUNPRO_CC < 0x550))
|
||||
# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
|
||||
# endif
|
||||
#define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Borland version of numeric_limits lacks __int64 specialisation:
|
||||
//
|
||||
#ifdef __BORLANDC__
|
||||
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
#define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
#endif
|
||||
|
||||
//
|
||||
// No std::iterator if it can't figure out default template args:
|
||||
//
|
||||
#if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || (BOOST_RWSTD_VER < 0x020000)
|
||||
# define BOOST_NO_STD_ITERATOR
|
||||
#if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) \
|
||||
|| (BOOST_RWSTD_VER < 0x020000)
|
||||
#define BOOST_NO_STD_ITERATOR
|
||||
#endif
|
||||
|
||||
//
|
||||
// No iterator traits without partial specialization:
|
||||
//
|
||||
#if defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) || defined(RWSTD_NO_CLASS_PARTIAL_SPEC)
|
||||
# define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
#define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -80,17 +81,17 @@
|
||||
// new-style iostreams, and no conformant std::allocator:
|
||||
//
|
||||
#if (BOOST_RWSTD_VER < 0x020000)
|
||||
# define BOOST_NO_AUTO_PTR
|
||||
# define BOOST_NO_STRINGSTREAM
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
#define BOOST_NO_AUTO_PTR
|
||||
#define BOOST_NO_STRINGSTREAM
|
||||
#define BOOST_NO_STD_ALLOCATOR
|
||||
#define BOOST_NO_STD_LOCALE
|
||||
#endif
|
||||
|
||||
//
|
||||
// No template iterator constructors without member template support:
|
||||
//
|
||||
#if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(_RWSTD_NO_MEMBER_TEMPLATES)
|
||||
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
#define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -99,15 +100,15 @@
|
||||
// on HP aCC systems even though the allocator is in fact broken):
|
||||
//
|
||||
#if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100)
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
#define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
//
|
||||
// If we have a std::locale, we still may not have std::use_facet:
|
||||
//
|
||||
#if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(BOOST_NO_STD_LOCALE)
|
||||
# define BOOST_NO_STD_USE_FACET
|
||||
# define BOOST_HAS_TWO_ARG_USE_FACET
|
||||
#define BOOST_NO_STD_USE_FACET
|
||||
#define BOOST_HAS_TWO_ARG_USE_FACET
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -115,7 +116,7 @@
|
||||
// partial specialization support:
|
||||
//
|
||||
#if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
|
||||
#define BOOST_NO_STD_DISTANCE
|
||||
#define BOOST_NO_STD_DISTANCE
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -123,57 +124,56 @@
|
||||
// OutputIterators:
|
||||
//
|
||||
#if BOOST_RWSTD_VER < 0x020100
|
||||
# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
|
||||
#define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
|
||||
#endif
|
||||
|
||||
//
|
||||
// Disable BOOST_HAS_LONG_LONG when the library has no support for it.
|
||||
//
|
||||
#if !defined(_RWSTD_LONG_LONG) && defined(BOOST_HAS_LONG_LONG)
|
||||
# undef BOOST_HAS_LONG_LONG
|
||||
#undef BOOST_HAS_LONG_LONG
|
||||
#endif
|
||||
|
||||
//
|
||||
// check that on HP-UX, the proper RW library is used
|
||||
//
|
||||
#if defined(__HP_aCC) && !defined(_HP_NAMESPACE_STD)
|
||||
# error "Boost requires Standard RW library. Please compile and link with -AA"
|
||||
#error "Boost requires Standard RW library. Please compile and link with -AA"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Define macros specific to RW V2.2 on HP-UX
|
||||
//
|
||||
#if defined(__HP_aCC) && (BOOST_RWSTD_VER == 0x02020100)
|
||||
# ifndef __HP_TC1_MAKE_PAIR
|
||||
# define __HP_TC1_MAKE_PAIR
|
||||
# endif
|
||||
# ifndef _HP_INSTANTIATE_STD2_VL
|
||||
# define _HP_INSTANTIATE_STD2_VL
|
||||
# endif
|
||||
#ifndef __HP_TC1_MAKE_PAIR
|
||||
#define __HP_TC1_MAKE_PAIR
|
||||
#endif
|
||||
#ifndef _HP_INSTANTIATE_STD2_VL
|
||||
#define _HP_INSTANTIATE_STD2_VL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_0X_HDR_THREAD
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
# define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
|
||||
#define BOOST_NO_0X_HDR_ARRAY
|
||||
#define BOOST_NO_0X_HDR_CHRONO
|
||||
#define BOOST_NO_0X_HDR_CODECVT
|
||||
#define BOOST_NO_0X_HDR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
#define BOOST_NO_0X_HDR_FUTURE
|
||||
#define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MUTEX
|
||||
#define BOOST_NO_0X_HDR_RANDOM
|
||||
#define BOOST_NO_0X_HDR_RATIO
|
||||
#define BOOST_NO_0X_HDR_REGEX
|
||||
#define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
#define BOOST_NO_0X_HDR_THREAD
|
||||
#define BOOST_NO_0X_HDR_TUPLE
|
||||
#define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
#define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// 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.
|
||||
@@ -10,34 +10,33 @@
|
||||
// generic SGI STL:
|
||||
|
||||
#if !defined(__STL_CONFIG_H)
|
||||
# include <boost/config/no_tr1/utility.hpp>
|
||||
# if !defined(__STL_CONFIG_H)
|
||||
# error "This is not the SGI STL!"
|
||||
# endif
|
||||
#include <boost/config/no_tr1/utility.hpp>
|
||||
#if !defined(__STL_CONFIG_H)
|
||||
#error "This is not the SGI STL!"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// No std::iterator traits without partial specialisation:
|
||||
//
|
||||
#if !defined(__STL_CLASS_PARTIAL_SPECIALIZATION)
|
||||
# define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
#define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
#endif
|
||||
|
||||
//
|
||||
// No std::stringstream with gcc < 3
|
||||
//
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3) && \
|
||||
((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)) && \
|
||||
!defined(__STL_USE_NEW_IOSTREAMS) || \
|
||||
defined(__APPLE_CC__)
|
||||
// Note that we only set this for GNU C++ prior to 2.95 since the
|
||||
// latest patches for that release do contain a minimal <sstream>
|
||||
// If you are running a 2.95 release prior to 2.95.3 then this will need
|
||||
// setting, but there is no way to detect that automatically (other
|
||||
// than by running the configure script).
|
||||
// Also, the unofficial GNU C++ 2.96 included in RedHat 7.1 doesn't
|
||||
// have <sstream>.
|
||||
# define BOOST_NO_STRINGSTREAM
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3) && ((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)) \
|
||||
&& !defined(__STL_USE_NEW_IOSTREAMS) \
|
||||
|| defined(__APPLE_CC__)
|
||||
// Note that we only set this for GNU C++ prior to 2.95 since the
|
||||
// latest patches for that release do contain a minimal <sstream>
|
||||
// If you are running a 2.95 release prior to 2.95.3 then this will need
|
||||
// setting, but there is no way to detect that automatically (other
|
||||
// than by running the configure script).
|
||||
// Also, the unofficial GNU C++ 2.96 included in RedHat 7.1 doesn't
|
||||
// have <sstream>.
|
||||
#define BOOST_NO_STRINGSTREAM
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -45,21 +44,21 @@
|
||||
// incorrect assumption in some cases):
|
||||
//
|
||||
#if !defined(__SGI_STL_OWN_IOSTREAMS) && !defined(__STL_USE_NEW_IOSTREAMS)
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
#define BOOST_NO_STD_LOCALE
|
||||
#endif
|
||||
|
||||
//
|
||||
// Original native SGI streams have non-standard std::messages facet:
|
||||
//
|
||||
#if defined(__sgi) && (_COMPILER_VERSION <= 650) && !defined(__SGI_STL_OWN_IOSTREAMS)
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
#define BOOST_NO_STD_LOCALE
|
||||
#endif
|
||||
|
||||
//
|
||||
// SGI's new iostreams have missing "const" in messages<>::open
|
||||
//
|
||||
#if defined(__sgi) && (_COMPILER_VERSION <= 740) && defined(__STL_USE_NEW_IOSTREAMS)
|
||||
# define BOOST_NO_STD_MESSAGES
|
||||
#define BOOST_NO_STD_MESSAGES
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -67,8 +66,8 @@
|
||||
// without member templates:
|
||||
//
|
||||
#if !defined(__STL_MEMBER_TEMPLATES)
|
||||
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
#define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
#define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -81,20 +80,20 @@
|
||||
// If this is GNU libstdc++2, then no <limits> and no std::wstring:
|
||||
//
|
||||
#if (defined(__GNUC__) && (__GNUC__ < 3))
|
||||
# include <string>
|
||||
# if defined(__BASTRING__)
|
||||
# define BOOST_NO_LIMITS
|
||||
#include <string>
|
||||
#if defined(__BASTRING__)
|
||||
#define BOOST_NO_LIMITS
|
||||
// Note: <boost/limits.hpp> will provide compile-time constants
|
||||
# undef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
# define BOOST_NO_STD_WSTRING
|
||||
# endif
|
||||
#undef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
#define BOOST_NO_STD_WSTRING
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// There is no standard iterator unless we have namespace support:
|
||||
//
|
||||
#if !defined(__STL_USE_NAMESPACES)
|
||||
# define BOOST_NO_STD_ITERATOR
|
||||
#define BOOST_NO_STD_ITERATOR
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -107,30 +106,27 @@
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_0X_HDR_THREAD
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
# define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
#define BOOST_NO_0X_HDR_ARRAY
|
||||
#define BOOST_NO_0X_HDR_CHRONO
|
||||
#define BOOST_NO_0X_HDR_CODECVT
|
||||
#define BOOST_NO_0X_HDR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
#define BOOST_NO_0X_HDR_FUTURE
|
||||
#define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MUTEX
|
||||
#define BOOST_NO_0X_HDR_RANDOM
|
||||
#define BOOST_NO_0X_HDR_RATIO
|
||||
#define BOOST_NO_0X_HDR_REGEX
|
||||
#define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
#define BOOST_NO_0X_HDR_THREAD
|
||||
#define BOOST_NO_0X_HDR_TUPLE
|
||||
#define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
#define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
|
||||
#define BOOST_STDLIB "SGI standard library"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// 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.
|
||||
@@ -10,10 +10,10 @@
|
||||
// STLPort standard library config:
|
||||
|
||||
#if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
||||
# include <cstddef>
|
||||
# if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
||||
# error "This is not STLPort!"
|
||||
# endif
|
||||
#include <cstddef>
|
||||
#if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
||||
#error "This is not STLPort!"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -21,7 +21,7 @@
|
||||
// for versions prior to 4.1(beta)
|
||||
//
|
||||
#if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400)
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
#define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -29,22 +29,23 @@
|
||||
// std::iterator traits:
|
||||
//
|
||||
#if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION))
|
||||
# define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
#define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
#endif
|
||||
|
||||
//
|
||||
// No new style iostreams on GCC without STLport's iostreams enabled:
|
||||
//
|
||||
#if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS))
|
||||
# define BOOST_NO_STRINGSTREAM
|
||||
#define BOOST_NO_STRINGSTREAM
|
||||
#endif
|
||||
|
||||
//
|
||||
// No new iostreams implies no std::locale, and no std::stringstream:
|
||||
//
|
||||
#if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS)
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
# define BOOST_NO_STRINGSTREAM
|
||||
#if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) \
|
||||
|| defined(_STLP_NO_NEW_IOSTREAMS)
|
||||
#define BOOST_NO_STD_LOCALE
|
||||
#define BOOST_NO_STRINGSTREAM
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -52,30 +53,32 @@
|
||||
// then the io stream facets are not available in namespace std::
|
||||
//
|
||||
#ifdef _STLPORT_VERSION
|
||||
# if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
# endif
|
||||
#if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) \
|
||||
&& defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
|
||||
#define BOOST_NO_STD_LOCALE
|
||||
#endif
|
||||
#else
|
||||
# if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
# endif
|
||||
#if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) \
|
||||
&& !defined(__BORLANDC__)
|
||||
#define BOOST_NO_STD_LOCALE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_STLPORT_VERSION) && ((_STLPORT_VERSION < 0x500) || (_STLPORT_VERSION >= 0x520))
|
||||
# define BOOST_NO_STD_UNORDERED
|
||||
#define BOOST_NO_STD_UNORDERED
|
||||
#endif
|
||||
|
||||
#if defined(_STLPORT_VERSION) && (_STLPORT_VERSION >= 0x520)
|
||||
# define BOOST_HAS_TR1_UNORDERED_SET
|
||||
# define BOOST_HAS_TR1_UNORDERED_MAP
|
||||
#define BOOST_HAS_TR1_UNORDERED_SET
|
||||
#define BOOST_HAS_TR1_UNORDERED_MAP
|
||||
#endif
|
||||
//
|
||||
// Without member template support enabled, their are no template
|
||||
// iterate constructors, and no std::allocator:
|
||||
//
|
||||
#if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES))
|
||||
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
#define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
#define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
//
|
||||
// however we always have at least a partial allocator:
|
||||
@@ -83,11 +86,11 @@
|
||||
#define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
||||
|
||||
#if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
#define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
#if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
#define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -95,12 +98,12 @@
|
||||
// the support for the relevant specilazations of std:: templates.
|
||||
//
|
||||
#if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT)
|
||||
# ifndef BOOST_NO_STD_WSTRING
|
||||
# define BOOST_NO_STD_WSTRING
|
||||
# endif
|
||||
# ifndef BOOST_NO_STD_WSTREAMBUF
|
||||
# define BOOST_NO_STD_WSTREAMBUF
|
||||
# endif
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
#define BOOST_NO_STD_WSTRING
|
||||
#endif
|
||||
#ifndef BOOST_NO_STD_WSTREAMBUF
|
||||
#define BOOST_NO_STD_WSTREAMBUF
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -119,7 +122,7 @@
|
||||
//
|
||||
// Harold Howe says:
|
||||
// Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with
|
||||
// BCB6 does cause problems. If we detect C++ Builder, then don't define
|
||||
// BCB6 does cause problems. If we detect C++ Builder, then don't define
|
||||
// BOOST_NO_STDC_NAMESPACE
|
||||
//
|
||||
#if !defined(__BORLANDC__) && !defined(__DMC__)
|
||||
@@ -128,29 +131,32 @@
|
||||
// the global namespace, then we duplicate STLport's using declarations
|
||||
// (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't
|
||||
// necessarily import all the names we need into namespace std::
|
||||
//
|
||||
# if (defined(__STL_IMPORT_VENDOR_CSTD) \
|
||||
|| defined(__STL_USE_OWN_NAMESPACE) \
|
||||
|| defined(_STLP_IMPORT_VENDOR_CSTD) \
|
||||
|| defined(_STLP_USE_OWN_NAMESPACE)) \
|
||||
&& (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD))
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
# define BOOST_NO_EXCEPTION_STD_NAMESPACE
|
||||
# endif
|
||||
//
|
||||
#if (defined(__STL_IMPORT_VENDOR_CSTD) || defined(__STL_USE_OWN_NAMESPACE) || defined(_STLP_IMPORT_VENDOR_CSTD) \
|
||||
|| defined(_STLP_USE_OWN_NAMESPACE)) \
|
||||
&& (defined(__STL_VENDOR_GLOBAL_CSTD) || defined(_STLP_VENDOR_GLOBAL_CSTD))
|
||||
#define BOOST_NO_STDC_NAMESPACE
|
||||
#define BOOST_NO_EXCEPTION_STD_NAMESPACE
|
||||
#endif
|
||||
#elif defined(__BORLANDC__) && __BORLANDC__ < 0x560
|
||||
// STLport doesn't import std::abs correctly:
|
||||
#include <stdlib.h>
|
||||
namespace std { using ::abs; }
|
||||
namespace std {
|
||||
using ::abs;
|
||||
}
|
||||
// and strcmp/strcpy don't get imported either ('cos they are macros)
|
||||
#include <string.h>
|
||||
#ifdef strcpy
|
||||
# undef strcpy
|
||||
#undef strcpy
|
||||
#endif
|
||||
#ifdef strcmp
|
||||
# undef strcmp
|
||||
#undef strcmp
|
||||
#endif
|
||||
#ifdef _STLP_VENDOR_CSTD
|
||||
namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; }
|
||||
namespace std {
|
||||
using _STLP_VENDOR_CSTD::strcmp;
|
||||
using _STLP_VENDOR_CSTD::strcpy;
|
||||
} // namespace std
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -158,18 +164,18 @@ namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy;
|
||||
// std::use_facet may be non-standard, uses a class instead:
|
||||
//
|
||||
#if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
|
||||
# define BOOST_NO_STD_USE_FACET
|
||||
# define BOOST_HAS_STLP_USE_FACET
|
||||
#define BOOST_NO_STD_USE_FACET
|
||||
#define BOOST_HAS_STLP_USE_FACET
|
||||
#endif
|
||||
|
||||
//
|
||||
// If STLport thinks there are no wide functions, <cwchar> etc. is not working; but
|
||||
// only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import
|
||||
// only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import
|
||||
// into std:: ourselves).
|
||||
//
|
||||
#if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE)
|
||||
# define BOOST_NO_CWCHAR
|
||||
# define BOOST_NO_CWCTYPE
|
||||
#define BOOST_NO_CWCHAR
|
||||
#define BOOST_NO_CWCTYPE
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -177,9 +183,9 @@ namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy;
|
||||
// is not an intrinsic type, then we have to disable the support for it as
|
||||
// well (we would be missing required specializations otherwise).
|
||||
//
|
||||
#if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT)
|
||||
# undef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#if !defined(_STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT)
|
||||
#undef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -187,50 +193,45 @@ namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy;
|
||||
// hashtables and the like:
|
||||
//
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ == 0x560)
|
||||
# undef BOOST_HAS_HASH
|
||||
#undef BOOST_HAS_HASH
|
||||
#endif
|
||||
|
||||
//
|
||||
// gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max
|
||||
//
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3)
|
||||
# include <algorithm> // for std::min and std::max
|
||||
# define BOOST_USING_STD_MIN() ((void)0)
|
||||
# define BOOST_USING_STD_MAX() ((void)0)
|
||||
namespace boost { using std::min; using std::max; }
|
||||
#include <algorithm> // for std::min and std::max
|
||||
#define BOOST_USING_STD_MIN() ((void)0)
|
||||
#define BOOST_USING_STD_MAX() ((void)0)
|
||||
namespace boost {
|
||||
using std::max;
|
||||
using std::min;
|
||||
} // namespace boost
|
||||
#endif
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_0X_HDR_THREAD
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
# define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
#define BOOST_NO_0X_HDR_ARRAY
|
||||
#define BOOST_NO_0X_HDR_CHRONO
|
||||
#define BOOST_NO_0X_HDR_CODECVT
|
||||
#define BOOST_NO_0X_HDR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
#define BOOST_NO_0X_HDR_FUTURE
|
||||
#define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MUTEX
|
||||
#define BOOST_NO_0X_HDR_RANDOM
|
||||
#define BOOST_NO_0X_HDR_RATIO
|
||||
#define BOOST_NO_0X_HDR_REGEX
|
||||
#define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
#define BOOST_NO_0X_HDR_THREAD
|
||||
#define BOOST_NO_0X_HDR_TUPLE
|
||||
#define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
#define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
|
||||
#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// 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.
|
||||
|
||||
#if __IBMCPP__ <= 501
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
#define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
#define BOOST_HAS_MACRO_USE_FACET
|
||||
@@ -14,30 +14,27 @@
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_0X_HDR_ARRAY
|
||||
# define BOOST_NO_0X_HDR_CHRONO
|
||||
# define BOOST_NO_0X_HDR_CODECVT
|
||||
# define BOOST_NO_0X_HDR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_0X_HDR_FUTURE
|
||||
# define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
# define BOOST_NO_0X_HDR_MUTEX
|
||||
# define BOOST_NO_0X_HDR_RANDOM
|
||||
# define BOOST_NO_0X_HDR_RATIO
|
||||
# define BOOST_NO_0X_HDR_REGEX
|
||||
# define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_0X_HDR_THREAD
|
||||
# define BOOST_NO_0X_HDR_TUPLE
|
||||
# define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
#define BOOST_NO_0X_HDR_ARRAY
|
||||
#define BOOST_NO_0X_HDR_CHRONO
|
||||
#define BOOST_NO_0X_HDR_CODECVT
|
||||
#define BOOST_NO_0X_HDR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_CONDITION_VARIABLE
|
||||
#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_FORWARD_LIST
|
||||
#define BOOST_NO_0X_HDR_FUTURE
|
||||
#define BOOST_NO_0X_HDR_INITIALIZER_LIST
|
||||
#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
|
||||
#define BOOST_NO_0X_HDR_MUTEX
|
||||
#define BOOST_NO_0X_HDR_RANDOM
|
||||
#define BOOST_NO_0X_HDR_RATIO
|
||||
#define BOOST_NO_0X_HDR_REGEX
|
||||
#define BOOST_NO_0X_HDR_SYSTEM_ERROR
|
||||
#define BOOST_NO_0X_HDR_THREAD
|
||||
#define BOOST_NO_0X_HDR_TUPLE
|
||||
#define BOOST_NO_0X_HDR_TYPE_TRAITS
|
||||
#define BOOST_NO_STD_UNORDERED // deprecated; see following
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_MAP
|
||||
#define BOOST_NO_0X_HDR_UNORDERED_SET
|
||||
|
||||
#define BOOST_STDLIB "Visual Age default standard library"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Copyright (c) 2001-2003 John Maddock
|
||||
// Copyright (c) 2001 Darin Adler
|
||||
// Copyright (c) 2001 Peter Dimov
|
||||
// Copyright (c) 2002 Bill Kempf
|
||||
// Copyright (c) 2002 Bill Kempf
|
||||
// Copyright (c) 2002 Jens Maurer
|
||||
// Copyright (c) 2002-2003 David Abrahams
|
||||
// Copyright (c) 2003 Gennaro Prota
|
||||
@@ -31,55 +31,52 @@
|
||||
// remember that since these just declare a bunch of macros, there should be
|
||||
// no namespace issues from this.
|
||||
//
|
||||
#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \
|
||||
&& !defined(BOOST_MSVC) && !defined(__BORLANDC__)
|
||||
# include <limits.h>
|
||||
# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
# else
|
||||
# define BOOST_NO_LONG_LONG
|
||||
# endif
|
||||
#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) && !defined(BOOST_MSVC) && !defined(__BORLANDC__)
|
||||
#include <limits.h>
|
||||
#if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
#else
|
||||
#define BOOST_NO_LONG_LONG
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// GCC 3.x will clean up all of those nasty macro definitions that
|
||||
// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine
|
||||
// it under GCC 3.x.
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS)
|
||||
# undef BOOST_NO_CTYPE_FUNCTIONS
|
||||
#undef BOOST_NO_CTYPE_FUNCTIONS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Assume any extensions are in namespace std:: unless stated otherwise:
|
||||
//
|
||||
# ifndef BOOST_STD_EXTENSION_NAMESPACE
|
||||
# define BOOST_STD_EXTENSION_NAMESPACE std
|
||||
# endif
|
||||
#ifndef BOOST_STD_EXTENSION_NAMESPACE
|
||||
#define BOOST_STD_EXTENSION_NAMESPACE std
|
||||
#endif
|
||||
|
||||
//
|
||||
// If cv-qualified specializations are not allowed, then neither are cv-void ones:
|
||||
//
|
||||
# if defined(BOOST_NO_CV_SPECIALIZATIONS) \
|
||||
&& !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
|
||||
# define BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
# endif
|
||||
#if defined(BOOST_NO_CV_SPECIALIZATIONS) && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
|
||||
#define BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
#endif
|
||||
|
||||
//
|
||||
// If there is no numeric_limits template, then it can't have any compile time
|
||||
// constants either!
|
||||
//
|
||||
# if defined(BOOST_NO_LIMITS) \
|
||||
&& !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
|
||||
# endif
|
||||
#if defined(BOOST_NO_LIMITS) && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
|
||||
#define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
#define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
#define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
|
||||
#endif
|
||||
|
||||
//
|
||||
// if there is no long long then there is no specialisation
|
||||
// for numeric_limits<long long> either:
|
||||
//
|
||||
#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)
|
||||
# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
|
||||
#define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -87,135 +84,126 @@
|
||||
// for numeric_limits<__int64> either:
|
||||
//
|
||||
#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)
|
||||
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
#define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
#endif
|
||||
|
||||
//
|
||||
// if member templates are supported then so is the
|
||||
// VC6 subset of member templates:
|
||||
//
|
||||
# if !defined(BOOST_NO_MEMBER_TEMPLATES) \
|
||||
&& !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
|
||||
# define BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
# endif
|
||||
#if !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
|
||||
#define BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
#endif
|
||||
|
||||
//
|
||||
// Without partial specialization, can't test for partial specialisation bugs:
|
||||
//
|
||||
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||
&& !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)
|
||||
# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
|
||||
# endif
|
||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)
|
||||
#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
|
||||
#endif
|
||||
|
||||
//
|
||||
// Without partial specialization, we can't have array-type partial specialisations:
|
||||
//
|
||||
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||
&& !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
|
||||
# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
|
||||
# endif
|
||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
|
||||
#define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Without partial specialization, std::iterator_traits can't work:
|
||||
//
|
||||
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||
&& !defined(BOOST_NO_STD_ITERATOR_TRAITS)
|
||||
# define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
# endif
|
||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
|
||||
#define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Without partial specialization, partial
|
||||
// Without partial specialization, partial
|
||||
// specialization with default args won't work either:
|
||||
//
|
||||
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||
&& !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
|
||||
# define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
|
||||
# endif
|
||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
|
||||
#define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Without member template support, we can't have template constructors
|
||||
// in the standard library either:
|
||||
//
|
||||
# if defined(BOOST_NO_MEMBER_TEMPLATES) \
|
||||
&& !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
|
||||
&& !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
|
||||
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
# endif
|
||||
#if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
|
||||
&& !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
|
||||
#define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Without member template support, we can't have a conforming
|
||||
// std::allocator template either:
|
||||
//
|
||||
# if defined(BOOST_NO_MEMBER_TEMPLATES) \
|
||||
&& !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
|
||||
&& !defined(BOOST_NO_STD_ALLOCATOR)
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
# endif
|
||||
#if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) && !defined(BOOST_NO_STD_ALLOCATOR)
|
||||
#define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
//
|
||||
// without ADL support then using declarations will break ADL as well:
|
||||
//
|
||||
#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
|
||||
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#endif
|
||||
|
||||
//
|
||||
// Without typeid support we have no dynamic RTTI either:
|
||||
//
|
||||
#if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
|
||||
# define BOOST_NO_RTTI
|
||||
#define BOOST_NO_RTTI
|
||||
#endif
|
||||
|
||||
//
|
||||
// If we have a standard allocator, then we have a partial one as well:
|
||||
//
|
||||
#if !defined(BOOST_NO_STD_ALLOCATOR)
|
||||
# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
||||
#define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
//
|
||||
// We can't have a working std::use_facet if there is no std::locale:
|
||||
//
|
||||
# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)
|
||||
# define BOOST_NO_STD_USE_FACET
|
||||
# endif
|
||||
#if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)
|
||||
#define BOOST_NO_STD_USE_FACET
|
||||
#endif
|
||||
|
||||
//
|
||||
// We can't have a std::messages facet if there is no std::locale:
|
||||
//
|
||||
# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)
|
||||
# define BOOST_NO_STD_MESSAGES
|
||||
# endif
|
||||
#if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)
|
||||
#define BOOST_NO_STD_MESSAGES
|
||||
#endif
|
||||
|
||||
//
|
||||
// We can't have a working std::wstreambuf if there is no std::locale:
|
||||
//
|
||||
# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
|
||||
# define BOOST_NO_STD_WSTREAMBUF
|
||||
# endif
|
||||
#if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
|
||||
#define BOOST_NO_STD_WSTREAMBUF
|
||||
#endif
|
||||
|
||||
//
|
||||
// We can't have a <cwctype> if there is no <cwchar>:
|
||||
//
|
||||
# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE)
|
||||
# define BOOST_NO_CWCTYPE
|
||||
# endif
|
||||
#if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE)
|
||||
#define BOOST_NO_CWCTYPE
|
||||
#endif
|
||||
|
||||
//
|
||||
// We can't have a swprintf if there is no <cwchar>:
|
||||
//
|
||||
# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF)
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# endif
|
||||
#if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF)
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
|
||||
//
|
||||
// If Win32 support is turned off, then we must turn off
|
||||
// threading support also, unless there is some other
|
||||
// thread API enabled:
|
||||
//
|
||||
#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \
|
||||
&& !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS)
|
||||
# define BOOST_DISABLE_THREADS
|
||||
#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS)
|
||||
#define BOOST_DISABLE_THREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -224,86 +212,85 @@
|
||||
// limited number of macros that identify this (if there's any missing
|
||||
// from here then add to the appropriate compiler section):
|
||||
//
|
||||
#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
|
||||
|| defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \
|
||||
#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) || defined(_PTHREADS) || defined(__APPLE__) \
|
||||
|| defined(__DragonFly__)) \
|
||||
&& !defined(BOOST_HAS_THREADS)
|
||||
# define BOOST_HAS_THREADS
|
||||
#define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Turn threading support off if BOOST_DISABLE_THREADS is defined:
|
||||
//
|
||||
#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS)
|
||||
# undef BOOST_HAS_THREADS
|
||||
#undef BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Turn threading support off if we don't recognise the threading API:
|
||||
//
|
||||
#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\
|
||||
&& !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\
|
||||
&& !defined(BOOST_HAS_MPTASKS)
|
||||
# undef BOOST_HAS_THREADS
|
||||
#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS) && !defined(BOOST_HAS_WINTHREADS) \
|
||||
&& !defined(BOOST_HAS_BETHREADS) && !defined(BOOST_HAS_MPTASKS)
|
||||
#undef BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Turn threading detail macros off if we don't (want to) use threading
|
||||
//
|
||||
#ifndef BOOST_HAS_THREADS
|
||||
# undef BOOST_HAS_PTHREADS
|
||||
# undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
# undef BOOST_HAS_PTHREAD_YIELD
|
||||
# undef BOOST_HAS_PTHREAD_DELAY_NP
|
||||
# undef BOOST_HAS_WINTHREADS
|
||||
# undef BOOST_HAS_BETHREADS
|
||||
# undef BOOST_HAS_MPTASKS
|
||||
#undef BOOST_HAS_PTHREADS
|
||||
#undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
#undef BOOST_HAS_PTHREAD_YIELD
|
||||
#undef BOOST_HAS_PTHREAD_DELAY_NP
|
||||
#undef BOOST_HAS_WINTHREADS
|
||||
#undef BOOST_HAS_BETHREADS
|
||||
#undef BOOST_HAS_MPTASKS
|
||||
#endif
|
||||
|
||||
//
|
||||
// If the compiler claims to be C99 conformant, then it had better
|
||||
// have a <stdint.h>:
|
||||
//
|
||||
# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# ifndef BOOST_HAS_LOG1P
|
||||
# define BOOST_HAS_LOG1P
|
||||
# endif
|
||||
# ifndef BOOST_HAS_EXPM1
|
||||
# define BOOST_HAS_EXPM1
|
||||
# endif
|
||||
# endif
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#ifndef BOOST_HAS_LOG1P
|
||||
#define BOOST_HAS_LOG1P
|
||||
#endif
|
||||
#ifndef BOOST_HAS_EXPM1
|
||||
#define BOOST_HAS_EXPM1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Define BOOST_NO_SLIST and BOOST_NO_HASH if required.
|
||||
// Note that this is for backwards compatibility only.
|
||||
//
|
||||
# if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST)
|
||||
# define BOOST_NO_SLIST
|
||||
# endif
|
||||
#if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST)
|
||||
#define BOOST_NO_SLIST
|
||||
#endif
|
||||
|
||||
# if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH)
|
||||
# define BOOST_NO_HASH
|
||||
# endif
|
||||
#if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH)
|
||||
#define BOOST_NO_HASH
|
||||
#endif
|
||||
|
||||
//
|
||||
// Set BOOST_SLIST_HEADER if not set already:
|
||||
//
|
||||
#if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER)
|
||||
# define BOOST_SLIST_HEADER <slist>
|
||||
#define BOOST_SLIST_HEADER <slist>
|
||||
#endif
|
||||
|
||||
//
|
||||
// Set BOOST_HASH_SET_HEADER if not set already:
|
||||
//
|
||||
#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER)
|
||||
# define BOOST_HASH_SET_HEADER <hash_set>
|
||||
#define BOOST_HASH_SET_HEADER <hash_set>
|
||||
#endif
|
||||
|
||||
//
|
||||
// Set BOOST_HASH_MAP_HEADER if not set already:
|
||||
//
|
||||
#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER)
|
||||
# define BOOST_HASH_MAP_HEADER <hash_map>
|
||||
#define BOOST_HASH_MAP_HEADER <hash_map>
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -311,18 +298,18 @@
|
||||
//
|
||||
|
||||
#if defined(BOOST_NO_0X_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
|
||||
# define BOOST_NO_INITIALIZER_LISTS
|
||||
#define BOOST_NO_INITIALIZER_LISTS
|
||||
#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:
|
||||
#if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS)
|
||||
# define BOOST_HAS_ABI_HEADERS
|
||||
#define BOOST_HAS_ABI_HEADERS
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS)
|
||||
# undef BOOST_HAS_ABI_HEADERS
|
||||
#undef BOOST_HAS_ABI_HEADERS
|
||||
#endif
|
||||
|
||||
// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------//
|
||||
@@ -334,39 +321,42 @@
|
||||
// works as expected with standard conforming compilers. The resulting
|
||||
// double inclusion of <cstddef> is harmless.
|
||||
|
||||
# ifdef BOOST_NO_STDC_NAMESPACE
|
||||
# include <cstddef>
|
||||
namespace std { using ::ptrdiff_t; using ::size_t; }
|
||||
# endif
|
||||
#ifdef BOOST_NO_STDC_NAMESPACE
|
||||
#include <cstddef>
|
||||
namespace std {
|
||||
using ::ptrdiff_t;
|
||||
using ::size_t;
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
// Workaround for the unfortunate min/max macros defined by some platform headers
|
||||
|
||||
#define BOOST_PREVENT_MACRO_SUBSTITUTION
|
||||
|
||||
#ifndef BOOST_USING_STD_MIN
|
||||
# define BOOST_USING_STD_MIN() using std::min
|
||||
#define BOOST_USING_STD_MIN() using std::min
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_USING_STD_MAX
|
||||
# define BOOST_USING_STD_MAX() using std::max
|
||||
#define BOOST_USING_STD_MAX() using std::max
|
||||
#endif
|
||||
|
||||
// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------//
|
||||
|
||||
# ifdef BOOST_NO_STD_MIN_MAX
|
||||
#ifdef BOOST_NO_STD_MIN_MAX
|
||||
|
||||
namespace std_ns {
|
||||
template <class _Tp>
|
||||
inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
|
||||
template <class _Tp> inline const _Tp &min BOOST_PREVENT_MACRO_SUBSTITUTION(const _Tp &__a, const _Tp &__b)
|
||||
{
|
||||
return __b < __a ? __b : __a;
|
||||
}
|
||||
template <class _Tp>
|
||||
inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
|
||||
return __a < __b ? __b : __a;
|
||||
}
|
||||
}
|
||||
template <class _Tp> inline const _Tp &max BOOST_PREVENT_MACRO_SUBSTITUTION(const _Tp &__a, const _Tp &__b)
|
||||
{
|
||||
return __a < __b ? __b : __a;
|
||||
}
|
||||
} // namespace std_ns
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// BOOST_STATIC_CONSTANT workaround --------------------------------------- //
|
||||
// On compilers which don't allow in-class initialization of static integral
|
||||
@@ -374,11 +364,11 @@ namespace std_ns {
|
||||
// to be available at compile-time. This macro gives us a convenient way to
|
||||
// declare such constants.
|
||||
|
||||
# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }
|
||||
# else
|
||||
# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
|
||||
# endif
|
||||
#ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
#define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }
|
||||
#else
|
||||
#define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
|
||||
#endif
|
||||
|
||||
// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------//
|
||||
// When the standard library does not have a conforming std::use_facet there
|
||||
@@ -394,19 +384,19 @@ namespace std_ns {
|
||||
// Use for BOOST_HAS_FACET is analogous.
|
||||
|
||||
#if defined(BOOST_NO_STD_USE_FACET)
|
||||
# ifdef BOOST_HAS_TWO_ARG_USE_FACET
|
||||
# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))
|
||||
# define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast<Type*>(0))
|
||||
# elif defined(BOOST_HAS_MACRO_USE_FACET)
|
||||
# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)
|
||||
# define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type)
|
||||
# elif defined(BOOST_HAS_STLP_USE_FACET)
|
||||
# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type >(loc))
|
||||
# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
|
||||
# endif
|
||||
#ifdef BOOST_HAS_TWO_ARG_USE_FACET
|
||||
#define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type *>(0))
|
||||
#define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast<Type *>(0))
|
||||
#elif defined(BOOST_HAS_MACRO_USE_FACET)
|
||||
#define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)
|
||||
#define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type)
|
||||
#elif defined(BOOST_HAS_STLP_USE_FACET)
|
||||
#define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type>(loc))
|
||||
#define BOOST_HAS_FACET(Type, loc) std::has_facet<Type>(loc)
|
||||
#endif
|
||||
#else
|
||||
# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc)
|
||||
# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
|
||||
#define BOOST_USE_FACET(Type, loc) std::use_facet<Type>(loc)
|
||||
#define BOOST_HAS_FACET(Type, loc) std::has_facet<Type>(loc)
|
||||
#endif
|
||||
|
||||
// BOOST_NESTED_TEMPLATE workaround ------------------------------------------//
|
||||
@@ -420,9 +410,9 @@ namespace std_ns {
|
||||
// typedef typename A::BOOST_NESTED_TEMPLATE rebind<U> binder;
|
||||
|
||||
#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
|
||||
# define BOOST_NESTED_TEMPLATE template
|
||||
#define BOOST_NESTED_TEMPLATE template
|
||||
#else
|
||||
# define BOOST_NESTED_TEMPLATE
|
||||
#define BOOST_NESTED_TEMPLATE
|
||||
#endif
|
||||
|
||||
// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------//
|
||||
@@ -431,9 +421,9 @@ namespace std_ns {
|
||||
// statement that can never be reached.
|
||||
|
||||
#ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
|
||||
# define BOOST_UNREACHABLE_RETURN(x) return x;
|
||||
#define BOOST_UNREACHABLE_RETURN(x) return x;
|
||||
#else
|
||||
# define BOOST_UNREACHABLE_RETURN(x)
|
||||
#define BOOST_UNREACHABLE_RETURN(x)
|
||||
#endif
|
||||
|
||||
// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------//
|
||||
@@ -448,15 +438,15 @@ namespace std_ns {
|
||||
// template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);
|
||||
|
||||
#ifndef BOOST_NO_DEDUCED_TYPENAME
|
||||
# define BOOST_DEDUCED_TYPENAME typename
|
||||
#define BOOST_DEDUCED_TYPENAME typename
|
||||
#else
|
||||
# define BOOST_DEDUCED_TYPENAME
|
||||
#define BOOST_DEDUCED_TYPENAME
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_TYPENAME_WITH_CTOR
|
||||
# define BOOST_CTOR_TYPENAME typename
|
||||
#define BOOST_CTOR_TYPENAME typename
|
||||
#else
|
||||
# define BOOST_CTOR_TYPENAME
|
||||
#define BOOST_CTOR_TYPENAME
|
||||
#endif
|
||||
|
||||
// long long workaround ------------------------------------------//
|
||||
@@ -465,15 +455,15 @@ namespace std_ns {
|
||||
// (with -pedantic -ansi) unless it's use is prefixed by __extension__
|
||||
//
|
||||
#if defined(BOOST_HAS_LONG_LONG)
|
||||
namespace boost{
|
||||
# ifdef __GNUC__
|
||||
__extension__ typedef long long long_long_type;
|
||||
__extension__ typedef unsigned long long ulong_long_type;
|
||||
# else
|
||||
typedef long long long_long_type;
|
||||
typedef unsigned long long ulong_long_type;
|
||||
# endif
|
||||
}
|
||||
namespace boost {
|
||||
#ifdef __GNUC__
|
||||
__extension__ typedef long long long_long_type;
|
||||
__extension__ typedef unsigned long long ulong_long_type;
|
||||
#else
|
||||
typedef long long long_long_type;
|
||||
typedef unsigned long long ulong_long_type;
|
||||
#endif
|
||||
} // namespace boost
|
||||
#endif
|
||||
|
||||
// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//
|
||||
@@ -520,36 +510,32 @@ namespace boost{
|
||||
|
||||
#if defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
|
||||
# include "boost/type.hpp"
|
||||
# include "boost/non_type.hpp"
|
||||
#include "boost/non_type.hpp"
|
||||
#include "boost/type.hpp"
|
||||
|
||||
# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) boost::type<t>* = 0
|
||||
# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type<t>*
|
||||
# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type<t, v>* = 0
|
||||
# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type<t, v>*
|
||||
#define BOOST_EXPLICIT_TEMPLATE_TYPE(t) boost::type<t> * = 0
|
||||
#define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type<t> *
|
||||
#define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type<t, v> * = 0
|
||||
#define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type<t, v> *
|
||||
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \
|
||||
, BOOST_EXPLICIT_TEMPLATE_TYPE(t)
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \
|
||||
, BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \
|
||||
, BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \
|
||||
, BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
|
||||
#define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) , BOOST_EXPLICIT_TEMPLATE_TYPE(t)
|
||||
#define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) , BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
|
||||
#define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) , BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
|
||||
#define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) , BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
|
||||
|
||||
#else
|
||||
|
||||
// no workaround needed: expand to nothing
|
||||
|
||||
# define BOOST_EXPLICIT_TEMPLATE_TYPE(t)
|
||||
# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
|
||||
# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
|
||||
# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
|
||||
#define BOOST_EXPLICIT_TEMPLATE_TYPE(t)
|
||||
#define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
|
||||
#define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
|
||||
#define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
|
||||
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
|
||||
#define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
|
||||
#define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
|
||||
#define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
|
||||
#define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
|
||||
|
||||
|
||||
#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
@@ -562,7 +548,7 @@ namespace boost{
|
||||
// Converts the parameter X to a string after macro replacement
|
||||
// on X has been performed.
|
||||
//
|
||||
#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
|
||||
#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
|
||||
#define BOOST_DO_STRINGIZE(X) #X
|
||||
|
||||
//
|
||||
@@ -573,29 +559,26 @@ namespace boost{
|
||||
// is that macro expansion of macro arguments does not
|
||||
// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
|
||||
//
|
||||
#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
|
||||
#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
|
||||
#define BOOST_DO_JOIN2( X, Y ) X##Y
|
||||
#define BOOST_JOIN(X, Y) BOOST_DO_JOIN(X, Y)
|
||||
#define BOOST_DO_JOIN(X, Y) BOOST_DO_JOIN2(X, Y)
|
||||
#define BOOST_DO_JOIN2(X, Y) X##Y
|
||||
|
||||
//
|
||||
// Set some default values for compiler/library/platform names.
|
||||
// These are for debugging config setup only:
|
||||
//
|
||||
# ifndef BOOST_COMPILER
|
||||
# define BOOST_COMPILER "Unknown ISO C++ Compiler"
|
||||
# endif
|
||||
# ifndef BOOST_STDLIB
|
||||
# define BOOST_STDLIB "Unknown ISO standard library"
|
||||
# endif
|
||||
# ifndef BOOST_PLATFORM
|
||||
# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
|
||||
|| defined(_POSIX_SOURCE)
|
||||
# define BOOST_PLATFORM "Generic Unix"
|
||||
# else
|
||||
# define BOOST_PLATFORM "Unknown"
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#ifndef BOOST_COMPILER
|
||||
#define BOOST_COMPILER "Unknown ISO C++ Compiler"
|
||||
#endif
|
||||
#ifndef BOOST_STDLIB
|
||||
#define BOOST_STDLIB "Unknown ISO standard library"
|
||||
#endif
|
||||
#ifndef BOOST_PLATFORM
|
||||
#if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)
|
||||
#define BOOST_PLATFORM "Generic Unix"
|
||||
#else
|
||||
#define BOOST_PLATFORM "Unknown"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// boost/config/user.hpp ---------------------------------------------------//
|
||||
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// 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)
|
||||
|
||||
// Do not check in modified versions of this file,
|
||||
@@ -65,60 +65,57 @@
|
||||
// even when available:
|
||||
// #define BOOST_DISABLE_WIN32
|
||||
|
||||
// BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any
|
||||
// prefix/suffix headers that normally control things like struct
|
||||
// packing and alignment.
|
||||
// BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any
|
||||
// prefix/suffix headers that normally control things like struct
|
||||
// packing and alignment.
|
||||
// #define BOOST_DISABLE_ABI_HEADERS
|
||||
|
||||
// BOOST_ABI_PREFIX: A prefix header to include in place of whatever
|
||||
// boost.config would normally select, any replacement should set up
|
||||
// struct packing and alignment options as required.
|
||||
// boost.config would normally select, any replacement should set up
|
||||
// struct packing and alignment options as required.
|
||||
// #define BOOST_ABI_PREFIX my-header-name
|
||||
|
||||
// BOOST_ABI_SUFFIX: A suffix header to include in place of whatever
|
||||
// boost.config would normally select, any replacement should undo
|
||||
// the effects of the prefix header.
|
||||
// BOOST_ABI_SUFFIX: A suffix header to include in place of whatever
|
||||
// boost.config would normally select, any replacement should undo
|
||||
// the effects of the prefix header.
|
||||
// #define BOOST_ABI_SUFFIX my-header-name
|
||||
|
||||
// BOOST_ALL_DYN_LINK: Forces all libraries that have separate source,
|
||||
// to be linked as dll's rather than static libraries on Microsoft Windows
|
||||
// (this macro is used to turn on __declspec(dllimport) modifiers, so that
|
||||
// the compiler knows which symbols to look for in a dll rather than in a
|
||||
// static library). Note that there may be some libraries that can only
|
||||
// be statically linked (Boost.Test for example) and others which may only
|
||||
// be dynamically linked (Boost.Threads for example), in these cases this
|
||||
// BOOST_ALL_DYN_LINK: Forces all libraries that have separate source,
|
||||
// to be linked as dll's rather than static libraries on Microsoft Windows
|
||||
// (this macro is used to turn on __declspec(dllimport) modifiers, so that
|
||||
// the compiler knows which symbols to look for in a dll rather than in a
|
||||
// static library). Note that there may be some libraries that can only
|
||||
// be statically linked (Boost.Test for example) and others which may only
|
||||
// be dynamically linked (Boost.Threads for example), in these cases this
|
||||
// macro has no effect.
|
||||
// #define BOOST_ALL_DYN_LINK
|
||||
|
||||
// BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll
|
||||
// rather than a static library on Microsoft Windows: replace the WHATEVER
|
||||
// part of the macro name with the name of the library that you want to
|
||||
// dynamically link to, for example use BOOST_DATE_TIME_DYN_LINK or
|
||||
// BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport)
|
||||
// modifiers, so that the compiler knows which symbols to look for in a dll
|
||||
// rather than in a static library).
|
||||
// Note that there may be some libraries that can only be statically linked
|
||||
// (Boost.Test for example) and others which may only be dynamically linked
|
||||
|
||||
// BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll
|
||||
// rather than a static library on Microsoft Windows: replace the WHATEVER
|
||||
// part of the macro name with the name of the library that you want to
|
||||
// dynamically link to, for example use BOOST_DATE_TIME_DYN_LINK or
|
||||
// BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport)
|
||||
// modifiers, so that the compiler knows which symbols to look for in a dll
|
||||
// rather than in a static library).
|
||||
// Note that there may be some libraries that can only be statically linked
|
||||
// (Boost.Test for example) and others which may only be dynamically linked
|
||||
// (Boost.Threads for example), in these cases this macro is unsupported.
|
||||
// #define BOOST_WHATEVER_DYN_LINK
|
||||
|
||||
// BOOST_ALL_NO_LIB: Tells the config system not to automatically select
|
||||
// which libraries to link against.
|
||||
// Normally if a compiler supports #pragma lib, then the correct library
|
||||
// build variant will be automatically selected and linked against,
|
||||
// simply by the act of including one of that library's headers.
|
||||
|
||||
// BOOST_ALL_NO_LIB: Tells the config system not to automatically select
|
||||
// which libraries to link against.
|
||||
// Normally if a compiler supports #pragma lib, then the correct library
|
||||
// build variant will be automatically selected and linked against,
|
||||
// simply by the act of including one of that library's headers.
|
||||
// This macro turns that feature off.
|
||||
// #define BOOST_ALL_NO_LIB
|
||||
|
||||
// BOOST_WHATEVER_NO_LIB: Tells the config system not to automatically
|
||||
// select which library to link against for library "whatever",
|
||||
// replace WHATEVER in the macro name with the name of the library;
|
||||
// for example BOOST_DATE_TIME_NO_LIB or BOOST_REGEX_NO_LIB.
|
||||
// Normally if a compiler supports #pragma lib, then the correct library
|
||||
// build variant will be automatically selected and linked against, simply
|
||||
// by the act of including one of that library's headers. This macro turns
|
||||
|
||||
// BOOST_WHATEVER_NO_LIB: Tells the config system not to automatically
|
||||
// select which library to link against for library "whatever",
|
||||
// replace WHATEVER in the macro name with the name of the library;
|
||||
// for example BOOST_DATE_TIME_NO_LIB or BOOST_REGEX_NO_LIB.
|
||||
// Normally if a compiler supports #pragma lib, then the correct library
|
||||
// build variant will be automatically selected and linked against, simply
|
||||
// by the act of including one of that library's headers. This macro turns
|
||||
// that feature off.
|
||||
// #define BOOST_WHATEVER_NO_LIB
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//
|
||||
// * Quite unreasonably pedantic.
|
||||
// * Generally only emitted by a single compiler.
|
||||
// * Can't easily be fixed: for example if the vendors own std lib
|
||||
// * Can't easily be fixed: for example if the vendors own std lib
|
||||
// code emits these warnings!
|
||||
//
|
||||
// Note that THIS HEADER MUST NOT INCLUDE ANY OTHER HEADERS:
|
||||
@@ -30,18 +30,18 @@
|
||||
#ifndef BOOST_CONFIG_WARNING_DISABLE_HPP
|
||||
#define BOOST_CONFIG_WARNING_DISABLE_HPP
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
// Error 'function': was declared deprecated
|
||||
// http://msdn2.microsoft.com/en-us/library/ttcz0bys(VS.80).aspx
|
||||
// This error is emitted when you use some perfectly conforming
|
||||
// std lib functions in a perfectly correct way, and also by
|
||||
// some of Microsoft's own std lib code !
|
||||
# pragma warning(disable:4996)
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
// Error 'function': was declared deprecated
|
||||
// http://msdn2.microsoft.com/en-us/library/ttcz0bys(VS.80).aspx
|
||||
// This error is emitted when you use some perfectly conforming
|
||||
// std lib functions in a perfectly correct way, and also by
|
||||
// some of Microsoft's own std lib code !
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
#if defined(__INTEL_COMPILER) || defined(__ICL)
|
||||
// As above: gives warning when a "deprecated"
|
||||
// std library function is encountered.
|
||||
# pragma warning(disable:1786)
|
||||
// As above: gives warning when a "deprecated"
|
||||
// std library function is encountered.
|
||||
#pragma warning(disable : 1786)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_CONFIG_WARNING_DISABLE_HPP
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
// (C) Copyright John maddock 1999.
|
||||
// (C) Copyright John maddock 1999.
|
||||
// (C) David Abrahams 2002. 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)
|
||||
@@ -14,133 +14,125 @@
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#ifdef BOOST_NO_LIMITS
|
||||
# include <boost/detail/limits.hpp>
|
||||
#include <boost/detail/limits.hpp>
|
||||
#else
|
||||
# include <limits>
|
||||
#include <limits>
|
||||
#endif
|
||||
|
||||
#if (defined(BOOST_HAS_LONG_LONG) && defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)) \
|
||||
|| (defined(BOOST_HAS_MS_INT64) && defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS))
|
||||
|| (defined(BOOST_HAS_MS_INT64) && defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS))
|
||||
// Add missing specializations for numeric_limits:
|
||||
#ifdef BOOST_HAS_MS_INT64
|
||||
# define BOOST_LLT __int64
|
||||
# define BOOST_ULLT unsigned __int64
|
||||
#define BOOST_LLT __int64
|
||||
#define BOOST_ULLT unsigned __int64
|
||||
#else
|
||||
# define BOOST_LLT ::boost::long_long_type
|
||||
# define BOOST_ULLT ::boost::ulong_long_type
|
||||
#define BOOST_LLT ::boost::long_long_type
|
||||
#define BOOST_ULLT ::boost::ulong_long_type
|
||||
#endif
|
||||
|
||||
#include <climits> // for CHAR_BIT
|
||||
#include <climits> // for CHAR_BIT
|
||||
|
||||
namespace std
|
||||
namespace std {
|
||||
template <> class numeric_limits<BOOST_LLT>
|
||||
{
|
||||
template<>
|
||||
class numeric_limits<BOOST_LLT>
|
||||
{
|
||||
public:
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, is_specialized = true);
|
||||
public:
|
||||
BOOST_STATIC_CONSTANT(bool, is_specialized = true);
|
||||
#ifdef BOOST_HAS_MS_INT64
|
||||
static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x8000000000000000i64; }
|
||||
static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x7FFFFFFFFFFFFFFFi64; }
|
||||
static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION() { return 0x8000000000000000i64; }
|
||||
static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION() { return 0x7FFFFFFFFFFFFFFFi64; }
|
||||
#elif defined(LLONG_MAX)
|
||||
static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MIN; }
|
||||
static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MAX; }
|
||||
static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION() { return LLONG_MIN; }
|
||||
static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION() { return LLONG_MAX; }
|
||||
#elif defined(LONGLONG_MAX)
|
||||
static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MIN; }
|
||||
static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MAX; }
|
||||
static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION() { return LONGLONG_MIN; }
|
||||
static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION() { return LONGLONG_MAX; }
|
||||
#else
|
||||
static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 1LL << (sizeof(BOOST_LLT) * CHAR_BIT - 1); }
|
||||
static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~(min)(); }
|
||||
static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION() { return 1LL << (sizeof(BOOST_LLT) * CHAR_BIT - 1); }
|
||||
static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION() { return ~(min)(); }
|
||||
#endif
|
||||
BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT -1);
|
||||
BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT) - 1) * 301L / 1000);
|
||||
BOOST_STATIC_CONSTANT(bool, is_signed = true);
|
||||
BOOST_STATIC_CONSTANT(bool, is_integer = true);
|
||||
BOOST_STATIC_CONSTANT(bool, is_exact = true);
|
||||
BOOST_STATIC_CONSTANT(int, radix = 2);
|
||||
static BOOST_LLT epsilon() throw() { return 0; };
|
||||
static BOOST_LLT round_error() throw() { return 0; };
|
||||
BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT - 1);
|
||||
BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof(BOOST_LLT) - 1) * 301L / 1000);
|
||||
BOOST_STATIC_CONSTANT(bool, is_signed = true);
|
||||
BOOST_STATIC_CONSTANT(bool, is_integer = true);
|
||||
BOOST_STATIC_CONSTANT(bool, is_exact = true);
|
||||
BOOST_STATIC_CONSTANT(int, radix = 2);
|
||||
static BOOST_LLT epsilon() throw() { return 0; };
|
||||
static BOOST_LLT round_error() throw() { return 0; };
|
||||
|
||||
BOOST_STATIC_CONSTANT(int, min_exponent = 0);
|
||||
BOOST_STATIC_CONSTANT(int, min_exponent10 = 0);
|
||||
BOOST_STATIC_CONSTANT(int, max_exponent = 0);
|
||||
BOOST_STATIC_CONSTANT(int, max_exponent10 = 0);
|
||||
BOOST_STATIC_CONSTANT(int, min_exponent = 0);
|
||||
BOOST_STATIC_CONSTANT(int, min_exponent10 = 0);
|
||||
BOOST_STATIC_CONSTANT(int, max_exponent = 0);
|
||||
BOOST_STATIC_CONSTANT(int, max_exponent10 = 0);
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, has_infinity = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_denorm = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false);
|
||||
static BOOST_LLT infinity() throw() { return 0; };
|
||||
static BOOST_LLT quiet_NaN() throw() { return 0; };
|
||||
static BOOST_LLT signaling_NaN() throw() { return 0; };
|
||||
static BOOST_LLT denorm_min() throw() { return 0; };
|
||||
BOOST_STATIC_CONSTANT(bool, has_infinity = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_denorm = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false);
|
||||
static BOOST_LLT infinity() throw() { return 0; };
|
||||
static BOOST_LLT quiet_NaN() throw() { return 0; };
|
||||
static BOOST_LLT signaling_NaN() throw() { return 0; };
|
||||
static BOOST_LLT denorm_min() throw() { return 0; };
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, is_iec559 = false);
|
||||
BOOST_STATIC_CONSTANT(bool, is_bounded = true);
|
||||
BOOST_STATIC_CONSTANT(bool, is_modulo = true);
|
||||
BOOST_STATIC_CONSTANT(bool, is_iec559 = false);
|
||||
BOOST_STATIC_CONSTANT(bool, is_bounded = true);
|
||||
BOOST_STATIC_CONSTANT(bool, is_modulo = true);
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, traps = false);
|
||||
BOOST_STATIC_CONSTANT(bool, tinyness_before = false);
|
||||
BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero);
|
||||
|
||||
};
|
||||
BOOST_STATIC_CONSTANT(bool, traps = false);
|
||||
BOOST_STATIC_CONSTANT(bool, tinyness_before = false);
|
||||
BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero);
|
||||
};
|
||||
|
||||
template<>
|
||||
class numeric_limits<BOOST_ULLT>
|
||||
{
|
||||
public:
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, is_specialized = true);
|
||||
template <> class numeric_limits<BOOST_ULLT>
|
||||
{
|
||||
public:
|
||||
BOOST_STATIC_CONSTANT(bool, is_specialized = true);
|
||||
#ifdef BOOST_HAS_MS_INT64
|
||||
static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0ui64; }
|
||||
static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0xFFFFFFFFFFFFFFFFui64; }
|
||||
static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION() { return 0ui64; }
|
||||
static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION() { return 0xFFFFFFFFFFFFFFFFui64; }
|
||||
#elif defined(ULLONG_MAX) && defined(ULLONG_MIN)
|
||||
static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MIN; }
|
||||
static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MAX; }
|
||||
static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION() { return ULLONG_MIN; }
|
||||
static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION() { return ULLONG_MAX; }
|
||||
#elif defined(ULONGLONG_MAX) && defined(ULONGLONG_MIN)
|
||||
static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MIN; }
|
||||
static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MAX; }
|
||||
static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION() { return ULONGLONG_MIN; }
|
||||
static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION() { return ULONGLONG_MAX; }
|
||||
#else
|
||||
static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0uLL; }
|
||||
static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~0uLL; }
|
||||
static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION() { return 0uLL; }
|
||||
static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION() { return ~0uLL; }
|
||||
#endif
|
||||
BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT);
|
||||
BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT)) * 301L / 1000);
|
||||
BOOST_STATIC_CONSTANT(bool, is_signed = false);
|
||||
BOOST_STATIC_CONSTANT(bool, is_integer = true);
|
||||
BOOST_STATIC_CONSTANT(bool, is_exact = true);
|
||||
BOOST_STATIC_CONSTANT(int, radix = 2);
|
||||
static BOOST_ULLT epsilon() throw() { return 0; };
|
||||
static BOOST_ULLT round_error() throw() { return 0; };
|
||||
BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT);
|
||||
BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof(BOOST_LLT)) * 301L / 1000);
|
||||
BOOST_STATIC_CONSTANT(bool, is_signed = false);
|
||||
BOOST_STATIC_CONSTANT(bool, is_integer = true);
|
||||
BOOST_STATIC_CONSTANT(bool, is_exact = true);
|
||||
BOOST_STATIC_CONSTANT(int, radix = 2);
|
||||
static BOOST_ULLT epsilon() throw() { return 0; };
|
||||
static BOOST_ULLT round_error() throw() { return 0; };
|
||||
|
||||
BOOST_STATIC_CONSTANT(int, min_exponent = 0);
|
||||
BOOST_STATIC_CONSTANT(int, min_exponent10 = 0);
|
||||
BOOST_STATIC_CONSTANT(int, max_exponent = 0);
|
||||
BOOST_STATIC_CONSTANT(int, max_exponent10 = 0);
|
||||
BOOST_STATIC_CONSTANT(int, min_exponent = 0);
|
||||
BOOST_STATIC_CONSTANT(int, min_exponent10 = 0);
|
||||
BOOST_STATIC_CONSTANT(int, max_exponent = 0);
|
||||
BOOST_STATIC_CONSTANT(int, max_exponent10 = 0);
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, has_infinity = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_denorm = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false);
|
||||
static BOOST_ULLT infinity() throw() { return 0; };
|
||||
static BOOST_ULLT quiet_NaN() throw() { return 0; };
|
||||
static BOOST_ULLT signaling_NaN() throw() { return 0; };
|
||||
static BOOST_ULLT denorm_min() throw() { return 0; };
|
||||
BOOST_STATIC_CONSTANT(bool, has_infinity = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_denorm = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false);
|
||||
static BOOST_ULLT infinity() throw() { return 0; };
|
||||
static BOOST_ULLT quiet_NaN() throw() { return 0; };
|
||||
static BOOST_ULLT signaling_NaN() throw() { return 0; };
|
||||
static BOOST_ULLT denorm_min() throw() { return 0; };
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, is_iec559 = false);
|
||||
BOOST_STATIC_CONSTANT(bool, is_bounded = true);
|
||||
BOOST_STATIC_CONSTANT(bool, is_modulo = true);
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, traps = false);
|
||||
BOOST_STATIC_CONSTANT(bool, tinyness_before = false);
|
||||
BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero);
|
||||
|
||||
};
|
||||
}
|
||||
#endif
|
||||
BOOST_STATIC_CONSTANT(bool, is_iec559 = false);
|
||||
BOOST_STATIC_CONSTANT(bool, is_bounded = true);
|
||||
BOOST_STATIC_CONSTANT(bool, is_modulo = true);
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, traps = false);
|
||||
BOOST_STATIC_CONSTANT(bool, tinyness_before = false);
|
||||
BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero);
|
||||
};
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,21 +12,18 @@
|
||||
#define BOOST_NUMERIC_INTERVAL_HPP
|
||||
|
||||
#include <boost/limits.hpp>
|
||||
#include <boost/numeric/interval/interval.hpp>
|
||||
#include <boost/numeric/interval/policies.hpp>
|
||||
|
||||
#include <boost/numeric/interval/hw_rounding.hpp>
|
||||
#include <boost/numeric/interval/rounded_arith.hpp>
|
||||
#include <boost/numeric/interval/rounded_transc.hpp>
|
||||
#include <boost/numeric/interval/constants.hpp>
|
||||
|
||||
#include <boost/numeric/interval/checking.hpp>
|
||||
#include <boost/numeric/interval/compare.hpp>
|
||||
#include <boost/numeric/interval/utility.hpp>
|
||||
|
||||
#include <boost/numeric/interval/arith.hpp>
|
||||
#include <boost/numeric/interval/arith2.hpp>
|
||||
#include <boost/numeric/interval/arith3.hpp>
|
||||
#include <boost/numeric/interval/checking.hpp>
|
||||
#include <boost/numeric/interval/compare.hpp>
|
||||
#include <boost/numeric/interval/constants.hpp>
|
||||
#include <boost/numeric/interval/hw_rounding.hpp>
|
||||
#include <boost/numeric/interval/interval.hpp>
|
||||
#include <boost/numeric/interval/policies.hpp>
|
||||
#include <boost/numeric/interval/rounded_arith.hpp>
|
||||
#include <boost/numeric/interval/rounded_transc.hpp>
|
||||
#include <boost/numeric/interval/transc.hpp>
|
||||
#include <boost/numeric/interval/utility.hpp>
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_HPP
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_ARITH_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_ARITH_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/numeric/interval/interval.hpp>
|
||||
#include <boost/numeric/interval/detail/bugs.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
#include <boost/numeric/interval/detail/division.hpp>
|
||||
#include <algorithm>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/numeric/interval/detail/bugs.hpp>
|
||||
#include <boost/numeric/interval/detail/division.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
#include <boost/numeric/interval/interval.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
@@ -25,278 +25,253 @@ namespace numeric {
|
||||
* Basic arithmetic operators
|
||||
*/
|
||||
|
||||
template<class T, class Policies> inline
|
||||
const interval<T, Policies>& operator+(const interval<T, Policies>& x)
|
||||
template <class T, class Policies> inline const interval<T, Policies> &operator+(const interval<T, Policies> &x)
|
||||
{
|
||||
return x;
|
||||
return x;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator-(const interval<T, Policies>& x)
|
||||
template <class T, class Policies> inline interval<T, Policies> operator-(const interval<T, Policies> &x)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x))
|
||||
return interval<T, Policies>::empty();
|
||||
return interval<T, Policies>(-x.upper(), -x.lower(), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator+=(const interval<T, Policies>& r)
|
||||
{
|
||||
if (interval_lib::detail::test_input(*this, r))
|
||||
set_empty();
|
||||
else {
|
||||
typename Policies::rounding rnd;
|
||||
set(rnd.add_down(low, r.low), rnd.add_up(up, r.up));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator+=(const T& r)
|
||||
{
|
||||
if (interval_lib::detail::test_input(*this, r))
|
||||
set_empty();
|
||||
else {
|
||||
typename Policies::rounding rnd;
|
||||
set(rnd.add_down(low, r), rnd.add_up(up, r));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator-=(const interval<T, Policies>& r)
|
||||
{
|
||||
if (interval_lib::detail::test_input(*this, r))
|
||||
set_empty();
|
||||
else {
|
||||
typename Policies::rounding rnd;
|
||||
set(rnd.sub_down(low, r.up), rnd.sub_up(up, r.low));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator-=(const T& r)
|
||||
{
|
||||
if (interval_lib::detail::test_input(*this, r))
|
||||
set_empty();
|
||||
else {
|
||||
typename Policies::rounding rnd;
|
||||
set(rnd.sub_down(low, r), rnd.sub_up(up, r));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator*=(const interval<T, Policies>& r)
|
||||
{
|
||||
return *this = *this * r;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator*=(const T& r)
|
||||
{
|
||||
return *this = r * *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator/=(const interval<T, Policies>& r)
|
||||
{
|
||||
return *this = *this / r;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator/=(const T& r)
|
||||
{
|
||||
return *this = *this / r;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator+(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T,Policies>(rnd.add_down(x.lower(), y.lower()),
|
||||
rnd.add_up (x.upper(), y.upper()), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator+(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T,Policies>(rnd.add_down(x, y.lower()),
|
||||
rnd.add_up (x, y.upper()), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator+(const interval<T, Policies>& x, const T& y)
|
||||
{ return y + x; }
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator-(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T,Policies>(rnd.sub_down(x.lower(), y.upper()),
|
||||
rnd.sub_up (x.upper(), y.lower()), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator-(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T,Policies>(rnd.sub_down(x, y.upper()),
|
||||
rnd.sub_up (x, y.lower()), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator-(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T,Policies>(rnd.sub_down(x.lower(), y),
|
||||
rnd.sub_up (x.upper(), y), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator*(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y)
|
||||
{
|
||||
BOOST_USING_STD_MIN();
|
||||
BOOST_USING_STD_MAX();
|
||||
typedef interval<T, Policies> I;
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
const T& xl = x.lower();
|
||||
const T& xu = x.upper();
|
||||
const T& yl = y.lower();
|
||||
const T& yu = y.upper();
|
||||
|
||||
if (interval_lib::user::is_neg(xl))
|
||||
if (interval_lib::user::is_pos(xu))
|
||||
if (interval_lib::user::is_neg(yl))
|
||||
if (interval_lib::user::is_pos(yu)) // M * M
|
||||
return I(min BOOST_PREVENT_MACRO_SUBSTITUTION(rnd.mul_down(xl, yu), rnd.mul_down(xu, yl)),
|
||||
max BOOST_PREVENT_MACRO_SUBSTITUTION(rnd.mul_up (xl, yl), rnd.mul_up (xu, yu)), true);
|
||||
else // M * N
|
||||
return I(rnd.mul_down(xu, yl), rnd.mul_up(xl, yl), true);
|
||||
else
|
||||
if (interval_lib::user::is_pos(yu)) // M * P
|
||||
return I(rnd.mul_down(xl, yu), rnd.mul_up(xu, yu), true);
|
||||
else // M * Z
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else
|
||||
if (interval_lib::user::is_neg(yl))
|
||||
if (interval_lib::user::is_pos(yu)) // N * M
|
||||
return I(rnd.mul_down(xl, yu), rnd.mul_up(xl, yl), true);
|
||||
else // N * N
|
||||
return I(rnd.mul_down(xu, yu), rnd.mul_up(xl, yl), true);
|
||||
else
|
||||
if (interval_lib::user::is_pos(yu)) // N * P
|
||||
return I(rnd.mul_down(xl, yu), rnd.mul_up(xu, yl), true);
|
||||
else // N * Z
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else
|
||||
if (interval_lib::user::is_pos(xu))
|
||||
if (interval_lib::user::is_neg(yl))
|
||||
if (interval_lib::user::is_pos(yu)) // P * M
|
||||
return I(rnd.mul_down(xu, yl), rnd.mul_up(xu, yu), true);
|
||||
else // P * N
|
||||
return I(rnd.mul_down(xu, yl), rnd.mul_up(xl, yu), true);
|
||||
else
|
||||
if (interval_lib::user::is_pos(yu)) // P * P
|
||||
return I(rnd.mul_down(xl, yl), rnd.mul_up(xu, yu), true);
|
||||
else // P * Z
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else // Z * ?
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator*(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
typedef interval<T, Policies> I;
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
const T& yl = y.lower();
|
||||
const T& yu = y.upper();
|
||||
// x is supposed not to be infinite
|
||||
if (interval_lib::user::is_neg(x))
|
||||
return I(rnd.mul_down(x, yu), rnd.mul_up(x, yl), true);
|
||||
else if (interval_lib::user::is_zero(x))
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else
|
||||
return I(rnd.mul_down(x, yl), rnd.mul_up(x, yu), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator*(const interval<T, Policies>& x, const T& y)
|
||||
{ return y * x; }
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator/(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
if (zero_in(y))
|
||||
if (!interval_lib::user::is_zero(y.lower()))
|
||||
if (!interval_lib::user::is_zero(y.upper()))
|
||||
return interval_lib::detail::div_zero(x);
|
||||
else
|
||||
return interval_lib::detail::div_negative(x, y.lower());
|
||||
else
|
||||
if (!interval_lib::user::is_zero(y.upper()))
|
||||
return interval_lib::detail::div_positive(x, y.upper());
|
||||
else
|
||||
if (interval_lib::detail::test_input(x))
|
||||
return interval<T, Policies>::empty();
|
||||
else
|
||||
return interval_lib::detail::div_non_zero(x, y);
|
||||
return interval<T, Policies>(-x.upper(), -x.lower(), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator/(const T& x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> &interval<T, Policies>::operator+=(const interval<T, Policies> &r)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
if (zero_in(y))
|
||||
if (!interval_lib::user::is_zero(y.lower()))
|
||||
if (!interval_lib::user::is_zero(y.upper()))
|
||||
return interval_lib::detail::div_zero<T, Policies>(x);
|
||||
else
|
||||
return interval_lib::detail::div_negative<T, Policies>(x, y.lower());
|
||||
else
|
||||
if (!interval_lib::user::is_zero(y.upper()))
|
||||
return interval_lib::detail::div_positive<T, Policies>(x, y.upper());
|
||||
else
|
||||
if (interval_lib::detail::test_input(*this, r))
|
||||
set_empty();
|
||||
else {
|
||||
typename Policies::rounding rnd;
|
||||
set(rnd.add_down(low, r.low), rnd.add_up(up, r.up));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class T, class Policies> inline interval<T, Policies> &interval<T, Policies>::operator+=(const T &r)
|
||||
{
|
||||
if (interval_lib::detail::test_input(*this, r))
|
||||
set_empty();
|
||||
else {
|
||||
typename Policies::rounding rnd;
|
||||
set(rnd.add_down(low, r), rnd.add_up(up, r));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> &interval<T, Policies>::operator-=(const interval<T, Policies> &r)
|
||||
{
|
||||
if (interval_lib::detail::test_input(*this, r))
|
||||
set_empty();
|
||||
else {
|
||||
typename Policies::rounding rnd;
|
||||
set(rnd.sub_down(low, r.up), rnd.sub_up(up, r.low));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class T, class Policies> inline interval<T, Policies> &interval<T, Policies>::operator-=(const T &r)
|
||||
{
|
||||
if (interval_lib::detail::test_input(*this, r))
|
||||
set_empty();
|
||||
else {
|
||||
typename Policies::rounding rnd;
|
||||
set(rnd.sub_down(low, r), rnd.sub_up(up, r));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> &interval<T, Policies>::operator*=(const interval<T, Policies> &r)
|
||||
{
|
||||
return *this = *this * r;
|
||||
}
|
||||
|
||||
template <class T, class Policies> inline interval<T, Policies> &interval<T, Policies>::operator*=(const T &r)
|
||||
{
|
||||
return *this = r * *this;
|
||||
}
|
||||
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> &interval<T, Policies>::operator/=(const interval<T, Policies> &r)
|
||||
{
|
||||
return *this = *this / r;
|
||||
}
|
||||
|
||||
template <class T, class Policies> inline interval<T, Policies> &interval<T, Policies>::operator/=(const T &r)
|
||||
{
|
||||
return *this = *this / r;
|
||||
}
|
||||
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> operator+(const interval<T, Policies> &x, const interval<T, Policies> &y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
else
|
||||
return interval_lib::detail::div_non_zero(x, y);
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T, Policies>(rnd.add_down(x.lower(), y.lower()), rnd.add_up(x.upper(), y.upper()), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator/(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline interval<T, Policies> operator+(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y) || interval_lib::user::is_zero(y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
const T& xl = x.lower();
|
||||
const T& xu = x.upper();
|
||||
if (interval_lib::user::is_neg(y))
|
||||
return interval<T, Policies>(rnd.div_down(xu, y), rnd.div_up(xl, y), true);
|
||||
else
|
||||
return interval<T, Policies>(rnd.div_down(xl, y), rnd.div_up(xu, y), true);
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T, Policies>(rnd.add_down(x, y.lower()), rnd.add_up(x, y.upper()), true);
|
||||
}
|
||||
|
||||
template <class T, class Policies> inline interval<T, Policies> operator+(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
return y + x;
|
||||
}
|
||||
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> operator-(const interval<T, Policies> &x, const interval<T, Policies> &y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T, Policies>(rnd.sub_down(x.lower(), y.upper()), rnd.sub_up(x.upper(), y.lower()), true);
|
||||
}
|
||||
|
||||
template <class T, class Policies> inline interval<T, Policies> operator-(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T, Policies>(rnd.sub_down(x, y.upper()), rnd.sub_up(x, y.lower()), true);
|
||||
}
|
||||
|
||||
template <class T, class Policies> inline interval<T, Policies> operator-(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T, Policies>(rnd.sub_down(x.lower(), y), rnd.sub_up(x.upper(), y), true);
|
||||
}
|
||||
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> operator*(const interval<T, Policies> &x, const interval<T, Policies> &y)
|
||||
{
|
||||
BOOST_USING_STD_MIN();
|
||||
BOOST_USING_STD_MAX();
|
||||
typedef interval<T, Policies> I;
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
const T &xl = x.lower();
|
||||
const T &xu = x.upper();
|
||||
const T &yl = y.lower();
|
||||
const T &yu = y.upper();
|
||||
|
||||
if (interval_lib::user::is_neg(xl))
|
||||
if (interval_lib::user::is_pos(xu))
|
||||
if (interval_lib::user::is_neg(yl))
|
||||
if (interval_lib::user::is_pos(yu)) // M * M
|
||||
return I(min BOOST_PREVENT_MACRO_SUBSTITUTION(rnd.mul_down(xl, yu), rnd.mul_down(xu, yl)),
|
||||
max BOOST_PREVENT_MACRO_SUBSTITUTION(rnd.mul_up(xl, yl), rnd.mul_up(xu, yu)),
|
||||
true);
|
||||
else // M * N
|
||||
return I(rnd.mul_down(xu, yl), rnd.mul_up(xl, yl), true);
|
||||
else if (interval_lib::user::is_pos(yu)) // M * P
|
||||
return I(rnd.mul_down(xl, yu), rnd.mul_up(xu, yu), true);
|
||||
else // M * Z
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else if (interval_lib::user::is_neg(yl))
|
||||
if (interval_lib::user::is_pos(yu)) // N * M
|
||||
return I(rnd.mul_down(xl, yu), rnd.mul_up(xl, yl), true);
|
||||
else // N * N
|
||||
return I(rnd.mul_down(xu, yu), rnd.mul_up(xl, yl), true);
|
||||
else if (interval_lib::user::is_pos(yu)) // N * P
|
||||
return I(rnd.mul_down(xl, yu), rnd.mul_up(xu, yl), true);
|
||||
else // N * Z
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else if (interval_lib::user::is_pos(xu))
|
||||
if (interval_lib::user::is_neg(yl))
|
||||
if (interval_lib::user::is_pos(yu)) // P * M
|
||||
return I(rnd.mul_down(xu, yl), rnd.mul_up(xu, yu), true);
|
||||
else // P * N
|
||||
return I(rnd.mul_down(xu, yl), rnd.mul_up(xl, yu), true);
|
||||
else if (interval_lib::user::is_pos(yu)) // P * P
|
||||
return I(rnd.mul_down(xl, yl), rnd.mul_up(xu, yu), true);
|
||||
else // P * Z
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else // Z * ?
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
}
|
||||
|
||||
template <class T, class Policies> inline interval<T, Policies> operator*(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
typedef interval<T, Policies> I;
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
const T &yl = y.lower();
|
||||
const T &yu = y.upper();
|
||||
// x is supposed not to be infinite
|
||||
if (interval_lib::user::is_neg(x))
|
||||
return I(rnd.mul_down(x, yu), rnd.mul_up(x, yl), true);
|
||||
else if (interval_lib::user::is_zero(x))
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else
|
||||
return I(rnd.mul_down(x, yl), rnd.mul_up(x, yu), true);
|
||||
}
|
||||
|
||||
template <class T, class Policies> inline interval<T, Policies> operator*(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
return y * x;
|
||||
}
|
||||
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> operator/(const interval<T, Policies> &x, const interval<T, Policies> &y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
if (zero_in(y))
|
||||
if (!interval_lib::user::is_zero(y.lower()))
|
||||
if (!interval_lib::user::is_zero(y.upper()))
|
||||
return interval_lib::detail::div_zero(x);
|
||||
else
|
||||
return interval_lib::detail::div_negative(x, y.lower());
|
||||
else if (!interval_lib::user::is_zero(y.upper()))
|
||||
return interval_lib::detail::div_positive(x, y.upper());
|
||||
else
|
||||
return interval<T, Policies>::empty();
|
||||
else
|
||||
return interval_lib::detail::div_non_zero(x, y);
|
||||
}
|
||||
|
||||
template <class T, class Policies> inline interval<T, Policies> operator/(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
if (zero_in(y))
|
||||
if (!interval_lib::user::is_zero(y.lower()))
|
||||
if (!interval_lib::user::is_zero(y.upper()))
|
||||
return interval_lib::detail::div_zero<T, Policies>(x);
|
||||
else
|
||||
return interval_lib::detail::div_negative<T, Policies>(x, y.lower());
|
||||
else if (!interval_lib::user::is_zero(y.upper()))
|
||||
return interval_lib::detail::div_positive<T, Policies>(x, y.upper());
|
||||
else
|
||||
return interval<T, Policies>::empty();
|
||||
else
|
||||
return interval_lib::detail::div_non_zero(x, y);
|
||||
}
|
||||
|
||||
template <class T, class Policies> inline interval<T, Policies> operator/(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y) || interval_lib::user::is_zero(y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
const T &xl = x.lower();
|
||||
const T &xu = x.upper();
|
||||
if (interval_lib::user::is_neg(y))
|
||||
return interval<T, Policies>(rnd.div_down(xu, y), rnd.div_up(xl, y), true);
|
||||
else
|
||||
return interval<T, Policies>(rnd.div_down(xl, y), rnd.div_up(xu, y), true);
|
||||
}
|
||||
|
||||
} // namespace numeric
|
||||
|
||||
@@ -14,289 +14,296 @@
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_ARITH2_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_ARITH2_HPP
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
#include <boost/config/no_tr1/cmath.hpp>
|
||||
#include <boost/numeric/interval/arith.hpp>
|
||||
#include <boost/numeric/interval/detail/bugs.hpp>
|
||||
#include <boost/numeric/interval/detail/division.hpp>
|
||||
#include <boost/numeric/interval/arith.hpp>
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
#include <boost/numeric/interval/policies.hpp>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <boost/config/no_tr1/cmath.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> fmod(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y)
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> fmod(const interval<T, Policies> &x, const interval<T, Policies> &y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename interval_lib::unprotect<interval<T, Policies> >::type I;
|
||||
T const &yb = interval_lib::user::is_neg(x.lower()) ? y.lower() : y.upper();
|
||||
T n = rnd.int_down(rnd.div_down(x.lower(), yb));
|
||||
return (const I&)x - n * (const I&)y;
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename interval_lib::unprotect<interval<T, Policies>>::type I;
|
||||
T const &yb = interval_lib::user::is_neg(x.lower()) ? y.lower() : y.upper();
|
||||
T n = rnd.int_down(rnd.div_down(x.lower(), yb));
|
||||
return (const I &)x - n * (const I &)y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> fmod(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline interval<T, Policies> fmod(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename interval_lib::unprotect<interval<T, Policies> >::type I;
|
||||
T n = rnd.int_down(rnd.div_down(x.lower(), y));
|
||||
return (const I&)x - n * I(y);
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename interval_lib::unprotect<interval<T, Policies>>::type I;
|
||||
T n = rnd.int_down(rnd.div_down(x.lower(), y));
|
||||
return (const I &)x - n * I(y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> fmod(const T& x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline interval<T, Policies> fmod(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename interval_lib::unprotect<interval<T, Policies> >::type I;
|
||||
T const &yb = interval_lib::user::is_neg(x) ? y.lower() : y.upper();
|
||||
T n = rnd.int_down(rnd.div_down(x, yb));
|
||||
return x - n * (const I&)y;
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename interval_lib::unprotect<interval<T, Policies>>::type I;
|
||||
T const &yb = interval_lib::user::is_neg(x) ? y.lower() : y.upper();
|
||||
T n = rnd.int_down(rnd.div_down(x, yb));
|
||||
return x - n * (const I &)y;
|
||||
}
|
||||
|
||||
namespace interval_lib {
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> division_part1(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y, bool& b)
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> division_part1(const interval<T, Policies> &x, const interval<T, Policies> &y, bool &b)
|
||||
{
|
||||
typedef interval<T, Policies> I;
|
||||
b = false;
|
||||
if (detail::test_input(x, y))
|
||||
return I::empty();
|
||||
if (zero_in(y))
|
||||
if (!user::is_zero(y.lower()))
|
||||
if (!user::is_zero(y.upper()))
|
||||
return detail::div_zero_part1(x, y, b);
|
||||
else
|
||||
return detail::div_negative(x, y.lower());
|
||||
else
|
||||
if (!user::is_zero(y.upper()))
|
||||
return detail::div_positive(x, y.upper());
|
||||
else
|
||||
typedef interval<T, Policies> I;
|
||||
b = false;
|
||||
if (detail::test_input(x, y))
|
||||
return I::empty();
|
||||
else
|
||||
return detail::div_non_zero(x, y);
|
||||
if (zero_in(y))
|
||||
if (!user::is_zero(y.lower()))
|
||||
if (!user::is_zero(y.upper()))
|
||||
return detail::div_zero_part1(x, y, b);
|
||||
else
|
||||
return detail::div_negative(x, y.lower());
|
||||
else if (!user::is_zero(y.upper()))
|
||||
return detail::div_positive(x, y.upper());
|
||||
else
|
||||
return I::empty();
|
||||
else
|
||||
return detail::div_non_zero(x, y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> division_part2(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y, bool b = true)
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies>
|
||||
division_part2(const interval<T, Policies> &x, const interval<T, Policies> &y, bool b = true)
|
||||
{
|
||||
if (!b) return interval<T, Policies>::empty();
|
||||
return detail::div_zero_part2(x, y);
|
||||
if (!b)
|
||||
return interval<T, Policies>::empty();
|
||||
return detail::div_zero_part2(x, y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> multiplicative_inverse(const interval<T, Policies>& x)
|
||||
template <class T, class Policies> inline interval<T, Policies> multiplicative_inverse(const interval<T, Policies> &x)
|
||||
{
|
||||
typedef interval<T, Policies> I;
|
||||
if (detail::test_input(x))
|
||||
return I::empty();
|
||||
T one = static_cast<T>(1);
|
||||
typename Policies::rounding rnd;
|
||||
if (zero_in(x)) {
|
||||
typedef typename Policies::checking checking;
|
||||
if (!user::is_zero(x.lower()))
|
||||
if (!user::is_zero(x.upper()))
|
||||
return I::whole();
|
||||
else
|
||||
return I(checking::neg_inf(), rnd.div_up(one, x.lower()), true);
|
||||
else
|
||||
if (!user::is_zero(x.upper()))
|
||||
return I(rnd.div_down(one, x.upper()), checking::pos_inf(), true);
|
||||
else
|
||||
typedef interval<T, Policies> I;
|
||||
if (detail::test_input(x))
|
||||
return I::empty();
|
||||
} else
|
||||
return I(rnd.div_down(one, x.upper()), rnd.div_up(one, x.lower()), true);
|
||||
T one = static_cast<T>(1);
|
||||
typename Policies::rounding rnd;
|
||||
if (zero_in(x)) {
|
||||
typedef typename Policies::checking checking;
|
||||
if (!user::is_zero(x.lower()))
|
||||
if (!user::is_zero(x.upper()))
|
||||
return I::whole();
|
||||
else
|
||||
return I(checking::neg_inf(), rnd.div_up(one, x.lower()), true);
|
||||
else if (!user::is_zero(x.upper()))
|
||||
return I(rnd.div_down(one, x.upper()), checking::pos_inf(), true);
|
||||
else
|
||||
return I::empty();
|
||||
}
|
||||
else
|
||||
return I(rnd.div_down(one, x.upper()), rnd.div_up(one, x.lower()), true);
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<class T, class Rounding> inline
|
||||
T pow_dn(const T& x_, int pwr, Rounding& rnd) // x and pwr are positive
|
||||
template <class T, class Rounding> inline T pow_dn(const T &x_, int pwr, Rounding &rnd) // x and pwr are positive
|
||||
{
|
||||
T x = x_;
|
||||
T y = (pwr & 1) ? x_ : static_cast<T>(1);
|
||||
pwr >>= 1;
|
||||
while (pwr > 0) {
|
||||
x = rnd.mul_down(x, x);
|
||||
if (pwr & 1) y = rnd.mul_down(x, y);
|
||||
T x = x_;
|
||||
T y = (pwr & 1) ? x_ : static_cast<T>(1);
|
||||
pwr >>= 1;
|
||||
}
|
||||
return y;
|
||||
while (pwr > 0) {
|
||||
x = rnd.mul_down(x, x);
|
||||
if (pwr & 1)
|
||||
y = rnd.mul_down(x, y);
|
||||
pwr >>= 1;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
template<class T, class Rounding> inline
|
||||
T pow_up(const T& x_, int pwr, Rounding& rnd) // x and pwr are positive
|
||||
template <class T, class Rounding> inline T pow_up(const T &x_, int pwr, Rounding &rnd) // x and pwr are positive
|
||||
{
|
||||
T x = x_;
|
||||
T y = (pwr & 1) ? x_ : static_cast<T>(1);
|
||||
pwr >>= 1;
|
||||
while (pwr > 0) {
|
||||
x = rnd.mul_up(x, x);
|
||||
if (pwr & 1) y = rnd.mul_up(x, y);
|
||||
T x = x_;
|
||||
T y = (pwr & 1) ? x_ : static_cast<T>(1);
|
||||
pwr >>= 1;
|
||||
}
|
||||
return y;
|
||||
while (pwr > 0) {
|
||||
x = rnd.mul_up(x, x);
|
||||
if (pwr & 1)
|
||||
y = rnd.mul_up(x, y);
|
||||
pwr >>= 1;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace interval_lib
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> pow(const interval<T, Policies>& x, int pwr)
|
||||
template <class T, class Policies> inline interval<T, Policies> pow(const interval<T, Policies> &x, int pwr)
|
||||
{
|
||||
BOOST_USING_STD_MAX();
|
||||
using interval_lib::detail::pow_dn;
|
||||
using interval_lib::detail::pow_up;
|
||||
typedef interval<T, Policies> I;
|
||||
BOOST_USING_STD_MAX();
|
||||
using interval_lib::detail::pow_dn;
|
||||
using interval_lib::detail::pow_up;
|
||||
typedef interval<T, Policies> I;
|
||||
|
||||
if (interval_lib::detail::test_input(x))
|
||||
return I::empty();
|
||||
if (interval_lib::detail::test_input(x))
|
||||
return I::empty();
|
||||
|
||||
if (pwr == 0)
|
||||
if (interval_lib::user::is_zero(x.lower())
|
||||
&& interval_lib::user::is_zero(x.upper()))
|
||||
return I::empty();
|
||||
else
|
||||
return I(static_cast<T>(1));
|
||||
else if (pwr < 0)
|
||||
return interval_lib::multiplicative_inverse(pow(x, -pwr));
|
||||
if (pwr == 0)
|
||||
if (interval_lib::user::is_zero(x.lower()) && interval_lib::user::is_zero(x.upper()))
|
||||
return I::empty();
|
||||
else
|
||||
return I(static_cast<T>(1));
|
||||
else if (pwr < 0)
|
||||
return interval_lib::multiplicative_inverse(pow(x, -pwr));
|
||||
|
||||
typename Policies::rounding rnd;
|
||||
|
||||
if (interval_lib::user::is_neg(x.upper())) { // [-2,-1]
|
||||
T yl = pow_dn(static_cast<T>(-x.upper()), pwr, rnd);
|
||||
T yu = pow_up(static_cast<T>(-x.lower()), pwr, rnd);
|
||||
if (pwr & 1) // [-2,-1]^1
|
||||
return I(-yu, -yl, true);
|
||||
else // [-2,-1]^2
|
||||
return I(yl, yu, true);
|
||||
} else if (interval_lib::user::is_neg(x.lower())) { // [-1,1]
|
||||
if (pwr & 1) { // [-1,1]^1
|
||||
return I(-pow_up(-x.lower(), pwr, rnd), pow_up(x.upper(), pwr, rnd), true);
|
||||
} else { // [-1,1]^2
|
||||
return I(static_cast<T>(0), pow_up(max BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<T>(-x.lower()), x.upper()), pwr, rnd), true);
|
||||
typename Policies::rounding rnd;
|
||||
|
||||
if (interval_lib::user::is_neg(x.upper())) { // [-2,-1]
|
||||
T yl = pow_dn(static_cast<T>(-x.upper()), pwr, rnd);
|
||||
T yu = pow_up(static_cast<T>(-x.lower()), pwr, rnd);
|
||||
if (pwr & 1) // [-2,-1]^1
|
||||
return I(-yu, -yl, true);
|
||||
else // [-2,-1]^2
|
||||
return I(yl, yu, true);
|
||||
}
|
||||
else if (interval_lib::user::is_neg(x.lower())) { // [-1,1]
|
||||
if (pwr & 1) { // [-1,1]^1
|
||||
return I(-pow_up(-x.lower(), pwr, rnd), pow_up(x.upper(), pwr, rnd), true);
|
||||
}
|
||||
else { // [-1,1]^2
|
||||
return I(static_cast<T>(0),
|
||||
pow_up(max BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<T>(-x.lower()), x.upper()), pwr, rnd),
|
||||
true);
|
||||
}
|
||||
}
|
||||
else { // [1,2]
|
||||
return I(pow_dn(x.lower(), pwr, rnd), pow_up(x.upper(), pwr, rnd), true);
|
||||
}
|
||||
} else { // [1,2]
|
||||
return I(pow_dn(x.lower(), pwr, rnd), pow_up(x.upper(), pwr, rnd), true);
|
||||
}
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> sqrt(const interval<T, Policies>& x)
|
||||
template <class T, class Policies> inline interval<T, Policies> sqrt(const interval<T, Policies> &x)
|
||||
{
|
||||
typedef interval<T, Policies> I;
|
||||
if (interval_lib::detail::test_input(x) || interval_lib::user::is_neg(x.upper()))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
T l = !interval_lib::user::is_pos(x.lower()) ? static_cast<T>(0) : rnd.sqrt_down(x.lower());
|
||||
return I(l, rnd.sqrt_up(x.upper()), true);
|
||||
typedef interval<T, Policies> I;
|
||||
if (interval_lib::detail::test_input(x) || interval_lib::user::is_neg(x.upper()))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
T l = !interval_lib::user::is_pos(x.lower()) ? static_cast<T>(0) : rnd.sqrt_down(x.lower());
|
||||
return I(l, rnd.sqrt_up(x.upper()), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> square(const interval<T, Policies>& x)
|
||||
template <class T, class Policies> inline interval<T, Policies> square(const interval<T, Policies> &x)
|
||||
{
|
||||
typedef interval<T, Policies> I;
|
||||
if (interval_lib::detail::test_input(x))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
const T& xl = x.lower();
|
||||
const T& xu = x.upper();
|
||||
if (interval_lib::user::is_neg(xu))
|
||||
return I(rnd.mul_down(xu, xu), rnd.mul_up(xl, xl), true);
|
||||
else if (interval_lib::user::is_pos(x.lower()))
|
||||
return I(rnd.mul_down(xl, xl), rnd.mul_up(xu, xu), true);
|
||||
else
|
||||
return I(static_cast<T>(0), (-xl > xu ? rnd.mul_up(xl, xl) : rnd.mul_up(xu, xu)), true);
|
||||
typedef interval<T, Policies> I;
|
||||
if (interval_lib::detail::test_input(x))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
const T &xl = x.lower();
|
||||
const T &xu = x.upper();
|
||||
if (interval_lib::user::is_neg(xu))
|
||||
return I(rnd.mul_down(xu, xu), rnd.mul_up(xl, xl), true);
|
||||
else if (interval_lib::user::is_pos(x.lower()))
|
||||
return I(rnd.mul_down(xl, xl), rnd.mul_up(xu, xu), true);
|
||||
else
|
||||
return I(static_cast<T>(0), (-xl > xu ? rnd.mul_up(xl, xl) : rnd.mul_up(xu, xu)), true);
|
||||
}
|
||||
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
template< class I > inline
|
||||
I root_aux(typename I::base_type const &x, int k) // x and k are bigger than one
|
||||
template <class I> inline I root_aux(typename I::base_type const &x, int k) // x and k are bigger than one
|
||||
{
|
||||
typedef typename I::base_type T;
|
||||
T tk(k);
|
||||
I y(static_cast<T>(1), x, true);
|
||||
for(;;) {
|
||||
T y0 = median(y);
|
||||
I yy = intersect(y, y0 - (pow(I(y0, y0, true), k) - x) / (tk * pow(y, k - 1)));
|
||||
if (equal(y, yy)) return y;
|
||||
y = yy;
|
||||
}
|
||||
typedef typename I::base_type T;
|
||||
T tk(k);
|
||||
I y(static_cast<T>(1), x, true);
|
||||
for (;;) {
|
||||
T y0 = median(y);
|
||||
I yy = intersect(y, y0 - (pow(I(y0, y0, true), k) - x) / (tk * pow(y, k - 1)));
|
||||
if (equal(y, yy))
|
||||
return y;
|
||||
y = yy;
|
||||
}
|
||||
}
|
||||
|
||||
template< class I > inline // x is positive and k bigger than one
|
||||
typename I::base_type root_aux_dn(typename I::base_type const &x, int k)
|
||||
template <class I>
|
||||
inline // x is positive and k bigger than one
|
||||
typename I::base_type
|
||||
root_aux_dn(typename I::base_type const &x, int k)
|
||||
{
|
||||
typedef typename I::base_type T;
|
||||
typedef typename I::traits_type Policies;
|
||||
typename Policies::rounding rnd;
|
||||
T one(1);
|
||||
if (x > one) return root_aux<I>(x, k).lower();
|
||||
if (x == one) return one;
|
||||
return rnd.div_down(one, root_aux<I>(rnd.div_up(one, x), k).upper());
|
||||
typedef typename I::base_type T;
|
||||
typedef typename I::traits_type Policies;
|
||||
typename Policies::rounding rnd;
|
||||
T one(1);
|
||||
if (x > one)
|
||||
return root_aux<I>(x, k).lower();
|
||||
if (x == one)
|
||||
return one;
|
||||
return rnd.div_down(one, root_aux<I>(rnd.div_up(one, x), k).upper());
|
||||
}
|
||||
|
||||
template< class I > inline // x is positive and k bigger than one
|
||||
typename I::base_type root_aux_up(typename I::base_type const &x, int k)
|
||||
template <class I>
|
||||
inline // x is positive and k bigger than one
|
||||
typename I::base_type
|
||||
root_aux_up(typename I::base_type const &x, int k)
|
||||
{
|
||||
typedef typename I::base_type T;
|
||||
typedef typename I::traits_type Policies;
|
||||
typename Policies::rounding rnd;
|
||||
T one(1);
|
||||
if (x > one) return root_aux<I>(x, k).upper();
|
||||
if (x == one) return one;
|
||||
return rnd.div_up(one, root_aux<I>(rnd.div_down(one, x), k).lower());
|
||||
typedef typename I::base_type T;
|
||||
typedef typename I::traits_type Policies;
|
||||
typename Policies::rounding rnd;
|
||||
T one(1);
|
||||
if (x > one)
|
||||
return root_aux<I>(x, k).upper();
|
||||
if (x == one)
|
||||
return one;
|
||||
return rnd.div_up(one, root_aux<I>(rnd.div_down(one, x), k).lower());
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace interval_lib
|
||||
|
||||
template< class T, class Policies > inline
|
||||
interval<T, Policies> nth_root(interval<T, Policies> const &x, int k)
|
||||
template <class T, class Policies> inline interval<T, Policies> nth_root(interval<T, Policies> const &x, int k)
|
||||
{
|
||||
typedef interval<T, Policies> I;
|
||||
if (interval_lib::detail::test_input(x)) return I::empty();
|
||||
assert(k > 0);
|
||||
if (k == 1) return x;
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename interval_lib::unprotect<I>::type R;
|
||||
if (!interval_lib::user::is_pos(x.upper())) {
|
||||
if (interval_lib::user::is_zero(x.upper())) {
|
||||
T zero(0);
|
||||
if (!(k & 1) || interval_lib::user::is_zero(x.lower())) // [-1,0]^/2 or [0,0]
|
||||
return I(zero, zero, true);
|
||||
else // [-1,0]^/3
|
||||
return I(-interval_lib::detail::root_aux_up<R>(-x.lower(), k), zero, true);
|
||||
} else if (!(k & 1)) // [-2,-1]^/2
|
||||
return I::empty();
|
||||
else { // [-2,-1]^/3
|
||||
return I(-interval_lib::detail::root_aux_up<R>(-x.lower(), k),
|
||||
-interval_lib::detail::root_aux_dn<R>(-x.upper(), k), true);
|
||||
typedef interval<T, Policies> I;
|
||||
if (interval_lib::detail::test_input(x))
|
||||
return I::empty();
|
||||
assert(k > 0);
|
||||
if (k == 1)
|
||||
return x;
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename interval_lib::unprotect<I>::type R;
|
||||
if (!interval_lib::user::is_pos(x.upper())) {
|
||||
if (interval_lib::user::is_zero(x.upper())) {
|
||||
T zero(0);
|
||||
if (!(k & 1) || interval_lib::user::is_zero(x.lower())) // [-1,0]^/2 or [0,0]
|
||||
return I(zero, zero, true);
|
||||
else // [-1,0]^/3
|
||||
return I(-interval_lib::detail::root_aux_up<R>(-x.lower(), k), zero, true);
|
||||
}
|
||||
else if (!(k & 1)) // [-2,-1]^/2
|
||||
return I::empty();
|
||||
else { // [-2,-1]^/3
|
||||
return I(-interval_lib::detail::root_aux_up<R>(-x.lower(), k),
|
||||
-interval_lib::detail::root_aux_dn<R>(-x.upper(), k),
|
||||
true);
|
||||
}
|
||||
}
|
||||
}
|
||||
T u = interval_lib::detail::root_aux_up<R>(x.upper(), k);
|
||||
if (!interval_lib::user::is_pos(x.lower()))
|
||||
if (!(k & 1) || interval_lib::user::is_zero(x.lower())) // [-1,1]^/2 or [0,1]
|
||||
return I(static_cast<T>(0), u, true);
|
||||
else // [-1,1]^/3
|
||||
return I(-interval_lib::detail::root_aux_up<R>(-x.lower(), k), u, true);
|
||||
else // [1,2]
|
||||
return I(interval_lib::detail::root_aux_dn<R>(x.lower(), k), u, true);
|
||||
T u = interval_lib::detail::root_aux_up<R>(x.upper(), k);
|
||||
if (!interval_lib::user::is_pos(x.lower()))
|
||||
if (!(k & 1) || interval_lib::user::is_zero(x.lower())) // [-1,1]^/2 or [0,1]
|
||||
return I(static_cast<T>(0), u, true);
|
||||
else // [-1,1]^/3
|
||||
return I(-interval_lib::detail::root_aux_up<R>(-x.lower(), k), u, true);
|
||||
else // [1,2]
|
||||
return I(interval_lib::detail::root_aux_dn<R>(x.lower(), k), u, true);
|
||||
}
|
||||
|
||||
} // namespace numeric
|
||||
|
||||
@@ -22,44 +22,40 @@ namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
|
||||
template<class I> inline
|
||||
I add(const typename I::base_type& x, const typename I::base_type& y)
|
||||
template <class I> inline I add(const typename I::base_type &x, const typename I::base_type &y)
|
||||
{
|
||||
typedef typename I::traits_type Policies;
|
||||
if (detail::test_input<typename I::base_type, Policies>(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return I(rnd.add_down(x, y), rnd.add_up(x, y), true);
|
||||
typedef typename I::traits_type Policies;
|
||||
if (detail::test_input<typename I::base_type, Policies>(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return I(rnd.add_down(x, y), rnd.add_up(x, y), true);
|
||||
}
|
||||
|
||||
template<class I> inline
|
||||
I sub(const typename I::base_type& x, const typename I::base_type& y)
|
||||
template <class I> inline I sub(const typename I::base_type &x, const typename I::base_type &y)
|
||||
{
|
||||
typedef typename I::traits_type Policies;
|
||||
if (detail::test_input<typename I::base_type, Policies>(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return I(rnd.sub_down(x, y), rnd.sub_up(x, y), true);
|
||||
typedef typename I::traits_type Policies;
|
||||
if (detail::test_input<typename I::base_type, Policies>(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return I(rnd.sub_down(x, y), rnd.sub_up(x, y), true);
|
||||
}
|
||||
|
||||
template<class I> inline
|
||||
I mul(const typename I::base_type& x, const typename I::base_type& y)
|
||||
template <class I> inline I mul(const typename I::base_type &x, const typename I::base_type &y)
|
||||
{
|
||||
typedef typename I::traits_type Policies;
|
||||
if (detail::test_input<typename I::base_type, Policies>(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return I(rnd.mul_down(x, y), rnd.mul_up(x, y), true);
|
||||
typedef typename I::traits_type Policies;
|
||||
if (detail::test_input<typename I::base_type, Policies>(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return I(rnd.mul_down(x, y), rnd.mul_up(x, y), true);
|
||||
}
|
||||
|
||||
template<class I> inline
|
||||
I div(const typename I::base_type& x, const typename I::base_type& y)
|
||||
template <class I> inline I div(const typename I::base_type &x, const typename I::base_type &y)
|
||||
{
|
||||
typedef typename I::traits_type Policies;
|
||||
if (detail::test_input<typename I::base_type, Policies>(x, y) || user::is_zero(y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return I(rnd.div_down(x, y), rnd.div_up(x, y), true);
|
||||
typedef typename I::traits_type Policies;
|
||||
if (detail::test_input<typename I::base_type, Policies>(x, y) || user::is_zero(y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return I(rnd.div_down(x, y), rnd.div_up(x, y), true);
|
||||
}
|
||||
|
||||
} // namespace interval_lib
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_CHECKING_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_CHECKING_HPP
|
||||
|
||||
#include <boost/limits.hpp>
|
||||
#include <cassert>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
#include <boost/limits.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
@@ -21,107 +21,86 @@ namespace interval_lib {
|
||||
|
||||
struct exception_create_empty
|
||||
{
|
||||
void operator()()
|
||||
{
|
||||
throw std::runtime_error("boost::interval: empty interval created");
|
||||
}
|
||||
void operator()() { throw std::runtime_error("boost::interval: empty interval created"); }
|
||||
};
|
||||
|
||||
struct exception_invalid_number
|
||||
{
|
||||
void operator()()
|
||||
{
|
||||
throw std::invalid_argument("boost::interval: invalid number");
|
||||
}
|
||||
void operator()() { throw std::invalid_argument("boost::interval: invalid number"); }
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct checking_base
|
||||
template <class T> struct checking_base
|
||||
{
|
||||
static T pos_inf()
|
||||
{
|
||||
assert(std::numeric_limits<T>::has_infinity);
|
||||
return std::numeric_limits<T>::infinity();
|
||||
}
|
||||
static T neg_inf()
|
||||
{
|
||||
assert(std::numeric_limits<T>::has_infinity);
|
||||
return -std::numeric_limits<T>::infinity();
|
||||
}
|
||||
static T nan()
|
||||
{
|
||||
assert(std::numeric_limits<T>::has_quiet_NaN);
|
||||
return std::numeric_limits<T>::quiet_NaN();
|
||||
}
|
||||
static bool is_nan(const T& x)
|
||||
{
|
||||
return std::numeric_limits<T>::has_quiet_NaN && (x != x);
|
||||
}
|
||||
static T empty_lower()
|
||||
{
|
||||
return (std::numeric_limits<T>::has_quiet_NaN ?
|
||||
std::numeric_limits<T>::quiet_NaN() : static_cast<T>(1));
|
||||
}
|
||||
static T empty_upper()
|
||||
{
|
||||
return (std::numeric_limits<T>::has_quiet_NaN ?
|
||||
std::numeric_limits<T>::quiet_NaN() : static_cast<T>(0));
|
||||
}
|
||||
static bool is_empty(const T& l, const T& u)
|
||||
{
|
||||
return !(l <= u); // safety for partial orders
|
||||
}
|
||||
static T pos_inf()
|
||||
{
|
||||
assert(std::numeric_limits<T>::has_infinity);
|
||||
return std::numeric_limits<T>::infinity();
|
||||
}
|
||||
static T neg_inf()
|
||||
{
|
||||
assert(std::numeric_limits<T>::has_infinity);
|
||||
return -std::numeric_limits<T>::infinity();
|
||||
}
|
||||
static T nan()
|
||||
{
|
||||
assert(std::numeric_limits<T>::has_quiet_NaN);
|
||||
return std::numeric_limits<T>::quiet_NaN();
|
||||
}
|
||||
static bool is_nan(const T &x) { return std::numeric_limits<T>::has_quiet_NaN && (x != x); }
|
||||
static T empty_lower()
|
||||
{
|
||||
return (std::numeric_limits<T>::has_quiet_NaN ? std::numeric_limits<T>::quiet_NaN() : static_cast<T>(1));
|
||||
}
|
||||
static T empty_upper()
|
||||
{
|
||||
return (std::numeric_limits<T>::has_quiet_NaN ? std::numeric_limits<T>::quiet_NaN() : static_cast<T>(0));
|
||||
}
|
||||
static bool is_empty(const T &l, const T &u)
|
||||
{
|
||||
return !(l <= u); // safety for partial orders
|
||||
}
|
||||
};
|
||||
|
||||
template<class T, class Checking = checking_base<T>,
|
||||
class Exception = exception_create_empty>
|
||||
struct checking_no_empty: Checking
|
||||
template <class T, class Checking = checking_base<T>, class Exception = exception_create_empty>
|
||||
struct checking_no_empty : Checking
|
||||
{
|
||||
static T nan()
|
||||
{
|
||||
assert(false);
|
||||
return Checking::nan();
|
||||
}
|
||||
static T empty_lower()
|
||||
{
|
||||
Exception()();
|
||||
return Checking::empty_lower();
|
||||
}
|
||||
static T empty_upper()
|
||||
{
|
||||
Exception()();
|
||||
return Checking::empty_upper();
|
||||
}
|
||||
static bool is_empty(const T&, const T&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
static T nan()
|
||||
{
|
||||
assert(false);
|
||||
return Checking::nan();
|
||||
}
|
||||
static T empty_lower()
|
||||
{
|
||||
Exception()();
|
||||
return Checking::empty_lower();
|
||||
}
|
||||
static T empty_upper()
|
||||
{
|
||||
Exception()();
|
||||
return Checking::empty_upper();
|
||||
}
|
||||
static bool is_empty(const T &, const T &) { return false; }
|
||||
};
|
||||
|
||||
template<class T, class Checking = checking_base<T> >
|
||||
struct checking_no_nan: Checking
|
||||
template <class T, class Checking = checking_base<T>> struct checking_no_nan : Checking
|
||||
{
|
||||
static bool is_nan(const T&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
static bool is_nan(const T &) { return false; }
|
||||
};
|
||||
|
||||
template<class T, class Checking = checking_base<T>,
|
||||
class Exception = exception_invalid_number>
|
||||
struct checking_catch_nan: Checking
|
||||
template <class T, class Checking = checking_base<T>, class Exception = exception_invalid_number>
|
||||
struct checking_catch_nan : Checking
|
||||
{
|
||||
static bool is_nan(const T& x)
|
||||
{
|
||||
if (Checking::is_nan(x)) Exception()();
|
||||
return false;
|
||||
}
|
||||
static bool is_nan(const T &x)
|
||||
{
|
||||
if (Checking::is_nan(x))
|
||||
Exception()();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct checking_strict:
|
||||
checking_no_nan<T, checking_no_empty<T> >
|
||||
{};
|
||||
template <class T> struct checking_strict : checking_no_nan<T, checking_no_empty<T>>
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
#define BOOST_NUMERIC_INTERVAL_COMPARE_HPP
|
||||
|
||||
#include <boost/numeric/interval/compare/certain.hpp>
|
||||
#include <boost/numeric/interval/compare/possible.hpp>
|
||||
#include <boost/numeric/interval/compare/explicit.hpp>
|
||||
#include <boost/numeric/interval/compare/lexicographic.hpp>
|
||||
#include <boost/numeric/interval/compare/possible.hpp>
|
||||
#include <boost/numeric/interval/compare/set.hpp>
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_COMPARE_HPP
|
||||
|
||||
@@ -19,88 +19,94 @@ namespace interval_lib {
|
||||
namespace compare {
|
||||
namespace certain {
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator<(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() < y.lower();
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.upper() < y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator<(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() < y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.upper() < y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator<=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() <= y.lower();
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.upper() <= y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator<=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() <= y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.upper() <= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator>(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() > y.upper();
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() > y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator>(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() > y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() > y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator>=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() >= y.upper();
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() >= y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator>=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() >= y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() >= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator==(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() == y.lower() && x.lower() == y.upper();
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.upper() == y.lower() && x.lower() == y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator==(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator==(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() == y && x.lower() == y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.upper() == y && x.lower() == y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator!=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() < y.lower() || x.lower() > y.upper();
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.upper() < y.lower() || x.lower() > y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator!=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator!=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() < y || x.lower() > y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.upper() < y || x.lower() > y;
|
||||
}
|
||||
|
||||
} // namespace certain
|
||||
|
||||
@@ -21,228 +21,204 @@ namespace interval_lib {
|
||||
* Certainly... operations
|
||||
*/
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool cerlt(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool cerlt(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return x.upper() < y.lower();
|
||||
return x.upper() < y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerlt(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool cerlt(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
return x.upper() < y;
|
||||
return x.upper() < y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerlt(const T& x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline bool cerlt(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
return x < y.lower();
|
||||
return x < y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool cerle(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool cerle(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return x.upper() <= y.lower();
|
||||
return x.upper() <= y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerle(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool cerle(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
return x.upper() <= y;
|
||||
return x.upper() <= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerle(const T& x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline bool cerle(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
return x <= y.lower();
|
||||
return x <= y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool cergt(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool cergt(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return x.lower() > y.upper();
|
||||
return x.lower() > y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cergt(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool cergt(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
return x.lower() > y;
|
||||
return x.lower() > y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cergt(const T& x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline bool cergt(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
return x > y.upper();
|
||||
return x > y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool cerge(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool cerge(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return x.lower() >= y.upper();
|
||||
return x.lower() >= y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerge(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool cerge(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
return x.lower() >= y;
|
||||
return x.lower() >= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerge(const T& x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline bool cerge(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
return x >= y.upper();
|
||||
return x >= y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool cereq(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool cereq(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return x.lower() == y.upper() && y.lower() == x.upper();
|
||||
return x.lower() == y.upper() && y.lower() == x.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cereq(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool cereq(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
return x.lower() == y && x.upper() == y;
|
||||
return x.lower() == y && x.upper() == y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cereq(const T& x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline bool cereq(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
return x == y.lower() && x == y.upper();
|
||||
return x == y.lower() && x == y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool cerne(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool cerne(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return x.upper() < y.lower() || y.upper() < x.lower();
|
||||
return x.upper() < y.lower() || y.upper() < x.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerne(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool cerne(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
return x.upper() < y || y < x.lower();
|
||||
return x.upper() < y || y < x.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerne(const T& x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline bool cerne(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
return x < y.lower() || y.upper() < x;
|
||||
return x < y.lower() || y.upper() < x;
|
||||
}
|
||||
|
||||
/*
|
||||
* Possibly... comparisons
|
||||
*/
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool poslt(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool poslt(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return x.lower() < y.upper();
|
||||
return x.lower() < y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool poslt(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool poslt(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
return x.lower() < y;
|
||||
return x.lower() < y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool poslt(const T& x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline bool poslt(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
return x < y.upper();
|
||||
return x < y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool posle(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool posle(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return x.lower() <= y.upper();
|
||||
return x.lower() <= y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posle(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool posle(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
return x.lower() <= y;
|
||||
return x.lower() <= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posle(const T& x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline bool posle(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
return x <= y.upper();
|
||||
return x <= y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool posgt(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool posgt(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return x.upper() > y.lower();
|
||||
return x.upper() > y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posgt(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool posgt(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
return x.upper() > y;
|
||||
return x.upper() > y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posgt(const T& x, const interval<T, Policies> & y)
|
||||
template <class T, class Policies> inline bool posgt(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
return x > y.lower();
|
||||
return x > y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool posge(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool posge(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return x.upper() >= y.lower();
|
||||
return x.upper() >= y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posge(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool posge(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
return x.upper() >= y;
|
||||
return x.upper() >= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posge(const T& x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline bool posge(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
return x >= y.lower();
|
||||
return x >= y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool poseq(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool poseq(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return x.upper() >= y.lower() && y.upper() >= x.lower();
|
||||
return x.upper() >= y.lower() && y.upper() >= x.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool poseq(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool poseq(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
return x.upper() >= y && y >= x.lower();
|
||||
return x.upper() >= y && y >= x.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool poseq(const T& x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline bool poseq(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
return x >= y.lower() && y.upper() >= x;
|
||||
return x >= y.lower() && y.upper() >= x;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool posne(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool posne(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return x.upper() != y.lower() || y.upper() != x.lower();
|
||||
return x.upper() != y.lower() || y.upper() != x.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posne(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool posne(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
return x.upper() != y || y != x.lower();
|
||||
return x.upper() != y || y != x.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posne(const T& x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline bool posne(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
return x != y.lower() || y.upper() != x;
|
||||
return x != y.lower() || y.upper() != x;
|
||||
}
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} //namespace boost
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_COMPARE_EXPLICIT_HPP
|
||||
|
||||
@@ -19,98 +19,104 @@ namespace interval_lib {
|
||||
namespace compare {
|
||||
namespace lexicographic {
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator<(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
const T& xl = x.lower();
|
||||
const T& yl = y.lower();
|
||||
return xl < yl || (xl == yl && x.upper() < y.upper());
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
const T &xl = x.lower();
|
||||
const T &yl = y.lower();
|
||||
return xl < yl || (xl == yl && x.upper() < y.upper());
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator<(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() < y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() < y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator<=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
const T& xl = x.lower();
|
||||
const T& yl = y.lower();
|
||||
return xl < yl || (xl == yl && x.upper() <= y.upper());
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
const T &xl = x.lower();
|
||||
const T &yl = y.lower();
|
||||
return xl < yl || (xl == yl && x.upper() <= y.upper());
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator<=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
const T& xl = x.lower();
|
||||
return xl < y || (xl == y && x.upper() <= y);
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
const T &xl = x.lower();
|
||||
return xl < y || (xl == y && x.upper() <= y);
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator>(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
const T& xl = x.lower();
|
||||
const T& yl = y.lower();
|
||||
return xl > yl || (xl == yl && x.upper() > y.upper());
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
const T &xl = x.lower();
|
||||
const T &yl = y.lower();
|
||||
return xl > yl || (xl == yl && x.upper() > y.upper());
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator>(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
const T& xl = x.lower();
|
||||
return xl > y || (xl == y && x.upper() > y);
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
const T &xl = x.lower();
|
||||
return xl > y || (xl == y && x.upper() > y);
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator>=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
const T& xl = x.lower();
|
||||
const T& yl = y.lower();
|
||||
return xl > yl || (xl == yl && x.upper() >= y.upper());
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
const T &xl = x.lower();
|
||||
const T &yl = y.lower();
|
||||
return xl > yl || (xl == yl && x.upper() >= y.upper());
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator>=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() >= y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() >= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator==(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() == y.lower() && x.upper() == y.upper();
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() == y.lower() && x.upper() == y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator==(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator==(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() == y && x.upper() == y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() == y && x.upper() == y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator!=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() != y.lower() || x.upper() != y.upper();
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() != y.lower() || x.upper() != y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator!=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator!=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() != y || x.upper() != y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() != y || x.upper() != y;
|
||||
}
|
||||
|
||||
} // namespace lexicographic
|
||||
|
||||
@@ -19,88 +19,94 @@ namespace interval_lib {
|
||||
namespace compare {
|
||||
namespace possible {
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator<(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() < y.upper();
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() < y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator<(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() < y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() < y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator<=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() <= y.upper();
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() <= y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator<=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() <= y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() <= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator>(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() > y.lower();
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.upper() > y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator>(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() > y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.upper() > y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator>=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() >= y.lower();
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.upper() >= y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator>=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() >= y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.upper() >= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator==(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() <= y.upper() && x.upper() >= y.lower();
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() <= y.upper() && x.upper() >= y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator==(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator==(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() <= y && x.upper() >= y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() <= y && x.upper() >= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator!=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() != y.upper() || x.upper() != y.lower();
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() != y.upper() || x.upper() != y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator!=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator!=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() != y || x.upper() != y;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
return x.lower() != y || x.upper() != y;
|
||||
}
|
||||
|
||||
} // namespace possible
|
||||
|
||||
@@ -20,76 +20,70 @@ namespace interval_lib {
|
||||
namespace compare {
|
||||
namespace set {
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator<(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return proper_subset(x, y);
|
||||
return proper_subset(x, y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator<(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
throw comparison_error();
|
||||
throw comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator<=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return subset(x, y);
|
||||
return subset(x, y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator<=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
throw comparison_error();
|
||||
throw comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator>(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return proper_subset(y, x);
|
||||
return proper_subset(y, x);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator>(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
throw comparison_error();
|
||||
throw comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator>=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return subset(y, x);
|
||||
return subset(y, x);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator>=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
throw comparison_error();
|
||||
throw comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator==(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return equal(y, x);
|
||||
return equal(y, x);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator==(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator==(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
throw comparison_error();
|
||||
throw comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool operator!=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
return !equal(y, x);
|
||||
return !equal(y, x);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator!=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline bool operator!=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
throw comparison_error();
|
||||
throw comparison_error();
|
||||
}
|
||||
|
||||
} // namespace set
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_TRIBOOL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_COMPARE_TRIBOOL_HPP
|
||||
|
||||
#include <boost/logic/tribool.hpp>
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
#include <boost/logic/tribool.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
@@ -20,112 +20,142 @@ namespace interval_lib {
|
||||
namespace compare {
|
||||
namespace tribool {
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
logic::tribool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline logic::tribool operator<(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() < y.lower()) return true;
|
||||
if (x.lower() >= y.upper()) return false;
|
||||
return logic::indeterminate;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
if (x.upper() < y.lower())
|
||||
return true;
|
||||
if (x.lower() >= y.upper())
|
||||
return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
logic::tribool operator<(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline logic::tribool operator<(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() < y) return true;
|
||||
if (x.lower() >= y) return false;
|
||||
return logic::indeterminate;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
if (x.upper() < y)
|
||||
return true;
|
||||
if (x.lower() >= y)
|
||||
return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
logic::tribool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline logic::tribool operator<=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() <= y.lower()) return true;
|
||||
if (x.lower() > y.upper()) return false;
|
||||
return logic::indeterminate;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
if (x.upper() <= y.lower())
|
||||
return true;
|
||||
if (x.lower() > y.upper())
|
||||
return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
logic::tribool operator<=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline logic::tribool operator<=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() <= y) return true;
|
||||
if (x.lower() > y) return false;
|
||||
return logic::indeterminate;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
if (x.upper() <= y)
|
||||
return true;
|
||||
if (x.lower() > y)
|
||||
return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
logic::tribool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline logic::tribool operator>(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.lower() > y.upper()) return true;
|
||||
if (x.upper() <= y.lower()) return false;
|
||||
return logic::indeterminate;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
if (x.lower() > y.upper())
|
||||
return true;
|
||||
if (x.upper() <= y.lower())
|
||||
return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
logic::tribool operator>(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline logic::tribool operator>(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.lower() > y) return true;
|
||||
if (x.upper() <= y) return false;
|
||||
return logic::indeterminate;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
if (x.lower() > y)
|
||||
return true;
|
||||
if (x.upper() <= y)
|
||||
return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
logic::tribool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline logic::tribool operator>=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.lower() >= y.upper()) return true;
|
||||
if (x.upper() < y.lower()) return false;
|
||||
return logic::indeterminate;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
if (x.lower() >= y.upper())
|
||||
return true;
|
||||
if (x.upper() < y.lower())
|
||||
return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
logic::tribool operator>=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline logic::tribool operator>=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.lower() >= y) return true;
|
||||
if (x.upper() < y) return false;
|
||||
return logic::indeterminate;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
if (x.lower() >= y)
|
||||
return true;
|
||||
if (x.upper() < y)
|
||||
return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
logic::tribool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline logic::tribool operator==(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() == y.lower() && x.lower() == y.upper()) return true;
|
||||
if (x.upper() < y.lower() || x.lower() > y.upper()) return false;
|
||||
return logic::indeterminate;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
if (x.upper() == y.lower() && x.lower() == y.upper())
|
||||
return true;
|
||||
if (x.upper() < y.lower() || x.lower() > y.upper())
|
||||
return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
logic::tribool operator==(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline logic::tribool operator==(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() == y && x.lower() == y) return true;
|
||||
if (x.upper() < y || x.lower() > y) return false;
|
||||
return logic::indeterminate;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
if (x.upper() == y && x.lower() == y)
|
||||
return true;
|
||||
if (x.upper() < y || x.lower() > y)
|
||||
return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
logic::tribool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline logic::tribool operator!=(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() < y.lower() || x.lower() > y.upper()) return true;
|
||||
if (x.upper() == y.lower() && x.lower() == y.upper()) return false;
|
||||
return logic::indeterminate;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
if (x.upper() < y.lower() || x.lower() > y.upper())
|
||||
return true;
|
||||
if (x.upper() == y.lower() && x.lower() == y.upper())
|
||||
return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
logic::tribool operator!=(const interval<T, Policies>& x, const T& y)
|
||||
template <class T, class Policies> inline logic::tribool operator!=(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() < y || x.lower() > y) return true;
|
||||
if (x.upper() == y && x.lower() == y) return false;
|
||||
return logic::indeterminate;
|
||||
if (detail::test_input(x, y))
|
||||
throw comparison_error();
|
||||
if (x.upper() < y || x.lower() > y)
|
||||
return true;
|
||||
if (x.upper() == y && x.lower() == y)
|
||||
return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
} // namespace tribool
|
||||
|
||||
@@ -19,63 +19,57 @@ namespace constants {
|
||||
// Decimal representations wouldn't do it since the standard doesn't
|
||||
// specify the rounding (even nearest) that should be used.
|
||||
|
||||
static const float pi_f_l = 13176794.0f/(1<<22);
|
||||
static const float pi_f_u = 13176795.0f/(1<<22);
|
||||
static const double pi_d_l = (3373259426.0 + 273688.0 / (1<<21)) / (1<<30);
|
||||
static const double pi_d_u = (3373259426.0 + 273689.0 / (1<<21)) / (1<<30);
|
||||
static const float pi_f_l = 13176794.0f / (1 << 22);
|
||||
static const float pi_f_u = 13176795.0f / (1 << 22);
|
||||
static const double pi_d_l = (3373259426.0 + 273688.0 / (1 << 21)) / (1 << 30);
|
||||
static const double pi_d_u = (3373259426.0 + 273689.0 / (1 << 21)) / (1 << 30);
|
||||
|
||||
template<class T> inline T pi_lower() { return 3; }
|
||||
template<class T> inline T pi_upper() { return 4; }
|
||||
template<class T> inline T pi_half_lower() { return 1; }
|
||||
template<class T> inline T pi_half_upper() { return 2; }
|
||||
template<class T> inline T pi_twice_lower() { return 6; }
|
||||
template<class T> inline T pi_twice_upper() { return 7; }
|
||||
template <class T> inline T pi_lower() { return 3; }
|
||||
template <class T> inline T pi_upper() { return 4; }
|
||||
template <class T> inline T pi_half_lower() { return 1; }
|
||||
template <class T> inline T pi_half_upper() { return 2; }
|
||||
template <class T> inline T pi_twice_lower() { return 6; }
|
||||
template <class T> inline T pi_twice_upper() { return 7; }
|
||||
|
||||
template<> inline float pi_lower<float>() { return pi_f_l; }
|
||||
template<> inline float pi_upper<float>() { return pi_f_u; }
|
||||
template<> inline float pi_half_lower<float>() { return pi_f_l / 2; }
|
||||
template<> inline float pi_half_upper<float>() { return pi_f_u / 2; }
|
||||
template<> inline float pi_twice_lower<float>() { return pi_f_l * 2; }
|
||||
template<> inline float pi_twice_upper<float>() { return pi_f_u * 2; }
|
||||
template <> inline float pi_lower<float>() { return pi_f_l; }
|
||||
template <> inline float pi_upper<float>() { return pi_f_u; }
|
||||
template <> inline float pi_half_lower<float>() { return pi_f_l / 2; }
|
||||
template <> inline float pi_half_upper<float>() { return pi_f_u / 2; }
|
||||
template <> inline float pi_twice_lower<float>() { return pi_f_l * 2; }
|
||||
template <> inline float pi_twice_upper<float>() { return pi_f_u * 2; }
|
||||
|
||||
template<> inline double pi_lower<double>() { return pi_d_l; }
|
||||
template<> inline double pi_upper<double>() { return pi_d_u; }
|
||||
template<> inline double pi_half_lower<double>() { return pi_d_l / 2; }
|
||||
template<> inline double pi_half_upper<double>() { return pi_d_u / 2; }
|
||||
template<> inline double pi_twice_lower<double>() { return pi_d_l * 2; }
|
||||
template<> inline double pi_twice_upper<double>() { return pi_d_u * 2; }
|
||||
template <> inline double pi_lower<double>() { return pi_d_l; }
|
||||
template <> inline double pi_upper<double>() { return pi_d_u; }
|
||||
template <> inline double pi_half_lower<double>() { return pi_d_l / 2; }
|
||||
template <> inline double pi_half_upper<double>() { return pi_d_u / 2; }
|
||||
template <> inline double pi_twice_lower<double>() { return pi_d_l * 2; }
|
||||
template <> inline double pi_twice_upper<double>() { return pi_d_u * 2; }
|
||||
|
||||
template<> inline long double pi_lower<long double>() { return pi_d_l; }
|
||||
template<> inline long double pi_upper<long double>() { return pi_d_u; }
|
||||
template<> inline long double pi_half_lower<long double>() { return pi_d_l / 2; }
|
||||
template<> inline long double pi_half_upper<long double>() { return pi_d_u / 2; }
|
||||
template<> inline long double pi_twice_lower<long double>() { return pi_d_l * 2; }
|
||||
template<> inline long double pi_twice_upper<long double>() { return pi_d_u * 2; }
|
||||
template <> inline long double pi_lower<long double>() { return pi_d_l; }
|
||||
template <> inline long double pi_upper<long double>() { return pi_d_u; }
|
||||
template <> inline long double pi_half_lower<long double>() { return pi_d_l / 2; }
|
||||
template <> inline long double pi_half_upper<long double>() { return pi_d_u / 2; }
|
||||
template <> inline long double pi_twice_lower<long double>() { return pi_d_l * 2; }
|
||||
template <> inline long double pi_twice_upper<long double>() { return pi_d_u * 2; }
|
||||
|
||||
} // namespace constants
|
||||
|
||||
template<class I> inline
|
||||
I pi()
|
||||
template <class I> inline I pi()
|
||||
{
|
||||
typedef typename I::base_type T;
|
||||
return I(constants::pi_lower<T>(),
|
||||
constants::pi_upper<T>(), true);
|
||||
typedef typename I::base_type T;
|
||||
return I(constants::pi_lower<T>(), constants::pi_upper<T>(), true);
|
||||
}
|
||||
|
||||
template<class I> inline
|
||||
I pi_half()
|
||||
template <class I> inline I pi_half()
|
||||
{
|
||||
typedef typename I::base_type T;
|
||||
return I(constants::pi_half_lower<T>(),
|
||||
constants::pi_half_upper<T>(), true);
|
||||
typedef typename I::base_type T;
|
||||
return I(constants::pi_half_lower<T>(), constants::pi_half_upper<T>(), true);
|
||||
}
|
||||
|
||||
template<class I> inline
|
||||
I pi_twice()
|
||||
template <class I> inline I pi_twice()
|
||||
{
|
||||
typedef typename I::base_type T;
|
||||
return I(constants::pi_twice_lower<T>(),
|
||||
constants::pi_twice_upper<T>(), true);
|
||||
typedef typename I::base_type T;
|
||||
return I(constants::pi_twice_lower<T>(), constants::pi_twice_upper<T>(), true);
|
||||
}
|
||||
|
||||
} // namespace interval_lib
|
||||
|
||||
@@ -23,84 +23,81 @@ namespace numeric {
|
||||
namespace interval_lib {
|
||||
|
||||
namespace detail {
|
||||
#if defined(__GNUC__ )
|
||||
typedef union {
|
||||
#if defined(__GNUC__)
|
||||
typedef union
|
||||
{
|
||||
::boost::long_long_type imode;
|
||||
double dmode;
|
||||
} rounding_mode_struct;
|
||||
double dmode;
|
||||
} rounding_mode_struct;
|
||||
|
||||
// set bits 59-58 (DYN),
|
||||
// clear all exception bits and disable overflow (51) and inexact exceptions (62)
|
||||
static const rounding_mode_struct mode_upward = { 0x4C08000000000000LL };
|
||||
static const rounding_mode_struct mode_downward = { 0x4408000000000000LL };
|
||||
static const rounding_mode_struct mode_to_nearest = { 0x4808000000000000LL };
|
||||
static const rounding_mode_struct mode_toward_zero = { 0x4008000000000000LL };
|
||||
// set bits 59-58 (DYN),
|
||||
// clear all exception bits and disable overflow (51) and inexact exceptions (62)
|
||||
static const rounding_mode_struct mode_upward = {0x4C08000000000000LL};
|
||||
static const rounding_mode_struct mode_downward = {0x4408000000000000LL};
|
||||
static const rounding_mode_struct mode_to_nearest = {0x4808000000000000LL};
|
||||
static const rounding_mode_struct mode_toward_zero = {0x4008000000000000LL};
|
||||
|
||||
struct alpha_rounding_control
|
||||
{
|
||||
struct alpha_rounding_control
|
||||
{
|
||||
typedef double rounding_mode;
|
||||
|
||||
static void set_rounding_mode(const rounding_mode mode)
|
||||
{ __asm__ __volatile__ ("mt_fpcr %0" : : "f"(mode)); }
|
||||
static void set_rounding_mode(const rounding_mode mode) { __asm__ __volatile__("mt_fpcr %0" : : "f"(mode)); }
|
||||
|
||||
static void get_rounding_mode(rounding_mode& mode)
|
||||
{ __asm__ __volatile__ ("mf_fpcr %0" : "=f"(mode)); }
|
||||
static void get_rounding_mode(rounding_mode &mode) { __asm__ __volatile__("mf_fpcr %0" : "=f"(mode)); }
|
||||
|
||||
static void downward() { set_rounding_mode(mode_downward.dmode); }
|
||||
static void upward() { set_rounding_mode(mode_upward.dmode); }
|
||||
static void to_nearest() { set_rounding_mode(mode_to_nearest.dmode); }
|
||||
static void downward() { set_rounding_mode(mode_downward.dmode); }
|
||||
static void upward() { set_rounding_mode(mode_upward.dmode); }
|
||||
static void to_nearest() { set_rounding_mode(mode_to_nearest.dmode); }
|
||||
static void toward_zero() { set_rounding_mode(mode_toward_zero.dmode); }
|
||||
};
|
||||
};
|
||||
#elif defined(__digital__) || defined(__DECCXX)
|
||||
|
||||
#if defined(__DECCXX) && !(defined(__FLT_ROUNDS) && __FLT_ROUNDS == -1)
|
||||
#error Dynamic rounding mode not enabled. See cxx man page for details.
|
||||
#endif
|
||||
|
||||
struct alpha_rounding_control
|
||||
{
|
||||
struct alpha_rounding_control
|
||||
{
|
||||
typedef unsigned int rounding_mode;
|
||||
|
||||
static void set_rounding_mode(const rounding_mode& mode) { write_rnd(mode); }
|
||||
static void get_rounding_mode(rounding_mode& mode) { mode = read_rnd(); }
|
||||
static void set_rounding_mode(const rounding_mode &mode) { write_rnd(mode); }
|
||||
static void get_rounding_mode(rounding_mode &mode) { mode = read_rnd(); }
|
||||
|
||||
static void downward() { set_rounding_mode(FP_RND_RM); }
|
||||
static void upward() { set_rounding_mode(FP_RND_RP); }
|
||||
static void to_nearest() { set_rounding_mode(FP_RND_RN); }
|
||||
static void downward() { set_rounding_mode(FP_RND_RM); }
|
||||
static void upward() { set_rounding_mode(FP_RND_RP); }
|
||||
static void to_nearest() { set_rounding_mode(FP_RND_RN); }
|
||||
static void toward_zero() { set_rounding_mode(FP_RND_RZ); }
|
||||
};
|
||||
};
|
||||
#endif
|
||||
} // namespace detail
|
||||
|
||||
extern "C" {
|
||||
float rintf(float);
|
||||
double rint(double);
|
||||
long double rintl(long double);
|
||||
extern "C"
|
||||
{
|
||||
float rintf(float);
|
||||
double rint(double);
|
||||
long double rintl(long double);
|
||||
}
|
||||
|
||||
template<>
|
||||
struct rounding_control<float>:
|
||||
detail::alpha_rounding_control
|
||||
template <> struct rounding_control<float> : detail::alpha_rounding_control
|
||||
{
|
||||
static float force_rounding(const float r)
|
||||
{ volatile float _r = r; return _r; }
|
||||
static float to_int(const float& x) { return rintf(x); }
|
||||
static float force_rounding(const float r)
|
||||
{
|
||||
volatile float _r = r;
|
||||
return _r;
|
||||
}
|
||||
static float to_int(const float &x) { return rintf(x); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<double>:
|
||||
detail::alpha_rounding_control
|
||||
template <> struct rounding_control<double> : detail::alpha_rounding_control
|
||||
{
|
||||
static const double & force_rounding(const double& r) { return r; }
|
||||
static double to_int(const double& r) { return rint(r); }
|
||||
static const double &force_rounding(const double &r) { return r; }
|
||||
static double to_int(const double &r) { return rint(r); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<long double>:
|
||||
detail::alpha_rounding_control
|
||||
template <> struct rounding_control<long double> : detail::alpha_rounding_control
|
||||
{
|
||||
static const long double & force_rounding(const long double& r) { return r; }
|
||||
static long double to_int(const long double& r) { return rintl(r); }
|
||||
static const long double &force_rounding(const long double &r) { return r; }
|
||||
static long double to_int(const long double &r) { return rintl(r); }
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_BCC_ROUNDING_CONTROL_HPP
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
# error This header is only intended for Borland C++.
|
||||
#error This header is only intended for Borland C++.
|
||||
#endif
|
||||
|
||||
#ifndef _M_IX86
|
||||
# error This header only works on x86 CPUs.
|
||||
#error This header only works on x86 CPUs.
|
||||
#endif
|
||||
|
||||
#include <float.h> // Borland C++ rounding control
|
||||
#include <float.h> // Borland C++ rounding control
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
@@ -27,26 +27,31 @@ namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_KEEP_EXCEPTIONS_FOR_BCC
|
||||
extern "C" { unsigned int _RTLENTRY _fm_init(void); }
|
||||
extern "C"
|
||||
{
|
||||
unsigned int _RTLENTRY _fm_init(void);
|
||||
}
|
||||
|
||||
struct borland_workaround {
|
||||
borland_workaround() { _fm_init(); }
|
||||
struct borland_workaround
|
||||
{
|
||||
borland_workaround() { _fm_init(); }
|
||||
};
|
||||
|
||||
static borland_workaround borland_workaround_exec;
|
||||
#endif // BOOST_NUMERIC_INTERVAL_KEEP_EXCEPTIONS_FOR_BCC
|
||||
|
||||
__inline double rint(double)
|
||||
{ __emit__(0xD9); __emit__(0xFC); /* asm FRNDINT */ }
|
||||
{
|
||||
__emit__(0xD9);
|
||||
__emit__(0xFC); /* asm FRNDINT */
|
||||
}
|
||||
|
||||
struct x86_rounding
|
||||
{
|
||||
typedef unsigned int rounding_mode;
|
||||
static void get_rounding_mode(rounding_mode& mode)
|
||||
{ mode = _control87(0, 0); }
|
||||
static void set_rounding_mode(const rounding_mode mode)
|
||||
{ _control87(mode, 0xffff); }
|
||||
static double to_int(const double& x) { return rint(x); }
|
||||
typedef unsigned int rounding_mode;
|
||||
static void get_rounding_mode(rounding_mode &mode) { mode = _control87(0, 0); }
|
||||
static void set_rounding_mode(const rounding_mode mode) { _control87(mode, 0xffff); }
|
||||
static double to_int(const double &x) { return rint(x); }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
@@ -13,36 +13,37 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(__GLIBC__) && (defined(__USE_MISC) || defined(__USE_XOPEN_EXTENDED) || defined(__USE_ISOC99)) && !defined(__ICC)
|
||||
# define BOOST_HAS_INV_HYPERBOLIC
|
||||
#if defined(__GLIBC__) && (defined(__USE_MISC) || defined(__USE_XOPEN_EXTENDED) || defined(__USE_ISOC99)) \
|
||||
&& !defined(__ICC)
|
||||
#define BOOST_HAS_INV_HYPERBOLIC
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_NO_STDC_NAMESPACE
|
||||
# define BOOST_NUMERIC_INTERVAL_using_math(a) using ::a
|
||||
# ifdef BOOST_HAS_INV_HYPERBOLIC
|
||||
# define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using ::a
|
||||
# endif
|
||||
#define BOOST_NUMERIC_INTERVAL_using_math(a) using ::a
|
||||
#ifdef BOOST_HAS_INV_HYPERBOLIC
|
||||
#define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using ::a
|
||||
#endif
|
||||
#else
|
||||
# define BOOST_NUMERIC_INTERVAL_using_math(a) using std::a
|
||||
# if defined(BOOST_HAS_INV_HYPERBOLIC)
|
||||
# if defined(__GLIBCPP__) || defined(__GLIBCXX__)
|
||||
# define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using ::a
|
||||
# else
|
||||
# define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using std::a
|
||||
# endif
|
||||
# endif
|
||||
#define BOOST_NUMERIC_INTERVAL_using_math(a) using std::a
|
||||
#if defined(BOOST_HAS_INV_HYPERBOLIC)
|
||||
#if defined(__GLIBCPP__) || defined(__GLIBCXX__)
|
||||
#define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using ::a
|
||||
#else
|
||||
#define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using std::a
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__COMO__) || defined(BOOST_INTEL)
|
||||
# define BOOST_NUMERIC_INTERVAL_using_max(a) using std::a
|
||||
#define BOOST_NUMERIC_INTERVAL_using_max(a) using std::a
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
# define BOOST_NUMERIC_INTERVAL_using_max(a) using ::a
|
||||
#define BOOST_NUMERIC_INTERVAL_using_max(a) using ::a
|
||||
#else
|
||||
# define BOOST_NUMERIC_INTERVAL_using_max(a) using std::a
|
||||
#define BOOST_NUMERIC_INTERVAL_using_max(a) using std::a
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_using_ahyp
|
||||
# define BOOST_NUMERIC_INTERVAL_using_ahyp(a)
|
||||
#define BOOST_NUMERIC_INTERVAL_using_ahyp(a)
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ <= 2)
|
||||
@@ -51,27 +52,27 @@
|
||||
#include <boost/config/no_tr1/cmath.hpp>
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
using std::min;
|
||||
using std::max;
|
||||
using std::sqrt;
|
||||
using std::exp;
|
||||
using std::log;
|
||||
using std::cos;
|
||||
using std::tan;
|
||||
using std::asin;
|
||||
using std::acos;
|
||||
using std::atan;
|
||||
using std::ceil;
|
||||
using std::floor;
|
||||
using std::sinh;
|
||||
using std::cosh;
|
||||
using std::tanh;
|
||||
# undef BOOST_NUMERIC_INTERVAL_using_max
|
||||
# undef BOOST_NUMERIC_INTERVAL_using_math
|
||||
# define BOOST_NUMERIC_INTERVAL_using_max(a)
|
||||
# define BOOST_NUMERIC_INTERVAL_using_math(a)
|
||||
# undef BOOST_NUMERIC_INTERVAL_using_ahyp
|
||||
# define BOOST_NUMERIC_INTERVAL_using_ahyp(a)
|
||||
using std::acos;
|
||||
using std::asin;
|
||||
using std::atan;
|
||||
using std::ceil;
|
||||
using std::cos;
|
||||
using std::cosh;
|
||||
using std::exp;
|
||||
using std::floor;
|
||||
using std::log;
|
||||
using std::max;
|
||||
using std::min;
|
||||
using std::sinh;
|
||||
using std::sqrt;
|
||||
using std::tan;
|
||||
using std::tanh;
|
||||
#undef BOOST_NUMERIC_INTERVAL_using_max
|
||||
#undef BOOST_NUMERIC_INTERVAL_using_math
|
||||
#define BOOST_NUMERIC_INTERVAL_using_max(a)
|
||||
#define BOOST_NUMERIC_INTERVAL_using_math(a)
|
||||
#undef BOOST_NUMERIC_INTERVAL_using_ahyp
|
||||
#define BOOST_NUMERIC_INTERVAL_using_ahyp(a)
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
#endif
|
||||
|
||||
@@ -18,25 +18,28 @@ namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
struct c99_rounding_control: c99_rounding
|
||||
struct c99_rounding_control : c99_rounding
|
||||
{
|
||||
template<class T>
|
||||
static T force_rounding(const T& r) { volatile T r_ = r; return r_; }
|
||||
template <class T> static T force_rounding(const T &r)
|
||||
{
|
||||
volatile T r_ = r;
|
||||
return r_;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<>
|
||||
struct rounding_control<float>:
|
||||
detail::c99_rounding_control { };
|
||||
template <> struct rounding_control<float> : detail::c99_rounding_control
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<double>:
|
||||
detail::c99_rounding_control { };
|
||||
template <> struct rounding_control<double> : detail::c99_rounding_control
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<long double>:
|
||||
detail::c99_rounding_control { };
|
||||
template <> struct rounding_control<long double> : detail::c99_rounding_control
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
|
||||
@@ -11,28 +11,30 @@
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_C99SUB_ROUNDING_CONTROL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_C99SUB_ROUNDING_CONTROL_HPP
|
||||
|
||||
#include <fenv.h> // ISO C 99 rounding mode control
|
||||
#include <fenv.h> // ISO C 99 rounding mode control
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
extern "C" { double rint(double); }
|
||||
extern "C"
|
||||
{
|
||||
double rint(double);
|
||||
}
|
||||
|
||||
struct c99_rounding
|
||||
{
|
||||
typedef int rounding_mode;
|
||||
typedef int rounding_mode;
|
||||
|
||||
static void set_rounding_mode(const rounding_mode mode) { fesetround(mode); }
|
||||
static void get_rounding_mode(rounding_mode &mode) { mode = fegetround(); }
|
||||
static void downward() { set_rounding_mode(FE_DOWNWARD); }
|
||||
static void upward() { set_rounding_mode(FE_UPWARD); }
|
||||
static void to_nearest() { set_rounding_mode(FE_TONEAREST); }
|
||||
static void toward_zero() { set_rounding_mode(FE_TOWARDZERO); }
|
||||
static void set_rounding_mode(const rounding_mode mode) { fesetround(mode); }
|
||||
static void get_rounding_mode(rounding_mode &mode) { mode = fegetround(); }
|
||||
static void downward() { set_rounding_mode(FE_DOWNWARD); }
|
||||
static void upward() { set_rounding_mode(FE_UPWARD); }
|
||||
static void to_nearest() { set_rounding_mode(FE_TONEAREST); }
|
||||
static void toward_zero() { set_rounding_mode(FE_TOWARDZERO); }
|
||||
|
||||
template<class T>
|
||||
static T to_int(const T& r) { return rint(r); }
|
||||
template <class T> static T to_int(const T &r) { return rint(r); }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
@@ -10,180 +10,184 @@
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_DIVISION_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_DIVISION_HPP
|
||||
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <algorithm>
|
||||
#include <boost/numeric/interval/detail/bugs.hpp>
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
#include <boost/numeric/interval/rounded_arith.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_non_zero(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y)
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> div_non_zero(const interval<T, Policies> &x, const interval<T, Policies> &y)
|
||||
{
|
||||
// assert(!in_zero(y));
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T& xl = x.lower();
|
||||
const T& xu = x.upper();
|
||||
const T& yl = y.lower();
|
||||
const T& yu = y.upper();
|
||||
if (::boost::numeric::interval_lib::user::is_neg(xu))
|
||||
if (::boost::numeric::interval_lib::user::is_neg(yu))
|
||||
return I(rnd.div_down(xu, yl), rnd.div_up(xl, yu), true);
|
||||
// assert(!in_zero(y));
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T &xl = x.lower();
|
||||
const T &xu = x.upper();
|
||||
const T &yl = y.lower();
|
||||
const T &yu = y.upper();
|
||||
if (::boost::numeric::interval_lib::user::is_neg(xu))
|
||||
if (::boost::numeric::interval_lib::user::is_neg(yu))
|
||||
return I(rnd.div_down(xu, yl), rnd.div_up(xl, yu), true);
|
||||
else
|
||||
return I(rnd.div_down(xl, yl), rnd.div_up(xu, yu), true);
|
||||
else if (::boost::numeric::interval_lib::user::is_neg(xl))
|
||||
if (::boost::numeric::interval_lib::user::is_neg(yu))
|
||||
return I(rnd.div_down(xu, yu), rnd.div_up(xl, yu), true);
|
||||
else
|
||||
return I(rnd.div_down(xl, yl), rnd.div_up(xu, yl), true);
|
||||
else if (::boost::numeric::interval_lib::user::is_neg(yu))
|
||||
return I(rnd.div_down(xu, yu), rnd.div_up(xl, yl), true);
|
||||
else
|
||||
return I(rnd.div_down(xl, yl), rnd.div_up(xu, yu), true);
|
||||
else if (::boost::numeric::interval_lib::user::is_neg(xl))
|
||||
if (::boost::numeric::interval_lib::user::is_neg(yu))
|
||||
return I(rnd.div_down(xu, yu), rnd.div_up(xl, yu), true);
|
||||
return I(rnd.div_down(xl, yu), rnd.div_up(xu, yl), true);
|
||||
}
|
||||
|
||||
template <class T, class Policies> inline interval<T, Policies> div_non_zero(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
// assert(!in_zero(y));
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T &yl = y.lower();
|
||||
const T &yu = y.upper();
|
||||
if (::boost::numeric::interval_lib::user::is_neg(x))
|
||||
return I(rnd.div_down(x, yl), rnd.div_up(x, yu), true);
|
||||
else
|
||||
return I(rnd.div_down(xl, yl), rnd.div_up(xu, yl), true);
|
||||
else
|
||||
if (::boost::numeric::interval_lib::user::is_neg(yu))
|
||||
return I(rnd.div_down(xu, yu), rnd.div_up(xl, yl), true);
|
||||
return I(rnd.div_down(x, yu), rnd.div_up(x, yl), true);
|
||||
}
|
||||
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> div_positive(const interval<T, Policies> &x, const T &yu)
|
||||
{
|
||||
// assert(::boost::numeric::interval_lib::user::is_pos(yu));
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x.lower())
|
||||
&& ::boost::numeric::interval_lib::user::is_zero(x.upper()))
|
||||
return x;
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T &xl = x.lower();
|
||||
const T &xu = x.upper();
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(xu))
|
||||
return I(checking::neg_inf(), rnd.div_up(xu, yu), true);
|
||||
else if (::boost::numeric::interval_lib::user::is_neg(xl))
|
||||
return I(checking::neg_inf(), checking::pos_inf(), true);
|
||||
else
|
||||
return I(rnd.div_down(xl, yu), rnd.div_up(xu, yl), true);
|
||||
return I(rnd.div_down(xl, yu), checking::pos_inf(), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_non_zero(const T& x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline interval<T, Policies> div_positive(const T &x, const T &yu)
|
||||
{
|
||||
// assert(!in_zero(y));
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T& yl = y.lower();
|
||||
const T& yu = y.upper();
|
||||
if (::boost::numeric::interval_lib::user::is_neg(x))
|
||||
return I(rnd.div_down(x, yl), rnd.div_up(x, yu), true);
|
||||
else
|
||||
return I(rnd.div_down(x, yu), rnd.div_up(x, yl), true);
|
||||
// assert(::boost::numeric::interval_lib::user::is_pos(yu));
|
||||
typedef interval<T, Policies> I;
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x))
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(x))
|
||||
return I(checking::neg_inf(), rnd.div_up(x, yu), true);
|
||||
else
|
||||
return I(rnd.div_down(x, yu), checking::pos_inf(), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_positive(const interval<T, Policies>& x, const T& yu)
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> div_negative(const interval<T, Policies> &x, const T &yl)
|
||||
{
|
||||
// assert(::boost::numeric::interval_lib::user::is_pos(yu));
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x.lower()) &&
|
||||
::boost::numeric::interval_lib::user::is_zero(x.upper()))
|
||||
return x;
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T& xl = x.lower();
|
||||
const T& xu = x.upper();
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(xu))
|
||||
return I(checking::neg_inf(), rnd.div_up(xu, yu), true);
|
||||
else if (::boost::numeric::interval_lib::user::is_neg(xl))
|
||||
return I(checking::neg_inf(), checking::pos_inf(), true);
|
||||
else
|
||||
return I(rnd.div_down(xl, yu), checking::pos_inf(), true);
|
||||
// assert(::boost::numeric::interval_lib::user::is_neg(yl));
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x.lower())
|
||||
&& ::boost::numeric::interval_lib::user::is_zero(x.upper()))
|
||||
return x;
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T &xl = x.lower();
|
||||
const T &xu = x.upper();
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(xu))
|
||||
return I(rnd.div_down(xu, yl), checking::pos_inf(), true);
|
||||
else if (::boost::numeric::interval_lib::user::is_neg(xl))
|
||||
return I(checking::neg_inf(), checking::pos_inf(), true);
|
||||
else
|
||||
return I(checking::neg_inf(), rnd.div_up(xl, yl), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_positive(const T& x, const T& yu)
|
||||
template <class T, class Policies> inline interval<T, Policies> div_negative(const T &x, const T &yl)
|
||||
{
|
||||
// assert(::boost::numeric::interval_lib::user::is_pos(yu));
|
||||
typedef interval<T, Policies> I;
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x))
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(x))
|
||||
return I(checking::neg_inf(), rnd.div_up(x, yu), true);
|
||||
else
|
||||
return I(rnd.div_down(x, yu), checking::pos_inf(), true);
|
||||
// assert(::boost::numeric::interval_lib::user::is_neg(yl));
|
||||
typedef interval<T, Policies> I;
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x))
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(x))
|
||||
return I(rnd.div_down(x, yl), checking::pos_inf(), true);
|
||||
else
|
||||
return I(checking::neg_inf(), rnd.div_up(x, yl), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_negative(const interval<T, Policies>& x, const T& yl)
|
||||
template <class T, class Policies> inline interval<T, Policies> div_zero(const interval<T, Policies> &x)
|
||||
{
|
||||
// assert(::boost::numeric::interval_lib::user::is_neg(yl));
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x.lower()) &&
|
||||
::boost::numeric::interval_lib::user::is_zero(x.upper()))
|
||||
return x;
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T& xl = x.lower();
|
||||
const T& xu = x.upper();
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(xu))
|
||||
return I(rnd.div_down(xu, yl), checking::pos_inf(), true);
|
||||
else if (::boost::numeric::interval_lib::user::is_neg(xl))
|
||||
return I(checking::neg_inf(), checking::pos_inf(), true);
|
||||
else
|
||||
return I(checking::neg_inf(), rnd.div_up(xl, yl), true);
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x.lower())
|
||||
&& ::boost::numeric::interval_lib::user::is_zero(x.upper()))
|
||||
return x;
|
||||
else
|
||||
return interval<T, Policies>::whole();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_negative(const T& x, const T& yl)
|
||||
template <class T, class Policies> inline interval<T, Policies> div_zero(const T &x)
|
||||
{
|
||||
// assert(::boost::numeric::interval_lib::user::is_neg(yl));
|
||||
typedef interval<T, Policies> I;
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x))
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(x))
|
||||
return I(rnd.div_down(x, yl), checking::pos_inf(), true);
|
||||
else
|
||||
return I(checking::neg_inf(), rnd.div_up(x, yl), true);
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x))
|
||||
return interval<T, Policies>(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else
|
||||
return interval<T, Policies>::whole();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_zero(const interval<T, Policies>& x)
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> div_zero_part1(const interval<T, Policies> &x, const interval<T, Policies> &y, bool &b)
|
||||
{
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x.lower()) &&
|
||||
::boost::numeric::interval_lib::user::is_zero(x.upper()))
|
||||
return x;
|
||||
else return interval<T, Policies>::whole();
|
||||
// assert(::boost::numeric::interval_lib::user::is_neg(y.lower()) &&
|
||||
// ::boost::numeric::interval_lib::user::is_pos(y.upper()));
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x.lower())
|
||||
&& ::boost::numeric::interval_lib::user::is_zero(x.upper())) {
|
||||
b = false;
|
||||
return x;
|
||||
}
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T &xl = x.lower();
|
||||
const T &xu = x.upper();
|
||||
const T &yl = y.lower();
|
||||
const T &yu = y.upper();
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(xu)) {
|
||||
b = true;
|
||||
return I(checking::neg_inf(), rnd.div_up(xu, yu), true);
|
||||
}
|
||||
else if (::boost::numeric::interval_lib::user::is_neg(xl)) {
|
||||
b = false;
|
||||
return I(checking::neg_inf(), checking::pos_inf(), true);
|
||||
}
|
||||
else {
|
||||
b = true;
|
||||
return I(checking::neg_inf(), rnd.div_up(xl, yl), true);
|
||||
}
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_zero(const T& x)
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> div_zero_part2(const interval<T, Policies> &x, const interval<T, Policies> &y)
|
||||
{
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x))
|
||||
return interval<T, Policies>(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else return interval<T, Policies>::whole();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_zero_part1(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y, bool& b)
|
||||
{
|
||||
// assert(::boost::numeric::interval_lib::user::is_neg(y.lower()) && ::boost::numeric::interval_lib::user::is_pos(y.upper()));
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x.lower()) && ::boost::numeric::interval_lib::user::is_zero(x.upper()))
|
||||
{ b = false; return x; }
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T& xl = x.lower();
|
||||
const T& xu = x.upper();
|
||||
const T& yl = y.lower();
|
||||
const T& yu = y.upper();
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(xu))
|
||||
{ b = true; return I(checking::neg_inf(), rnd.div_up(xu, yu), true); }
|
||||
else if (::boost::numeric::interval_lib::user::is_neg(xl))
|
||||
{ b = false; return I(checking::neg_inf(), checking::pos_inf(), true); }
|
||||
else
|
||||
{ b = true; return I(checking::neg_inf(), rnd.div_up(xl, yl), true); }
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_zero_part2(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y)
|
||||
{
|
||||
// assert(::boost::numeric::interval_lib::user::is_neg(y.lower()) && ::boost::numeric::interval_lib::user::is_pos(y.upper()) && (div_zero_part1(x, y, b), b));
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(x.upper()))
|
||||
return I(rnd.div_down(x.upper(), y.lower()), checking::pos_inf(), true);
|
||||
else
|
||||
return I(rnd.div_down(x.lower(), y.upper()), checking::pos_inf(), true);
|
||||
// assert(::boost::numeric::interval_lib::user::is_neg(y.lower()) &&
|
||||
// ::boost::numeric::interval_lib::user::is_pos(y.upper()) && (div_zero_part1(x, y, b), b));
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(x.upper()))
|
||||
return I(rnd.div_down(x.upper(), y.lower()), checking::pos_inf(), true);
|
||||
else
|
||||
return I(rnd.div_down(x.lower(), y.upper()), checking::pos_inf(), true);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#if defined(__hpux)
|
||||
|
||||
# include <fenv.h>
|
||||
#include <fenv.h>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
@@ -24,51 +24,48 @@ namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
|
||||
struct ia64_rounding_control
|
||||
{
|
||||
struct ia64_rounding_control
|
||||
{
|
||||
typedef unsigned int rounding_mode;
|
||||
|
||||
static void set_rounding_mode(const rounding_mode& mode) {
|
||||
fesetround(mode); }
|
||||
static void get_rounding_mode(rounding_mode& mode) { mode = fegetround(); }
|
||||
static void set_rounding_mode(const rounding_mode &mode) { fesetround(mode); }
|
||||
static void get_rounding_mode(rounding_mode &mode) { mode = fegetround(); }
|
||||
|
||||
static void downward() { set_rounding_mode(FE_DOWNWARD); }
|
||||
static void upward() { set_rounding_mode(FE_UPWARD); }
|
||||
static void to_nearest() { set_rounding_mode(FE_TONEAREST); }
|
||||
static void downward() { set_rounding_mode(FE_DOWNWARD); }
|
||||
static void upward() { set_rounding_mode(FE_UPWARD); }
|
||||
static void to_nearest() { set_rounding_mode(FE_TONEAREST); }
|
||||
static void toward_zero() { set_rounding_mode(FE_TOWARDZERO); }
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
extern "C" {
|
||||
float rintf(float);
|
||||
double rint(double);
|
||||
long double rintl(long double);
|
||||
extern "C"
|
||||
{
|
||||
float rintf(float);
|
||||
double rint(double);
|
||||
long double rintl(long double);
|
||||
}
|
||||
|
||||
template<>
|
||||
struct rounding_control<float>:
|
||||
detail::ia64_rounding_control
|
||||
template <> struct rounding_control<float> : detail::ia64_rounding_control
|
||||
{
|
||||
static float force_rounding(const float r)
|
||||
{ volatile float _r = r; return _r; }
|
||||
static float to_int(const float& x) { return rintf(x); }
|
||||
static float force_rounding(const float r)
|
||||
{
|
||||
volatile float _r = r;
|
||||
return _r;
|
||||
}
|
||||
static float to_int(const float &x) { return rintf(x); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<double>:
|
||||
detail::ia64_rounding_control
|
||||
template <> struct rounding_control<double> : detail::ia64_rounding_control
|
||||
{
|
||||
static const double & force_rounding(const double& r) { return r; }
|
||||
static double to_int(const double& r) { return rint(r); }
|
||||
static const double &force_rounding(const double &r) { return r; }
|
||||
static double to_int(const double &r) { return rint(r); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<long double>:
|
||||
detail::ia64_rounding_control
|
||||
template <> struct rounding_control<long double> : detail::ia64_rounding_control
|
||||
{
|
||||
static const long double & force_rounding(const long double& r) { return r; }
|
||||
static long double to_int(const long double& r) { return rintl(r); }
|
||||
static const long double &force_rounding(const long double &r) { return r; }
|
||||
static long double to_int(const long double &r) { return rintl(r); }
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
@@ -80,4 +77,3 @@ struct rounding_control<long double>:
|
||||
#endif /* __hpux */
|
||||
|
||||
#endif /* BOOST_NUMERIC_INTERVAL_DETAIL_IA64_ROUNDING_CONTROL_HPP */
|
||||
|
||||
|
||||
@@ -15,25 +15,23 @@ namespace numeric {
|
||||
|
||||
namespace interval_lib {
|
||||
|
||||
template<class T> struct rounded_math;
|
||||
template<class T> struct checking_strict;
|
||||
template <class T> struct rounded_math;
|
||||
template <class T> struct checking_strict;
|
||||
class comparison_error;
|
||||
template<class Rounding, class Checking> struct policies;
|
||||
template <class Rounding, class Checking> struct policies;
|
||||
|
||||
/*
|
||||
* default policies class
|
||||
*/
|
||||
|
||||
template<class T>
|
||||
struct default_policies
|
||||
template <class T> struct default_policies
|
||||
{
|
||||
typedef policies<rounded_math<T>, checking_strict<T> > type;
|
||||
typedef policies<rounded_math<T>, checking_strict<T>> type;
|
||||
};
|
||||
|
||||
|
||||
} // namespace interval_lib
|
||||
|
||||
template<class T, class Policies = typename interval_lib::default_policies<T>::type >
|
||||
class interval;
|
||||
template <class T, class Policies = typename interval_lib::default_policies<T>::type> class interval;
|
||||
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_MSVC_ROUNDING_CONTROL_HPP
|
||||
|
||||
#ifndef _MSC_VER
|
||||
# error This header is only intended for MSVC, but might work for Borland as well
|
||||
#error This header is only intended for MSVC, but might work for Borland as well
|
||||
#endif
|
||||
|
||||
#include <float.h> // MSVC rounding control
|
||||
#include <float.h> // MSVC rounding control
|
||||
|
||||
// Although the function is called _control87, it seems to work for
|
||||
// other FPUs too, so it does not have to be changed to _controlfp.
|
||||
@@ -25,74 +25,123 @@ namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
extern "C" { double rint(double); }
|
||||
extern "C"
|
||||
{
|
||||
double rint(double);
|
||||
}
|
||||
|
||||
struct x86_rounding
|
||||
{
|
||||
static unsigned int hard2msvc(unsigned short m) {
|
||||
unsigned int n = 0;
|
||||
if (m & 0x01) n |= _EM_INVALID;
|
||||
if (m & 0x02) n |= _EM_DENORMAL;
|
||||
if (m & 0x04) n |= _EM_ZERODIVIDE;
|
||||
if (m & 0x08) n |= _EM_OVERFLOW;
|
||||
if (m & 0x10) n |= _EM_UNDERFLOW;
|
||||
if (m & 0x20) n |= _EM_INEXACT;
|
||||
switch (m & 0x300) {
|
||||
case 0x000: n |= _PC_24; break;
|
||||
case 0x200: n |= _PC_53; break;
|
||||
case 0x300: n |= _PC_64; break;
|
||||
static unsigned int hard2msvc(unsigned short m)
|
||||
{
|
||||
unsigned int n = 0;
|
||||
if (m & 0x01)
|
||||
n |= _EM_INVALID;
|
||||
if (m & 0x02)
|
||||
n |= _EM_DENORMAL;
|
||||
if (m & 0x04)
|
||||
n |= _EM_ZERODIVIDE;
|
||||
if (m & 0x08)
|
||||
n |= _EM_OVERFLOW;
|
||||
if (m & 0x10)
|
||||
n |= _EM_UNDERFLOW;
|
||||
if (m & 0x20)
|
||||
n |= _EM_INEXACT;
|
||||
switch (m & 0x300) {
|
||||
case 0x000:
|
||||
n |= _PC_24;
|
||||
break;
|
||||
case 0x200:
|
||||
n |= _PC_53;
|
||||
break;
|
||||
case 0x300:
|
||||
n |= _PC_64;
|
||||
break;
|
||||
}
|
||||
switch (m & 0xC00) {
|
||||
case 0x000:
|
||||
n |= _RC_NEAR;
|
||||
break;
|
||||
case 0x400:
|
||||
n |= _RC_DOWN;
|
||||
break;
|
||||
case 0x800:
|
||||
n |= _RC_UP;
|
||||
break;
|
||||
case 0xC00:
|
||||
n |= _RC_CHOP;
|
||||
break;
|
||||
}
|
||||
if (m & 0x1000)
|
||||
n |= _IC_AFFINE; // only useful on 287
|
||||
return n;
|
||||
}
|
||||
switch (m & 0xC00) {
|
||||
case 0x000: n |= _RC_NEAR; break;
|
||||
case 0x400: n |= _RC_DOWN; break;
|
||||
case 0x800: n |= _RC_UP; break;
|
||||
case 0xC00: n |= _RC_CHOP; break;
|
||||
}
|
||||
if (m & 0x1000) n |= _IC_AFFINE; // only useful on 287
|
||||
return n;
|
||||
}
|
||||
|
||||
static unsigned short msvc2hard(unsigned int n) {
|
||||
unsigned short m = 0;
|
||||
if (n & _EM_INVALID) m |= 0x01;
|
||||
if (n & _EM_DENORMAL) m |= 0x02;
|
||||
if (n & _EM_ZERODIVIDE) m |= 0x04;
|
||||
if (n & _EM_OVERFLOW) m |= 0x08;
|
||||
if (n & _EM_UNDERFLOW) m |= 0x10;
|
||||
if (n & _EM_INEXACT) m |= 0x20;
|
||||
switch (n & _MCW_RC) {
|
||||
case _RC_NEAR: m |= 0x000; break;
|
||||
case _RC_DOWN: m |= 0x400; break;
|
||||
case _RC_UP: m |= 0x800; break;
|
||||
case _RC_CHOP: m |= 0xC00; break;
|
||||
static unsigned short msvc2hard(unsigned int n)
|
||||
{
|
||||
unsigned short m = 0;
|
||||
if (n & _EM_INVALID)
|
||||
m |= 0x01;
|
||||
if (n & _EM_DENORMAL)
|
||||
m |= 0x02;
|
||||
if (n & _EM_ZERODIVIDE)
|
||||
m |= 0x04;
|
||||
if (n & _EM_OVERFLOW)
|
||||
m |= 0x08;
|
||||
if (n & _EM_UNDERFLOW)
|
||||
m |= 0x10;
|
||||
if (n & _EM_INEXACT)
|
||||
m |= 0x20;
|
||||
switch (n & _MCW_RC) {
|
||||
case _RC_NEAR:
|
||||
m |= 0x000;
|
||||
break;
|
||||
case _RC_DOWN:
|
||||
m |= 0x400;
|
||||
break;
|
||||
case _RC_UP:
|
||||
m |= 0x800;
|
||||
break;
|
||||
case _RC_CHOP:
|
||||
m |= 0xC00;
|
||||
break;
|
||||
}
|
||||
switch (n & _MCW_PC) {
|
||||
case _PC_24:
|
||||
m |= 0x000;
|
||||
break;
|
||||
case _PC_53:
|
||||
m |= 0x200;
|
||||
break;
|
||||
case _PC_64:
|
||||
m |= 0x300;
|
||||
break;
|
||||
}
|
||||
if ((n & _MCW_IC) == _IC_AFFINE)
|
||||
m |= 0x1000;
|
||||
return m;
|
||||
}
|
||||
switch (n & _MCW_PC) {
|
||||
case _PC_24: m |= 0x000; break;
|
||||
case _PC_53: m |= 0x200; break;
|
||||
case _PC_64: m |= 0x300; break;
|
||||
}
|
||||
if ((n & _MCW_IC) == _IC_AFFINE) m |= 0x1000;
|
||||
return m;
|
||||
}
|
||||
|
||||
typedef unsigned short rounding_mode;
|
||||
static void get_rounding_mode(rounding_mode& mode)
|
||||
{ mode = msvc2hard(_control87(0, 0)); }
|
||||
static void set_rounding_mode(const rounding_mode mode)
|
||||
{ _control87(hard2msvc(mode),
|
||||
_MCW_EM | _MCW_RC
|
||||
typedef unsigned short rounding_mode;
|
||||
static void get_rounding_mode(rounding_mode &mode) { mode = msvc2hard(_control87(0, 0)); }
|
||||
static void set_rounding_mode(const rounding_mode mode)
|
||||
{
|
||||
_control87(hard2msvc(mode),
|
||||
_MCW_EM
|
||||
| _MCW_RC
|
||||
// This is updated as per fix in boost 1.58
|
||||
#if !defined(_M_AMD64) && !defined(_M_ARM)
|
||||
// x64 ignores _MCW_PC and _MCW_IC, and the Debug CRT library actually
|
||||
// asserts when these are passed to _control87.
|
||||
// MSDN says on '_control87' that changing precision (_MCW_PC) or
|
||||
// infinity (_MCW_IC) handling is not supported on the ARM and x64
|
||||
// architectures and that _control87 raises an assertion
|
||||
// and the invalid parameter handler is invoked.
|
||||
| _MCW_PC | _MCW_IC
|
||||
// x64 ignores _MCW_PC and _MCW_IC, and the Debug CRT library actually
|
||||
// asserts when these are passed to _control87.
|
||||
// MSDN says on '_control87' that changing precision (_MCW_PC) or
|
||||
// infinity (_MCW_IC) handling is not supported on the ARM and x64
|
||||
// architectures and that _control87 raises an assertion
|
||||
// and the invalid parameter handler is invoked.
|
||||
| _MCW_PC | _MCW_IC
|
||||
#endif
|
||||
); }
|
||||
static double to_int(const double& x) { return rint(x); }
|
||||
);
|
||||
}
|
||||
static double to_int(const double &x) { return rint(x); }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
@@ -16,37 +16,36 @@
|
||||
#error This header only works on PPC CPUs.
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__ ) || (__IBMCPP__ >= 700)
|
||||
#if defined(__GNUC__) || (__IBMCPP__ >= 700)
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
typedef union {
|
||||
::boost::long_long_type imode;
|
||||
double dmode;
|
||||
typedef union
|
||||
{
|
||||
::boost::long_long_type imode;
|
||||
double dmode;
|
||||
} rounding_mode_struct;
|
||||
|
||||
static const rounding_mode_struct mode_upward = { static_cast<boost::long_long_type>(0xFFF8000000000002LL) };
|
||||
static const rounding_mode_struct mode_downward = { static_cast<boost::long_long_type>(0xFFF8000000000003LL) };
|
||||
static const rounding_mode_struct mode_to_nearest = { static_cast<boost::long_long_type>(0xFFF8000000000000LL) };
|
||||
static const rounding_mode_struct mode_toward_zero = { static_cast<boost::long_long_type>(0xFFF8000000000001LL) };
|
||||
static const rounding_mode_struct mode_upward = {static_cast<boost::long_long_type>(0xFFF8000000000002LL)};
|
||||
static const rounding_mode_struct mode_downward = {static_cast<boost::long_long_type>(0xFFF8000000000003LL)};
|
||||
static const rounding_mode_struct mode_to_nearest = {static_cast<boost::long_long_type>(0xFFF8000000000000LL)};
|
||||
static const rounding_mode_struct mode_toward_zero = {static_cast<boost::long_long_type>(0xFFF8000000000001LL)};
|
||||
|
||||
struct ppc_rounding_control
|
||||
{
|
||||
typedef double rounding_mode;
|
||||
typedef double rounding_mode;
|
||||
|
||||
static void set_rounding_mode(const rounding_mode mode)
|
||||
{ __asm__ __volatile__ ("mtfsf 255,%0" : : "f"(mode)); }
|
||||
static void set_rounding_mode(const rounding_mode mode) { __asm__ __volatile__("mtfsf 255,%0" : : "f"(mode)); }
|
||||
|
||||
static void get_rounding_mode(rounding_mode& mode)
|
||||
{ __asm__ __volatile__ ("mffs %0" : "=f"(mode)); }
|
||||
static void get_rounding_mode(rounding_mode &mode) { __asm__ __volatile__("mffs %0" : "=f"(mode)); }
|
||||
|
||||
static void downward() { set_rounding_mode(mode_downward.dmode); }
|
||||
static void upward() { set_rounding_mode(mode_upward.dmode); }
|
||||
static void to_nearest() { set_rounding_mode(mode_to_nearest.dmode); }
|
||||
static void toward_zero() { set_rounding_mode(mode_toward_zero.dmode); }
|
||||
static void downward() { set_rounding_mode(mode_downward.dmode); }
|
||||
static void upward() { set_rounding_mode(mode_upward.dmode); }
|
||||
static void to_nearest() { set_rounding_mode(mode_to_nearest.dmode); }
|
||||
static void toward_zero() { set_rounding_mode(mode_toward_zero.dmode); }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
@@ -54,39 +53,34 @@ struct ppc_rounding_control
|
||||
// Do not declare the following C99 symbols if <math.h> provides them.
|
||||
// Otherwise, conflicts may occur, due to differences between prototypes.
|
||||
#if !defined(_ISOC99_SOURCE) && !defined(__USE_ISOC99)
|
||||
extern "C" {
|
||||
float rintf(float);
|
||||
double rint(double);
|
||||
extern "C"
|
||||
{
|
||||
float rintf(float);
|
||||
double rint(double);
|
||||
}
|
||||
#endif
|
||||
|
||||
template<>
|
||||
struct rounding_control<float>:
|
||||
detail::ppc_rounding_control
|
||||
template <> struct rounding_control<float> : detail::ppc_rounding_control
|
||||
{
|
||||
static float force_rounding(const float r)
|
||||
{
|
||||
float tmp;
|
||||
__asm__ __volatile__ ("frsp %0, %1" : "=f" (tmp) : "f" (r));
|
||||
return tmp;
|
||||
}
|
||||
static float to_int(const float& x) { return rintf(x); }
|
||||
static float force_rounding(const float r)
|
||||
{
|
||||
float tmp;
|
||||
__asm__ __volatile__("frsp %0, %1" : "=f"(tmp) : "f"(r));
|
||||
return tmp;
|
||||
}
|
||||
static float to_int(const float &x) { return rintf(x); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<double>:
|
||||
detail::ppc_rounding_control
|
||||
template <> struct rounding_control<double> : detail::ppc_rounding_control
|
||||
{
|
||||
static const double & force_rounding(const double& r) { return r; }
|
||||
static double to_int(const double& r) { return rint(r); }
|
||||
static const double &force_rounding(const double &r) { return r; }
|
||||
static double to_int(const double &r) { return rint(r); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<long double>:
|
||||
detail::ppc_rounding_control
|
||||
template <> struct rounding_control<long double> : detail::ppc_rounding_control
|
||||
{
|
||||
static const long double & force_rounding(const long double& r) { return r; }
|
||||
static long double to_int(const long double& r) { return rint(static_cast<double>(r)); }
|
||||
static const long double &force_rounding(const long double &r) { return r; }
|
||||
static long double to_int(const long double &r) { return rint(static_cast<double>(r)); }
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_SPARC_ROUNDING_CONTROL_HPP
|
||||
|
||||
#if !defined(sparc) && !defined(__sparc__)
|
||||
# error This header is only intended for SPARC CPUs.
|
||||
#error This header is only intended for SPARC CPUs.
|
||||
#endif
|
||||
|
||||
#ifdef __SUNPRO_CC
|
||||
# include <ieeefp.h>
|
||||
#include <ieeefp.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -29,78 +29,73 @@ namespace detail {
|
||||
|
||||
struct sparc_rounding_control
|
||||
{
|
||||
typedef unsigned int rounding_mode;
|
||||
typedef unsigned int rounding_mode;
|
||||
|
||||
static void set_rounding_mode(const rounding_mode& mode)
|
||||
{
|
||||
# if defined(__GNUC__)
|
||||
__asm__ __volatile__("ld %0, %%fsr" : : "m"(mode));
|
||||
# elif defined (__SUNPRO_CC)
|
||||
fpsetround(fp_rnd(mode));
|
||||
# elif defined(__KCC)
|
||||
asm("sethi %hi(mode), %o1");
|
||||
asm("ld [%o1+%lo(mode)], %fsr");
|
||||
# else
|
||||
# error Unsupported compiler for Sparc rounding control.
|
||||
# endif
|
||||
}
|
||||
static void set_rounding_mode(const rounding_mode &mode)
|
||||
{
|
||||
#if defined(__GNUC__)
|
||||
__asm__ __volatile__("ld %0, %%fsr" : : "m"(mode));
|
||||
#elif defined(__SUNPRO_CC)
|
||||
fpsetround(fp_rnd(mode));
|
||||
#elif defined(__KCC)
|
||||
asm("sethi %hi(mode), %o1");
|
||||
asm("ld [%o1+%lo(mode)], %fsr");
|
||||
#else
|
||||
#error Unsupported compiler for Sparc rounding control.
|
||||
#endif
|
||||
}
|
||||
|
||||
static void get_rounding_mode(rounding_mode& mode)
|
||||
{
|
||||
# if defined(__GNUC__)
|
||||
__asm__ __volatile__("st %%fsr, %0" : "=m"(mode));
|
||||
# elif defined (__SUNPRO_CC)
|
||||
mode = fpgetround();
|
||||
# elif defined(__KCC)
|
||||
# error KCC on Sun SPARC get_round_mode: please fix me
|
||||
asm("st %fsr, [mode]");
|
||||
# else
|
||||
# error Unsupported compiler for Sparc rounding control.
|
||||
# endif
|
||||
}
|
||||
static void get_rounding_mode(rounding_mode &mode)
|
||||
{
|
||||
#if defined(__GNUC__)
|
||||
__asm__ __volatile__("st %%fsr, %0" : "=m"(mode));
|
||||
#elif defined(__SUNPRO_CC)
|
||||
mode = fpgetround();
|
||||
#elif defined(__KCC)
|
||||
#error KCC on Sun SPARC get_round_mode: please fix me
|
||||
asm("st %fsr, [mode]");
|
||||
#else
|
||||
#error Unsupported compiler for Sparc rounding control.
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__SUNPRO_CC)
|
||||
static void downward() { set_rounding_mode(FP_RM); }
|
||||
static void upward() { set_rounding_mode(FP_RP); }
|
||||
static void to_nearest() { set_rounding_mode(FP_RN); }
|
||||
static void toward_zero() { set_rounding_mode(FP_RZ); }
|
||||
static void downward() { set_rounding_mode(FP_RM); }
|
||||
static void upward() { set_rounding_mode(FP_RP); }
|
||||
static void to_nearest() { set_rounding_mode(FP_RN); }
|
||||
static void toward_zero() { set_rounding_mode(FP_RZ); }
|
||||
#else
|
||||
static void downward() { set_rounding_mode(0xc0000000); }
|
||||
static void upward() { set_rounding_mode(0x80000000); }
|
||||
static void to_nearest() { set_rounding_mode(0x00000000); }
|
||||
static void toward_zero() { set_rounding_mode(0x40000000); }
|
||||
static void downward() { set_rounding_mode(0xc0000000); }
|
||||
static void upward() { set_rounding_mode(0x80000000); }
|
||||
static void to_nearest() { set_rounding_mode(0x00000000); }
|
||||
static void toward_zero() { set_rounding_mode(0x40000000); }
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
extern "C" {
|
||||
float rintf(float);
|
||||
double rint(double);
|
||||
extern "C"
|
||||
{
|
||||
float rintf(float);
|
||||
double rint(double);
|
||||
}
|
||||
|
||||
template<>
|
||||
struct rounding_control<float>:
|
||||
detail::sparc_rounding_control
|
||||
template <> struct rounding_control<float> : detail::sparc_rounding_control
|
||||
{
|
||||
static const float& force_rounding(const float& x) { return x; }
|
||||
static float to_int(const float& x) { return rintf(x); }
|
||||
static const float &force_rounding(const float &x) { return x; }
|
||||
static float to_int(const float &x) { return rintf(x); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<double>:
|
||||
detail::sparc_rounding_control
|
||||
template <> struct rounding_control<double> : detail::sparc_rounding_control
|
||||
{
|
||||
static const double& force_rounding(const double& x) { return x; }
|
||||
static double to_int(const double& x) { return rint(x); }
|
||||
static const double &force_rounding(const double &x) { return x; }
|
||||
static double to_int(const double &x) { return rint(x); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<long double>:
|
||||
detail::sparc_rounding_control
|
||||
template <> struct rounding_control<long double> : detail::sparc_rounding_control
|
||||
{
|
||||
static const long double& force_rounding(const long double& x) { return x; }
|
||||
static long double to_int(const long double& x) { return rint(x); }
|
||||
static const long double &force_rounding(const long double &x) { return x; }
|
||||
static long double to_int(const long double &x) { return rint(x); }
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
|
||||
@@ -17,55 +17,52 @@ namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace user {
|
||||
|
||||
template<class T> inline
|
||||
bool is_zero(T const &v) { return v == static_cast<T>(0); }
|
||||
template <class T> inline bool is_zero(T const &v) { return v == static_cast<T>(0); }
|
||||
|
||||
template<class T> inline
|
||||
bool is_neg (T const &v) { return v < static_cast<T>(0); }
|
||||
template <class T> inline bool is_neg(T const &v) { return v < static_cast<T>(0); }
|
||||
|
||||
template<class T> inline
|
||||
bool is_pos (T const &v) { return v > static_cast<T>(0); }
|
||||
template <class T> inline bool is_pos(T const &v) { return v > static_cast<T>(0); }
|
||||
|
||||
} // namespace user
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool test_input(const interval<T, Policies>& x) {
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_empty(x.lower(), x.upper());
|
||||
template <class T, class Policies> inline bool test_input(const interval<T, Policies> &x)
|
||||
{
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_empty(x.lower(), x.upper());
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool test_input(const interval<T, Policies1>& x, const interval<T, Policies2>& y) {
|
||||
typedef typename Policies1::checking checking1;
|
||||
typedef typename Policies2::checking checking2;
|
||||
return checking1::is_empty(x.lower(), x.upper()) ||
|
||||
checking2::is_empty(y.lower(), y.upper());
|
||||
template <class T, class Policies1, class Policies2>
|
||||
inline bool test_input(const interval<T, Policies1> &x, const interval<T, Policies2> &y)
|
||||
{
|
||||
typedef typename Policies1::checking checking1;
|
||||
typedef typename Policies2::checking checking2;
|
||||
return checking1::is_empty(x.lower(), x.upper()) || checking2::is_empty(y.lower(), y.upper());
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool test_input(const T& x, const interval<T, Policies>& y) {
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_nan(x) || checking::is_empty(y.lower(), y.upper());
|
||||
template <class T, class Policies> inline bool test_input(const T &x, const interval<T, Policies> &y)
|
||||
{
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_nan(x) || checking::is_empty(y.lower(), y.upper());
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool test_input(const interval<T, Policies>& x, const T& y) {
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_empty(x.lower(), x.upper()) || checking::is_nan(y);
|
||||
template <class T, class Policies> inline bool test_input(const interval<T, Policies> &x, const T &y)
|
||||
{
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_empty(x.lower(), x.upper()) || checking::is_nan(y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool test_input(const T& x) {
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_nan(x);
|
||||
template <class T, class Policies> inline bool test_input(const T &x)
|
||||
{
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_nan(x);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool test_input(const T& x, const T& y) {
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_nan(x) || checking::is_nan(y);
|
||||
template <class T, class Policies> inline bool test_input(const T &x, const T &y)
|
||||
{
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_nan(x) || checking::is_nan(y);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
@@ -12,16 +12,16 @@
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_X86_ROUNDING_CONTROL_HPP
|
||||
|
||||
#ifdef __GNUC__
|
||||
# include <boost/numeric/interval/detail/x86gcc_rounding_control.hpp>
|
||||
#include <boost/numeric/interval/detail/x86gcc_rounding_control.hpp>
|
||||
#elif defined(__BORLANDC__)
|
||||
# include <boost/numeric/interval/detail/bcc_rounding_control.hpp>
|
||||
#include <boost/numeric/interval/detail/bcc_rounding_control.hpp>
|
||||
#elif defined(_MSC_VER)
|
||||
# include <boost/numeric/interval/detail/msvc_rounding_control.hpp>
|
||||
#include <boost/numeric/interval/detail/msvc_rounding_control.hpp>
|
||||
#elif defined(__MWERKS__) || defined(__ICC)
|
||||
# define BOOST_NUMERIC_INTERVAL_USE_C99_SUBSYSTEM
|
||||
# include <boost/numeric/interval/detail/c99sub_rounding_control.hpp>
|
||||
#define BOOST_NUMERIC_INTERVAL_USE_C99_SUBSYSTEM
|
||||
#include <boost/numeric/interval/detail/c99sub_rounding_control.hpp>
|
||||
#else
|
||||
# error Unsupported C++ compiler.
|
||||
#error Unsupported C++ compiler.
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
@@ -36,68 +36,70 @@ typedef c99_rounding x86_rounding_control;
|
||||
#else
|
||||
struct fpu_rounding_modes
|
||||
{
|
||||
unsigned short to_nearest;
|
||||
unsigned short downward;
|
||||
unsigned short upward;
|
||||
unsigned short toward_zero;
|
||||
unsigned short to_nearest;
|
||||
unsigned short downward;
|
||||
unsigned short upward;
|
||||
unsigned short toward_zero;
|
||||
};
|
||||
|
||||
// exceptions masked, extended precision
|
||||
// hardware default is 0x037f (0x1000 only has a meaning on 287)
|
||||
static const fpu_rounding_modes rnd_mode = { 0x137f, 0x177f, 0x1b7f, 0x1f7f };
|
||||
static const fpu_rounding_modes rnd_mode = {0x137f, 0x177f, 0x1b7f, 0x1f7f};
|
||||
|
||||
struct x86_rounding_control: x86_rounding
|
||||
struct x86_rounding_control : x86_rounding
|
||||
{
|
||||
static void to_nearest() { set_rounding_mode(rnd_mode.to_nearest); }
|
||||
static void downward() { set_rounding_mode(rnd_mode.downward); }
|
||||
static void upward() { set_rounding_mode(rnd_mode.upward); }
|
||||
static void toward_zero() { set_rounding_mode(rnd_mode.toward_zero); }
|
||||
static void to_nearest() { set_rounding_mode(rnd_mode.to_nearest); }
|
||||
static void downward() { set_rounding_mode(rnd_mode.downward); }
|
||||
static void upward() { set_rounding_mode(rnd_mode.upward); }
|
||||
static void toward_zero() { set_rounding_mode(rnd_mode.toward_zero); }
|
||||
};
|
||||
#endif // BOOST_NUMERIC_INTERVAL_USE_C99_SUBSYSTEM
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<>
|
||||
struct rounding_control<float>: detail::x86_rounding_control
|
||||
template <> struct rounding_control<float> : detail::x86_rounding_control
|
||||
{
|
||||
static float force_rounding(const float& r)
|
||||
{ volatile float r_ = r; return r_; }
|
||||
static float force_rounding(const float &r)
|
||||
{
|
||||
volatile float r_ = r;
|
||||
return r_;
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<double>: detail::x86_rounding_control
|
||||
template <> struct rounding_control<double> : detail::x86_rounding_control
|
||||
{
|
||||
/*static double force_rounding(double r)
|
||||
{ asm volatile ("" : "+m"(r) : ); return r; }*/
|
||||
static double force_rounding(const double& r)
|
||||
{ volatile double r_ = r; return r_; }
|
||||
/*static double force_rounding(double r)
|
||||
{ asm volatile ("" : "+m"(r) : ); return r; }*/
|
||||
static double force_rounding(const double &r)
|
||||
{
|
||||
volatile double r_ = r;
|
||||
return r_;
|
||||
}
|
||||
};
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<bool>
|
||||
struct x86_rounding_control_long_double;
|
||||
template <bool> struct x86_rounding_control_long_double;
|
||||
|
||||
template<>
|
||||
struct x86_rounding_control_long_double<false>: x86_rounding_control
|
||||
template <> struct x86_rounding_control_long_double<false> : x86_rounding_control
|
||||
{
|
||||
static long double force_rounding(long double const &r)
|
||||
{ volatile long double r_ = r; return r_; }
|
||||
static long double force_rounding(long double const &r)
|
||||
{
|
||||
volatile long double r_ = r;
|
||||
return r_;
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct x86_rounding_control_long_double<true>: x86_rounding_control
|
||||
template <> struct x86_rounding_control_long_double<true> : x86_rounding_control
|
||||
{
|
||||
static long double const &force_rounding(long double const &r)
|
||||
{ return r; }
|
||||
static long double const &force_rounding(long double const &r) { return r; }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<>
|
||||
struct rounding_control<long double>:
|
||||
detail::x86_rounding_control_long_double< (sizeof(long double) >= 10) >
|
||||
{};
|
||||
template <> struct rounding_control<long double> : detail::x86_rounding_control_long_double<(sizeof(long double) >= 10)>
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_X86GCC_ROUNDING_CONTROL_HPP
|
||||
|
||||
#ifndef __GNUC__
|
||||
# error This header only works with GNU CC.
|
||||
#error This header only works with GNU CC.
|
||||
#endif
|
||||
|
||||
#ifndef __i386__
|
||||
# error This header only works on x86 CPUs.
|
||||
#error This header only works on x86 CPUs.
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
@@ -26,21 +26,18 @@ namespace detail {
|
||||
|
||||
struct x86_rounding
|
||||
{
|
||||
typedef unsigned short rounding_mode;
|
||||
typedef unsigned short rounding_mode;
|
||||
|
||||
static void set_rounding_mode(const rounding_mode& mode)
|
||||
{ __asm__ __volatile__ ("fldcw %0" : : "m"(mode)); }
|
||||
static void set_rounding_mode(const rounding_mode &mode) { __asm__ __volatile__("fldcw %0" : : "m"(mode)); }
|
||||
|
||||
static void get_rounding_mode(rounding_mode& mode)
|
||||
{ __asm__ __volatile__ ("fnstcw %0" : "=m"(mode)); }
|
||||
static void get_rounding_mode(rounding_mode &mode) { __asm__ __volatile__("fnstcw %0" : "=m"(mode)); }
|
||||
|
||||
template<class T>
|
||||
static T to_int(T r)
|
||||
{
|
||||
T r_;
|
||||
__asm__ ("frndint" : "=&t"(r_) : "0"(r));
|
||||
return r_;
|
||||
}
|
||||
template <class T> static T to_int(T r)
|
||||
{
|
||||
T r_;
|
||||
__asm__("frndint" : "=&t"(r_) : "0"(r));
|
||||
return r_;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
@@ -16,52 +16,44 @@
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator+ (const interval<T, Policies>& x, int y)
|
||||
template <class T, class Policies> inline interval<T, Policies> operator+(const interval<T, Policies> &x, int y)
|
||||
{
|
||||
return x + static_cast<T>(y);
|
||||
return x + static_cast<T>(y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator+ (int x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline interval<T, Policies> operator+(int x, const interval<T, Policies> &y)
|
||||
{
|
||||
return static_cast<T>(x) + y;
|
||||
return static_cast<T>(x) + y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator- (const interval<T, Policies>& x, int y)
|
||||
template <class T, class Policies> inline interval<T, Policies> operator-(const interval<T, Policies> &x, int y)
|
||||
{
|
||||
return x - static_cast<T>(y);
|
||||
return x - static_cast<T>(y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator- (int x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline interval<T, Policies> operator-(int x, const interval<T, Policies> &y)
|
||||
{
|
||||
return static_cast<T>(x) - y;
|
||||
return static_cast<T>(x) - y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator* (const interval<T, Policies>& x, int y)
|
||||
template <class T, class Policies> inline interval<T, Policies> operator*(const interval<T, Policies> &x, int y)
|
||||
{
|
||||
return x * static_cast<T>(y);
|
||||
return x * static_cast<T>(y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator* (int x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline interval<T, Policies> operator*(int x, const interval<T, Policies> &y)
|
||||
{
|
||||
return static_cast<T>(x) * y;
|
||||
return static_cast<T>(x) * y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator/ (const interval<T, Policies>& x, int y)
|
||||
template <class T, class Policies> inline interval<T, Policies> operator/(const interval<T, Policies> &x, int y)
|
||||
{
|
||||
return x / static_cast<T>(y);
|
||||
return x / static_cast<T>(y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator/ (int x, const interval<T, Policies>& y)
|
||||
template <class T, class Policies> inline interval<T, Policies> operator/(int x, const interval<T, Policies> &y)
|
||||
{
|
||||
return static_cast<T>(x) / y;
|
||||
return static_cast<T>(x) / y;
|
||||
}
|
||||
|
||||
} // namespace numeric
|
||||
|
||||
@@ -24,43 +24,39 @@ namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
// exceptions masked, expected precision (the mask is 0x0300)
|
||||
static const fpu_rounding_modes rnd_mode_f = { 0x107f, 0x147f, 0x187f, 0x1c7f };
|
||||
static const fpu_rounding_modes rnd_mode_d = { 0x127f, 0x167f, 0x1a7f, 0x1e7f };
|
||||
static const fpu_rounding_modes rnd_mode_l = { 0x137f, 0x177f, 0x1b7f, 0x1f7f };
|
||||
static const fpu_rounding_modes rnd_mode_f = {0x107f, 0x147f, 0x187f, 0x1c7f};
|
||||
static const fpu_rounding_modes rnd_mode_d = {0x127f, 0x167f, 0x1a7f, 0x1e7f};
|
||||
static const fpu_rounding_modes rnd_mode_l = {0x137f, 0x177f, 0x1b7f, 0x1f7f};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<class T>
|
||||
struct x86_fast_rounding_control;
|
||||
template <class T> struct x86_fast_rounding_control;
|
||||
|
||||
template<>
|
||||
struct x86_fast_rounding_control<float>: detail::x86_rounding
|
||||
template <> struct x86_fast_rounding_control<float> : detail::x86_rounding
|
||||
{
|
||||
static void to_nearest() { set_rounding_mode(detail::rnd_mode_f.to_nearest); }
|
||||
static void downward() { set_rounding_mode(detail::rnd_mode_f.downward); }
|
||||
static void upward() { set_rounding_mode(detail::rnd_mode_f.upward); }
|
||||
static void toward_zero() { set_rounding_mode(detail::rnd_mode_f.toward_zero); }
|
||||
static const float& force_rounding(const float& r) { return r; }
|
||||
static void to_nearest() { set_rounding_mode(detail::rnd_mode_f.to_nearest); }
|
||||
static void downward() { set_rounding_mode(detail::rnd_mode_f.downward); }
|
||||
static void upward() { set_rounding_mode(detail::rnd_mode_f.upward); }
|
||||
static void toward_zero() { set_rounding_mode(detail::rnd_mode_f.toward_zero); }
|
||||
static const float &force_rounding(const float &r) { return r; }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct x86_fast_rounding_control<double>: detail::x86_rounding
|
||||
template <> struct x86_fast_rounding_control<double> : detail::x86_rounding
|
||||
{
|
||||
static void to_nearest() { set_rounding_mode(detail::rnd_mode_d.to_nearest); }
|
||||
static void downward() { set_rounding_mode(detail::rnd_mode_d.downward); }
|
||||
static void upward() { set_rounding_mode(detail::rnd_mode_d.upward); }
|
||||
static void toward_zero() { set_rounding_mode(detail::rnd_mode_d.toward_zero); }
|
||||
static const double& force_rounding(const double& r) { return r; }
|
||||
static void to_nearest() { set_rounding_mode(detail::rnd_mode_d.to_nearest); }
|
||||
static void downward() { set_rounding_mode(detail::rnd_mode_d.downward); }
|
||||
static void upward() { set_rounding_mode(detail::rnd_mode_d.upward); }
|
||||
static void toward_zero() { set_rounding_mode(detail::rnd_mode_d.toward_zero); }
|
||||
static const double &force_rounding(const double &r) { return r; }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct x86_fast_rounding_control<long double>: detail::x86_rounding
|
||||
template <> struct x86_fast_rounding_control<long double> : detail::x86_rounding
|
||||
{
|
||||
static void to_nearest() { set_rounding_mode(detail::rnd_mode_l.to_nearest); }
|
||||
static void downward() { set_rounding_mode(detail::rnd_mode_l.downward); }
|
||||
static void upward() { set_rounding_mode(detail::rnd_mode_l.upward); }
|
||||
static void toward_zero() { set_rounding_mode(detail::rnd_mode_l.toward_zero); }
|
||||
static const long double& force_rounding(const long double& r) { return r; }
|
||||
static void to_nearest() { set_rounding_mode(detail::rnd_mode_l.to_nearest); }
|
||||
static void downward() { set_rounding_mode(detail::rnd_mode_l.downward); }
|
||||
static void upward() { set_rounding_mode(detail::rnd_mode_l.upward); }
|
||||
static void toward_zero() { set_rounding_mode(detail::rnd_mode_l.toward_zero); }
|
||||
static const long double &force_rounding(const long double &r) { return r; }
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
|
||||
@@ -11,33 +11,33 @@
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP
|
||||
|
||||
#include <boost/numeric/interval/rounding.hpp>
|
||||
#include <boost/numeric/interval/rounded_arith.hpp>
|
||||
#include <boost/numeric/interval/rounding.hpp>
|
||||
|
||||
#define BOOST_NUMERIC_INTERVAL_NO_HARDWARE
|
||||
|
||||
// define appropriate specialization of rounding_control for built-in types
|
||||
#if defined(__x86_64__) && defined(__USE_ISOC99)
|
||||
# include <boost/numeric/interval/detail/c99_rounding_control.hpp>
|
||||
#include <boost/numeric/interval/detail/c99_rounding_control.hpp>
|
||||
#elif defined(__i386__) || defined(_M_IX86) || defined(__BORLANDC__) || defined(_M_X64)
|
||||
# include <boost/numeric/interval/detail/x86_rounding_control.hpp>
|
||||
#include <boost/numeric/interval/detail/x86_rounding_control.hpp>
|
||||
#elif defined(powerpc) || defined(__powerpc__) || defined(__ppc__)
|
||||
# include <boost/numeric/interval/detail/ppc_rounding_control.hpp>
|
||||
#include <boost/numeric/interval/detail/ppc_rounding_control.hpp>
|
||||
#elif defined(sparc) || defined(__sparc__)
|
||||
# include <boost/numeric/interval/detail/sparc_rounding_control.hpp>
|
||||
#include <boost/numeric/interval/detail/sparc_rounding_control.hpp>
|
||||
#elif defined(alpha) || defined(__alpha__)
|
||||
# include <boost/numeric/interval/detail/alpha_rounding_control.hpp>
|
||||
#include <boost/numeric/interval/detail/alpha_rounding_control.hpp>
|
||||
#elif defined(ia64) || defined(__ia64) || defined(__ia64__)
|
||||
# include <boost/numeric/interval/detail/ia64_rounding_control.hpp>
|
||||
#include <boost/numeric/interval/detail/ia64_rounding_control.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_NUMERIC_INTERVAL_NO_HARDWARE) && (defined(__USE_ISOC99) || defined(__MSL__))
|
||||
# include <boost/numeric/interval/detail/c99_rounding_control.hpp>
|
||||
#include <boost/numeric/interval/detail/c99_rounding_control.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_NUMERIC_INTERVAL_NO_HARDWARE)
|
||||
# undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE
|
||||
# error Boost.Numeric.Interval: Please specify rounding control mechanism.
|
||||
#undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE
|
||||
#error Boost.Numeric.Interval: Please specify rounding control mechanism.
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
@@ -48,20 +48,17 @@ namespace interval_lib {
|
||||
* Three specializations of rounded_math<T>
|
||||
*/
|
||||
|
||||
template<>
|
||||
struct rounded_math<float>
|
||||
: save_state<rounded_arith_opp<float> >
|
||||
{};
|
||||
template <> struct rounded_math<float> : save_state<rounded_arith_opp<float>>
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounded_math<double>
|
||||
: save_state<rounded_arith_opp<double> >
|
||||
{};
|
||||
template <> struct rounded_math<double> : save_state<rounded_arith_opp<double>>
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounded_math<long double>
|
||||
: save_state<rounded_arith_opp<long double> >
|
||||
{};
|
||||
template <> struct rounded_math<long double> : save_state<rounded_arith_opp<long double>>
|
||||
{
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
|
||||
@@ -10,22 +10,22 @@
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_INTERVAL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_INTERVAL_HPP
|
||||
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
|
||||
namespace interval_lib {
|
||||
|
||||
class comparison_error
|
||||
: public std::runtime_error
|
||||
|
||||
class comparison_error : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
comparison_error()
|
||||
: std::runtime_error("boost::interval: uncertain comparison")
|
||||
{ }
|
||||
comparison_error()
|
||||
: std::runtime_error("boost::interval: uncertain comparison")
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
@@ -34,414 +34,448 @@ public:
|
||||
* interval class
|
||||
*/
|
||||
|
||||
template<class T, class Policies>
|
||||
class interval
|
||||
template <class T, class Policies> class interval
|
||||
{
|
||||
private:
|
||||
struct interval_holder;
|
||||
struct number_holder;
|
||||
struct interval_holder;
|
||||
struct number_holder;
|
||||
|
||||
public:
|
||||
typedef T base_type;
|
||||
typedef Policies traits_type;
|
||||
typedef T base_type;
|
||||
typedef Policies traits_type;
|
||||
|
||||
T const &lower() const;
|
||||
T const &upper() const;
|
||||
T const &lower() const;
|
||||
T const &upper() const;
|
||||
|
||||
interval();
|
||||
interval(T const &v);
|
||||
template<class T1> interval(T1 const &v);
|
||||
interval(T const &l, T const &u);
|
||||
template<class T1, class T2> interval(T1 const &l, T2 const &u);
|
||||
interval(interval<T, Policies> const &r);
|
||||
template<class Policies1> interval(interval<T, Policies1> const &r);
|
||||
template<class T1, class Policies1> interval(interval<T1, Policies1> const &r);
|
||||
interval();
|
||||
interval(T const &v);
|
||||
template <class T1> interval(T1 const &v);
|
||||
interval(T const &l, T const &u);
|
||||
template <class T1, class T2> interval(T1 const &l, T2 const &u);
|
||||
interval(interval<T, Policies> const &r);
|
||||
template <class Policies1> interval(interval<T, Policies1> const &r);
|
||||
template <class T1, class Policies1> interval(interval<T1, Policies1> const &r);
|
||||
|
||||
interval &operator=(T const &v);
|
||||
template<class T1> interval &operator=(T1 const &v);
|
||||
interval &operator=(interval<T, Policies> const &r);
|
||||
template<class Policies1> interval &operator=(interval<T, Policies1> const &r);
|
||||
template<class T1, class Policies1> interval &operator=(interval<T1, Policies1> const &r);
|
||||
|
||||
void assign(const T& l, const T& u);
|
||||
interval &operator=(T const &v);
|
||||
template <class T1> interval &operator=(T1 const &v);
|
||||
interval &operator=(interval<T, Policies> const &r);
|
||||
template <class Policies1> interval &operator=(interval<T, Policies1> const &r);
|
||||
template <class T1, class Policies1> interval &operator=(interval<T1, Policies1> const &r);
|
||||
|
||||
static interval empty();
|
||||
static interval whole();
|
||||
static interval hull(const T& x, const T& y);
|
||||
void assign(const T &l, const T &u);
|
||||
|
||||
interval& operator+= (const T& r);
|
||||
interval& operator+= (const interval& r);
|
||||
interval& operator-= (const T& r);
|
||||
interval& operator-= (const interval& r);
|
||||
interval& operator*= (const T& r);
|
||||
interval& operator*= (const interval& r);
|
||||
interval& operator/= (const T& r);
|
||||
interval& operator/= (const interval& r);
|
||||
static interval empty();
|
||||
static interval whole();
|
||||
static interval hull(const T &x, const T &y);
|
||||
|
||||
bool operator< (const interval_holder& r) const;
|
||||
bool operator> (const interval_holder& r) const;
|
||||
bool operator<= (const interval_holder& r) const;
|
||||
bool operator>= (const interval_holder& r) const;
|
||||
bool operator== (const interval_holder& r) const;
|
||||
bool operator!= (const interval_holder& r) const;
|
||||
interval &operator+=(const T &r);
|
||||
interval &operator+=(const interval &r);
|
||||
interval &operator-=(const T &r);
|
||||
interval &operator-=(const interval &r);
|
||||
interval &operator*=(const T &r);
|
||||
interval &operator*=(const interval &r);
|
||||
interval &operator/=(const T &r);
|
||||
interval &operator/=(const interval &r);
|
||||
|
||||
bool operator< (const number_holder& r) const;
|
||||
bool operator> (const number_holder& r) const;
|
||||
bool operator<= (const number_holder& r) const;
|
||||
bool operator>= (const number_holder& r) const;
|
||||
bool operator== (const number_holder& r) const;
|
||||
bool operator!= (const number_holder& r) const;
|
||||
bool operator<(const interval_holder &r) const;
|
||||
bool operator>(const interval_holder &r) const;
|
||||
bool operator<=(const interval_holder &r) const;
|
||||
bool operator>=(const interval_holder &r) const;
|
||||
bool operator==(const interval_holder &r) const;
|
||||
bool operator!=(const interval_holder &r) const;
|
||||
|
||||
// the following is for internal use only, it is not a published interface
|
||||
// nevertheless, it's public because friends don't always work correctly.
|
||||
interval(const T& l, const T& u, bool): low(l), up(u) {}
|
||||
void set_empty();
|
||||
void set_whole();
|
||||
void set(const T& l, const T& u);
|
||||
bool operator<(const number_holder &r) const;
|
||||
bool operator>(const number_holder &r) const;
|
||||
bool operator<=(const number_holder &r) const;
|
||||
bool operator>=(const number_holder &r) const;
|
||||
bool operator==(const number_holder &r) const;
|
||||
bool operator!=(const number_holder &r) const;
|
||||
|
||||
// the following is for internal use only, it is not a published interface
|
||||
// nevertheless, it's public because friends don't always work correctly.
|
||||
interval(const T &l, const T &u, bool)
|
||||
: low(l)
|
||||
, up(u)
|
||||
{
|
||||
}
|
||||
void set_empty();
|
||||
void set_whole();
|
||||
void set(const T &l, const T &u);
|
||||
|
||||
private:
|
||||
struct interval_holder {
|
||||
template<class Policies2>
|
||||
interval_holder(const interval<T, Policies2>& r)
|
||||
: low(r.lower()), up(r.upper())
|
||||
struct interval_holder
|
||||
{
|
||||
typedef typename Policies2::checking checking2;
|
||||
if (checking2::is_empty(low, up))
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
template <class Policies2>
|
||||
interval_holder(const interval<T, Policies2> &r)
|
||||
: low(r.lower())
|
||||
, up(r.upper())
|
||||
{
|
||||
typedef typename Policies2::checking checking2;
|
||||
if (checking2::is_empty(low, up))
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
const T& low;
|
||||
const T& up;
|
||||
};
|
||||
const T &low;
|
||||
const T &up;
|
||||
};
|
||||
|
||||
struct number_holder {
|
||||
number_holder(const T& r) : val(r)
|
||||
struct number_holder
|
||||
{
|
||||
typedef typename Policies::checking checking;
|
||||
if (checking::is_nan(r))
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
const T& val;
|
||||
};
|
||||
number_holder(const T &r)
|
||||
: val(r)
|
||||
{
|
||||
typedef typename Policies::checking checking;
|
||||
if (checking::is_nan(r))
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
typedef typename Policies::checking checking;
|
||||
typedef typename Policies::rounding rounding;
|
||||
const T &val;
|
||||
};
|
||||
|
||||
T low;
|
||||
T up;
|
||||
typedef typename Policies::checking checking;
|
||||
typedef typename Policies::rounding rounding;
|
||||
|
||||
T low;
|
||||
T up;
|
||||
};
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>::interval():
|
||||
low(static_cast<T>(0)), up(static_cast<T>(0))
|
||||
{}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>::interval(T const &v): low(v), up(v)
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies>::interval()
|
||||
: low(static_cast<T>(0))
|
||||
, up(static_cast<T>(0))
|
||||
{
|
||||
if (checking::is_nan(v)) set_empty();
|
||||
}
|
||||
|
||||
template<class T, class Policies> template<class T1> inline
|
||||
interval<T, Policies>::interval(T1 const &v)
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies>::interval(T const &v)
|
||||
: low(v)
|
||||
, up(v)
|
||||
{
|
||||
if (checking::is_nan(v)) set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(v);
|
||||
up = rnd.conv_up (v);
|
||||
}
|
||||
if (checking::is_nan(v))
|
||||
set_empty();
|
||||
}
|
||||
|
||||
template<class T, class Policies> template<class T1, class T2> inline
|
||||
interval<T, Policies>::interval(T1 const &l, T2 const &u)
|
||||
template <class T, class Policies> template <class T1> inline interval<T, Policies>::interval(T1 const &v)
|
||||
{
|
||||
if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u)) set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(l);
|
||||
up = rnd.conv_up (u);
|
||||
}
|
||||
if (checking::is_nan(v))
|
||||
set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(v);
|
||||
up = rnd.conv_up(v);
|
||||
}
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>::interval(T const &l, T const &u): low(l), up(u)
|
||||
template <class T, class Policies>
|
||||
template <class T1, class T2>
|
||||
inline interval<T, Policies>::interval(T1 const &l, T2 const &u)
|
||||
{
|
||||
if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u))
|
||||
set_empty();
|
||||
if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u))
|
||||
set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(l);
|
||||
up = rnd.conv_up(u);
|
||||
}
|
||||
}
|
||||
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies>::interval(T const &l, T const &u)
|
||||
: low(l)
|
||||
, up(u)
|
||||
{
|
||||
if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u))
|
||||
set_empty();
|
||||
}
|
||||
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>::interval(interval<T, Policies> const &r): low(r.lower()), up(r.upper())
|
||||
{}
|
||||
|
||||
template<class T, class Policies> template<class Policies1> inline
|
||||
interval<T, Policies>::interval(interval<T, Policies1> const &r): low(r.lower()), up(r.upper())
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies>::interval(interval<T, Policies> const &r)
|
||||
: low(r.lower())
|
||||
, up(r.upper())
|
||||
{
|
||||
typedef typename Policies1::checking checking1;
|
||||
if (checking1::is_empty(r.lower(), r.upper())) set_empty();
|
||||
}
|
||||
|
||||
template<class T, class Policies> template<class T1, class Policies1> inline
|
||||
interval<T, Policies>::interval(interval<T1, Policies1> const &r)
|
||||
template <class T, class Policies>
|
||||
template <class Policies1>
|
||||
inline interval<T, Policies>::interval(interval<T, Policies1> const &r)
|
||||
: low(r.lower())
|
||||
, up(r.upper())
|
||||
{
|
||||
typedef typename Policies1::checking checking1;
|
||||
if (checking1::is_empty(r.lower(), r.upper())) set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(r.lower());
|
||||
up = rnd.conv_up (r.upper());
|
||||
}
|
||||
typedef typename Policies1::checking checking1;
|
||||
if (checking1::is_empty(r.lower(), r.upper()))
|
||||
set_empty();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> &interval<T, Policies>::operator=(T const &v)
|
||||
template <class T, class Policies>
|
||||
template <class T1, class Policies1>
|
||||
inline interval<T, Policies>::interval(interval<T1, Policies1> const &r)
|
||||
{
|
||||
if (checking::is_nan(v)) set_empty();
|
||||
else low = up = v;
|
||||
return *this;
|
||||
typedef typename Policies1::checking checking1;
|
||||
if (checking1::is_empty(r.lower(), r.upper()))
|
||||
set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(r.lower());
|
||||
up = rnd.conv_up(r.upper());
|
||||
}
|
||||
}
|
||||
|
||||
template<class T, class Policies> template<class T1> inline
|
||||
interval<T, Policies> &interval<T, Policies>::operator=(T1 const &v)
|
||||
template <class T, class Policies> inline interval<T, Policies> &interval<T, Policies>::operator=(T const &v)
|
||||
{
|
||||
if (checking::is_nan(v)) set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(v);
|
||||
up = rnd.conv_up (v);
|
||||
}
|
||||
return *this;
|
||||
if (checking::is_nan(v))
|
||||
set_empty();
|
||||
else
|
||||
low = up = v;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> &interval<T, Policies>::operator=(interval<T, Policies> const &r)
|
||||
template <class T, class Policies>
|
||||
template <class T1>
|
||||
inline interval<T, Policies> &interval<T, Policies>::operator=(T1 const &v)
|
||||
{
|
||||
low = r.lower();
|
||||
up = r.upper();
|
||||
return *this;
|
||||
if (checking::is_nan(v))
|
||||
set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(v);
|
||||
up = rnd.conv_up(v);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> template<class Policies1> inline
|
||||
interval<T, Policies> &interval<T, Policies>::operator=(interval<T, Policies1> const &r)
|
||||
template <class T, class Policies>
|
||||
inline interval<T, Policies> &interval<T, Policies>::operator=(interval<T, Policies> const &r)
|
||||
{
|
||||
typedef typename Policies1::checking checking1;
|
||||
if (checking1::is_empty(r.lower(), r.upper())) set_empty();
|
||||
else {
|
||||
low = r.lower();
|
||||
up = r.upper();
|
||||
}
|
||||
return *this;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> template<class T1, class Policies1> inline
|
||||
interval<T, Policies> &interval<T, Policies>::operator=(interval<T1, Policies1> const &r)
|
||||
template <class T, class Policies>
|
||||
template <class Policies1>
|
||||
inline interval<T, Policies> &interval<T, Policies>::operator=(interval<T, Policies1> const &r)
|
||||
{
|
||||
typedef typename Policies1::checking checking1;
|
||||
if (checking1::is_empty(r.lower(), r.upper())) set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(r.lower());
|
||||
up = rnd.conv_up (r.upper());
|
||||
}
|
||||
return *this;
|
||||
typedef typename Policies1::checking checking1;
|
||||
if (checking1::is_empty(r.lower(), r.upper()))
|
||||
set_empty();
|
||||
else {
|
||||
low = r.lower();
|
||||
up = r.upper();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
void interval<T, Policies>::assign(const T& l, const T& u)
|
||||
template <class T, class Policies>
|
||||
template <class T1, class Policies1>
|
||||
inline interval<T, Policies> &interval<T, Policies>::operator=(interval<T1, Policies1> const &r)
|
||||
{
|
||||
if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u))
|
||||
set_empty();
|
||||
else set(l, u);
|
||||
typedef typename Policies1::checking checking1;
|
||||
if (checking1::is_empty(r.lower(), r.upper()))
|
||||
set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(r.lower());
|
||||
up = rnd.conv_up(r.upper());
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
void interval<T, Policies>::set(const T& l, const T& u)
|
||||
template <class T, class Policies> inline void interval<T, Policies>::assign(const T &l, const T &u)
|
||||
{
|
||||
low = l;
|
||||
up = u;
|
||||
if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u))
|
||||
set_empty();
|
||||
else
|
||||
set(l, u);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
void interval<T, Policies>::set_empty()
|
||||
template <class T, class Policies> inline void interval<T, Policies>::set(const T &l, const T &u)
|
||||
{
|
||||
low = checking::empty_lower();
|
||||
up = checking::empty_upper();
|
||||
low = l;
|
||||
up = u;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
void interval<T, Policies>::set_whole()
|
||||
template <class T, class Policies> inline void interval<T, Policies>::set_empty()
|
||||
{
|
||||
low = checking::neg_inf();
|
||||
up = checking::pos_inf();
|
||||
low = checking::empty_lower();
|
||||
up = checking::empty_upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> interval<T, Policies>::hull(const T& x, const T& y)
|
||||
template <class T, class Policies> inline void interval<T, Policies>::set_whole()
|
||||
{
|
||||
bool bad_x = checking::is_nan(x);
|
||||
bool bad_y = checking::is_nan(y);
|
||||
if (bad_x)
|
||||
if (bad_y) return interval::empty();
|
||||
else return interval(y, y, true);
|
||||
else
|
||||
if (bad_y) return interval(x, x, true);
|
||||
if (x <= y) return interval(x, y, true);
|
||||
else return interval(y, x, true);
|
||||
low = checking::neg_inf();
|
||||
up = checking::pos_inf();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> interval<T, Policies>::empty()
|
||||
template <class T, class Policies> inline interval<T, Policies> interval<T, Policies>::hull(const T &x, const T &y)
|
||||
{
|
||||
return interval<T, Policies>(checking::empty_lower(),
|
||||
checking::empty_upper(), true);
|
||||
bool bad_x = checking::is_nan(x);
|
||||
bool bad_y = checking::is_nan(y);
|
||||
if (bad_x)
|
||||
if (bad_y)
|
||||
return interval::empty();
|
||||
else
|
||||
return interval(y, y, true);
|
||||
else if (bad_y)
|
||||
return interval(x, x, true);
|
||||
if (x <= y)
|
||||
return interval(x, y, true);
|
||||
else
|
||||
return interval(y, x, true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> interval<T, Policies>::whole()
|
||||
template <class T, class Policies> inline interval<T, Policies> interval<T, Policies>::empty()
|
||||
{
|
||||
return interval<T, Policies>(checking::neg_inf(), checking::pos_inf(), true);
|
||||
return interval<T, Policies>(checking::empty_lower(), checking::empty_upper(), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
const T& interval<T, Policies>::lower() const
|
||||
template <class T, class Policies> inline interval<T, Policies> interval<T, Policies>::whole()
|
||||
{
|
||||
return low;
|
||||
return interval<T, Policies>(checking::neg_inf(), checking::pos_inf(), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
const T& interval<T, Policies>::upper() const
|
||||
{
|
||||
return up;
|
||||
}
|
||||
template <class T, class Policies> inline const T &interval<T, Policies>::lower() const { return low; }
|
||||
|
||||
template <class T, class Policies> inline const T &interval<T, Policies>::upper() const { return up; }
|
||||
|
||||
/*
|
||||
* interval/interval comparisons
|
||||
*/
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator< (const interval_holder& r) const
|
||||
template <class T, class Policies> inline bool interval<T, Policies>::operator<(const interval_holder &r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up < r.low) return true;
|
||||
else if (low >= r.up) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up < r.low)
|
||||
return true;
|
||||
else if (low >= r.up)
|
||||
return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator> (const interval_holder& r) const
|
||||
template <class T, class Policies> inline bool interval<T, Policies>::operator>(const interval_holder &r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (low > r.up) return true;
|
||||
else if (up <= r.low) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (low > r.up)
|
||||
return true;
|
||||
else if (up <= r.low)
|
||||
return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator<= (const interval_holder& r) const
|
||||
template <class T, class Policies> inline bool interval<T, Policies>::operator<=(const interval_holder &r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up <= r.low) return true;
|
||||
else if (low > r.up) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up <= r.low)
|
||||
return true;
|
||||
else if (low > r.up)
|
||||
return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator>= (const interval_holder& r) const
|
||||
template <class T, class Policies> inline bool interval<T, Policies>::operator>=(const interval_holder &r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (low >= r.up) return true;
|
||||
else if (up < r.low) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (low >= r.up)
|
||||
return true;
|
||||
else if (up < r.low)
|
||||
return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator== (const interval_holder& r) const
|
||||
template <class T, class Policies> inline bool interval<T, Policies>::operator==(const interval_holder &r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up == r.low && low == r.up) return true;
|
||||
else if (up < r.low || low > r.up) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up == r.low && low == r.up)
|
||||
return true;
|
||||
else if (up < r.low || low > r.up)
|
||||
return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator!= (const interval_holder& r) const
|
||||
template <class T, class Policies> inline bool interval<T, Policies>::operator!=(const interval_holder &r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up < r.low || low > r.up) return true;
|
||||
else if (up == r.low && low == r.up) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up < r.low || low > r.up)
|
||||
return true;
|
||||
else if (up == r.low && low == r.up)
|
||||
return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
/*
|
||||
* interval/number comparisons
|
||||
*/
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator< (const number_holder& r) const
|
||||
template <class T, class Policies> inline bool interval<T, Policies>::operator<(const number_holder &r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up < r.val) return true;
|
||||
else if (low >= r.val) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up < r.val)
|
||||
return true;
|
||||
else if (low >= r.val)
|
||||
return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator> (const number_holder& r) const
|
||||
template <class T, class Policies> inline bool interval<T, Policies>::operator>(const number_holder &r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (low > r.val) return true;
|
||||
else if (up <= r.val) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (low > r.val)
|
||||
return true;
|
||||
else if (up <= r.val)
|
||||
return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator<= (const number_holder& r) const
|
||||
template <class T, class Policies> inline bool interval<T, Policies>::operator<=(const number_holder &r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up <= r.val) return true;
|
||||
else if (low > r.val) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up <= r.val)
|
||||
return true;
|
||||
else if (low > r.val)
|
||||
return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator>= (const number_holder& r) const
|
||||
template <class T, class Policies> inline bool interval<T, Policies>::operator>=(const number_holder &r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (low >= r.val) return true;
|
||||
else if (up < r.val) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (low >= r.val)
|
||||
return true;
|
||||
else if (up < r.val)
|
||||
return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator== (const number_holder& r) const
|
||||
template <class T, class Policies> inline bool interval<T, Policies>::operator==(const number_holder &r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up == r.val && low == r.val) return true;
|
||||
else if (up < r.val || low > r.val) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up == r.val && low == r.val)
|
||||
return true;
|
||||
else if (up < r.val || low > r.val)
|
||||
return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator!= (const number_holder& r) const
|
||||
template <class T, class Policies> inline bool interval<T, Policies>::operator!=(const number_holder &r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up < r.val || low > r.val) return true;
|
||||
else if (up == r.val && low == r.val) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up < r.val || low > r.val)
|
||||
return true;
|
||||
else if (up == r.val && low == r.val)
|
||||
return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
} // namespace numeric
|
||||
|
||||
@@ -24,15 +24,14 @@
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
|
||||
template<class CharType, class CharTraits, class T, class Policies>
|
||||
std::basic_ostream<CharType, CharTraits> &operator<<
|
||||
(std::basic_ostream<CharType, CharTraits> &stream,
|
||||
interval<T, Policies> const &value)
|
||||
template <class CharType, class CharTraits, class T, class Policies>
|
||||
std::basic_ostream<CharType, CharTraits> &operator<<(std::basic_ostream<CharType, CharTraits> &stream,
|
||||
interval<T, Policies> const &value)
|
||||
{
|
||||
if (empty(value))
|
||||
return stream << "[]";
|
||||
else
|
||||
return stream << '[' << lower(value) << ',' << upper(value) << ']';
|
||||
if (empty(value))
|
||||
return stream << "[]";
|
||||
else
|
||||
return stream << '[' << lower(value) << ',' << upper(value) << ']';
|
||||
}
|
||||
|
||||
} // namespace numeric
|
||||
|
||||
@@ -19,29 +19,28 @@
|
||||
|
||||
namespace std {
|
||||
|
||||
template<class T, class Policies>
|
||||
class numeric_limits<boost::numeric::interval<T, Policies> >
|
||||
: public numeric_limits<T>
|
||||
template <class T, class Policies>
|
||||
class numeric_limits<boost::numeric::interval<T, Policies>> : public numeric_limits<T>
|
||||
{
|
||||
private:
|
||||
typedef boost::numeric::interval<T, Policies> I;
|
||||
typedef numeric_limits<T> bl;
|
||||
typedef boost::numeric::interval<T, Policies> I;
|
||||
typedef numeric_limits<T> bl;
|
||||
|
||||
public:
|
||||
static I min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return I((bl::min)(), (bl::min)()); }
|
||||
static I max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return I((bl::max)(), (bl::max)()); }
|
||||
static I epsilon() throw() { return I(bl::epsilon(), bl::epsilon()); }
|
||||
static I min BOOST_PREVENT_MACRO_SUBSTITUTION() throw() { return I((bl::min)(), (bl::min)()); }
|
||||
static I max BOOST_PREVENT_MACRO_SUBSTITUTION() throw() { return I((bl::max)(), (bl::max)()); }
|
||||
static I epsilon() throw() { return I(bl::epsilon(), bl::epsilon()); }
|
||||
|
||||
BOOST_STATIC_CONSTANT(float_round_style, round_style = round_indeterminate);
|
||||
BOOST_STATIC_CONSTANT(bool, is_iec559 = false);
|
||||
BOOST_STATIC_CONSTANT(float_round_style, round_style = round_indeterminate);
|
||||
BOOST_STATIC_CONSTANT(bool, is_iec559 = false);
|
||||
|
||||
static I infinity() throw() { return I::whole(); }
|
||||
static I quiet_NaN() throw() { return I::empty(); }
|
||||
static I signaling_NaN() throw() { return I(bl::signaling_NaN(), bl::signaling_Nan()); }
|
||||
static I denorm_min() throw() { return I(bl::denorm_min(), bl::denorm_min()); }
|
||||
|
||||
static I infinity () throw() { return I::whole(); }
|
||||
static I quiet_NaN() throw() { return I::empty(); }
|
||||
static I signaling_NaN() throw()
|
||||
{ return I(bl::signaling_NaN(), bl::signaling_Nan()); }
|
||||
static I denorm_min() throw()
|
||||
{ return I(bl::denorm_min(), bl::denorm_min()); }
|
||||
private:
|
||||
static I round_error(); // hide this on purpose, not yet implemented
|
||||
static I round_error(); // hide this on purpose, not yet implemented
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
|
||||
@@ -20,35 +20,34 @@ namespace interval_lib {
|
||||
* policies class
|
||||
*/
|
||||
|
||||
template<class Rounding, class Checking>
|
||||
struct policies
|
||||
template <class Rounding, class Checking> struct policies
|
||||
{
|
||||
typedef Rounding rounding;
|
||||
typedef Checking checking;
|
||||
typedef Rounding rounding;
|
||||
typedef Checking checking;
|
||||
};
|
||||
|
||||
/*
|
||||
* policies switching classes
|
||||
*/
|
||||
|
||||
template<class OldInterval, class NewRounding>
|
||||
class change_rounding
|
||||
template <class OldInterval, class NewRounding> class change_rounding
|
||||
{
|
||||
typedef typename OldInterval::base_type T;
|
||||
typedef typename OldInterval::traits_type p;
|
||||
typedef typename p::checking checking;
|
||||
typedef typename OldInterval::base_type T;
|
||||
typedef typename OldInterval::traits_type p;
|
||||
typedef typename p::checking checking;
|
||||
|
||||
public:
|
||||
typedef interval<T, policies<NewRounding, checking> > type;
|
||||
typedef interval<T, policies<NewRounding, checking>> type;
|
||||
};
|
||||
|
||||
template<class OldInterval, class NewChecking>
|
||||
class change_checking
|
||||
template <class OldInterval, class NewChecking> class change_checking
|
||||
{
|
||||
typedef typename OldInterval::base_type T;
|
||||
typedef typename OldInterval::traits_type p;
|
||||
typedef typename p::rounding rounding;
|
||||
typedef typename OldInterval::base_type T;
|
||||
typedef typename OldInterval::traits_type p;
|
||||
typedef typename p::rounding rounding;
|
||||
|
||||
public:
|
||||
typedef interval<T, policies<rounding, NewChecking> > type;
|
||||
typedef interval<T, policies<rounding, NewChecking>> type;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -56,15 +55,15 @@ public:
|
||||
* at each operation, rather than once and for all.
|
||||
*/
|
||||
|
||||
template<class OldInterval>
|
||||
class unprotect
|
||||
template <class OldInterval> class unprotect
|
||||
{
|
||||
typedef typename OldInterval::base_type T;
|
||||
typedef typename OldInterval::traits_type p;
|
||||
typedef typename p::rounding r;
|
||||
typedef typename r::unprotected_rounding newRounding;
|
||||
typedef typename OldInterval::base_type T;
|
||||
typedef typename OldInterval::traits_type p;
|
||||
typedef typename p::rounding r;
|
||||
typedef typename r::unprotected_rounding newRounding;
|
||||
|
||||
public:
|
||||
typedef typename change_rounding<OldInterval, newRounding>::type type;
|
||||
typedef typename change_rounding<OldInterval, newRounding>::type type;
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_ROUNDED_ARITH_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_ROUNDED_ARITH_HPP
|
||||
|
||||
#include <boost/numeric/interval/rounding.hpp>
|
||||
#include <boost/numeric/interval/detail/bugs.hpp>
|
||||
#include <boost/config/no_tr1/cmath.hpp>
|
||||
#include <boost/numeric/interval/detail/bugs.hpp>
|
||||
#include <boost/numeric/interval/rounding.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
@@ -23,94 +23,132 @@ namespace interval_lib {
|
||||
* See documentation for details.
|
||||
*/
|
||||
|
||||
template<class T, class Rounding>
|
||||
struct rounded_arith_exact: Rounding {
|
||||
void init() { }
|
||||
template<class U> T conv_down(U const &v) { return v; }
|
||||
template<class U> T conv_up (U const &v) { return v; }
|
||||
T add_down (const T& x, const T& y) { return x + y; }
|
||||
T add_up (const T& x, const T& y) { return x + y; }
|
||||
T sub_down (const T& x, const T& y) { return x - y; }
|
||||
T sub_up (const T& x, const T& y) { return x - y; }
|
||||
T mul_down (const T& x, const T& y) { return x * y; }
|
||||
T mul_up (const T& x, const T& y) { return x * y; }
|
||||
T div_down (const T& x, const T& y) { return x / y; }
|
||||
T div_up (const T& x, const T& y) { return x / y; }
|
||||
T median (const T& x, const T& y) { return (x + y) / 2; }
|
||||
T sqrt_down(const T& x)
|
||||
{ BOOST_NUMERIC_INTERVAL_using_math(sqrt); return sqrt(x); }
|
||||
T sqrt_up (const T& x)
|
||||
{ BOOST_NUMERIC_INTERVAL_using_math(sqrt); return sqrt(x); }
|
||||
T int_down (const T& x)
|
||||
{ BOOST_NUMERIC_INTERVAL_using_math(floor); return floor(x); }
|
||||
T int_up (const T& x)
|
||||
{ BOOST_NUMERIC_INTERVAL_using_math(ceil); return ceil(x); }
|
||||
template <class T, class Rounding> struct rounded_arith_exact : Rounding
|
||||
{
|
||||
void init() {}
|
||||
template <class U> T conv_down(U const &v) { return v; }
|
||||
template <class U> T conv_up(U const &v) { return v; }
|
||||
T add_down(const T &x, const T &y) { return x + y; }
|
||||
T add_up(const T &x, const T &y) { return x + y; }
|
||||
T sub_down(const T &x, const T &y) { return x - y; }
|
||||
T sub_up(const T &x, const T &y) { return x - y; }
|
||||
T mul_down(const T &x, const T &y) { return x * y; }
|
||||
T mul_up(const T &x, const T &y) { return x * y; }
|
||||
T div_down(const T &x, const T &y) { return x / y; }
|
||||
T div_up(const T &x, const T &y) { return x / y; }
|
||||
T median(const T &x, const T &y) { return (x + y) / 2; }
|
||||
T sqrt_down(const T &x)
|
||||
{
|
||||
BOOST_NUMERIC_INTERVAL_using_math(sqrt);
|
||||
return sqrt(x);
|
||||
}
|
||||
T sqrt_up(const T &x)
|
||||
{
|
||||
BOOST_NUMERIC_INTERVAL_using_math(sqrt);
|
||||
return sqrt(x);
|
||||
}
|
||||
T int_down(const T &x)
|
||||
{
|
||||
BOOST_NUMERIC_INTERVAL_using_math(floor);
|
||||
return floor(x);
|
||||
}
|
||||
T int_up(const T &x)
|
||||
{
|
||||
BOOST_NUMERIC_INTERVAL_using_math(ceil);
|
||||
return ceil(x);
|
||||
}
|
||||
};
|
||||
|
||||
template<class T, class Rounding>
|
||||
struct rounded_arith_std: Rounding {
|
||||
# define BOOST_DN(EXPR) this->downward(); return this->force_rounding(EXPR)
|
||||
# define BOOST_NR(EXPR) this->to_nearest(); return this->force_rounding(EXPR)
|
||||
# define BOOST_UP(EXPR) this->upward(); return this->force_rounding(EXPR)
|
||||
void init() { }
|
||||
template<class U> T conv_down(U const &v) { BOOST_DN(v); }
|
||||
template<class U> T conv_up (U const &v) { BOOST_UP(v); }
|
||||
T add_down(const T& x, const T& y) { BOOST_DN(x + y); }
|
||||
T sub_down(const T& x, const T& y) { BOOST_DN(x - y); }
|
||||
T mul_down(const T& x, const T& y) { BOOST_DN(x * y); }
|
||||
T div_down(const T& x, const T& y) { BOOST_DN(x / y); }
|
||||
T add_up (const T& x, const T& y) { BOOST_UP(x + y); }
|
||||
T sub_up (const T& x, const T& y) { BOOST_UP(x - y); }
|
||||
T mul_up (const T& x, const T& y) { BOOST_UP(x * y); }
|
||||
T div_up (const T& x, const T& y) { BOOST_UP(x / y); }
|
||||
T median(const T& x, const T& y) { BOOST_NR((x + y) / 2); }
|
||||
T sqrt_down(const T& x)
|
||||
{ BOOST_NUMERIC_INTERVAL_using_math(sqrt); BOOST_DN(sqrt(x)); }
|
||||
T sqrt_up (const T& x)
|
||||
{ BOOST_NUMERIC_INTERVAL_using_math(sqrt); BOOST_UP(sqrt(x)); }
|
||||
T int_down(const T& x) { this->downward(); return to_int(x); }
|
||||
T int_up (const T& x) { this->upward(); return to_int(x); }
|
||||
# undef BOOST_DN
|
||||
# undef BOOST_NR
|
||||
# undef BOOST_UP
|
||||
};
|
||||
|
||||
template<class T, class Rounding>
|
||||
struct rounded_arith_opp: Rounding {
|
||||
void init() { this->upward(); }
|
||||
# define BOOST_DN(EXPR) \
|
||||
this->downward(); \
|
||||
T r = this->force_rounding(EXPR); \
|
||||
this->upward(); \
|
||||
return r
|
||||
# define BOOST_NR(EXPR) \
|
||||
template <class T, class Rounding> struct rounded_arith_std : Rounding
|
||||
{
|
||||
#define BOOST_DN(EXPR) \
|
||||
this->downward(); \
|
||||
return this->force_rounding(EXPR)
|
||||
#define BOOST_NR(EXPR) \
|
||||
this->to_nearest(); \
|
||||
return this->force_rounding(EXPR)
|
||||
#define BOOST_UP(EXPR) \
|
||||
this->upward(); \
|
||||
return this->force_rounding(EXPR)
|
||||
void init() {}
|
||||
template <class U> T conv_down(U const &v) { BOOST_DN(v); }
|
||||
template <class U> T conv_up(U const &v) { BOOST_UP(v); }
|
||||
T add_down(const T &x, const T &y) { BOOST_DN(x + y); }
|
||||
T sub_down(const T &x, const T &y) { BOOST_DN(x - y); }
|
||||
T mul_down(const T &x, const T &y) { BOOST_DN(x * y); }
|
||||
T div_down(const T &x, const T &y) { BOOST_DN(x / y); }
|
||||
T add_up(const T &x, const T &y) { BOOST_UP(x + y); }
|
||||
T sub_up(const T &x, const T &y) { BOOST_UP(x - y); }
|
||||
T mul_up(const T &x, const T &y) { BOOST_UP(x * y); }
|
||||
T div_up(const T &x, const T &y) { BOOST_UP(x / y); }
|
||||
T median(const T &x, const T &y) { BOOST_NR((x + y) / 2); }
|
||||
T sqrt_down(const T &x)
|
||||
{
|
||||
BOOST_NUMERIC_INTERVAL_using_math(sqrt);
|
||||
BOOST_DN(sqrt(x));
|
||||
}
|
||||
T sqrt_up(const T &x)
|
||||
{
|
||||
BOOST_NUMERIC_INTERVAL_using_math(sqrt);
|
||||
BOOST_UP(sqrt(x));
|
||||
}
|
||||
T int_down(const T &x)
|
||||
{
|
||||
this->downward();
|
||||
return to_int(x);
|
||||
}
|
||||
T int_up(const T &x)
|
||||
{
|
||||
this->upward();
|
||||
return to_int(x);
|
||||
}
|
||||
#undef BOOST_DN
|
||||
#undef BOOST_NR
|
||||
#undef BOOST_UP
|
||||
};
|
||||
|
||||
template <class T, class Rounding> struct rounded_arith_opp : Rounding
|
||||
{
|
||||
void init() { this->upward(); }
|
||||
#define BOOST_DN(EXPR) \
|
||||
this->downward(); \
|
||||
T r = this->force_rounding(EXPR); \
|
||||
this->upward(); \
|
||||
this->upward(); \
|
||||
return r
|
||||
# define BOOST_UP(EXPR) return this->force_rounding(EXPR)
|
||||
# define BOOST_UP_NEG(EXPR) return -this->force_rounding(EXPR)
|
||||
template<class U> T conv_down(U const &v) { BOOST_UP_NEG(-v); }
|
||||
template<class U> T conv_up (U const &v) { BOOST_UP(v); }
|
||||
T add_down(const T& x, const T& y) { BOOST_UP_NEG((-x) - y); }
|
||||
T sub_down(const T& x, const T& y) { BOOST_UP_NEG(y - x); }
|
||||
T mul_down(const T& x, const T& y) { BOOST_UP_NEG(x * (-y)); }
|
||||
T div_down(const T& x, const T& y) { BOOST_UP_NEG(x / (-y)); }
|
||||
T add_up (const T& x, const T& y) { BOOST_UP(x + y); }
|
||||
T sub_up (const T& x, const T& y) { BOOST_UP(x - y); }
|
||||
T mul_up (const T& x, const T& y) { BOOST_UP(x * y); }
|
||||
T div_up (const T& x, const T& y) { BOOST_UP(x / y); }
|
||||
T median (const T& x, const T& y) { BOOST_NR((x + y) / 2); }
|
||||
T sqrt_down(const T& x)
|
||||
{ BOOST_NUMERIC_INTERVAL_using_math(sqrt); BOOST_DN(sqrt(x)); }
|
||||
T sqrt_up (const T& x)
|
||||
{ BOOST_NUMERIC_INTERVAL_using_math(sqrt); BOOST_UP(sqrt(x)); }
|
||||
T int_down(const T& x) { return -to_int(-x); }
|
||||
T int_up (const T& x) { return to_int(x); }
|
||||
# undef BOOST_DN
|
||||
# undef BOOST_NR
|
||||
# undef BOOST_UP
|
||||
# undef BOOST_UP_NEG
|
||||
#define BOOST_NR(EXPR) \
|
||||
this->to_nearest(); \
|
||||
T r = this->force_rounding(EXPR); \
|
||||
this->upward(); \
|
||||
return r
|
||||
#define BOOST_UP(EXPR) return this->force_rounding(EXPR)
|
||||
#define BOOST_UP_NEG(EXPR) return -this->force_rounding(EXPR)
|
||||
template <class U> T conv_down(U const &v) { BOOST_UP_NEG(-v); }
|
||||
template <class U> T conv_up(U const &v) { BOOST_UP(v); }
|
||||
T add_down(const T &x, const T &y) { BOOST_UP_NEG((-x) - y); }
|
||||
T sub_down(const T &x, const T &y) { BOOST_UP_NEG(y - x); }
|
||||
T mul_down(const T &x, const T &y) { BOOST_UP_NEG(x * (-y)); }
|
||||
T div_down(const T &x, const T &y) { BOOST_UP_NEG(x / (-y)); }
|
||||
T add_up(const T &x, const T &y) { BOOST_UP(x + y); }
|
||||
T sub_up(const T &x, const T &y) { BOOST_UP(x - y); }
|
||||
T mul_up(const T &x, const T &y) { BOOST_UP(x * y); }
|
||||
T div_up(const T &x, const T &y) { BOOST_UP(x / y); }
|
||||
T median(const T &x, const T &y) { BOOST_NR((x + y) / 2); }
|
||||
T sqrt_down(const T &x)
|
||||
{
|
||||
BOOST_NUMERIC_INTERVAL_using_math(sqrt);
|
||||
BOOST_DN(sqrt(x));
|
||||
}
|
||||
T sqrt_up(const T &x)
|
||||
{
|
||||
BOOST_NUMERIC_INTERVAL_using_math(sqrt);
|
||||
BOOST_UP(sqrt(x));
|
||||
}
|
||||
T int_down(const T &x) { return -to_int(-x); }
|
||||
T int_up(const T &x) { return to_int(x); }
|
||||
#undef BOOST_DN
|
||||
#undef BOOST_NR
|
||||
#undef BOOST_UP
|
||||
#undef BOOST_UP_NEG
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
|
||||
@@ -10,129 +10,153 @@
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_ROUNDED_TRANSC_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_ROUNDED_TRANSC_HPP
|
||||
|
||||
#include <boost/numeric/interval/rounding.hpp>
|
||||
#include <boost/numeric/interval/detail/bugs.hpp>
|
||||
#include <boost/config/no_tr1/cmath.hpp>
|
||||
#include <boost/numeric/interval/detail/bugs.hpp>
|
||||
#include <boost/numeric/interval/rounding.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
|
||||
template<class T, class Rounding>
|
||||
struct rounded_transc_exact: Rounding
|
||||
template <class T, class Rounding> struct rounded_transc_exact : Rounding
|
||||
{
|
||||
# define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T& x) { BOOST_NUMERIC_INTERVAL_using_math(f); return f(x); } \
|
||||
T f##_up (const T& x) { BOOST_NUMERIC_INTERVAL_using_math(f); return f(x); }
|
||||
BOOST_NUMERIC_INTERVAL_new_func(exp)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(log)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(sin)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(cos)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(tan)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(asin)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(acos)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(atan)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(sinh)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(cosh)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(tanh)
|
||||
# undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
# define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T& x) { BOOST_NUMERIC_INTERVAL_using_ahyp(f); return f(x); } \
|
||||
T f##_up (const T& x) { BOOST_NUMERIC_INTERVAL_using_ahyp(f); return f(x); }
|
||||
BOOST_NUMERIC_INTERVAL_new_func(asinh)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(acosh)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(atanh)
|
||||
# undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
};
|
||||
|
||||
template<class T, class Rounding>
|
||||
struct rounded_transc_std: Rounding
|
||||
{
|
||||
# define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T& x) \
|
||||
{ BOOST_NUMERIC_INTERVAL_using_math(f); \
|
||||
this->downward(); return this->force_rounding(f(x)); } \
|
||||
T f##_up (const T& x) \
|
||||
{ BOOST_NUMERIC_INTERVAL_using_math(f); \
|
||||
this->upward(); return this->force_rounding(f(x)); }
|
||||
BOOST_NUMERIC_INTERVAL_new_func(exp)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(log)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(sin)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(cos)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(tan)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(asin)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(acos)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(atan)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(sinh)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(cosh)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(tanh)
|
||||
# undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
# define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T& x) \
|
||||
{ BOOST_NUMERIC_INTERVAL_using_ahyp(f); \
|
||||
this->downward(); return this->force_rounding(f(x)); } \
|
||||
T f##_up (const T& x) \
|
||||
{ BOOST_NUMERIC_INTERVAL_using_ahyp(f); \
|
||||
this->upward(); return this->force_rounding(f(x)); }
|
||||
BOOST_NUMERIC_INTERVAL_new_func(asinh)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(acosh)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(atanh)
|
||||
# undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
#define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_math(f); \
|
||||
return f(x); \
|
||||
} \
|
||||
T f##_up(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_math(f); \
|
||||
return f(x); \
|
||||
}
|
||||
BOOST_NUMERIC_INTERVAL_new_func(exp) BOOST_NUMERIC_INTERVAL_new_func(log) BOOST_NUMERIC_INTERVAL_new_func(sin)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(cos) BOOST_NUMERIC_INTERVAL_new_func(tan) BOOST_NUMERIC_INTERVAL_new_func(asin)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(acos) BOOST_NUMERIC_INTERVAL_new_func(atan)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(sinh) BOOST_NUMERIC_INTERVAL_new_func(cosh)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(tanh)
|
||||
#undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
#define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_ahyp(f); \
|
||||
return f(x); \
|
||||
} \
|
||||
T f##_up(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_ahyp(f); \
|
||||
return f(x); \
|
||||
}
|
||||
BOOST_NUMERIC_INTERVAL_new_func(asinh) BOOST_NUMERIC_INTERVAL_new_func(acosh)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(atanh)
|
||||
#undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
};
|
||||
|
||||
template<class T, class Rounding>
|
||||
struct rounded_transc_opp: Rounding
|
||||
template <class T, class Rounding> struct rounded_transc_std : Rounding
|
||||
{
|
||||
# define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T& x) \
|
||||
{ BOOST_NUMERIC_INTERVAL_using_math(f); \
|
||||
this->downward(); T y = this->force_rounding(f(x)); \
|
||||
this->upward(); return y; } \
|
||||
T f##_up (const T& x) \
|
||||
{ BOOST_NUMERIC_INTERVAL_using_math(f); \
|
||||
return this->force_rounding(f(x)); }
|
||||
BOOST_NUMERIC_INTERVAL_new_func(exp)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(log)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(cos)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(acos)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(cosh)
|
||||
# undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
# define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T& x) \
|
||||
{ BOOST_NUMERIC_INTERVAL_using_math(f); \
|
||||
return -this->force_rounding(-f(x)); } \
|
||||
T f##_up (const T& x) \
|
||||
{ BOOST_NUMERIC_INTERVAL_using_math(f); \
|
||||
return this->force_rounding(f(x)); }
|
||||
BOOST_NUMERIC_INTERVAL_new_func(sin)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(tan)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(asin)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(atan)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(sinh)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(tanh)
|
||||
# undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
# define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T& x) \
|
||||
{ BOOST_NUMERIC_INTERVAL_using_ahyp(f); \
|
||||
this->downward(); T y = this->force_rounding(f(x)); \
|
||||
this->upward(); return y; } \
|
||||
T f##_up (const T& x) \
|
||||
{ BOOST_NUMERIC_INTERVAL_using_ahyp(f); \
|
||||
return this->force_rounding(f(x)); }
|
||||
BOOST_NUMERIC_INTERVAL_new_func(asinh)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(atanh)
|
||||
# undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
# define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T& x) \
|
||||
{ BOOST_NUMERIC_INTERVAL_using_ahyp(f); \
|
||||
return -this->force_rounding(-f(x)); } \
|
||||
T f##_up (const T& x) \
|
||||
{ BOOST_NUMERIC_INTERVAL_using_ahyp(f); \
|
||||
return this->force_rounding(f(x)); }
|
||||
BOOST_NUMERIC_INTERVAL_new_func(acosh)
|
||||
# undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
#define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_math(f); \
|
||||
this->downward(); \
|
||||
return this->force_rounding(f(x)); \
|
||||
} \
|
||||
T f##_up(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_math(f); \
|
||||
this->upward(); \
|
||||
return this->force_rounding(f(x)); \
|
||||
}
|
||||
BOOST_NUMERIC_INTERVAL_new_func(exp) BOOST_NUMERIC_INTERVAL_new_func(log) BOOST_NUMERIC_INTERVAL_new_func(sin)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(cos) BOOST_NUMERIC_INTERVAL_new_func(tan) BOOST_NUMERIC_INTERVAL_new_func(asin)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(acos) BOOST_NUMERIC_INTERVAL_new_func(atan)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(sinh) BOOST_NUMERIC_INTERVAL_new_func(cosh)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(tanh)
|
||||
#undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
#define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_ahyp(f); \
|
||||
this->downward(); \
|
||||
return this->force_rounding(f(x)); \
|
||||
} \
|
||||
T f##_up(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_ahyp(f); \
|
||||
this->upward(); \
|
||||
return this->force_rounding(f(x)); \
|
||||
}
|
||||
BOOST_NUMERIC_INTERVAL_new_func(asinh) BOOST_NUMERIC_INTERVAL_new_func(acosh)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(atanh)
|
||||
#undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
};
|
||||
|
||||
|
||||
template <class T, class Rounding> struct rounded_transc_opp : Rounding
|
||||
{
|
||||
#define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_math(f); \
|
||||
this->downward(); \
|
||||
T y = this->force_rounding(f(x)); \
|
||||
this->upward(); \
|
||||
return y; \
|
||||
} \
|
||||
T f##_up(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_math(f); \
|
||||
return this->force_rounding(f(x)); \
|
||||
}
|
||||
BOOST_NUMERIC_INTERVAL_new_func(exp) BOOST_NUMERIC_INTERVAL_new_func(log) BOOST_NUMERIC_INTERVAL_new_func(cos)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(acos) BOOST_NUMERIC_INTERVAL_new_func(cosh)
|
||||
#undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
#define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_math(f); \
|
||||
return -this->force_rounding(-f(x)); \
|
||||
} \
|
||||
T f##_up(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_math(f); \
|
||||
return this->force_rounding(f(x)); \
|
||||
}
|
||||
BOOST_NUMERIC_INTERVAL_new_func(sin) BOOST_NUMERIC_INTERVAL_new_func(tan)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(asin) BOOST_NUMERIC_INTERVAL_new_func(atan)
|
||||
BOOST_NUMERIC_INTERVAL_new_func(sinh) BOOST_NUMERIC_INTERVAL_new_func(tanh)
|
||||
#undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
#define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_ahyp(f); \
|
||||
this->downward(); \
|
||||
T y = this->force_rounding(f(x)); \
|
||||
this->upward(); \
|
||||
return y; \
|
||||
} \
|
||||
T f##_up(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_ahyp(f); \
|
||||
return this->force_rounding(f(x)); \
|
||||
}
|
||||
BOOST_NUMERIC_INTERVAL_new_func(asinh) BOOST_NUMERIC_INTERVAL_new_func(atanh)
|
||||
#undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
#define BOOST_NUMERIC_INTERVAL_new_func(f) \
|
||||
T f##_down(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_ahyp(f); \
|
||||
return -this->force_rounding(-f(x)); \
|
||||
} \
|
||||
T f##_up(const T &x) \
|
||||
{ \
|
||||
BOOST_NUMERIC_INTERVAL_using_ahyp(f); \
|
||||
return this->force_rounding(f(x)); \
|
||||
}
|
||||
BOOST_NUMERIC_INTERVAL_new_func(acosh)
|
||||
#undef BOOST_NUMERIC_INTERVAL_new_func
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
@@ -18,17 +18,16 @@ namespace interval_lib {
|
||||
* Default rounding_control class (does nothing)
|
||||
*/
|
||||
|
||||
template<class T>
|
||||
struct rounding_control
|
||||
template <class T> struct rounding_control
|
||||
{
|
||||
typedef int rounding_mode;
|
||||
static void get_rounding_mode(rounding_mode&) {}
|
||||
static void set_rounding_mode(rounding_mode) {}
|
||||
static void upward() {}
|
||||
static void downward() {}
|
||||
static void to_nearest() {}
|
||||
static const T& to_int(const T& x) { return x; }
|
||||
static const T& force_rounding(const T& x) { return x; }
|
||||
typedef int rounding_mode;
|
||||
static void get_rounding_mode(rounding_mode &) {}
|
||||
static void set_rounding_mode(rounding_mode) {}
|
||||
static void upward() {}
|
||||
static void downward() {}
|
||||
static void to_nearest() {}
|
||||
static const T &to_int(const T &x) { return x; }
|
||||
static const T &force_rounding(const T &x) { return x; }
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -37,26 +36,19 @@ struct rounding_control
|
||||
* rounded_transc_* control the rounding of the transcendental functions
|
||||
*/
|
||||
|
||||
template<class T, class Rounding = rounding_control<T> >
|
||||
struct rounded_arith_exact;
|
||||
template <class T, class Rounding = rounding_control<T>> struct rounded_arith_exact;
|
||||
|
||||
template<class T, class Rounding = rounding_control<T> >
|
||||
struct rounded_arith_std;
|
||||
template <class T, class Rounding = rounding_control<T>> struct rounded_arith_std;
|
||||
|
||||
template<class T, class Rounding = rounding_control<T> >
|
||||
struct rounded_arith_opp;
|
||||
template <class T, class Rounding = rounding_control<T>> struct rounded_arith_opp;
|
||||
|
||||
template<class T, class Rounding>
|
||||
struct rounded_transc_dummy;
|
||||
template <class T, class Rounding> struct rounded_transc_dummy;
|
||||
|
||||
template<class T, class Rounding = rounded_arith_exact<T> >
|
||||
struct rounded_transc_exact;
|
||||
template <class T, class Rounding = rounded_arith_exact<T>> struct rounded_transc_exact;
|
||||
|
||||
template<class T, class Rounding = rounded_arith_std<T> >
|
||||
struct rounded_transc_std;
|
||||
template <class T, class Rounding = rounded_arith_std<T>> struct rounded_transc_std;
|
||||
|
||||
template<class T, class Rounding = rounded_arith_opp<T> >
|
||||
struct rounded_transc_opp;
|
||||
template <class T, class Rounding = rounded_arith_opp<T>> struct rounded_transc_opp;
|
||||
|
||||
/*
|
||||
* State-saving classes: allow to set and reset rounding control
|
||||
@@ -64,35 +56,33 @@ struct rounded_transc_opp;
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<class Rounding>
|
||||
struct save_state_unprotected: Rounding
|
||||
template <class Rounding> struct save_state_unprotected : Rounding
|
||||
{
|
||||
typedef save_state_unprotected<Rounding> unprotected_rounding;
|
||||
typedef save_state_unprotected<Rounding> unprotected_rounding;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<class Rounding>
|
||||
struct save_state: Rounding
|
||||
template <class Rounding> struct save_state : Rounding
|
||||
{
|
||||
typename Rounding::rounding_mode mode;
|
||||
save_state() {
|
||||
this->get_rounding_mode(mode);
|
||||
this->init();
|
||||
}
|
||||
~save_state() { this->set_rounding_mode(mode); }
|
||||
typedef detail::save_state_unprotected<Rounding> unprotected_rounding;
|
||||
typename Rounding::rounding_mode mode;
|
||||
save_state()
|
||||
{
|
||||
this->get_rounding_mode(mode);
|
||||
this->init();
|
||||
}
|
||||
~save_state() { this->set_rounding_mode(mode); }
|
||||
typedef detail::save_state_unprotected<Rounding> unprotected_rounding;
|
||||
};
|
||||
|
||||
template<class Rounding>
|
||||
struct save_state_nothing: Rounding
|
||||
|
||||
template <class Rounding> struct save_state_nothing : Rounding
|
||||
{
|
||||
typedef save_state_nothing<Rounding> unprotected_rounding;
|
||||
};
|
||||
|
||||
template <class T> struct rounded_math : save_state_nothing<rounded_arith_exact<T>>
|
||||
{
|
||||
typedef save_state_nothing<Rounding> unprotected_rounding;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct rounded_math: save_state_nothing<rounded_arith_exact<T> >
|
||||
{};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user