set(PKG_DL_LIBS)
endif (GMX_DLOPEN)
+find_package( Boost 1.36.0 )
+if(Boost_FOUND)
+ include_directories(${Boost_INCLUDE_DIRS})
+else()
+ message("Boost >= 1.36 not found. Using minimal internal version. Not recommended if GROMACS is used as library!")
+ include_directories(${CMAKE_SOURCE_DIR}/src/external/boost)
+ add_definitions( -DBOOST_NO_TYPEID ) #TYPEID not supported for minimal internal version (would add significant more code)
+ # TODO: Propagate the above settings to the installed CMakeFiles.txt template
+ # (from share/template/)
+ # TODO: Reorder stuff such that INCL_INSTALL_DIR could be used here
+ set(PKG_CFLAGS "${PKG_CFLAGS} -DBOOST_NO_TYPEID -I${CMAKE_INSTALL_PREFIX}/include/gromacs/external/boost")
+ install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/external/boost/boost
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/gromacs/external/boost
+ COMPONENT development)
+endif()
+
find_package(GTest)
find_package(GMock)
find_package(Doxygen)
--- /dev/null
+Steps to produce minimal version of BOOST:
+1) Download Boost (current minimal version is derived from 1.46_1)
+2) Extract
+3) Edit Boost files to uncomment unnessary includes (search for GMX in minimal version and copy all changes)
+4) run bcp with required files (currently exception/all.hpp)
--- /dev/null
+//\r
+// boost/assert.hpp - BOOST_ASSERT(expr)\r
+// BOOST_ASSERT_MSG(expr, msg)\r
+// BOOST_VERIFY(expr)\r
+//\r
+// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.\r
+// Copyright (c) 2007 Peter Dimov\r
+// Copyright (c) Beman Dawes 2011\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// Note: There are no include guards. This is intentional.\r
+//\r
+// See http://www.boost.org/libs/utility/assert.html for documentation.\r
+//\r
+\r
+//\r
+// Stop inspect complaining about use of 'assert':\r
+//\r
+// boostinspect:naassert_macro\r
+//\r
+\r
+//--------------------------------------------------------------------------------------//\r
+// BOOST_ASSERT //\r
+//--------------------------------------------------------------------------------------//\r
+\r
+#undef BOOST_ASSERT\r
+\r
+#if defined(BOOST_DISABLE_ASSERTS)\r
+\r
+# define BOOST_ASSERT(expr) ((void)0)\r
+\r
+#elif defined(BOOST_ENABLE_ASSERT_HANDLER)\r
+\r
+#include <boost/current_function.hpp>\r
+\r
+namespace boost\r
+{\r
+ void assertion_failed(char const * expr,\r
+ char const * function, char const * file, long line); // user defined\r
+} // namespace boost\r
+\r
+#define BOOST_ASSERT(expr) ((expr) \\r
+ ? ((void)0) \\r
+ : ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))\r
+\r
+#else\r
+# include <assert.h> // .h to support old libraries w/o <cassert> - effect is the same\r
+# define BOOST_ASSERT(expr) assert(expr)\r
+#endif\r
+\r
+//--------------------------------------------------------------------------------------//\r
+// BOOST_ASSERT_MSG //\r
+//--------------------------------------------------------------------------------------//\r
+\r
+# undef BOOST_ASSERT_MSG\r
+\r
+#if defined(BOOST_DISABLE_ASSERTS) || defined(NDEBUG)\r
+\r
+ #define BOOST_ASSERT_MSG(expr, msg) ((void)0)\r
+\r
+#elif defined(BOOST_ENABLE_ASSERT_HANDLER)\r
+\r
+ #include <boost/current_function.hpp>\r
+\r
+ namespace boost\r
+ {\r
+ void assertion_failed_msg(char const * expr, char const * msg,\r
+ char const * function, char const * file, long line); // user defined\r
+ } // namespace boost\r
+\r
+ #define BOOST_ASSERT_MSG(expr, msg) ((expr) \\r
+ ? ((void)0) \\r
+ : ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))\r
+\r
+#else\r
+ #ifndef BOOST_ASSERT_HPP\r
+ #define BOOST_ASSERT_HPP\r
+ #include <cstdlib>\r
+ #include <iostream>\r
+ #include <boost/current_function.hpp>\r
+\r
+ // IDE's like Visual Studio perform better if output goes to std::cout or\r
+ // some other stream, so allow user to configure output stream:\r
+ #ifndef BOOST_ASSERT_MSG_OSTREAM\r
+ # define BOOST_ASSERT_MSG_OSTREAM std::cerr\r
+ #endif\r
+\r
+ namespace boost\r
+ { \r
+ namespace assertion \r
+ { \r
+ namespace detail\r
+ {\r
+ inline void assertion_failed_msg(char const * expr, char const * msg, char const * function,\r
+ char const * file, long line)\r
+ {\r
+ BOOST_ASSERT_MSG_OSTREAM\r
+ << "***** Internal Program Error - assertion (" << expr << ") failed in "\r
+ << function << ":\n"\r
+ << file << '(' << line << "): " << msg << std::endl;\r
+ std::abort();\r
+ }\r
+ } // detail\r
+ } // assertion\r
+ } // detail\r
+ #endif\r
+\r
+ #define BOOST_ASSERT_MSG(expr, msg) ((expr) \\r
+ ? ((void)0) \\r
+ : ::boost::assertion::detail::assertion_failed_msg(#expr, msg, \\r
+ BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))\r
+#endif\r
+\r
+//--------------------------------------------------------------------------------------//\r
+// BOOST_VERIFY //\r
+//--------------------------------------------------------------------------------------//\r
+\r
+#undef BOOST_VERIFY\r
+\r
+#if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) )\r
+\r
+# define BOOST_VERIFY(expr) ((void)(expr))\r
+\r
+#else\r
+\r
+# define BOOST_VERIFY(expr) BOOST_ASSERT(expr)\r
+\r
+#endif\r
--- /dev/null
+#ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED\r
+#define BOOST_CHECKED_DELETE_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/checked_delete.hpp\r
+//\r
+// Copyright (c) 2002, 2003 Peter Dimov\r
+// Copyright (c) 2003 Daniel Frey\r
+// Copyright (c) 2003 Howard Hinnant\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// See http://www.boost.org/libs/utility/checked_delete.html for documentation.\r
+//\r
+\r
+namespace boost\r
+{\r
+\r
+// verify that types are complete for increased safety\r
+\r
+template<class T> inline void checked_delete(T * x)\r
+{\r
+ // intentionally complex - simplification causes regressions\r
+ typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];\r
+ (void) sizeof(type_must_be_complete);\r
+ delete x;\r
+}\r
+\r
+template<class T> inline void checked_array_delete(T * x)\r
+{\r
+ typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];\r
+ (void) sizeof(type_must_be_complete);\r
+ delete [] x;\r
+}\r
+\r
+template<class T> struct checked_deleter\r
+{\r
+ typedef void result_type;\r
+ typedef T * argument_type;\r
+\r
+ void operator()(T * x) const\r
+ {\r
+ // boost:: disables ADL\r
+ boost::checked_delete(x);\r
+ }\r
+};\r
+\r
+template<class T> struct checked_array_deleter\r
+{\r
+ typedef void result_type;\r
+ typedef T * argument_type;\r
+\r
+ void operator()(T * x) const\r
+ {\r
+ boost::checked_array_delete(x);\r
+ }\r
+};\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED\r
--- /dev/null
+// Boost config.hpp configuration header file ------------------------------//\r
+\r
+// (C) Copyright John Maddock 2002. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org/libs/config for most recent version.\r
+\r
+// Boost config.hpp policy and rationale documentation has been moved to\r
+// http://www.boost.org/libs/config\r
+//\r
+// CAUTION: This file is intended to be completely stable -\r
+// DO NOT MODIFY THIS FILE!\r
+//\r
+\r
+#ifndef BOOST_CONFIG_HPP\r
+#define BOOST_CONFIG_HPP\r
+\r
+// if we don't have a user config, then use the default location:\r
+#if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG)\r
+# define BOOST_USER_CONFIG <boost/config/user.hpp>\r
+#endif\r
+// include it first:\r
+#ifdef BOOST_USER_CONFIG\r
+# include BOOST_USER_CONFIG\r
+#endif\r
+\r
+// if we don't have a compiler config set, try and find one:\r
+#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG)\r
+# include <boost/config/select_compiler_config.hpp>\r
+#endif\r
+// if we have a compiler config, include it now:\r
+#ifdef BOOST_COMPILER_CONFIG\r
+# include BOOST_COMPILER_CONFIG\r
+#endif\r
+\r
+// if we don't have a std library config set, try and find one:\r
+#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG)\r
+# include <boost/config/select_stdlib_config.hpp>\r
+#endif\r
+// if we have a std library config, include it now:\r
+#ifdef BOOST_STDLIB_CONFIG\r
+# include BOOST_STDLIB_CONFIG\r
+#endif\r
+\r
+// if we don't have a platform config set, try and find one:\r
+#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG)\r
+# include <boost/config/select_platform_config.hpp>\r
+#endif\r
+// if we have a platform config, include it now:\r
+#ifdef BOOST_PLATFORM_CONFIG\r
+# include BOOST_PLATFORM_CONFIG\r
+#endif\r
+\r
+// get config suffix code:\r
+#include <boost/config/suffix.hpp>\r
+\r
+#endif // BOOST_CONFIG_HPP\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// for C++ Builder the following options effect the ABI:\r
+//\r
+// -b (on or off - effect emum sizes)\r
+// -Vx (on or off - empty members)\r
+// -Ve (on or off - empty base classes)\r
+// -aX (alignment - 5 options).\r
+// -pX (Calling convention - 4 options)\r
+// -VmX (member pointer size and layout - 5 options)\r
+// -VC (on or off, changes name mangling)\r
+// -Vl (on or off, changes struct layout).\r
+\r
+// In addition the following warnings are sufficiently annoying (and\r
+// unfixable) to have them turned off by default:\r
+//\r
+// 8027 - functions containing [for|while] loops are not expanded inline\r
+// 8026 - functions taking class by value arguments are not expanded inline\r
+\r
+#pragma nopushoptwarn\r
+# pragma option push -a8 -Vx- -Ve- -b- -pc -Vmv -VC- -Vl- -w-8027 -w-8026\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+# pragma option pop\r
+#pragma nopushoptwarn\r
+\r
+\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+//\r
+// Boost binaries are built with the compiler's default ABI settings,\r
+// if the user changes their default alignment in the VS IDE then their\r
+// code will no longer be binary compatible with the bjam built binaries\r
+// unless this header is included to force Boost code into a consistent ABI.\r
+//\r
+// Note that inclusion of this header is only necessary for libraries with \r
+// separate source, header only libraries DO NOT need this as long as all\r
+// translation units are built with the same options.\r
+//\r
+#if defined(_M_X64)\r
+# pragma pack(push,16)\r
+#else\r
+# pragma pack(push,8)\r
+#endif\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#pragma pack(pop)\r
+\r
+\r
--- /dev/null
+// abi_prefix header -------------------------------------------------------//\r
+\r
+// (c) Copyright John Maddock 2003\r
+ \r
+// Use, modification and distribution are subject to the Boost Software License,\r
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt).\r
+\r
+#ifndef BOOST_CONFIG_ABI_PREFIX_HPP\r
+# define BOOST_CONFIG_ABI_PREFIX_HPP\r
+#else\r
+# error double inclusion of header boost/config/abi_prefix.hpp is an error\r
+#endif\r
+\r
+#include <boost/config.hpp>\r
+\r
+// this must occur after all other includes and before any code appears:\r
+#ifdef BOOST_HAS_ABI_HEADERS\r
+# include BOOST_ABI_PREFIX\r
+#endif\r
+\r
+#if defined( __BORLANDC__ )\r
+#pragma nopushoptwarn\r
+#endif\r
+\r
--- /dev/null
+// abi_sufffix header -------------------------------------------------------//\r
+\r
+// (c) Copyright John Maddock 2003\r
+ \r
+// Use, modification and distribution are subject to the Boost Software License,\r
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt).\r
+\r
+// This header should be #included AFTER code that was preceded by a #include\r
+// <boost/config/abi_prefix.hpp>.\r
+\r
+#ifndef BOOST_CONFIG_ABI_PREFIX_HPP\r
+# error Header boost/config/abi_suffix.hpp must only be used after boost/config/abi_prefix.hpp\r
+#else\r
+# undef BOOST_CONFIG_ABI_PREFIX_HPP\r
+#endif\r
+\r
+// the suffix header occurs after all of our code:\r
+#ifdef BOOST_HAS_ABI_HEADERS\r
+# include BOOST_ABI_SUFFIX\r
+#endif\r
+\r
+#if defined( __BORLANDC__ )\r
+#pragma nopushoptwarn\r
+#endif\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2003.\r
+// Use, modification and distribution are subject to the\r
+// Boost Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+ /*\r
+ * LOCATION: see http://www.boost.org for most recent version.\r
+ * FILE auto_link.hpp\r
+ * VERSION see <boost/version.hpp>\r
+ * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.\r
+ */\r
+\r
+/*************************************************************************\r
+\r
+USAGE:\r
+~~~~~~\r
+\r
+Before including this header you must define one or more of define the following macros:\r
+\r
+BOOST_LIB_NAME: Required: A string containing the basename of the library,\r
+ for example boost_regex.\r
+BOOST_LIB_TOOLSET: Optional: the base name of the toolset.\r
+BOOST_DYN_LINK: Optional: when set link to dll rather than static library.\r
+BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name\r
+ of the library selected (useful for debugging).\r
+BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib,\r
+ rather than a mangled-name version.\r
+BOOST_AUTO_LINK_TAGGED: Specifies that we link to libraries built with the --layout=tagged option.\r
+ This is essentially the same as the default name-mangled version, but without\r
+ the compiler name and version, or the Boost version. Just the build options.\r
+\r
+These macros will be undef'ed at the end of the header, further this header\r
+has no include guards - so be sure to include it only once from your library!\r
+\r
+Algorithm:\r
+~~~~~~~~~~\r
+\r
+Libraries for Borland and Microsoft compilers are automatically\r
+selected here, the name of the lib is selected according to the following\r
+formula:\r
+\r
+BOOST_LIB_PREFIX\r
+ + BOOST_LIB_NAME\r
+ + "_"\r
+ + BOOST_LIB_TOOLSET\r
+ + BOOST_LIB_THREAD_OPT\r
+ + BOOST_LIB_RT_OPT\r
+ "-"\r
+ + BOOST_LIB_VERSION\r
+\r
+These are defined as:\r
+\r
+BOOST_LIB_PREFIX: "lib" for static libraries otherwise "".\r
+\r
+BOOST_LIB_NAME: The base name of the lib ( for example boost_regex).\r
+\r
+BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).\r
+\r
+BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing.\r
+\r
+BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used,\r
+ contains one or more of the following letters after\r
+ a hiphen:\r
+\r
+ s static runtime (dynamic if not present).\r
+ g debug/diagnostic runtime (release if not present).\r
+ y Python debug/diagnostic runtime (release if not present).\r
+ d debug build (release if not present).\r
+ g debug/diagnostic runtime (release if not present).\r
+ p STLPort Build.\r
+\r
+BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.\r
+\r
+\r
+***************************************************************************/\r
+\r
+#ifdef __cplusplus\r
+# ifndef BOOST_CONFIG_HPP\r
+# include <boost/config.hpp>\r
+# endif\r
+#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__)\r
+//\r
+// C language compatability (no, honestly)\r
+//\r
+# define BOOST_MSVC _MSC_VER\r
+# define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)\r
+# define BOOST_DO_STRINGIZE(X) #X\r
+#endif\r
+//\r
+// Only include what follows for known and supported compilers:\r
+//\r
+#if defined(BOOST_MSVC) \\r
+ || defined(__BORLANDC__) \\r
+ || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \\r
+ || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))\r
+\r
+#ifndef BOOST_VERSION_HPP\r
+# include <boost/version.hpp>\r
+#endif\r
+\r
+#ifndef BOOST_LIB_NAME\r
+# error "Macro BOOST_LIB_NAME not set (internal error)"\r
+#endif\r
+\r
+//\r
+// error check:\r
+//\r
+#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG)\r
+# pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors")\r
+# pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes")\r
+# error "Incompatible build options"\r
+#endif\r
+//\r
+// select toolset if not defined already:\r
+//\r
+#ifndef BOOST_LIB_TOOLSET\r
+// Note: no compilers before 1200 are supported\r
+#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)\r
+\r
+# ifdef UNDER_CE\r
+ // vc6:\r
+# define BOOST_LIB_TOOLSET "evc4"\r
+# else\r
+ // vc6:\r
+# define BOOST_LIB_TOOLSET "vc6"\r
+# endif\r
+\r
+#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300)\r
+\r
+ // vc7:\r
+# define BOOST_LIB_TOOLSET "vc7"\r
+\r
+#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310)\r
+\r
+ // vc71:\r
+# define BOOST_LIB_TOOLSET "vc71"\r
+\r
+#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1400)\r
+\r
+ // vc80:\r
+# define BOOST_LIB_TOOLSET "vc80"\r
+\r
+#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1500)\r
+\r
+ // vc90:\r
+# define BOOST_LIB_TOOLSET "vc90"\r
+\r
+#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1600)\r
+\r
+ // vc10:\r
+# define BOOST_LIB_TOOLSET "vc100"\r
+\r
+#elif defined(__BORLANDC__)\r
+\r
+ // CBuilder 6:\r
+# define BOOST_LIB_TOOLSET "bcb"\r
+\r
+#elif defined(__ICL)\r
+\r
+ // Intel C++, no version number:\r
+# define BOOST_LIB_TOOLSET "iw"\r
+\r
+#elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )\r
+\r
+ // Metrowerks CodeWarrior 8.x\r
+# define BOOST_LIB_TOOLSET "cw8"\r
+\r
+#elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )\r
+\r
+ // Metrowerks CodeWarrior 9.x\r
+# define BOOST_LIB_TOOLSET "cw9"\r
+\r
+#endif\r
+#endif // BOOST_LIB_TOOLSET\r
+\r
+//\r
+// select thread opt:\r
+//\r
+#if defined(_MT) || defined(__MT__)\r
+# define BOOST_LIB_THREAD_OPT "-mt"\r
+#else\r
+# define BOOST_LIB_THREAD_OPT\r
+#endif\r
+\r
+#if defined(_MSC_VER) || defined(__MWERKS__)\r
+\r
+# ifdef _DLL\r
+\r
+# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))\r
+\r
+# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\\r
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)\r
+# define BOOST_LIB_RT_OPT "-gydp"\r
+# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\r
+# define BOOST_LIB_RT_OPT "-gdp"\r
+# elif defined(_DEBUG)\\r
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)\r
+# define BOOST_LIB_RT_OPT "-gydp"\r
+# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")\r
+# error "Build options aren't compatible with pre-built libraries"\r
+# elif defined(_DEBUG)\r
+# define BOOST_LIB_RT_OPT "-gdp"\r
+# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")\r
+# error "Build options aren't compatible with pre-built libraries"\r
+# else\r
+# define BOOST_LIB_RT_OPT "-p"\r
+# endif\r
+\r
+# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)\r
+\r
+# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\\r
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)\r
+# define BOOST_LIB_RT_OPT "-gydpn"\r
+# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\r
+# define BOOST_LIB_RT_OPT "-gdpn"\r
+# elif defined(_DEBUG)\\r
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)\r
+# define BOOST_LIB_RT_OPT "-gydpn"\r
+# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")\r
+# error "Build options aren't compatible with pre-built libraries"\r
+# elif defined(_DEBUG)\r
+# define BOOST_LIB_RT_OPT "-gdpn"\r
+# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")\r
+# error "Build options aren't compatible with pre-built libraries"\r
+# else\r
+# define BOOST_LIB_RT_OPT "-pn"\r
+# endif\r
+\r
+# else\r
+\r
+# if defined(_DEBUG) && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)\r
+# define BOOST_LIB_RT_OPT "-gyd"\r
+# elif defined(_DEBUG)\r
+# define BOOST_LIB_RT_OPT "-gd"\r
+# else\r
+# define BOOST_LIB_RT_OPT\r
+# endif\r
+\r
+# endif\r
+\r
+# else\r
+\r
+# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))\r
+\r
+# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\\r
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)\r
+# define BOOST_LIB_RT_OPT "-sgydp"\r
+# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\r
+# define BOOST_LIB_RT_OPT "-sgdp"\r
+# elif defined(_DEBUG)\\r
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)\r
+# define BOOST_LIB_RT_OPT "-sgydp"\r
+# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")\r
+# error "Build options aren't compatible with pre-built libraries"\r
+# elif defined(_DEBUG)\r
+# define BOOST_LIB_RT_OPT "-sgdp"\r
+# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")\r
+# error "Build options aren't compatible with pre-built libraries"\r
+# else\r
+# define BOOST_LIB_RT_OPT "-sp"\r
+# endif\r
+\r
+# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)\r
+\r
+# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\\r
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)\r
+# define BOOST_LIB_RT_OPT "-sgydpn"\r
+# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\r
+# define BOOST_LIB_RT_OPT "-sgdpn"\r
+# elif defined(_DEBUG)\\r
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)\r
+# define BOOST_LIB_RT_OPT "-sgydpn"\r
+# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")\r
+# error "Build options aren't compatible with pre-built libraries"\r
+# elif defined(_DEBUG)\r
+# define BOOST_LIB_RT_OPT "-sgdpn"\r
+# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")\r
+# error "Build options aren't compatible with pre-built libraries"\r
+# else\r
+# define BOOST_LIB_RT_OPT "-spn"\r
+# endif\r
+\r
+# else\r
+\r
+# if defined(_DEBUG)\\r
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)\r
+# define BOOST_LIB_RT_OPT "-sgyd"\r
+# elif defined(_DEBUG)\r
+# define BOOST_LIB_RT_OPT "-sgd"\r
+# else\r
+# define BOOST_LIB_RT_OPT "-s"\r
+# endif\r
+\r
+# endif\r
+\r
+# endif\r
+\r
+#elif defined(__BORLANDC__)\r
+\r
+//\r
+// figure out whether we want the debug builds or not:\r
+//\r
+#if __BORLANDC__ > 0x561\r
+#pragma defineonoption BOOST_BORLAND_DEBUG -v\r
+#endif\r
+//\r
+// sanity check:\r
+//\r
+#if defined(__STL_DEBUG) || defined(_STLP_DEBUG)\r
+#error "Pre-built versions of the Boost libraries are not provided in STLPort-debug form"\r
+#endif\r
+\r
+# ifdef _RTLDLL\r
+\r
+# if defined(BOOST_BORLAND_DEBUG)\\r
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)\r
+# define BOOST_LIB_RT_OPT "-yd"\r
+# elif defined(BOOST_BORLAND_DEBUG)\r
+# define BOOST_LIB_RT_OPT "-d"\r
+# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)\r
+# define BOOST_LIB_RT_OPT -y\r
+# else\r
+# define BOOST_LIB_RT_OPT\r
+# endif\r
+\r
+# else\r
+\r
+# if defined(BOOST_BORLAND_DEBUG)\\r
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)\r
+# define BOOST_LIB_RT_OPT "-syd"\r
+# elif defined(BOOST_BORLAND_DEBUG)\r
+# define BOOST_LIB_RT_OPT "-sd"\r
+# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)\r
+# define BOOST_LIB_RT_OPT "-sy"\r
+# else\r
+# define BOOST_LIB_RT_OPT "-s"\r
+# endif\r
+\r
+# endif\r
+\r
+#endif\r
+\r
+//\r
+// select linkage opt:\r
+//\r
+#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK)\r
+# define BOOST_LIB_PREFIX\r
+#elif defined(BOOST_DYN_LINK)\r
+# error "Mixing a dll boost library with a static runtime is a really bad idea..."\r
+#else\r
+# define BOOST_LIB_PREFIX "lib"\r
+#endif\r
+\r
+//\r
+// now include the lib:\r
+//\r
+#if defined(BOOST_LIB_NAME) \\r
+ && defined(BOOST_LIB_PREFIX) \\r
+ && defined(BOOST_LIB_TOOLSET) \\r
+ && defined(BOOST_LIB_THREAD_OPT) \\r
+ && defined(BOOST_LIB_RT_OPT) \\r
+ && defined(BOOST_LIB_VERSION)\r
+\r
+#ifdef BOOST_AUTO_LINK_TAGGED\r
+# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")\r
+# ifdef BOOST_LIB_DIAGNOSTIC\r
+# 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")\r
+# endif\r
+#elif defined(BOOST_AUTO_LINK_NOMANGLE)\r
+# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")\r
+# ifdef BOOST_LIB_DIAGNOSTIC\r
+# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")\r
+# endif\r
+#else\r
+# 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")\r
+# ifdef BOOST_LIB_DIAGNOSTIC\r
+# 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")\r
+# endif\r
+#endif\r
+\r
+#else\r
+# error "some required macros where not defined (internal logic error)."\r
+#endif\r
+\r
+\r
+#endif // _MSC_VER || __BORLANDC__\r
+\r
+//\r
+// finally undef any macros we may have set:\r
+//\r
+#ifdef BOOST_LIB_PREFIX\r
+# undef BOOST_LIB_PREFIX\r
+#endif\r
+#if defined(BOOST_LIB_NAME)\r
+# undef BOOST_LIB_NAME\r
+#endif\r
+// Don't undef this one: it can be set by the user and should be the \r
+// same for all libraries:\r
+//#if defined(BOOST_LIB_TOOLSET)\r
+//# undef BOOST_LIB_TOOLSET\r
+//#endif\r
+#if defined(BOOST_LIB_THREAD_OPT)\r
+# undef BOOST_LIB_THREAD_OPT\r
+#endif\r
+#if defined(BOOST_LIB_RT_OPT)\r
+# undef BOOST_LIB_RT_OPT\r
+#endif\r
+#if defined(BOOST_LIB_LINK_OPT)\r
+# undef BOOST_LIB_LINK_OPT\r
+#endif\r
+#if defined(BOOST_LIB_DEBUG_OPT)\r
+# undef BOOST_LIB_DEBUG_OPT\r
+#endif\r
+#if defined(BOOST_DYN_LINK)\r
+# undef BOOST_DYN_LINK\r
+#endif\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003.\r
+// (C) Copyright David Abrahams 2002 - 2003.\r
+// (C) Copyright Aleksey Gurtovoy 2002.\r
+// Use, modification and distribution are subject to the\r
+// Boost Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Borland C++ compiler setup:\r
+\r
+//\r
+// versions check:\r
+// we don't support Borland prior to version 5.4:\r
+#if __BORLANDC__ < 0x540\r
+# error "Compiler not supported or configured - please reconfigure"\r
+#endif\r
+\r
+// last known compiler version:\r
+#if (__BORLANDC__ > 0x613)\r
+//# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown compiler version - please run the configure tests and report the results"\r
+//# else\r
+//# pragma message( "Unknown compiler version - please run the configure tests and report the results")\r
+//# endif\r
+#elif (__BORLANDC__ == 0x600)\r
+# error "CBuilderX preview compiler is no longer supported"\r
+#endif\r
+\r
+//\r
+// Support macros to help with standard library detection\r
+#if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL)\r
+# define BOOST_BCB_WITH_ROGUE_WAVE\r
+#elif __BORLANDC__ < 0x570\r
+# define BOOST_BCB_WITH_STLPORT\r
+#else\r
+# define BOOST_BCB_WITH_DINKUMWARE\r
+#endif\r
+\r
+//\r
+// Version 5.0 and below:\r
+# if __BORLANDC__ <= 0x0550\r
+// Borland C++Builder 4 and 5:\r
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS\r
+# if __BORLANDC__ == 0x0550\r
+// Borland C++Builder 5, command-line compiler 5.5:\r
+# define BOOST_NO_OPERATORS_IN_NAMESPACE\r
+# endif\r
+// Variadic macros do not exist for C++ Builder versions 5 and below\r
+#define BOOST_NO_VARIADIC_MACROS\r
+# endif\r
+\r
+// Version 5.51 and below:\r
+#if (__BORLANDC__ <= 0x551)\r
+# define BOOST_NO_CV_SPECIALIZATIONS\r
+# define BOOST_NO_CV_VOID_SPECIALIZATIONS\r
+# define BOOST_NO_DEDUCED_TYPENAME\r
+// workaround for missing WCHAR_MAX/WCHAR_MIN:\r
+#include <climits>\r
+#include <cwchar>\r
+#ifndef WCHAR_MAX\r
+# define WCHAR_MAX 0xffff\r
+#endif\r
+#ifndef WCHAR_MIN\r
+# define WCHAR_MIN 0\r
+#endif\r
+#endif\r
+\r
+// Borland C++ Builder 6 and below:\r
+#if (__BORLANDC__ <= 0x564)\r
+\r
+# ifdef NDEBUG\r
+ // fix broken <cstring> so that Boost.test works:\r
+# include <cstring>\r
+# undef strcmp\r
+# endif\r
+ // fix broken errno declaration:\r
+# include <errno.h>\r
+# ifndef errno\r
+# define errno errno\r
+# endif\r
+\r
+#endif\r
+\r
+//\r
+// new bug in 5.61:\r
+#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580)\r
+ // this seems to be needed by the command line compiler, but not the IDE:\r
+# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS\r
+#endif\r
+\r
+// Borland C++ Builder 2006 Update 2 and below:\r
+#if (__BORLANDC__ <= 0x582)\r
+# define BOOST_NO_SFINAE\r
+# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG\r
+# define BOOST_NO_TEMPLATE_TEMPLATES\r
+\r
+# define BOOST_NO_PRIVATE_IN_AGGREGATE\r
+\r
+# ifdef _WIN32\r
+# define BOOST_NO_SWPRINTF\r
+# elif defined(linux) || defined(__linux__) || defined(__linux)\r
+ // we should really be able to do without this\r
+ // but the wcs* functions aren't imported into std::\r
+# define BOOST_NO_STDC_NAMESPACE\r
+ // _CPPUNWIND doesn't get automatically set for some reason:\r
+# pragma defineonoption BOOST_CPPUNWIND -x\r
+# endif\r
+#endif\r
+\r
+#if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info\r
+ // we shouldn't really need this - but too many things choke\r
+ // without it, this needs more investigation:\r
+# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS\r
+# define BOOST_NO_IS_ABSTRACT\r
+# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS\r
+# define BOOST_NO_USING_TEMPLATE\r
+# define BOOST_SP_NO_SP_CONVERTIBLE\r
+\r
+// Temporary workaround\r
+#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS\r
+#endif\r
+\r
+// Borland C++ Builder 2008 and below:\r
+# define BOOST_NO_INTEGRAL_INT64_T\r
+# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL\r
+# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS\r
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS\r
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE\r
+# define BOOST_NO_NESTED_FRIENDSHIP\r
+# define BOOST_NO_TYPENAME_WITH_CTOR\r
+#if (__BORLANDC__ < 0x600)\r
+# define BOOST_ILLEGAL_CV_REFERENCES\r
+#endif\r
+\r
+//\r
+// Positive Feature detection\r
+//\r
+// Borland C++ Builder 2008 and below:\r
+#if (__BORLANDC__ >= 0x599)\r
+# pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax\r
+#endif\r
+//\r
+// C++0x Macros:\r
+//\r
+#if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610)\r
+# define BOOST_NO_CHAR16_T\r
+# define BOOST_NO_CHAR32_T\r
+# define BOOST_NO_DECLTYPE\r
+# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
+# define BOOST_NO_EXTERN_TEMPLATE\r
+# define BOOST_NO_RVALUE_REFERENCES \r
+# define BOOST_NO_SCOPED_ENUMS\r
+# define BOOST_NO_STATIC_ASSERT\r
+#else\r
+# define BOOST_HAS_ALIGNOF\r
+# define BOOST_HAS_CHAR16_T\r
+# define BOOST_HAS_CHAR32_T\r
+# define BOOST_HAS_DECLTYPE\r
+# define BOOST_HAS_EXPLICIT_CONVERSION_OPS\r
+# define BOOST_HAS_REF_QUALIFIER\r
+# define BOOST_HAS_RVALUE_REFS\r
+# define BOOST_HAS_STATIC_ASSERT\r
+#endif\r
+\r
+#define BOOST_NO_AUTO_DECLARATIONS\r
+#define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#define BOOST_NO_CONCEPTS\r
+#define BOOST_NO_CONSTEXPR\r
+#define BOOST_NO_DEFAULTED_FUNCTIONS\r
+#define BOOST_NO_DELETED_FUNCTIONS\r
+#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
+#define BOOST_NO_INITIALIZER_LISTS\r
+#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NULLPTR\r
+#define BOOST_NO_RAW_LITERALS\r
+#define BOOST_NO_RVALUE_REFERENCES\r
+#define BOOST_NO_SCOPED_ENUMS\r
+#define BOOST_NO_SFINAE_EXPR\r
+#define BOOST_NO_TEMPLATE_ALIASES\r
+#define BOOST_NO_UNICODE_LITERALS // UTF-8 still not supported\r
+#define BOOST_NO_VARIADIC_TEMPLATES\r
+\r
+#if __BORLANDC__ >= 0x590\r
+# define BOOST_HAS_TR1_HASH\r
+\r
+# define BOOST_HAS_MACRO_USE_FACET\r
+#endif\r
+\r
+//\r
+// Post 0x561 we have long long and stdint.h:\r
+#if __BORLANDC__ >= 0x561\r
+# ifndef __NO_LONG_LONG\r
+# define BOOST_HAS_LONG_LONG\r
+# else\r
+# define BOOST_NO_LONG_LONG\r
+# endif\r
+ // On non-Win32 platforms let the platform config figure this out:\r
+# ifdef _WIN32\r
+# define BOOST_HAS_STDINT_H\r
+# endif\r
+#endif\r
+\r
+// Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is\r
+// defined, then we have 0x560 or greater with the Rogue Wave implementation\r
+// which presumably has the std::DBL_MAX bug.\r
+#if defined( BOOST_BCB_WITH_ROGUE_WAVE )\r
+// <climits> is partly broken, some macros define symbols that are really in\r
+// namespace std, so you end up having to use illegal constructs like\r
+// std::DBL_MAX, as a fix we'll just include float.h and have done with:\r
+#include <float.h>\r
+#endif\r
+//\r
+// __int64:\r
+//\r
+#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)\r
+# define BOOST_HAS_MS_INT64\r
+#endif\r
+//\r
+// check for exception handling support:\r
+//\r
+#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)\r
+# define BOOST_NO_EXCEPTIONS\r
+#endif\r
+//\r
+// all versions have a <dirent.h>:\r
+//\r
+#ifndef __STRICT_ANSI__\r
+# define BOOST_HAS_DIRENT_H\r
+#endif\r
+//\r
+// all versions support __declspec:\r
+//\r
+#if defined(__STRICT_ANSI__)\r
+// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined \r
+# define BOOST_SYMBOL_EXPORT\r
+#endif\r
+//\r
+// ABI fixing headers:\r
+//\r
+#if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet\r
+#ifndef BOOST_ABI_PREFIX\r
+# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"\r
+#endif\r
+#ifndef BOOST_ABI_SUFFIX\r
+# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"\r
+#endif\r
+#endif\r
+//\r
+// Disable Win32 support in ANSI mode:\r
+//\r
+#if __BORLANDC__ < 0x600\r
+# pragma defineonoption BOOST_DISABLE_WIN32 -A\r
+#elif defined(__STRICT_ANSI__)\r
+# define BOOST_DISABLE_WIN32\r
+#endif\r
+//\r
+// MSVC compatibility mode does some nasty things:\r
+// TODO: look up if this doesn't apply to the whole 12xx range\r
+//\r
+#if defined(_MSC_VER) && (_MSC_VER <= 1200)\r
+# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP\r
+# define BOOST_NO_VOID_RETURNS\r
+#endif\r
+\r
+// Borland did not implement value-initialization completely, as I reported\r
+// in 2007, Borland Report 51854, "Value-initialization: POD struct should be\r
+// zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854\r
+// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues\r
+// (Niels Dekker, LKEB, April 2010)\r
+#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION\r
+\r
+#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright Douglas Gregor 2010\r
+//\r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Clang compiler setup.\r
+\r
+#if __has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)\r
+#else\r
+# define BOOST_NO_EXCEPTIONS\r
+#endif\r
+\r
+#if !__has_feature(cxx_rtti)\r
+# define BOOST_NO_RTTI\r
+#endif\r
+\r
+#if defined(__int64)\r
+# define BOOST_HAS_MS_INT64\r
+#endif\r
+\r
+#define BOOST_HAS_NRVO\r
+\r
+// Clang supports "long long" in all compilation modes.\r
+\r
+#define BOOST_NO_AUTO_DECLARATIONS\r
+#define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#define BOOST_NO_CHAR16_T\r
+#define BOOST_NO_CHAR32_T\r
+#define BOOST_NO_CONCEPTS\r
+#define BOOST_NO_CONSTEXPR\r
+\r
+#if !__has_feature(cxx_decltype)\r
+# define BOOST_NO_DECLTYPE\r
+#endif\r
+\r
+#define BOOST_NO_DEFAULTED_FUNCTIONS\r
+\r
+#if !__has_feature(cxx_deleted_functions)\r
+# define BOOST_NO_DELETED_FUNCTIONS\r
+#endif\r
+\r
+#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
+\r
+#if !__has_feature(cxx_default_function_template_args)\r
+ #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
+#endif\r
+\r
+#define BOOST_NO_INITIALIZER_LISTS\r
+#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NULLPTR\r
+#define BOOST_NO_RAW_LITERALS\r
+\r
+#if !__has_feature(cxx_rvalue_references)\r
+# define BOOST_NO_RVALUE_REFERENCES\r
+#endif\r
+\r
+#if !__has_feature(cxx_strong_enums)\r
+# define BOOST_NO_SCOPED_ENUMS\r
+#endif\r
+\r
+#if !__has_feature(cxx_static_assert)\r
+# define BOOST_NO_STATIC_ASSERT\r
+#endif\r
+\r
+#define BOOST_NO_TEMPLATE_ALIASES\r
+#define BOOST_NO_UNICODE_LITERALS\r
+\r
+#if !__has_feature(cxx_variadic_templates)\r
+# define BOOST_NO_VARIADIC_TEMPLATES\r
+#endif\r
+\r
+// Clang always supports variadic macros\r
+// Clang always supports extern templates\r
+\r
+#ifndef BOOST_COMPILER\r
+# define BOOST_COMPILER "Clang version " __clang_version__\r
+#endif\r
+\r
+// Macro used to identify the Clang compiler.\r
+#define BOOST_CLANG 1\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003.\r
+// (C) Copyright David Abrahams 2002 - 2003.\r
+// (C) Copyright Aleksey Gurtovoy 2002.\r
+// Use, modification and distribution are subject to the\r
+// Boost Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// CodeGear C++ compiler setup:\r
+\r
+#if !defined( BOOST_WITH_CODEGEAR_WARNINGS )\r
+// these warnings occur frequently in optimized template code\r
+# pragma warn -8004 // var assigned value, but never used\r
+# pragma warn -8008 // condition always true/false\r
+# pragma warn -8066 // dead code can never execute\r
+# pragma warn -8104 // static members with ctors not threadsafe\r
+# pragma warn -8105 // reference member in class without ctors\r
+#endif\r
+//\r
+// versions check:\r
+// last known and checked version is 0x621\r
+#if (__CODEGEARC__ > 0x621)\r
+# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown compiler version - please run the configure tests and report the results"\r
+# else\r
+# pragma message( "Unknown compiler version - please run the configure tests and report the results")\r
+# endif\r
+#endif\r
+\r
+// CodeGear C++ Builder 2009\r
+#if (__CODEGEARC__ <= 0x613)\r
+# define BOOST_NO_INTEGRAL_INT64_T\r
+# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS\r
+# define BOOST_NO_PRIVATE_IN_AGGREGATE\r
+# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE\r
+ // we shouldn't really need this - but too many things choke\r
+ // without it, this needs more investigation:\r
+# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS\r
+# define BOOST_SP_NO_SP_CONVERTIBLE\r
+#endif\r
+\r
+// CodeGear C++ Builder 2010\r
+#if (__CODEGEARC__ <= 0x621)\r
+# define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type\r
+# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL\r
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS\r
+# define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member\r
+# define BOOST_NO_USING_TEMPLATE\r
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+// Temporary hack, until specific MPL preprocessed headers are generated\r
+# define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS\r
+\r
+// CodeGear has not yet completely implemented value-initialization, for\r
+// example for array types, as I reported in 2010: Embarcadero Report 83751,\r
+// "Value-initialization: arrays should have each element value-initialized",\r
+// http://qc.embarcadero.com/wc/qcmain.aspx?d=83751\r
+// Last checked version: Embarcadero C++ 6.21\r
+// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues\r
+// (Niels Dekker, LKEB, April 2010)\r
+# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION\r
+\r
+# ifdef NDEBUG\r
+ // fix broken <cstring> so that Boost.test works:\r
+# include <cstring>\r
+# undef strcmp\r
+# endif\r
+ // fix broken errno declaration:\r
+# include <errno.h>\r
+# ifndef errno\r
+# define errno errno\r
+# endif\r
+\r
+#endif\r
+//\r
+// C++0x macros:\r
+//\r
+#if (__CODEGEARC__ <= 0x620)\r
+#define BOOST_NO_STATIC_ASSERT\r
+#else\r
+#define BOOST_HAS_STATIC_ASSERT\r
+#endif\r
+#define BOOST_HAS_CHAR16_T\r
+#define BOOST_HAS_CHAR32_T\r
+#define BOOST_HAS_LONG_LONG\r
+// #define BOOST_HAS_ALIGNOF\r
+#define BOOST_HAS_DECLTYPE\r
+#define BOOST_HAS_EXPLICIT_CONVERSION_OPS\r
+// #define BOOST_HAS_RVALUE_REFS\r
+#define BOOST_HAS_SCOPED_ENUM\r
+// #define BOOST_HAS_STATIC_ASSERT\r
+#define BOOST_HAS_STD_TYPE_TRAITS\r
+\r
+#define BOOST_NO_AUTO_DECLARATIONS\r
+#define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#define BOOST_NO_CONCEPTS\r
+#define BOOST_NO_CONSTEXPR\r
+#define BOOST_NO_DEFAULTED_FUNCTIONS\r
+#define BOOST_NO_DELETED_FUNCTIONS\r
+#define BOOST_NO_EXTERN_TEMPLATE\r
+#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
+#define BOOST_NO_INITIALIZER_LISTS\r
+#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NULLPTR\r
+#define BOOST_NO_RAW_LITERALS\r
+#define BOOST_NO_RVALUE_REFERENCES\r
+#define BOOST_NO_SFINAE_EXPR\r
+#define BOOST_NO_TEMPLATE_ALIASES\r
+#define BOOST_NO_UNICODE_LITERALS\r
+#define BOOST_NO_VARIADIC_TEMPLATES\r
+\r
+//\r
+// TR1 macros:\r
+//\r
+#define BOOST_HAS_TR1_HASH\r
+#define BOOST_HAS_TR1_TYPE_TRAITS\r
+#define BOOST_HAS_TR1_UNORDERED_MAP\r
+#define BOOST_HAS_TR1_UNORDERED_SET\r
+\r
+#define BOOST_HAS_MACRO_USE_FACET\r
+\r
+#define BOOST_NO_INITIALIZER_LISTS\r
+\r
+// On non-Win32 platforms let the platform config figure this out:\r
+#ifdef _WIN32\r
+# define BOOST_HAS_STDINT_H\r
+#endif\r
+\r
+//\r
+// __int64:\r
+//\r
+#if !defined(__STRICT_ANSI__)\r
+# define BOOST_HAS_MS_INT64\r
+#endif\r
+//\r
+// check for exception handling support:\r
+//\r
+#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)\r
+# define BOOST_NO_EXCEPTIONS\r
+#endif\r
+//\r
+// all versions have a <dirent.h>:\r
+//\r
+#if !defined(__STRICT_ANSI__)\r
+# define BOOST_HAS_DIRENT_H\r
+#endif\r
+//\r
+// all versions support __declspec:\r
+//\r
+#if defined(__STRICT_ANSI__)\r
+// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined \r
+# define BOOST_SYMBOL_EXPORT\r
+#endif\r
+//\r
+// ABI fixing headers:\r
+//\r
+#ifndef BOOST_ABI_PREFIX\r
+# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"\r
+#endif\r
+#ifndef BOOST_ABI_SUFFIX\r
+# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"\r
+#endif\r
+//\r
+// Disable Win32 support in ANSI mode:\r
+//\r
+# pragma defineonoption BOOST_DISABLE_WIN32 -A\r
+//\r
+// MSVC compatibility mode does some nasty things:\r
+// TODO: look up if this doesn't apply to the whole 12xx range\r
+//\r
+#if defined(_MSC_VER) && (_MSC_VER <= 1200)\r
+# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP\r
+# define BOOST_NO_VOID_RETURNS\r
+#endif\r
+\r
+#define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__)\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001. \r
+// (C) Copyright Douglas Gregor 2001. \r
+// (C) Copyright Peter Dimov 2001. \r
+// (C) Copyright Aleksey Gurtovoy 2003. \r
+// (C) Copyright Beman Dawes 2003. \r
+// (C) Copyright Jens Maurer 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Comeau C++ compiler setup:\r
+\r
+#include "boost/config/compiler/common_edg.hpp"\r
+\r
+#if (__COMO_VERSION__ <= 4245)\r
+\r
+# if defined(_MSC_VER) && _MSC_VER <= 1300\r
+# if _MSC_VER > 100\r
+ // only set this in non-strict mode:\r
+# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP\r
+# endif\r
+# endif\r
+\r
+// Void returns don't work when emulating VC 6 (Peter Dimov)\r
+// TODO: look up if this doesn't apply to the whole 12xx range\r
+# if defined(_MSC_VER) && (_MSC_VER < 1300)\r
+# define BOOST_NO_VOID_RETURNS\r
+# endif\r
+\r
+#endif // version 4245\r
+\r
+//\r
+// enable __int64 support in VC emulation mode\r
+//\r
+# if defined(_MSC_VER) && (_MSC_VER >= 1200)\r
+# define BOOST_HAS_MS_INT64\r
+# endif\r
+\r
+#define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__)\r
+\r
+//\r
+// versions check:\r
+// we don't know Comeau prior to version 4245:\r
+#if __COMO_VERSION__ < 4245\r
+# error "Compiler not configured - please reconfigure"\r
+#endif\r
+//\r
+// last known and checked version is 4245:\r
+#if (__COMO_VERSION__ > 4245)\r
+# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown compiler version - please run the configure tests and report the results"\r
+# endif\r
+#endif\r
+\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2002. \r
+// (C) Copyright Jens Maurer 2001. \r
+// (C) Copyright David Abrahams 2002. \r
+// (C) Copyright Aleksey Gurtovoy 2002. \r
+// (C) Copyright Markus Schoepflin 2005.\r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+//\r
+// Options common to all edg based compilers.\r
+//\r
+// This is included from within the individual compiler mini-configs.\r
+\r
+#ifndef __EDG_VERSION__\r
+# error This file requires that __EDG_VERSION__ be defined.\r
+#endif\r
+\r
+#if (__EDG_VERSION__ <= 238)\r
+# define BOOST_NO_INTEGRAL_INT64_T\r
+# define BOOST_NO_SFINAE\r
+#endif\r
+\r
+#if (__EDG_VERSION__ <= 240)\r
+# define BOOST_NO_VOID_RETURNS\r
+#endif\r
+\r
+#if (__EDG_VERSION__ <= 241) && !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)\r
+# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP\r
+#endif\r
+\r
+#if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES)\r
+# define BOOST_NO_TEMPLATE_TEMPLATES\r
+#endif \r
+\r
+#if (__EDG_VERSION__ < 300) && !defined(BOOST_NO_IS_ABSTRACT)\r
+# define BOOST_NO_IS_ABSTRACT\r
+#endif \r
+\r
+#if (__EDG_VERSION__ <= 303) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)\r
+# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL\r
+#endif \r
+\r
+// See also kai.hpp which checks a Kai-specific symbol for EH\r
+# if !defined(__KCC) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)\r
+# define BOOST_NO_EXCEPTIONS\r
+# endif\r
+\r
+# if !defined(__NO_LONG_LONG)\r
+# define BOOST_HAS_LONG_LONG\r
+# else\r
+# define BOOST_NO_LONG_LONG\r
+# endif\r
+\r
+//\r
+// C++0x features\r
+//\r
+// See above for BOOST_NO_LONG_LONG\r
+//\r
+#if (__EDG_VERSION__ < 310)\r
+# define BOOST_NO_EXTERN_TEMPLATE\r
+#endif\r
+#if (__EDG_VERSION__ <= 310)\r
+// No support for initializer lists\r
+# define BOOST_NO_INITIALIZER_LISTS\r
+#endif\r
+#if (__EDG_VERSION__ < 400)\r
+# define BOOST_NO_VARIADIC_MACROS\r
+#endif\r
+\r
+#define BOOST_NO_AUTO_DECLARATIONS\r
+#define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#define BOOST_NO_CHAR16_T\r
+#define BOOST_NO_CHAR32_T\r
+#define BOOST_NO_CONCEPTS\r
+#define BOOST_NO_CONSTEXPR\r
+#define BOOST_NO_DECLTYPE\r
+#define BOOST_NO_DEFAULTED_FUNCTIONS\r
+#define BOOST_NO_DELETED_FUNCTIONS\r
+#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
+#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
+#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NULLPTR\r
+#define BOOST_NO_RAW_LITERALS\r
+#define BOOST_NO_RVALUE_REFERENCES\r
+#define BOOST_NO_SCOPED_ENUMS\r
+#define BOOST_NO_SFINAE_EXPR\r
+#define BOOST_NO_STATIC_ASSERT\r
+#define BOOST_NO_TEMPLATE_ALIASES\r
+#define BOOST_NO_UNICODE_LITERALS\r
+#define BOOST_NO_VARIADIC_TEMPLATES\r
+\r
+#ifdef c_plusplus\r
+// EDG has "long long" in non-strict mode\r
+// However, some libraries have insufficient "long long" support\r
+// #define BOOST_HAS_LONG_LONG\r
+#endif\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Tru64 C++ compiler setup (now HP):\r
+\r
+#define BOOST_COMPILER "HP Tru64 C++ " BOOST_STRINGIZE(__DECCXX_VER)\r
+\r
+#include "boost/config/compiler/common_edg.hpp"\r
+\r
+//\r
+// versions check:\r
+// Nothing to do here?\r
+\r
+\r
+\r
--- /dev/null
+// Copyright (C) Christof Meerwald 2003\r
+// Copyright (C) Dan Watkins 2003\r
+//\r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// Digital Mars C++ compiler setup:\r
+#define BOOST_COMPILER __DMC_VERSION_STRING__\r
+\r
+#define BOOST_HAS_LONG_LONG\r
+#define BOOST_HAS_PRAGMA_ONCE\r
+\r
+#if (__DMC__ <= 0x833)\r
+#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL\r
+#define BOOST_NO_TEMPLATE_TEMPLATES\r
+#define BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING\r
+#define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS\r
+#define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS\r
+#endif\r
+#if (__DMC__ <= 0x840) || !defined(BOOST_STRICT_CONFIG)\r
+#define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS\r
+#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS\r
+#define BOOST_NO_OPERATORS_IN_NAMESPACE\r
+#define BOOST_NO_UNREACHABLE_RETURN_DETECTION\r
+#define BOOST_NO_SFINAE\r
+#define BOOST_NO_USING_TEMPLATE\r
+#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL\r
+#endif\r
+\r
+//\r
+// has macros:\r
+#if (__DMC__ >= 0x840)\r
+#define BOOST_HAS_DIRENT_H\r
+#define BOOST_HAS_STDINT_H\r
+#define BOOST_HAS_WINTHREADS\r
+#endif\r
+\r
+#if (__DMC__ >= 0x847)\r
+#define BOOST_HAS_EXPM1\r
+#define BOOST_HAS_LOG1P\r
+#endif\r
+\r
+//\r
+// Is this really the best way to detect whether the std lib is in namespace std?\r
+//\r
+#include <cstddef>\r
+#if !defined(__STL_IMPORT_VENDOR_CSTD) && !defined(_STLP_IMPORT_VENDOR_CSTD)\r
+# define BOOST_NO_STDC_NAMESPACE\r
+#endif\r
+\r
+\r
+// check for exception handling support:\r
+#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)\r
+# define BOOST_NO_EXCEPTIONS\r
+#endif\r
+\r
+//\r
+// C++0x features\r
+//\r
+#define BOOST_NO_AUTO_DECLARATIONS\r
+#define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#define BOOST_NO_CHAR16_T\r
+#define BOOST_NO_CHAR32_T\r
+#define BOOST_NO_CONCEPTS\r
+#define BOOST_NO_CONSTEXPR\r
+#define BOOST_NO_DECLTYPE\r
+#define BOOST_NO_DEFAULTED_FUNCTIONS\r
+#define BOOST_NO_DELETED_FUNCTIONS\r
+#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
+#define BOOST_NO_EXTERN_TEMPLATE\r
+#define BOOST_NO_INITIALIZER_LISTS\r
+#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NULLPTR\r
+#define BOOST_NO_RAW_LITERALS\r
+#define BOOST_NO_RVALUE_REFERENCES\r
+#define BOOST_NO_SCOPED_ENUMS\r
+#define BOOST_NO_SFINAE_EXPR\r
+#define BOOST_NO_STATIC_ASSERT\r
+#define BOOST_NO_TEMPLATE_ALIASES\r
+#define BOOST_NO_UNICODE_LITERALS\r
+#define BOOST_NO_VARIADIC_TEMPLATES\r
+#if (__DMC__ < 0x812)\r
+#define BOOST_NO_VARIADIC_MACROS\r
+#endif\r
+\r
+#if __DMC__ < 0x800\r
+#error "Compiler not supported or configured - please reconfigure"\r
+#endif\r
+//\r
+// last known and checked version is ...:\r
+#if (__DMC__ > 0x848)\r
+# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown compiler version - please run the configure tests and report the results"\r
+# endif\r
+#endif\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Darin Adler 2001 - 2002. \r
+// (C) Copyright Jens Maurer 2001 - 2002. \r
+// (C) Copyright Beman Dawes 2001 - 2003. \r
+// (C) Copyright Douglas Gregor 2002. \r
+// (C) Copyright David Abrahams 2002 - 2003. \r
+// (C) Copyright Synge Todo 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// GNU C++ compiler setup:\r
+\r
+#if __GNUC__ < 3\r
+# if __GNUC_MINOR__ == 91\r
+ // egcs 1.1 won't parse shared_ptr.hpp without this:\r
+# define BOOST_NO_AUTO_PTR\r
+# endif\r
+# if __GNUC_MINOR__ < 95\r
+ //\r
+ // Prior to gcc 2.95 member templates only partly\r
+ // work - define BOOST_MSVC6_MEMBER_TEMPLATES\r
+ // instead since inline member templates mostly work.\r
+ //\r
+# define BOOST_NO_MEMBER_TEMPLATES\r
+# if __GNUC_MINOR__ >= 9\r
+# define BOOST_MSVC6_MEMBER_TEMPLATES\r
+# endif\r
+# endif\r
+\r
+# if __GNUC_MINOR__ < 96\r
+# define BOOST_NO_SFINAE\r
+# endif\r
+\r
+# if __GNUC_MINOR__ <= 97\r
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS\r
+# define BOOST_NO_OPERATORS_IN_NAMESPACE\r
+# endif\r
+\r
+# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE\r
+# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL\r
+# define BOOST_NO_IS_ABSTRACT\r
+# define BOOST_NO_EXTERN_TEMPLATE\r
+// Variadic macros do not exist for gcc versions before 3.0\r
+# define BOOST_NO_VARIADIC_MACROS\r
+#elif __GNUC__ == 3\r
+# if defined (__PATHSCALE__)\r
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+# define BOOST_NO_IS_ABSTRACT\r
+# endif\r
+ //\r
+ // gcc-3.x problems:\r
+ //\r
+ // Bug specific to gcc 3.1 and 3.2:\r
+ //\r
+# if ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2))\r
+# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS\r
+# endif\r
+# if __GNUC_MINOR__ < 4\r
+# define BOOST_NO_IS_ABSTRACT\r
+# endif\r
+# define BOOST_NO_EXTERN_TEMPLATE\r
+#endif\r
+#if __GNUC__ < 4\r
+//\r
+// All problems to gcc-3.x and earlier here:\r
+//\r
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+# ifdef __OPEN64__\r
+# define BOOST_NO_IS_ABSTRACT\r
+# endif\r
+#endif\r
+\r
+#if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 )\r
+// Previous versions of GCC did not completely implement value-initialization:\r
+// GCC Bug 30111, "Value-initialization of POD base class doesn't initialize\r
+// members", reported by Jonathan Wakely in 2006,\r
+// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4)\r
+// GCC Bug 33916, "Default constructor fails to initialize array members",\r
+// reported by Michael Elizabeth Chastain in 2007,\r
+// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4)\r
+// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues\r
+#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION\r
+#endif\r
+\r
+#if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)\r
+# define BOOST_NO_EXCEPTIONS\r
+#endif\r
+\r
+\r
+//\r
+// Threading support: Turn this on unconditionally here (except for\r
+// those platforms where we can know for sure). It will get turned off again\r
+// later if no threading API is detected.\r
+//\r
+#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__)\r
+# define BOOST_HAS_THREADS\r
+#endif \r
+\r
+//\r
+// gcc has "long long"\r
+//\r
+#define BOOST_HAS_LONG_LONG\r
+\r
+//\r
+// gcc implements the named return value optimization since version 3.1\r
+//\r
+#if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 )\r
+#define BOOST_HAS_NRVO\r
+#endif\r
+\r
+//\r
+// Dynamic shared object (DSO) and dynamic-link library (DLL) support\r
+//\r
+#if __GNUC__ >= 4\r
+# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__)\r
+ // All Win32 development environments, including 64-bit Windows and MinGW, define \r
+ // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment,\r
+ // so does not define _WIN32 or its variants.\r
+# define BOOST_HAS_DECLSPEC\r
+# define BOOST_SYMBOL_EXPORT __attribute__((dllexport))\r
+# define BOOST_SYMBOL_IMPORT __attribute__((dllimport))\r
+# else\r
+# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default")))\r
+# define BOOST_SYMBOL_IMPORT\r
+# endif\r
+# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))\r
+#else\r
+// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined \r
+# define BOOST_SYMBOL_EXPORT\r
+#endif\r
+\r
+//\r
+// RTTI and typeinfo detection is possible post gcc-4.3:\r
+//\r
+#if __GNUC__ * 100 + __GNUC_MINOR__ >= 403\r
+# ifndef __GXX_RTTI\r
+# ifndef BOOST_NO_TYPEID\r
+# define BOOST_NO_TYPEID\r
+# endif\r
+# ifndef BOOST_NO_RTTI\r
+# define BOOST_NO_RTTI\r
+# endif\r
+# endif\r
+#endif\r
+\r
+// C++0x features not implemented in any GCC version\r
+//\r
+#define BOOST_NO_TEMPLATE_ALIASES\r
+\r
+// C++0x features in 4.3.n and later\r
+//\r
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__)\r
+// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are\r
+// passed on the command line, which in turn defines\r
+// __GXX_EXPERIMENTAL_CXX0X__.\r
+# define BOOST_HAS_DECLTYPE\r
+# define BOOST_HAS_RVALUE_REFS\r
+# define BOOST_HAS_STATIC_ASSERT\r
+# define BOOST_HAS_VARIADIC_TMPL\r
+#else\r
+# define BOOST_NO_DECLTYPE\r
+# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
+# define BOOST_NO_RVALUE_REFERENCES\r
+# define BOOST_NO_STATIC_ASSERT\r
+\r
+// Variadic templates compiler: \r
+// http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html\r
+# ifdef __VARIADIC_TEMPLATES\r
+# define BOOST_HAS_VARIADIC_TMPL\r
+# else\r
+# define BOOST_NO_VARIADIC_TEMPLATES\r
+# endif\r
+#endif\r
+\r
+// C++0x features in 4.4.n and later\r
+//\r
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)\r
+# define BOOST_NO_AUTO_DECLARATIONS\r
+# define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+# define BOOST_NO_CHAR16_T\r
+# define BOOST_NO_CHAR32_T\r
+# define BOOST_NO_DEFAULTED_FUNCTIONS\r
+# define BOOST_NO_DELETED_FUNCTIONS\r
+# define BOOST_NO_INITIALIZER_LISTS\r
+# define BOOST_NO_SCOPED_ENUMS \r
+#endif\r
+\r
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)\r
+# define BOOST_NO_SFINAE_EXPR\r
+#endif\r
+\r
+// C++0x features in 4.4.1 and later\r
+//\r
+#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40401) || !defined(__GXX_EXPERIMENTAL_CXX0X__)\r
+// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_SCOPED_ENUMS before 4.4.1\r
+// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064\r
+# define BOOST_NO_SCOPED_ENUMS\r
+#endif\r
+\r
+// C++0x features in 4.5.n and later\r
+//\r
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)\r
+# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
+# define BOOST_NO_LAMBDAS\r
+# define BOOST_NO_RAW_LITERALS\r
+# define BOOST_NO_UNICODE_LITERALS\r
+#endif\r
+\r
+// C++0x features in 4.5.n and later\r
+//\r
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)\r
+#define BOOST_NO_CONSTEXPR\r
+#define BOOST_NO_NULLPTR\r
+#endif\r
+\r
+// ConceptGCC compiler:\r
+// http://www.generic-programming.org/software/ConceptGCC/\r
+#ifdef __GXX_CONCEPTS__\r
+# define BOOST_HAS_CONCEPTS\r
+# define BOOST_COMPILER "ConceptGCC version " __VERSION__\r
+#else\r
+# define BOOST_NO_CONCEPTS\r
+#endif\r
+\r
+#ifndef BOOST_COMPILER\r
+# define BOOST_COMPILER "GNU C++ version " __VERSION__\r
+#endif\r
+\r
+//\r
+// versions check:\r
+// we don't know gcc prior to version 2.90:\r
+#if (__GNUC__ == 2) && (__GNUC_MINOR__ < 90)\r
+# error "Compiler not configured - please reconfigure"\r
+#endif\r
+//\r
+// last known and checked version is 4.6 (Pre-release):\r
+#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6))\r
+# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown compiler version - please run the configure tests and report the results"\r
+# else\r
+// we don't emit warnings here anymore since there are no defect macros defined for\r
+// gcc post 3.4, so any failures are gcc regressions...\r
+//# warning "Unknown compiler version - please run the configure tests and report the results"\r
+# endif\r
+#endif\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2006. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// GCC-XML C++ compiler setup:\r
+\r
+# if !defined(__GCCXML_GNUC__) || ((__GCCXML_GNUC__ <= 3) && (__GCCXML_GNUC_MINOR__ <= 3))\r
+# define BOOST_NO_IS_ABSTRACT\r
+# endif\r
+\r
+//\r
+// Threading support: Turn this on unconditionally here (except for\r
+// those platforms where we can know for sure). It will get turned off again\r
+// later if no threading API is detected.\r
+//\r
+#if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(linux) && !defined(__linux) && !defined(__linux__)\r
+# define BOOST_HAS_THREADS\r
+#endif \r
+\r
+//\r
+// gcc has "long long"\r
+//\r
+#define BOOST_HAS_LONG_LONG\r
+\r
+// C++0x features:\r
+//\r
+# define BOOST_NO_CONSTEXPR\r
+# define BOOST_NO_NULLPTR\r
+# define BOOST_NO_TEMPLATE_ALIASES\r
+# define BOOST_NO_DECLTYPE\r
+# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
+# define BOOST_NO_RVALUE_REFERENCES\r
+# define BOOST_NO_STATIC_ASSERT\r
+# define BOOST_NO_VARIADIC_TEMPLATES\r
+# define BOOST_NO_VARIADIC_MACROS\r
+# define BOOST_NO_AUTO_DECLARATIONS\r
+# define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+# define BOOST_NO_CHAR16_T\r
+# define BOOST_NO_CHAR32_T\r
+# define BOOST_NO_DEFAULTED_FUNCTIONS\r
+# define BOOST_NO_DELETED_FUNCTIONS\r
+# define BOOST_NO_INITIALIZER_LISTS\r
+# define BOOST_NO_SCOPED_ENUMS \r
+# define BOOST_NO_SFINAE_EXPR\r
+# define BOOST_NO_SCOPED_ENUMS\r
+# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
+# define BOOST_NO_LAMBDAS\r
+# define BOOST_NO_RAW_LITERALS\r
+# define BOOST_NO_UNICODE_LITERALS\r
+\r
+#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Greenhills C++ compiler setup:\r
+\r
+#define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs)\r
+\r
+#include "boost/config/compiler/common_edg.hpp"\r
+\r
+//\r
+// versions check:\r
+// we don't support Greenhills prior to version 0:\r
+#if __ghs < 0\r
+# error "Compiler not supported or configured - please reconfigure"\r
+#endif\r
+//\r
+// last known and checked version is 0:\r
+#if (__ghs > 0)\r
+# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown compiler version - please run the configure tests and report the results"\r
+# endif\r
+#endif\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Jens Maurer 2001 - 2003. \r
+// (C) Copyright Aleksey Gurtovoy 2002. \r
+// (C) Copyright David Abrahams 2002 - 2003. \r
+// (C) Copyright Toon Knapen 2003. \r
+// (C) Copyright Boris Gubenko 2006 - 2007.\r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// HP aCC C++ compiler setup:\r
+\r
+#if defined(__EDG__)\r
+#include "boost/config/compiler/common_edg.hpp"\r
+#endif\r
+\r
+#if (__HP_aCC <= 33100)\r
+# define BOOST_NO_INTEGRAL_INT64_T\r
+# define BOOST_NO_OPERATORS_IN_NAMESPACE\r
+# if !defined(_NAMESPACE_STD)\r
+# define BOOST_NO_STD_LOCALE\r
+# define BOOST_NO_STRINGSTREAM\r
+# endif\r
+#endif\r
+\r
+#if (__HP_aCC <= 33300)\r
+// member templates are sufficiently broken that we disable them for now\r
+# define BOOST_NO_MEMBER_TEMPLATES\r
+# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS\r
+# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE\r
+#endif\r
+\r
+#if (__HP_aCC <= 38000)\r
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+#endif\r
+\r
+#if (__HP_aCC > 50000) && (__HP_aCC < 60000)\r
+# define BOOST_NO_UNREACHABLE_RETURN_DETECTION\r
+# define BOOST_NO_TEMPLATE_TEMPLATES\r
+# define BOOST_NO_SWPRINTF\r
+# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS\r
+# define BOOST_NO_IS_ABSTRACT\r
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS\r
+#endif \r
+\r
+// optional features rather than defects:\r
+#if (__HP_aCC >= 33900)\r
+# define BOOST_HAS_LONG_LONG\r
+# define BOOST_HAS_PARTIAL_STD_ALLOCATOR\r
+#endif\r
+\r
+#if (__HP_aCC >= 50000 ) && (__HP_aCC <= 53800 ) || (__HP_aCC < 31300 )\r
+# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD\r
+#endif\r
+\r
+// This macro should not be defined when compiling in strict ansi\r
+// mode, but, currently, we don't have the ability to determine\r
+// what standard mode we are compiling with. Some future version\r
+// of aCC6 compiler will provide predefined macros reflecting the\r
+// compilation options, including the standard mode.\r
+#if (__HP_aCC >= 60000) || ((__HP_aCC > 38000) && defined(__hpxstd98))\r
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+#endif\r
+\r
+#define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC)\r
+\r
+//\r
+// versions check:\r
+// we don't support HP aCC prior to version 33000:\r
+#if __HP_aCC < 33000\r
+# error "Compiler not supported or configured - please reconfigure"\r
+#endif\r
+\r
+//\r
+// Extended checks for supporting aCC on PA-RISC\r
+#if __HP_aCC > 30000 && __HP_aCC < 50000\r
+# if __HP_aCC < 38000\r
+ // versions prior to version A.03.80 not supported\r
+# error "Compiler version not supported - version A.03.80 or higher is required"\r
+# elif !defined(__hpxstd98)\r
+ // must compile using the option +hpxstd98 with version A.03.80 and above\r
+# error "Compiler option '+hpxstd98' is required for proper support"\r
+# endif //PA-RISC\r
+#endif\r
+\r
+//\r
+// C++0x features\r
+//\r
+// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG\r
+//\r
+#if !defined(__EDG__)\r
+\r
+#define BOOST_NO_AUTO_DECLARATIONS\r
+#define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#define BOOST_NO_CHAR16_T\r
+#define BOOST_NO_CHAR32_T\r
+#define BOOST_NO_CONCEPTS\r
+#define BOOST_NO_CONSTEXPR\r
+#define BOOST_NO_DECLTYPE\r
+#define BOOST_NO_DEFAULTED_FUNCTIONS\r
+#define BOOST_NO_DELETED_FUNCTIONS\r
+#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
+#define BOOST_NO_EXTERN_TEMPLATE\r
+#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
+#define BOOST_NO_INITIALIZER_LISTS\r
+#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NULLPTR\r
+#define BOOST_NO_RAW_LITERALS\r
+#define BOOST_NO_RVALUE_REFERENCES\r
+#define BOOST_NO_SCOPED_ENUMS\r
+#define BOOST_NO_SFINAE_EXPR\r
+#define BOOST_NO_STATIC_ASSERT\r
+#define BOOST_NO_TEMPLATE_ALIASES\r
+#define BOOST_NO_UNICODE_LITERALS\r
+#define BOOST_NO_VARIADIC_TEMPLATES\r
+\r
+/* \r
+ See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and\r
+ https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443436\r
+*/\r
+\r
+#if (__HP_aCC < 62500) || !defined(HP_CXX0x_SOURCE)\r
+ #define BOOST_NO_VARIADIC_MACROS\r
+#endif\r
+\r
+#endif\r
+\r
+//\r
+// last known and checked version for HP-UX/ia64 is 61300\r
+// last known and checked version for PA-RISC is 38000\r
+#if ((__HP_aCC > 61300) || ((__HP_aCC > 38000) && defined(__hpxstd98)))\r
+# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown compiler version - please run the configure tests and report the results"\r
+# endif\r
+#endif\r
--- /dev/null
+// (C) Copyright John Maddock 2001-8.\r
+// (C) Copyright Peter Dimov 2001.\r
+// (C) Copyright Jens Maurer 2001.\r
+// (C) Copyright David Abrahams 2002 - 2003.\r
+// (C) Copyright Aleksey Gurtovoy 2002 - 2003.\r
+// (C) Copyright Guillaume Melquiond 2002 - 2003.\r
+// (C) Copyright Beman Dawes 2003.\r
+// (C) Copyright Martin Wille 2003.\r
+// Use, modification and distribution are subject to the\r
+// Boost Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Intel compiler setup:\r
+\r
+#include "boost/config/compiler/common_edg.hpp"\r
+\r
+#if defined(__INTEL_COMPILER)\r
+# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER\r
+#elif defined(__ICL)\r
+# define BOOST_INTEL_CXX_VERSION __ICL\r
+#elif defined(__ICC)\r
+# define BOOST_INTEL_CXX_VERSION __ICC\r
+#elif defined(__ECC)\r
+# define BOOST_INTEL_CXX_VERSION __ECC\r
+#endif\r
+\r
+// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x'\r
+#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && __STDC_HOSTED__) || defined(__GXX_EXPERIMENTAL_CPP0X__)\r
+# define BOOST_INTEL_STDCXX0X\r
+#endif\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1600)\r
+# define BOOST_INTEL_STDCXX0X\r
+#endif\r
+\r
+#ifdef BOOST_INTEL_STDCXX0X\r
+#define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)\r
+#else\r
+#define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)\r
+#endif\r
+#define BOOST_INTEL BOOST_INTEL_CXX_VERSION\r
+\r
+#if defined(_WIN32) || defined(_WIN64)\r
+# define BOOST_INTEL_WIN BOOST_INTEL\r
+#else\r
+# define BOOST_INTEL_LINUX BOOST_INTEL\r
+#endif\r
+\r
+#if (BOOST_INTEL_CXX_VERSION <= 500) && defined(_MSC_VER)\r
+# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS\r
+# define BOOST_NO_TEMPLATE_TEMPLATES\r
+#endif\r
+\r
+#if (BOOST_INTEL_CXX_VERSION <= 600)\r
+\r
+# if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov)\r
+\r
+// Boost libraries assume strong standard conformance unless otherwise\r
+// indicated by a config macro. As configured by Intel, the EDG front-end\r
+// requires certain compiler options be set to achieve that strong conformance.\r
+// Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt)\r
+// and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for\r
+// details as they apply to particular versions of the compiler. When the\r
+// compiler does not predefine a macro indicating if an option has been set,\r
+// this config file simply assumes the option has been set.\r
+// Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if\r
+// the compiler option is not enabled.\r
+\r
+# define BOOST_NO_SWPRINTF\r
+# endif\r
+\r
+// Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov)\r
+\r
+# if defined(_MSC_VER) && (_MSC_VER <= 1200)\r
+# define BOOST_NO_VOID_RETURNS\r
+# define BOOST_NO_INTEGRAL_INT64_T\r
+# endif\r
+\r
+#endif\r
+\r
+#if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32)\r
+# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS\r
+#endif\r
+\r
+// See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864\r
+#if BOOST_INTEL_CXX_VERSION < 600\r
+# define BOOST_NO_INTRINSIC_WCHAR_T\r
+#else\r
+// We should test the macro _WCHAR_T_DEFINED to check if the compiler\r
+// supports wchar_t natively. *BUT* there is a problem here: the standard\r
+// headers define this macro if they typedef wchar_t. Anyway, we're lucky\r
+// because they define it without a value, while Intel C++ defines it\r
+// to 1. So we can check its value to see if the macro was defined natively\r
+// or not.\r
+// Under UNIX, the situation is exactly the same, but the macro _WCHAR_T\r
+// is used instead.\r
+# if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0)\r
+# define BOOST_NO_INTRINSIC_WCHAR_T\r
+# endif\r
+#endif\r
+\r
+#if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)\r
+//\r
+// Figure out when Intel is emulating this gcc bug\r
+// (All Intel versions prior to 9.0.26, and versions\r
+// later than that if they are set up to emulate gcc 3.2\r
+// or earlier):\r
+//\r
+# if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912)\r
+# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL\r
+# endif\r
+#endif\r
+#if (defined(__GNUC__) && (__GNUC__ < 4)) || defined(_WIN32) || (BOOST_INTEL_CXX_VERSION <= 1200)\r
+// GCC or VC emulation:\r
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+#endif\r
+//\r
+// Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T\r
+// set correctly, if we don't do this now, we will get errors later\r
+// in type_traits code among other things, getting this correct\r
+// for the Intel compiler is actually remarkably fragile and tricky:\r
+//\r
+#if defined(BOOST_NO_INTRINSIC_WCHAR_T)\r
+#include <cwchar>\r
+template< typename T > struct assert_no_intrinsic_wchar_t;\r
+template<> struct assert_no_intrinsic_wchar_t<wchar_t> { typedef void type; };\r
+// if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T\r
+// where it is defined above:\r
+typedef assert_no_intrinsic_wchar_t<unsigned short>::type assert_no_intrinsic_wchar_t_;\r
+#else\r
+template< typename T > struct assert_intrinsic_wchar_t;\r
+template<> struct assert_intrinsic_wchar_t<wchar_t> {};\r
+// if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line:\r
+template<> struct assert_intrinsic_wchar_t<unsigned short> {};\r
+#endif\r
+\r
+#if _MSC_VER+0 >= 1000\r
+# if _MSC_VER >= 1200\r
+# define BOOST_HAS_MS_INT64\r
+# endif\r
+# define BOOST_NO_SWPRINTF\r
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+#elif defined(_WIN32)\r
+# define BOOST_DISABLE_WIN32\r
+#endif\r
+\r
+// I checked version 6.0 build 020312Z, it implements the NRVO.\r
+// Correct this as you find out which version of the compiler\r
+// implemented the NRVO first. (Daniel Frey)\r
+#if (BOOST_INTEL_CXX_VERSION >= 600)\r
+# define BOOST_HAS_NRVO\r
+#endif\r
+\r
+//\r
+// versions check:\r
+// we don't support Intel prior to version 5.0:\r
+#if BOOST_INTEL_CXX_VERSION < 500\r
+# error "Compiler not supported or configured - please reconfigure"\r
+#endif\r
+\r
+// Intel on MacOS requires\r
+#if defined(__APPLE__) && defined(__INTEL_COMPILER)\r
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+#endif\r
+\r
+// Intel on Altix Itanium\r
+#if defined(__itanium__) && defined(__INTEL_COMPILER)\r
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+#endif\r
+\r
+//\r
+// An attempt to value-initialize a pointer-to-member may trigger an\r
+// internal error on Intel <= 11.1 (last checked version), as was \r
+// reported by John Maddock, Intel support issue 589832, May 2010.\r
+// Moreover, according to test results from Huang-Vista-x86_32_intel,\r
+// intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some \r
+// cases when it should be value-initialized.\r
+// (Niels Dekker, LKEB, May 2010)\r
+#if defined(__INTEL_COMPILER)\r
+# if __INTEL_COMPILER <= 1110\r
+# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION\r
+# endif\r
+#endif\r
+\r
+//\r
+// Dynamic shared object (DSO) and dynamic-link library (DLL) support\r
+//\r
+#if defined(__GNUC__) && (__GNUC__ >= 4)\r
+# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default")))\r
+# define BOOST_SYMBOL_IMPORT\r
+# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))\r
+#endif\r
+//\r
+// C++0x features\r
+// - ICC added static_assert in 11.0 (first version with C++0x support)\r
+//\r
+#if defined(BOOST_INTEL_STDCXX0X)\r
+# undef BOOST_NO_STATIC_ASSERT\r
+//\r
+// These pass our test cases, but aren't officially supported according to:\r
+// http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/\r
+//\r
+//# undef BOOST_NO_LAMBDAS\r
+//# undef BOOST_NO_DECLTYPE\r
+//# undef BOOST_NO_AUTO_DECLARATIONS\r
+//# undef BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#endif\r
+\r
+#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1200)\r
+# undef BOOST_NO_RVALUE_REFERENCES\r
+# undef BOOST_NO_SCOPED_ENUMS\r
+# undef BOOST_NO_DELETED_FUNCTIONS\r
+# undef BOOST_NO_DEFAULTED_FUNCTIONS\r
+# undef BOOST_NO_LAMBDAS\r
+# undef BOOST_NO_DECLTYPE\r
+# undef BOOST_NO_AUTO_DECLARATIONS\r
+# undef BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#endif\r
+\r
+//\r
+// last known and checked version:\r
+#if (BOOST_INTEL_CXX_VERSION > 1110)\r
+# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown compiler version - please run the configure tests and report the results"\r
+# elif defined(_MSC_VER)\r
+//\r
+// We don't emit this warning any more, since we have so few\r
+// defect macros set anyway (just the one).\r
+//\r
+//# pragma message("Unknown compiler version - please run the configure tests and report the results")\r
+# endif\r
+#endif\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001. \r
+// (C) Copyright David Abrahams 2002. \r
+// (C) Copyright Aleksey Gurtovoy 2002. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Kai C++ compiler setup:\r
+\r
+#include "boost/config/compiler/common_edg.hpp"\r
+\r
+# if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG)\r
+ // at least on Sun, the contents of <cwchar> is not in namespace std\r
+# define BOOST_NO_STDC_NAMESPACE\r
+# endif\r
+\r
+// see also common_edg.hpp which needs a special check for __KCC\r
+# if !defined(_EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)\r
+# define BOOST_NO_EXCEPTIONS\r
+# endif\r
+\r
+//\r
+// last known and checked version is 4001:\r
+#if (__KCC_VERSION > 4001)\r
+# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown compiler version - please run the configure tests and report the results"\r
+# endif\r
+#endif\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001. \r
+// (C) Copyright Darin Adler 2001. \r
+// (C) Copyright Peter Dimov 2001. \r
+// (C) Copyright David Abrahams 2001 - 2002. \r
+// (C) Copyright Beman Dawes 2001 - 2003. \r
+// (C) Copyright Stefan Slapeta 2004. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Metrowerks C++ compiler setup:\r
+\r
+// locale support is disabled when linking with the dynamic runtime\r
+# ifdef _MSL_NO_LOCALE\r
+# define BOOST_NO_STD_LOCALE\r
+# endif \r
+\r
+# if __MWERKS__ <= 0x2301 // 5.3\r
+# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING\r
+# define BOOST_NO_POINTER_TO_MEMBER_CONST\r
+# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS\r
+# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD\r
+# endif\r
+\r
+# if __MWERKS__ <= 0x2401 // 6.2\r
+//# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING\r
+# endif\r
+\r
+# if(__MWERKS__ <= 0x2407) // 7.x\r
+# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS\r
+# define BOOST_NO_UNREACHABLE_RETURN_DETECTION\r
+# endif\r
+\r
+# if(__MWERKS__ <= 0x3003) // 8.x\r
+# define BOOST_NO_SFINAE\r
+# endif\r
+\r
+// the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last\r
+// tested version *only*:\r
+# if(__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6\r
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS\r
+# define BOOST_NO_IS_ABSTRACT\r
+# endif\r
+\r
+#if !__option(wchar_type)\r
+# define BOOST_NO_INTRINSIC_WCHAR_T\r
+#endif\r
+\r
+#if !__option(exceptions) && !defined(BOOST_NO_EXCEPTIONS)\r
+# define BOOST_NO_EXCEPTIONS\r
+#endif\r
+\r
+#if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh)\r
+# if __MWERKS__ == 0x3000\r
+# define BOOST_COMPILER_VERSION 8.0\r
+# elif __MWERKS__ == 0x3001\r
+# define BOOST_COMPILER_VERSION 8.1\r
+# elif __MWERKS__ == 0x3002\r
+# define BOOST_COMPILER_VERSION 8.2\r
+# elif __MWERKS__ == 0x3003\r
+# define BOOST_COMPILER_VERSION 8.3\r
+# elif __MWERKS__ == 0x3200\r
+# define BOOST_COMPILER_VERSION 9.0\r
+# elif __MWERKS__ == 0x3201\r
+# define BOOST_COMPILER_VERSION 9.1\r
+# elif __MWERKS__ == 0x3202\r
+# define BOOST_COMPILER_VERSION 9.2\r
+# elif __MWERKS__ == 0x3204\r
+# define BOOST_COMPILER_VERSION 9.3\r
+# elif __MWERKS__ == 0x3205\r
+# define BOOST_COMPILER_VERSION 9.4\r
+# elif __MWERKS__ == 0x3206\r
+# define BOOST_COMPILER_VERSION 9.5\r
+# elif __MWERKS__ == 0x3207\r
+# define BOOST_COMPILER_VERSION 9.6\r
+# else\r
+# define BOOST_COMPILER_VERSION __MWERKS__\r
+# endif\r
+#else\r
+# define BOOST_COMPILER_VERSION __MWERKS__\r
+#endif\r
+\r
+//\r
+// C++0x features\r
+//\r
+// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG\r
+//\r
+#if __MWERKS__ > 0x3206 && __option(rvalue_refs)\r
+# define BOOST_HAS_RVALUE_REFS\r
+#else\r
+# define BOOST_NO_RVALUE_REFERENCES \r
+#endif\r
+#define BOOST_NO_AUTO_DECLARATIONS\r
+#define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#define BOOST_NO_CHAR16_T\r
+#define BOOST_NO_CHAR32_T\r
+#define BOOST_NO_CONCEPTS\r
+#define BOOST_NO_CONSTEXPR\r
+#define BOOST_NO_DECLTYPE\r
+#define BOOST_NO_DEFAULTED_FUNCTIONS\r
+#define BOOST_NO_DELETED_FUNCTIONS\r
+#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
+#define BOOST_NO_EXTERN_TEMPLATE\r
+#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
+#define BOOST_NO_INITIALIZER_LISTS\r
+#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NULLPTR\r
+#define BOOST_NO_RAW_LITERALS\r
+#define BOOST_NO_SCOPED_ENUMS\r
+#define BOOST_NO_SFINAE_EXPR\r
+#define BOOST_NO_STATIC_ASSERT\r
+#define BOOST_NO_TEMPLATE_ALIASES\r
+#define BOOST_NO_UNICODE_LITERALS\r
+#define BOOST_NO_VARIADIC_TEMPLATES\r
+#define BOOST_NO_VARIADIC_MACROS\r
+\r
+#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)\r
+\r
+//\r
+// versions check:\r
+// we don't support Metrowerks prior to version 5.3:\r
+#if __MWERKS__ < 0x2301\r
+# error "Compiler not supported or configured - please reconfigure"\r
+#endif\r
+//\r
+// last known and checked version:\r
+#if (__MWERKS__ > 0x3205)\r
+# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown compiler version - please run the configure tests and report the results"\r
+# endif\r
+#endif\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2002. \r
+// (C) Copyright Aleksey Gurtovoy 2002. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// MPW C++ compilers setup:\r
+\r
+# if defined(__SC__)\r
+# define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__)\r
+# elif defined(__MRC__)\r
+# define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__)\r
+# else\r
+# error "Using MPW compiler configuration by mistake. Please update."\r
+# endif\r
+\r
+//\r
+// MPW 8.90:\r
+//\r
+#if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG)\r
+# define BOOST_NO_CV_SPECIALIZATIONS\r
+# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS\r
+# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS\r
+# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION\r
+# define BOOST_NO_INTRINSIC_WCHAR_T\r
+# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION\r
+# define BOOST_NO_USING_TEMPLATE\r
+\r
+# define BOOST_NO_CWCHAR\r
+# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS\r
+\r
+# define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */\r
+\r
+#endif\r
+\r
+//\r
+// C++0x features\r
+//\r
+// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG\r
+//\r
+#define BOOST_NO_AUTO_DECLARATIONS\r
+#define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#define BOOST_NO_CHAR16_T\r
+#define BOOST_NO_CHAR32_T\r
+#define BOOST_NO_CONCEPTS\r
+#define BOOST_NO_CONSTEXPR\r
+#define BOOST_NO_DECLTYPE\r
+#define BOOST_NO_DEFAULTED_FUNCTIONS\r
+#define BOOST_NO_DELETED_FUNCTIONS\r
+#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
+#define BOOST_NO_EXTERN_TEMPLATE\r
+#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
+#define BOOST_NO_INITIALIZER_LISTS\r
+#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NULLPTR\r
+#define BOOST_NO_RAW_LITERALS\r
+#define BOOST_NO_RVALUE_REFERENCES\r
+#define BOOST_NO_SCOPED_ENUMS\r
+#define BOOST_NO_SFINAE_EXPR\r
+#define BOOST_NO_STATIC_ASSERT\r
+#define BOOST_NO_TEMPLATE_ALIASES\r
+#define BOOST_NO_UNICODE_LITERALS\r
+#define BOOST_NO_VARIADIC_TEMPLATES\r
+#define BOOST_NO_VARIADIC_MACROS\r
+\r
+//\r
+// versions check:\r
+// we don't support MPW prior to version 8.9:\r
+#if MPW_CPLUS < 0x890\r
+# error "Compiler not supported or configured - please reconfigure"\r
+#endif\r
+//\r
+// last known and checked version is 0x890:\r
+#if (MPW_CPLUS > 0x890)\r
+# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown compiler version - please run the configure tests and report the results"\r
+# endif\r
+#endif\r
+\r
+\r
--- /dev/null
+// (C) Copyright Eric Jourdanneau, Joel Falcou 2010\r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// NVIDIA CUDA C++ compiler setup\r
+\r
+#ifndef BOOST_COMPILER\r
+# define BOOST_COMPILER "NVIDIA CUDA C++ Compiler"\r
+#endif\r
+\r
+// NVIDIA Specific support\r
+// BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device\r
+#define BOOST_GPU_ENABLED __host__ __device__\r
+\r
+// Boost support macro for NVCC \r
+// NVCC Basically behaves like some flavor of MSVC6 + some specific quirks\r
+#ifdef __GNUC__\r
+\r
+#include <boost/config/compiler/gcc.hpp>\r
+\r
+#elif defined(_MSC_VER)\r
+\r
+#include <boost/config/compiler/visualc.hpp>\r
+\r
+#endif\r
--- /dev/null
+// (C) Copyright Bryce Lelbach 2011\r
+\r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// PathScale EKOPath C++ Compiler\r
+\r
+#ifndef BOOST_COMPILER\r
+# define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__\r
+#endif\r
+\r
+#if __PATHCC__ >= 4\r
+# define BOOST_MSVC6_MEMBER_TEMPLATES\r
+# define BOOST_HAS_UNISTD_H\r
+# define BOOST_HAS_STDINT_H\r
+# define BOOST_HAS_SIGACTION\r
+# define BOOST_HAS_SCHED_YIELD\r
+# define BOOST_HAS_THREADS\r
+# define BOOST_HAS_PTHREADS\r
+# define BOOST_HAS_PTHREAD_YIELD\r
+# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE\r
+# define BOOST_HAS_PARTIAL_STD_ALLOCATOR\r
+# define BOOST_HAS_NRVO\r
+# define BOOST_HAS_NL_TYPES_H\r
+# define BOOST_HAS_NANOSLEEP\r
+# define BOOST_HAS_LONG_LONG\r
+# define BOOST_HAS_LOG1P\r
+# define BOOST_HAS_GETTIMEOFDAY\r
+# define BOOST_HAS_EXPM1\r
+# define BOOST_HAS_DIRENT_H\r
+# define BOOST_HAS_CLOCK_GETTIME\r
+# define BOOST_NO_VARIADIC_TEMPLATES\r
+# define BOOST_NO_UNICODE_LITERALS\r
+# define BOOST_NO_TEMPLATE_ALIASES\r
+# define BOOST_NO_STD_UNORDERED\r
+# define BOOST_NO_STATIC_ASSERT\r
+# define BOOST_NO_SFINAE_EXPR\r
+# define BOOST_NO_SCOPED_ENUMS\r
+# define BOOST_NO_RVALUE_REFERENCES\r
+# define BOOST_NO_RAW_LITERALS\r
+# define BOOST_NO_NULLPTR\r
+# define BOOST_NO_NUMERIC_LIMITS_LOWEST\r
+# define BOOST_NO_LAMBDAS\r
+# define BOOST_NO_INITIALIZER_LISTS\r
+# define BOOST_NO_MS_INT64_NUMERIC_LIMITS\r
+# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
+# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
+# define BOOST_NO_DELETED_FUNCTIONS\r
+# define BOOST_NO_DEFAULTED_FUNCTIONS\r
+# define BOOST_NO_DECLTYPE\r
+# define BOOST_NO_CONSTEXPR\r
+# define BOOST_NO_CONCEPTS\r
+# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION\r
+# define BOOST_NO_CHAR32_T\r
+# define BOOST_NO_CHAR16_T\r
+# define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+# define BOOST_NO_AUTO_DECLARATIONS\r
+# define BOOST_NO_0X_HDR_UNORDERED_SET\r
+# define BOOST_NO_0X_HDR_UNORDERED_MAP\r
+# define BOOST_NO_0X_HDR_TYPEINDEX\r
+# define BOOST_NO_0X_HDR_TUPLE\r
+# define BOOST_NO_0X_HDR_THREAD\r
+# define BOOST_NO_0X_HDR_SYSTEM_ERROR\r
+# define BOOST_NO_0X_HDR_REGEX\r
+# define BOOST_NO_0X_HDR_RATIO\r
+# define BOOST_NO_0X_HDR_RANDOM\r
+# define BOOST_NO_0X_HDR_MUTEX\r
+# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS\r
+# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_INITIALIZER_LIST\r
+# define BOOST_NO_0X_HDR_FUTURE\r
+# define BOOST_NO_0X_HDR_FORWARD_LIST\r
+# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS\r
+# define BOOST_NO_0X_HDR_CONDITION_VARIABLE\r
+# define BOOST_NO_0X_HDR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_CODECVT\r
+# define BOOST_NO_0X_HDR_CHRONO\r
+#endif\r
+\r
--- /dev/null
+// (C) Copyright Noel Belcourt 2007.\r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// PGI C++ compiler setup:\r
+\r
+#define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__\r
+#define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(_COMPILER_VERSION)\r
+\r
+//\r
+// Threading support:\r
+// Turn this on unconditionally here, it will get turned off again later\r
+// if no threading API is detected.\r
+//\r
+\r
+// PGI 10.x doesn't seem to define __PGIC__\r
+\r
+// versions earlier than 10.x do define __PGIC__\r
+#if __PGIC__ >= 10\r
+\r
+// options requested by configure --enable-test\r
+#define BOOST_HAS_PTHREADS\r
+#define BOOST_HAS_NRVO\r
+#define BOOST_HAS_LONG_LONG\r
+\r
+// options --enable-test wants undefined\r
+#undef BOOST_NO_STDC_NAMESPACE\r
+#undef BOOST_NO_EXCEPTION_STD_NAMESPACE\r
+#undef BOOST_DEDUCED_TYPENAME\r
+\r
+#elif __PGIC__ >= 7\r
+\r
+#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL \r
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+#define BOOST_NO_SWPRINTF\r
+#define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#define BOOST_NO_AUTO_DECLARATIONS\r
+\r
+#else\r
+\r
+# error "Pgi compiler not configured - please reconfigure"\r
+\r
+#endif\r
+//\r
+// C++0x features\r
+//\r
+// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG\r
+//\r
+#define BOOST_NO_CHAR16_T\r
+#define BOOST_NO_CHAR32_T\r
+#define BOOST_NO_CONCEPTS\r
+#define BOOST_NO_CONSTEXPR\r
+#define BOOST_NO_DECLTYPE\r
+#define BOOST_NO_DEFAULTED_FUNCTIONS\r
+#define BOOST_NO_DELETED_FUNCTIONS\r
+#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
+#define BOOST_NO_EXTERN_TEMPLATE\r
+#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
+#define BOOST_NO_INITIALIZER_LISTS\r
+#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NULLPTR\r
+#define BOOST_NO_RAW_LITERALS\r
+#define BOOST_NO_RVALUE_REFERENCES\r
+#define BOOST_NO_SCOPED_ENUMS\r
+#define BOOST_NO_SFINAE_EXPR\r
+#define BOOST_NO_STATIC_ASSERT\r
+#define BOOST_NO_TEMPLATE_ALIASES\r
+#define BOOST_NO_UNICODE_LITERALS\r
+#define BOOST_NO_VARIADIC_TEMPLATES\r
+#define BOOST_NO_VARIADIC_MACROS\r
+\r
+//\r
+// version check:\r
+// probably nothing to do here?\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2002. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// SGI C++ compiler setup:\r
+\r
+#define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION)\r
+\r
+#include "boost/config/compiler/common_edg.hpp"\r
+\r
+//\r
+// Threading support:\r
+// Turn this on unconditionally here, it will get turned off again later\r
+// if no threading API is detected.\r
+//\r
+#define BOOST_HAS_THREADS\r
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+\r
+#undef BOOST_NO_SWPRINTF\r
+#undef BOOST_DEDUCED_TYPENAME\r
+\r
+//\r
+// version check:\r
+// probably nothing to do here?\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001. \r
+// (C) Copyright Jens Maurer 2001 - 2003. \r
+// (C) Copyright Peter Dimov 2002. \r
+// (C) Copyright Aleksey Gurtovoy 2002 - 2003. \r
+// (C) Copyright David Abrahams 2002. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Sun C++ compiler setup:\r
+\r
+# if __SUNPRO_CC <= 0x500\r
+# define BOOST_NO_MEMBER_TEMPLATES\r
+# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING\r
+# endif\r
+\r
+# if (__SUNPRO_CC <= 0x520)\r
+ //\r
+ // Sunpro 5.2 and earler:\r
+ //\r
+ // although sunpro 5.2 supports the syntax for\r
+ // inline initialization it often gets the value\r
+ // wrong, especially where the value is computed\r
+ // from other constants (J Maddock 6th May 2001)\r
+# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION\r
+\r
+ // Although sunpro 5.2 supports the syntax for\r
+ // partial specialization, it often seems to\r
+ // bind to the wrong specialization. Better\r
+ // to disable it until suppport becomes more stable\r
+ // (J Maddock 6th May 2001).\r
+# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION\r
+# endif\r
+\r
+# if (__SUNPRO_CC <= 0x530) \r
+ // Requesting debug info (-g) with Boost.Python results\r
+ // in an internal compiler error for "static const"\r
+ // initialized in-class.\r
+ // >> Assertion: (../links/dbg_cstabs.cc, line 611)\r
+ // while processing ../test.cpp at line 0.\r
+ // (Jens Maurer according to Gottfried Ganssauge 04 Mar 2002)\r
+# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION\r
+\r
+ // SunPro 5.3 has better support for partial specialization,\r
+ // but breaks when compiling std::less<shared_ptr<T> >\r
+ // (Jens Maurer 4 Nov 2001).\r
+\r
+ // std::less specialization fixed as reported by George\r
+ // Heintzelman; partial specialization re-enabled\r
+ // (Peter Dimov 17 Jan 2002)\r
+\r
+//# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION\r
+\r
+ // integral constant expressions with 64 bit numbers fail\r
+# define BOOST_NO_INTEGRAL_INT64_T\r
+# endif\r
+\r
+# if (__SUNPRO_CC < 0x570) \r
+# define BOOST_NO_TEMPLATE_TEMPLATES\r
+ // see http://lists.boost.org/MailArchives/boost/msg47184.php\r
+ // and http://lists.boost.org/MailArchives/boost/msg47220.php\r
+# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION\r
+# define BOOST_NO_SFINAE\r
+# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS\r
+# endif\r
+# if (__SUNPRO_CC <= 0x580) \r
+# define BOOST_NO_IS_ABSTRACT\r
+# endif\r
+\r
+# if (__SUNPRO_CC <= 0x5100)\r
+ // Sun 5.10 may not correctly value-initialize objects of\r
+ // some user defined types, as was reported in April 2010\r
+ // (CR 6947016), and confirmed by Steve Clamage.\r
+ // (Niels Dekker, LKEB, May 2010).\r
+# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION\r
+# endif\r
+\r
+//\r
+// Dynamic shared object (DSO) and dynamic-link library (DLL) support\r
+//\r
+#if __SUNPRO_CC > 0x500\r
+# define BOOST_SYMBOL_EXPORT __global\r
+# define BOOST_SYMBOL_IMPORT __global\r
+# define BOOST_SYMBOL_VISIBLE __global\r
+#endif\r
+\r
+\r
+\r
+//\r
+// Issues that effect all known versions:\r
+//\r
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+#define BOOST_NO_ADL_BARRIER\r
+\r
+//\r
+// C++0x features\r
+//\r
+# define BOOST_HAS_LONG_LONG\r
+\r
+#define BOOST_NO_AUTO_DECLARATIONS\r
+#define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#define BOOST_NO_CHAR16_T\r
+#define BOOST_NO_CHAR32_T\r
+#define BOOST_NO_CONCEPTS\r
+#define BOOST_NO_CONSTEXPR\r
+#define BOOST_NO_DECLTYPE\r
+#define BOOST_NO_DEFAULTED_FUNCTIONS\r
+#define BOOST_NO_DELETED_FUNCTIONS\r
+#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
+#define BOOST_NO_EXTERN_TEMPLATE\r
+#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
+#define BOOST_NO_INITIALIZER_LISTS\r
+#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NULLPTR\r
+#define BOOST_NO_RAW_LITERALS\r
+#define BOOST_NO_RVALUE_REFERENCES\r
+#define BOOST_NO_SCOPED_ENUMS\r
+#define BOOST_NO_SFINAE_EXPR\r
+#define BOOST_NO_STATIC_ASSERT\r
+#define BOOST_NO_TEMPLATE_ALIASES\r
+#define BOOST_NO_UNICODE_LITERALS\r
+#define BOOST_NO_VARIADIC_TEMPLATES\r
+#define BOOST_NO_VARIADIC_MACROS\r
+\r
+//\r
+// Version\r
+//\r
+\r
+#define BOOST_COMPILER "Sun compiler version " BOOST_STRINGIZE(__SUNPRO_CC)\r
+\r
+//\r
+// versions check:\r
+// we don't support sunpro prior to version 4:\r
+#if __SUNPRO_CC < 0x400\r
+#error "Compiler not supported or configured - please reconfigure"\r
+#endif\r
+//\r
+// last known and checked version is 0x590:\r
+#if (__SUNPRO_CC > 0x590)\r
+# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown compiler version - please run the configure tests and report the results"\r
+# endif\r
+#endif\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Toon Knapen 2001 - 2003. \r
+// (C) Copyright Lie-Quan Lee 2001. \r
+// (C) Copyright Markus Schoepflin 2002 - 2003. \r
+// (C) Copyright Beman Dawes 2002 - 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Visual Age (IBM) C++ compiler setup:\r
+\r
+#if __IBMCPP__ <= 501\r
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS\r
+# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS\r
+#endif\r
+\r
+#if (__IBMCPP__ <= 502) \r
+// Actually the compiler supports inclass member initialization but it\r
+// requires a definition for the class member and it doesn't recognize\r
+// it as an integral constant expression when used as a template argument.\r
+# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION\r
+# define BOOST_NO_INTEGRAL_INT64_T\r
+# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD\r
+#endif\r
+\r
+#if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG)\r
+# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS\r
+#endif\r
+\r
+#if (__IBMCPP__ <= 1110)\r
+// XL C++ V11.1 and earlier versions may not always value-initialize \r
+// a temporary object T(), when T is a non-POD aggregate class type. \r
+// Michael Wong (IBM Canada Ltd) has confirmed this issue and gave it \r
+// high priority. -- Niels Dekker (LKEB), May 2010.\r
+# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION\r
+#endif\r
+\r
+//\r
+// On AIX thread support seems to be indicated by _THREAD_SAFE:\r
+//\r
+#ifdef _THREAD_SAFE\r
+# define BOOST_HAS_THREADS\r
+#endif\r
+\r
+#define BOOST_COMPILER "IBM Visual Age version " BOOST_STRINGIZE(__IBMCPP__)\r
+\r
+//\r
+// versions check:\r
+// we don't support Visual age prior to version 5:\r
+#if __IBMCPP__ < 500\r
+#error "Compiler not supported or configured - please reconfigure"\r
+#endif\r
+//\r
+// last known and checked version is 1110:\r
+#if (__IBMCPP__ > 1110)\r
+# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown compiler version - please run the configure tests and report the results"\r
+# endif\r
+#endif\r
+\r
+// Some versions of the compiler have issues with default arguments on partial specializations\r
+#if __IBMCPP__ <= 1010\r
+#define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS\r
+#endif\r
+\r
+//\r
+// C++0x features\r
+//\r
+// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG\r
+//\r
+#if ! __IBMCPP_AUTO_TYPEDEDUCTION\r
+# define BOOST_NO_AUTO_DECLARATIONS\r
+# define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#endif\r
+#if ! __IBMCPP_UTF_LITERAL__\r
+# define BOOST_NO_CHAR16_T\r
+# define BOOST_NO_CHAR32_T\r
+#endif\r
+#define BOOST_NO_CONCEPTS\r
+#define BOOST_NO_CONSTEXPR\r
+#if ! __IBMCPP_DECLTYPE\r
+# define BOOST_NO_DECLTYPE\r
+#else\r
+# define BOOST_HAS_DECLTYPE\r
+#endif\r
+#define BOOST_NO_DEFAULTED_FUNCTIONS\r
+#define BOOST_NO_DELETED_FUNCTIONS\r
+#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
+#if ! __IBMCPP_EXTERN_TEMPLATE\r
+# define BOOST_NO_EXTERN_TEMPLATE\r
+#endif\r
+#if ! __IBMCPP_VARIADIC_TEMPLATES\r
+// not enabled separately at this time\r
+# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
+#endif\r
+#define BOOST_NO_INITIALIZER_LISTS\r
+#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NULLPTR\r
+#define BOOST_NO_RAW_LITERALS\r
+#define BOOST_NO_RVALUE_REFERENCES\r
+#define BOOST_NO_SCOPED_ENUMS\r
+#define BOOST_NO_SFINAE_EXPR\r
+#if ! __IBMCPP_STATIC_ASSERT\r
+# define BOOST_NO_STATIC_ASSERT\r
+#endif\r
+#define BOOST_NO_TEMPLATE_ALIASES\r
+#define BOOST_NO_UNICODE_LITERALS\r
+#if ! __IBMCPP_VARIADIC_TEMPLATES\r
+# define BOOST_NO_VARIADIC_TEMPLATES\r
+#endif\r
+#if ! __C99_MACRO_WITH_VA_ARGS\r
+# define BOOST_NO_VARIADIC_MACROS\r
+#endif\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Darin Adler 2001 - 2002. \r
+// (C) Copyright Peter Dimov 2001. \r
+// (C) Copyright Aleksey Gurtovoy 2002. \r
+// (C) Copyright David Abrahams 2002 - 2003. \r
+// (C) Copyright Beman Dawes 2002 - 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Microsoft Visual C++ compiler setup:\r
+\r
+#define BOOST_MSVC _MSC_VER\r
+\r
+#if _MSC_FULL_VER > 100000000\r
+# define BOOST_MSVC_FULL_VER _MSC_FULL_VER\r
+#else\r
+# define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10)\r
+#endif\r
+\r
+// turn off the warnings before we #include anything\r
+#pragma warning( disable : 4503 ) // warning: decorated name length exceeded\r
+\r
+#if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1200-1202 == eVC++4\r
+# pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info\r
+# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS\r
+# define BOOST_NO_VOID_RETURNS\r
+# define BOOST_NO_EXCEPTION_STD_NAMESPACE\r
+\r
+# if BOOST_MSVC == 1202\r
+# define BOOST_NO_STD_TYPEINFO\r
+# endif\r
+\r
+ // disable min/max macro defines on vc6:\r
+ //\r
+#endif\r
+\r
+/// Visual Studio has no fenv.h\r
+#define BOOST_NO_FENV_H\r
+\r
+#if (_MSC_VER <= 1300) // 1300 == VC++ 7.0\r
+\r
+# if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za\r
+# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS\r
+# endif\r
+\r
+# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS\r
+# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION\r
+# define BOOST_NO_PRIVATE_IN_AGGREGATE\r
+# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP\r
+# define BOOST_NO_INTEGRAL_INT64_T\r
+# define BOOST_NO_DEDUCED_TYPENAME\r
+# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE\r
+\r
+// VC++ 6/7 has member templates but they have numerous problems including\r
+// cases of silent failure, so for safety we define:\r
+# define BOOST_NO_MEMBER_TEMPLATES\r
+// For VC++ experts wishing to attempt workarounds, we define:\r
+# define BOOST_MSVC6_MEMBER_TEMPLATES\r
+\r
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS\r
+# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION\r
+# define BOOST_NO_CV_VOID_SPECIALIZATIONS\r
+# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING\r
+# define BOOST_NO_USING_TEMPLATE\r
+# define BOOST_NO_SWPRINTF\r
+# define BOOST_NO_TEMPLATE_TEMPLATES\r
+# define BOOST_NO_SFINAE\r
+# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS\r
+# define BOOST_NO_IS_ABSTRACT\r
+# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS\r
+// TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)?\r
+# if (_MSC_VER > 1200)\r
+# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS\r
+# endif\r
+\r
+#endif\r
+\r
+#if _MSC_VER < 1400 \r
+// although a conforming signature for swprint exists in VC7.1\r
+// it appears not to actually work:\r
+# define BOOST_NO_SWPRINTF\r
+// Our extern template tests also fail for this compiler:\r
+# define BOOST_NO_EXTERN_TEMPLATE\r
+// Variadic macros do not exist for VC7.1 and lower\r
+# define BOOST_NO_VARIADIC_MACROS\r
+#endif\r
+\r
+#if defined(UNDER_CE)\r
+// Windows CE does not have a conforming signature for swprintf\r
+# define BOOST_NO_SWPRINTF\r
+#endif\r
+\r
+#if _MSC_VER <= 1400 // 1400 == VC++ 8.0\r
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS\r
+#endif\r
+\r
+#if _MSC_VER == 1500 // 1500 == VC++ 9.0\r
+ // A bug in VC9:\r
+# define BOOST_NO_ADL_BARRIER\r
+#endif\r
+\r
+\r
+#if (_MSC_VER <= 1600)\r
+// MSVC (including the latest checked version) has not yet completely \r
+// implemented value-initialization, as is reported:\r
+// "VC++ does not value-initialize members of derived classes without \r
+// user-declared constructor", reported in 2009 by Sylvester Hesp:\r
+// https://connect.microsoft.com/VisualStudio/feedback/details/484295\r
+// "Presence of copy constructor breaks member class initialization",\r
+// reported in 2009 by Alex Vakulenko:\r
+// https://connect.microsoft.com/VisualStudio/feedback/details/499606\r
+// "Value-initialization in new-expression", reported in 2005 by\r
+// Pavel Kuznetsov (MetaCommunications Engineering):\r
+// https://connect.microsoft.com/VisualStudio/feedback/details/100744\r
+// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues\r
+// (Niels Dekker, LKEB, May 2010)\r
+#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION\r
+#endif\r
+\r
+#if _MSC_VER <= 1500 || !defined(BOOST_STRICT_CONFIG) // 1500 == VC++ 9.0\r
+# define BOOST_NO_INITIALIZER_LISTS\r
+#endif\r
+\r
+#ifndef _NATIVE_WCHAR_T_DEFINED\r
+# define BOOST_NO_INTRINSIC_WCHAR_T\r
+#endif\r
+\r
+#if defined(_WIN32_WCE) || defined(UNDER_CE)\r
+# define BOOST_NO_THREADEX\r
+# define BOOST_NO_GETSYSTEMTIMEASFILETIME\r
+# define BOOST_NO_SWPRINTF\r
+#endif\r
+\r
+// \r
+// check for exception handling support: \r
+#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)\r
+# define BOOST_NO_EXCEPTIONS \r
+#endif \r
+\r
+//\r
+// __int64 support:\r
+//\r
+#if (_MSC_VER >= 1200)\r
+# define BOOST_HAS_MS_INT64\r
+#endif\r
+#if (_MSC_VER >= 1310) && (defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400))\r
+# define BOOST_HAS_LONG_LONG\r
+#else\r
+# define BOOST_NO_LONG_LONG\r
+#endif\r
+#if (_MSC_VER >= 1400) && !defined(_DEBUG)\r
+# define BOOST_HAS_NRVO\r
+#endif\r
+//\r
+// disable Win32 API's if compiler extentions are\r
+// turned off:\r
+//\r
+#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32)\r
+# define BOOST_DISABLE_WIN32\r
+#endif\r
+#if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI)\r
+# define BOOST_NO_RTTI\r
+#endif\r
+\r
+//\r
+// C++0x features\r
+//\r
+// See above for BOOST_NO_LONG_LONG\r
+\r
+// C++ features supported by VC++ 10 (aka 2010)\r
+//\r
+#if _MSC_VER < 1600\r
+#define BOOST_NO_AUTO_DECLARATIONS\r
+#define BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_RVALUE_REFERENCES\r
+#define BOOST_NO_STATIC_ASSERT\r
+#define BOOST_NO_NULLPTR\r
+#endif // _MSC_VER < 1600\r
+\r
+#if _MSC_VER >= 1600\r
+#define BOOST_HAS_STDINT_H\r
+#endif\r
+\r
+// C++0x features not supported by any versions\r
+#define BOOST_NO_CHAR16_T\r
+#define BOOST_NO_CHAR32_T\r
+#define BOOST_NO_CONCEPTS\r
+#define BOOST_NO_CONSTEXPR\r
+#define BOOST_NO_DEFAULTED_FUNCTIONS\r
+#define BOOST_NO_DECLTYPE\r
+#define BOOST_NO_DELETED_FUNCTIONS\r
+#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
+#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
+#define BOOST_NO_INITIALIZER_LISTS\r
+#define BOOST_NO_RAW_LITERALS\r
+#define BOOST_NO_SCOPED_ENUMS\r
+#define BOOST_NO_TEMPLATE_ALIASES\r
+#define BOOST_NO_UNICODE_LITERALS\r
+#define BOOST_NO_VARIADIC_TEMPLATES\r
+#define BOOST_NO_SFINAE_EXPR\r
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+//\r
+// prefix and suffix headers:\r
+//\r
+#ifndef BOOST_ABI_PREFIX\r
+# define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp"\r
+#endif\r
+#ifndef BOOST_ABI_SUFFIX\r
+# define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp"\r
+#endif\r
+\r
+// TODO:\r
+// these things are mostly bogus. 1200 means version 12.0 of the compiler. The \r
+// artificial versions assigned to them only refer to the versions of some IDE\r
+// these compilers have been shipped with, and even that is not all of it. Some\r
+// were shipped with freely downloadable SDKs, others as crosscompilers in eVC.\r
+// IOW, you can't use these 'versions' in any sensible way. Sorry.\r
+# if defined(UNDER_CE)\r
+# if _MSC_VER < 1200\r
+ // Note: these are so far off, they are not really supported\r
+# elif _MSC_VER < 1300 // eVC++ 4 comes with 1200-1202\r
+# define BOOST_COMPILER_VERSION evc4.0\r
+# elif _MSC_VER == 1400\r
+# define BOOST_COMPILER_VERSION evc8\r
+# elif _MSC_VER == 1500\r
+# define BOOST_COMPILER_VERSION evc9\r
+# elif _MSC_VER == 1600\r
+# define BOOST_COMPILER_VERSION evc10\r
+# else\r
+# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown EVC++ compiler version - please run the configure tests and report the results"\r
+# else\r
+# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")\r
+# endif\r
+# endif\r
+# else\r
+# if _MSC_VER < 1200\r
+ // Note: these are so far off, they are not really supported\r
+# define BOOST_COMPILER_VERSION 5.0\r
+# elif _MSC_VER < 1300\r
+# define BOOST_COMPILER_VERSION 6.0\r
+# elif _MSC_VER == 1300\r
+# define BOOST_COMPILER_VERSION 7.0\r
+# elif _MSC_VER == 1310\r
+# define BOOST_COMPILER_VERSION 7.1\r
+# elif _MSC_VER == 1400\r
+# define BOOST_COMPILER_VERSION 8.0\r
+# elif _MSC_VER == 1500\r
+# define BOOST_COMPILER_VERSION 9.0\r
+# elif _MSC_VER == 1600\r
+# define BOOST_COMPILER_VERSION 10.0\r
+# else\r
+# define BOOST_COMPILER_VERSION _MSC_VER\r
+# endif\r
+# endif\r
+\r
+#define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)\r
+\r
+//\r
+// versions check:\r
+// we don't support Visual C++ prior to version 6:\r
+#if _MSC_VER < 1200\r
+#error "Compiler not supported or configured - please reconfigure"\r
+#endif\r
+//\r
+// last known and checked version is 1600 (VC10, aka 2010):\r
+#if (_MSC_VER > 1600)\r
+# if defined(BOOST_ASSERT_CONFIG)\r
+# error "Unknown compiler version - please run the configure tests and report the results"\r
+# else\r
+# pragma message("Unknown compiler version - please run the configure tests and report the results")\r
+# endif\r
+#endif\r
--- /dev/null
+// (C) Copyright John Maddock 2008.\r
+// Use, modification and distribution are subject to the\r
+// Boost Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// The aim of this header is just to include <cmath> but to do\r
+// so in a way that does not result in recursive inclusion of\r
+// the Boost TR1 components if boost/tr1/tr1/cmath is in the\r
+// include search path. We have to do this to avoid circular\r
+// dependencies:\r
+//\r
+\r
+#ifndef BOOST_CONFIG_CMATH\r
+# define BOOST_CONFIG_CMATH\r
+\r
+# ifndef BOOST_TR1_NO_RECURSION\r
+# define BOOST_TR1_NO_RECURSION\r
+# define BOOST_CONFIG_NO_CMATH_RECURSION\r
+# endif\r
+\r
+# include <cmath>\r
+\r
+# ifdef BOOST_CONFIG_NO_CMATH_RECURSION\r
+# undef BOOST_TR1_NO_RECURSION\r
+# undef BOOST_CONFIG_NO_CMATH_RECURSION\r
+# endif\r
+\r
+#endif\r
--- /dev/null
+// (C) Copyright John Maddock 2005.\r
+// Use, modification and distribution are subject to the\r
+// Boost Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// The aim of this header is just to include <complex> but to do\r
+// so in a way that does not result in recursive inclusion of\r
+// the Boost TR1 components if boost/tr1/tr1/complex is in the\r
+// include search path. We have to do this to avoid circular\r
+// dependencies:\r
+//\r
+\r
+#ifndef BOOST_CONFIG_COMPLEX\r
+# define BOOST_CONFIG_COMPLEX\r
+\r
+# ifndef BOOST_TR1_NO_RECURSION\r
+# define BOOST_TR1_NO_RECURSION\r
+# define BOOST_CONFIG_NO_COMPLEX_RECURSION\r
+# endif\r
+\r
+# include <complex>\r
+\r
+# ifdef BOOST_CONFIG_NO_COMPLEX_RECURSION\r
+# undef BOOST_TR1_NO_RECURSION\r
+# undef BOOST_CONFIG_NO_COMPLEX_RECURSION\r
+# endif\r
+\r
+#endif\r
--- /dev/null
+// (C) Copyright John Maddock 2005.\r
+// Use, modification and distribution are subject to the\r
+// Boost Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// The aim of this header is just to include <functional> but to do\r
+// so in a way that does not result in recursive inclusion of\r
+// the Boost TR1 components if boost/tr1/tr1/functional is in the\r
+// include search path. We have to do this to avoid circular\r
+// dependencies:\r
+//\r
+\r
+#ifndef BOOST_CONFIG_FUNCTIONAL\r
+# define BOOST_CONFIG_FUNCTIONAL\r
+\r
+# ifndef BOOST_TR1_NO_RECURSION\r
+# define BOOST_TR1_NO_RECURSION\r
+# define BOOST_CONFIG_NO_FUNCTIONAL_RECURSION\r
+# endif\r
+\r
+# include <functional>\r
+\r
+# ifdef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION\r
+# undef BOOST_TR1_NO_RECURSION\r
+# undef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION\r
+# endif\r
+\r
+#endif\r
--- /dev/null
+// (C) Copyright John Maddock 2005.\r
+// Use, modification and distribution are subject to the\r
+// Boost Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// The aim of this header is just to include <memory> but to do\r
+// so in a way that does not result in recursive inclusion of\r
+// the Boost TR1 components if boost/tr1/tr1/memory is in the\r
+// include search path. We have to do this to avoid circular\r
+// dependencies:\r
+//\r
+\r
+#ifndef BOOST_CONFIG_MEMORY\r
+# define BOOST_CONFIG_MEMORY\r
+\r
+# ifndef BOOST_TR1_NO_RECURSION\r
+# define BOOST_TR1_NO_RECURSION\r
+# define BOOST_CONFIG_NO_MEMORY_RECURSION\r
+# endif\r
+\r
+# include <memory>\r
+\r
+# ifdef BOOST_CONFIG_NO_MEMORY_RECURSION\r
+# undef BOOST_TR1_NO_RECURSION\r
+# undef BOOST_CONFIG_NO_MEMORY_RECURSION\r
+# endif\r
+\r
+#endif\r
--- /dev/null
+// (C) Copyright John Maddock 2005.\r
+// Use, modification and distribution are subject to the\r
+// Boost Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// The aim of this header is just to include <utility> but to do\r
+// so in a way that does not result in recursive inclusion of\r
+// the Boost TR1 components if boost/tr1/tr1/utility is in the\r
+// include search path. We have to do this to avoid circular\r
+// dependencies:\r
+//\r
+\r
+#ifndef BOOST_CONFIG_UTILITY\r
+# define BOOST_CONFIG_UTILITY\r
+\r
+# ifndef BOOST_TR1_NO_RECURSION\r
+# define BOOST_TR1_NO_RECURSION\r
+# define BOOST_CONFIG_NO_UTILITY_RECURSION\r
+# endif\r
+\r
+# include <utility>\r
+\r
+# ifdef BOOST_CONFIG_NO_UTILITY_RECURSION\r
+# undef BOOST_TR1_NO_RECURSION\r
+# undef BOOST_CONFIG_NO_UTILITY_RECURSION\r
+# endif\r
+\r
+#endif\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2002. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// IBM/Aix specific config options:\r
+\r
+#define BOOST_PLATFORM "IBM Aix"\r
+\r
+#define BOOST_HAS_UNISTD_H\r
+#define BOOST_HAS_NL_TYPES_H\r
+#define BOOST_HAS_NANOSLEEP\r
+#define BOOST_HAS_CLOCK_GETTIME\r
+\r
+// This needs support in "boost/cstdint.hpp" exactly like FreeBSD.\r
+// This platform has header named <inttypes.h> which includes all\r
+// the things needed.\r
+#define BOOST_HAS_STDINT_H\r
+\r
+// Threading API's:\r
+#define BOOST_HAS_PTHREADS\r
+#define BOOST_HAS_PTHREAD_DELAY_NP\r
+#define BOOST_HAS_SCHED_YIELD\r
+//#define BOOST_HAS_PTHREAD_YIELD\r
+\r
+// boilerplate code:\r
+#include <boost/config/posix_features.hpp>\r
+\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2002. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+#define BOOST_PLATFORM "AmigaOS"\r
+\r
+#define BOOST_DISABLE_THREADS\r
+#define BOOST_NO_CWCHAR\r
+#define BOOST_NO_STD_WSTRING\r
+#define BOOST_NO_INTRINSIC_WCHAR_T\r
+ \r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// BeOS specific config options:\r
+\r
+#define BOOST_PLATFORM "BeOS"\r
+\r
+#define BOOST_NO_CWCHAR\r
+#define BOOST_NO_CWCTYPE\r
+#define BOOST_HAS_UNISTD_H\r
+\r
+#define BOOST_HAS_BETHREADS\r
+\r
+#ifndef BOOST_DISABLE_THREADS\r
+# define BOOST_HAS_THREADS\r
+#endif\r
+\r
+// boilerplate code:\r
+#include <boost/config/posix_features.hpp>\r
+ \r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Darin Adler 2001. \r
+// (C) Copyright Douglas Gregor 2002. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// generic BSD config options:\r
+\r
+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)\r
+#error "This platform is not BSD"\r
+#endif\r
+\r
+#ifdef __FreeBSD__\r
+#define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__)\r
+#elif defined(__NetBSD__)\r
+#define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__)\r
+#elif defined(__OpenBSD__)\r
+#define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__)\r
+#elif defined(__DragonFly__)\r
+#define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__)\r
+#endif\r
+\r
+//\r
+// is this the correct version check?\r
+// FreeBSD has <nl_types.h> but does not\r
+// advertise the fact in <unistd.h>:\r
+//\r
+#if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) || defined(__DragonFly__)\r
+# define BOOST_HAS_NL_TYPES_H\r
+#endif\r
+\r
+//\r
+// FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in <pthread.h>\r
+// and not in <unistd.h>\r
+//\r
+#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3))\\r
+ || defined(__OpenBSD__) || defined(__DragonFly__) \r
+# define BOOST_HAS_PTHREADS\r
+#endif\r
+\r
+//\r
+// No wide character support in the BSD header files:\r
+//\r
+#if defined(__NetBSD__)\r
+#define __NetBSD_GCC__ (__GNUC__ * 1000000 \\r
+ + __GNUC_MINOR__ * 1000 \\r
+ + __GNUC_PATCHLEVEL__)\r
+// XXX - the following is required until c++config.h\r
+// defines _GLIBCXX_HAVE_SWPRINTF and friends\r
+// or the preprocessor conditionals are removed\r
+// from the cwchar header.\r
+#define _GLIBCXX_HAVE_SWPRINTF 1\r
+#endif\r
+\r
+#if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \\r
+ || (defined(__NetBSD_GCC__) && (__NetBSD_GCC__ >= 2095003)) || defined(__DragonFly__))\r
+# define BOOST_NO_CWCHAR\r
+#endif\r
+//\r
+// The BSD <ctype.h> has macros only, no functions:\r
+//\r
+#if !defined(__OpenBSD__) || defined(__DragonFly__)\r
+# define BOOST_NO_CTYPE_FUNCTIONS\r
+#endif\r
+\r
+//\r
+// thread API's not auto detected:\r
+//\r
+#define BOOST_HAS_SCHED_YIELD\r
+#define BOOST_HAS_NANOSLEEP\r
+#define BOOST_HAS_GETTIMEOFDAY\r
+#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE\r
+#define BOOST_HAS_SIGACTION\r
+\r
+// boilerplate code:\r
+#define BOOST_HAS_UNISTD_H\r
+#include <boost/config/posix_features.hpp>\r
+\r
+\r
+\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// cygwin specific config options:\r
+\r
+#define BOOST_PLATFORM "Cygwin"\r
+#define BOOST_HAS_DIRENT_H\r
+#define BOOST_HAS_LOG1P\r
+#define BOOST_HAS_EXPM1\r
+\r
+//\r
+// Threading API:\r
+// See if we have POSIX threads, if we do use them, otherwise\r
+// revert to native Win threads.\r
+#define BOOST_HAS_UNISTD_H\r
+#include <unistd.h>\r
+#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS)\r
+# define BOOST_HAS_PTHREADS\r
+# define BOOST_HAS_SCHED_YIELD\r
+# define BOOST_HAS_GETTIMEOFDAY\r
+# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE\r
+# define BOOST_HAS_SIGACTION\r
+#else\r
+# if !defined(BOOST_HAS_WINTHREADS)\r
+# define BOOST_HAS_WINTHREADS\r
+# endif\r
+# define BOOST_HAS_FTIME\r
+#endif\r
+\r
+//\r
+// find out if we have a stdint.h, there should be a better way to do this:\r
+//\r
+#include <sys/types.h>\r
+#ifdef _STDINT_H\r
+#define BOOST_HAS_STDINT_H\r
+#endif\r
+\r
+/// Cygwin has no fenv.h\r
+#define BOOST_NO_FENV_H\r
+\r
+// boilerplate code:\r
+#include <boost/config/posix_features.hpp>\r
+\r
+//\r
+// Cygwin lies about XSI conformance, there is no nl_types.h:\r
+//\r
+#ifdef BOOST_HAS_NL_TYPES_H\r
+# undef BOOST_HAS_NL_TYPES_H\r
+#endif\r
+ \r
+\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Jens Maurer 2001 - 2003. \r
+// (C) Copyright David Abrahams 2002. \r
+// (C) Copyright Toon Knapen 2003. \r
+// (C) Copyright Boris Gubenko 2006 - 2007.\r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// hpux specific config options:\r
+\r
+#define BOOST_PLATFORM "HP-UX"\r
+\r
+// In principle, HP-UX has a nice <stdint.h> under the name <inttypes.h>\r
+// However, it has the following problem:\r
+// Use of UINT32_C(0) results in "0u l" for the preprocessed source\r
+// (verifyable with gcc 2.95.3)\r
+#if (defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__HP_aCC)\r
+# define BOOST_HAS_STDINT_H\r
+#endif\r
+\r
+#if !(defined(__HP_aCC) || !defined(_INCLUDE__STDC_A1_SOURCE))\r
+# define BOOST_NO_SWPRINTF\r
+#endif\r
+#if defined(__HP_aCC) && !defined(_INCLUDE__STDC_A1_SOURCE)\r
+# define BOOST_NO_CWCTYPE\r
+#endif\r
+\r
+#if defined(__GNUC__)\r
+# if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3))\r
+ // GNU C on HP-UX does not support threads (checked up to gcc 3.3)\r
+# define BOOST_DISABLE_THREADS\r
+# elif !defined(BOOST_DISABLE_THREADS)\r
+ // threads supported from gcc-3.3 onwards:\r
+# define BOOST_HAS_THREADS\r
+# define BOOST_HAS_PTHREADS\r
+# endif\r
+#elif defined(__HP_aCC) && !defined(BOOST_DISABLE_THREADS)\r
+# define BOOST_HAS_PTHREADS\r
+#endif\r
+\r
+// boilerplate code:\r
+#define BOOST_HAS_UNISTD_H\r
+#include <boost/config/posix_features.hpp>\r
+\r
+// the following are always available:\r
+#ifndef BOOST_HAS_GETTIMEOFDAY\r
+# define BOOST_HAS_GETTIMEOFDAY\r
+#endif\r
+#ifndef BOOST_HAS_SCHED_YIELD\r
+# define BOOST_HAS_SCHED_YIELD\r
+#endif\r
+#ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE\r
+# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE\r
+#endif\r
+#ifndef BOOST_HAS_NL_TYPES_H\r
+# define BOOST_HAS_NL_TYPES_H\r
+#endif\r
+#ifndef BOOST_HAS_NANOSLEEP\r
+# define BOOST_HAS_NANOSLEEP\r
+#endif\r
+#ifndef BOOST_HAS_GETTIMEOFDAY\r
+# define BOOST_HAS_GETTIMEOFDAY\r
+#endif\r
+#ifndef BOOST_HAS_DIRENT_H\r
+# define BOOST_HAS_DIRENT_H\r
+#endif\r
+#ifndef BOOST_HAS_CLOCK_GETTIME\r
+# define BOOST_HAS_CLOCK_GETTIME\r
+#endif\r
+#ifndef BOOST_HAS_SIGACTION\r
+# define BOOST_HAS_SIGACTION\r
+#endif\r
+#ifndef BOOST_HAS_NRVO \r
+# ifndef __parisc\r
+# define BOOST_HAS_NRVO\r
+# endif\r
+#endif\r
+#ifndef BOOST_HAS_LOG1P \r
+# define BOOST_HAS_LOG1P\r
+#endif\r
+#ifndef BOOST_HAS_EXPM1\r
+# define BOOST_HAS_EXPM1\r
+#endif\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Jens Maurer 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// SGI Irix specific config options:\r
+\r
+#define BOOST_PLATFORM "SGI Irix"\r
+\r
+#define BOOST_NO_SWPRINTF \r
+//\r
+// these are not auto detected by POSIX feature tests:\r
+//\r
+#define BOOST_HAS_GETTIMEOFDAY\r
+#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE\r
+\r
+#ifdef __GNUC__\r
+ // GNU C on IRIX does not support threads (checked up to gcc 3.3)\r
+# define BOOST_DISABLE_THREADS\r
+#endif\r
+\r
+// boilerplate code:\r
+#define BOOST_HAS_UNISTD_H\r
+#include <boost/config/posix_features.hpp>\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Jens Maurer 2001 - 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// linux specific config options:\r
+\r
+#define BOOST_PLATFORM "linux"\r
+\r
+// make sure we have __GLIBC_PREREQ if available at all\r
+#include <cstdlib>\r
+\r
+//\r
+// <stdint.h> added to glibc 2.1.1\r
+// We can only test for 2.1 though:\r
+//\r
+#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1)))\r
+ // <stdint.h> defines int64_t unconditionally, but <sys/types.h> defines\r
+ // int64_t only if __GNUC__. Thus, assume a fully usable <stdint.h>\r
+ // only when using GCC.\r
+# if defined __GNUC__\r
+# define BOOST_HAS_STDINT_H\r
+# endif\r
+#endif\r
+\r
+#if defined(__LIBCOMO__)\r
+ //\r
+ // como on linux doesn't have std:: c functions:\r
+ // NOTE: versions of libcomo prior to beta28 have octal version numbering,\r
+ // e.g. version 25 is 21 (dec)\r
+ //\r
+# if __LIBCOMO_VERSION__ <= 20\r
+# define BOOST_NO_STDC_NAMESPACE\r
+# endif\r
+\r
+# if __LIBCOMO_VERSION__ <= 21\r
+# define BOOST_NO_SWPRINTF\r
+# endif\r
+\r
+#endif\r
+\r
+//\r
+// If glibc is past version 2 then we definitely have\r
+// gettimeofday, earlier versions may or may not have it:\r
+//\r
+#if defined(__GLIBC__) && (__GLIBC__ >= 2)\r
+# define BOOST_HAS_GETTIMEOFDAY\r
+#endif\r
+\r
+#ifdef __USE_POSIX199309\r
+# define BOOST_HAS_NANOSLEEP\r
+#endif\r
+\r
+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)\r
+// __GLIBC_PREREQ is available since 2.1.2\r
+\r
+ // swprintf is available since glibc 2.2.0\r
+# if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98))\r
+# define BOOST_NO_SWPRINTF\r
+# endif\r
+#else\r
+# define BOOST_NO_SWPRINTF\r
+#endif\r
+\r
+// boilerplate code:\r
+#define BOOST_HAS_UNISTD_H\r
+#include <boost/config/posix_features.hpp>\r
+\r
+#ifndef __GNUC__\r
+//\r
+// if the compiler is not gcc we still need to be able to parse\r
+// the GNU system headers, some of which (mainly <stdint.h>)\r
+// use GNU specific extensions:\r
+//\r
+# ifndef __extension__\r
+# define __extension__\r
+# endif\r
+# ifndef __const__\r
+# define __const__ const\r
+# endif\r
+# ifndef __volatile__\r
+# define __volatile__ volatile\r
+# endif\r
+# ifndef __signed__\r
+# define __signed__ signed\r
+# endif\r
+# ifndef __typeof__\r
+# define __typeof__ typeof\r
+# endif\r
+# ifndef __inline__\r
+# define __inline__ inline\r
+# endif\r
+#endif\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Darin Adler 2001 - 2002. \r
+// (C) Copyright Bill Kempf 2002. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Mac OS specific config options:\r
+\r
+#define BOOST_PLATFORM "Mac OS"\r
+\r
+#if __MACH__ && !defined(_MSL_USING_MSL_C)\r
+\r
+// Using the Mac OS X system BSD-style C library.\r
+\r
+# ifndef BOOST_HAS_UNISTD_H\r
+# define BOOST_HAS_UNISTD_H\r
+# endif\r
+//\r
+// Begin by including our boilerplate code for POSIX\r
+// feature detection, this is safe even when using\r
+// the MSL as Metrowerks supply their own <unistd.h>\r
+// to replace the platform-native BSD one. G++ users\r
+// should also always be able to do this on MaxOS X.\r
+//\r
+# include <boost/config/posix_features.hpp>\r
+# ifndef BOOST_HAS_STDINT_H\r
+# define BOOST_HAS_STDINT_H\r
+# endif\r
+\r
+//\r
+// BSD runtime has pthreads, sigaction, sched_yield and gettimeofday,\r
+// of these only pthreads are advertised in <unistd.h>, so set the \r
+// other options explicitly:\r
+//\r
+# define BOOST_HAS_SCHED_YIELD\r
+# define BOOST_HAS_GETTIMEOFDAY\r
+# define BOOST_HAS_SIGACTION\r
+\r
+# if (__GNUC__ < 3) && !defined( __APPLE_CC__)\r
+\r
+// GCC strange "ignore std" mode works better if you pretend everything\r
+// is in the std namespace, for the most part.\r
+\r
+# define BOOST_NO_STDC_NAMESPACE\r
+# endif\r
+\r
+# if (__GNUC__ == 4)\r
+\r
+// Both gcc and intel require these. \r
+# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE\r
+# define BOOST_HAS_NANOSLEEP\r
+\r
+# endif\r
+\r
+#else\r
+\r
+// Using the MSL C library.\r
+\r
+// We will eventually support threads in non-Carbon builds, but we do\r
+// not support this yet.\r
+# if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON )\r
+\r
+# if !defined(BOOST_HAS_PTHREADS)\r
+# define BOOST_HAS_MPTASKS\r
+# elif ( __dest_os == __mac_os_x )\r
+// We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the\r
+// gettimeofday and no posix.\r
+# define BOOST_HAS_GETTIMEOFDAY\r
+# endif\r
+\r
+// The MP task implementation of Boost Threads aims to replace MP-unsafe\r
+// parts of the MSL, so we turn on threads unconditionally.\r
+# define BOOST_HAS_THREADS\r
+\r
+// The remote call manager depends on this.\r
+# define BOOST_BIND_ENABLE_PASCAL\r
+\r
+# endif\r
+\r
+#endif\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright Jim Douglas 2005. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// QNX specific config options:\r
+\r
+#define BOOST_PLATFORM "QNX"\r
+\r
+#define BOOST_HAS_UNISTD_H\r
+#include <boost/config/posix_features.hpp>\r
+\r
+// QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h\r
+// or log1p and expm1:\r
+#undef BOOST_HAS_NL_TYPES_H\r
+#undef BOOST_HAS_LOG1P\r
+#undef BOOST_HAS_EXPM1\r
+\r
+#define BOOST_HAS_PTHREADS\r
+#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE\r
+\r
+#define BOOST_HAS_GETTIMEOFDAY\r
+#define BOOST_HAS_CLOCK_GETTIME\r
+#define BOOST_HAS_NANOSLEEP\r
+\r
+\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Jens Maurer 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// sun specific config options:\r
+\r
+#define BOOST_PLATFORM "Sun Solaris"\r
+\r
+#define BOOST_HAS_GETTIMEOFDAY\r
+\r
+// boilerplate code:\r
+#define BOOST_HAS_UNISTD_H\r
+#include <boost/config/posix_features.hpp>\r
+\r
+//\r
+// pthreads don't actually work with gcc unless _PTHREADS is defined:\r
+//\r
+#if defined(__GNUC__) && defined(_POSIX_THREADS) && !defined(_PTHREADS)\r
+# undef BOOST_HAS_PTHREADS\r
+#endif\r
+\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright Yuriy Krasnoschek 2009. \r
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Jens Maurer 2001 - 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// symbian specific config options:\r
+\r
+\r
+#define BOOST_PLATFORM "Symbian"\r
+#define BOOST_SYMBIAN 1\r
+\r
+\r
+#if defined(__S60_3X__)\r
+// Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL\r
+# define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK\r
+// make sure we have __GLIBC_PREREQ if available at all\r
+# include <cstdlib>\r
+// boilerplate code:\r
+# define BOOST_HAS_UNISTD_H\r
+# include <boost/config/posix_features.hpp>\r
+// S60 SDK defines _POSIX_VERSION as POSIX.1\r
+# ifndef BOOST_HAS_STDINT_H\r
+# define BOOST_HAS_STDINT_H\r
+# endif\r
+# ifndef BOOST_HAS_GETTIMEOFDAY\r
+# define BOOST_HAS_GETTIMEOFDAY\r
+# endif\r
+# ifndef BOOST_HAS_DIRENT_H\r
+# define BOOST_HAS_DIRENT_H\r
+# endif\r
+# ifndef BOOST_HAS_SIGACTION\r
+# define BOOST_HAS_SIGACTION\r
+# endif\r
+# ifndef BOOST_HAS_PTHREADS\r
+# define BOOST_HAS_PTHREADS\r
+# endif\r
+# ifndef BOOST_HAS_NANOSLEEP\r
+# define BOOST_HAS_NANOSLEEP\r
+# endif\r
+# ifndef BOOST_HAS_SCHED_YIELD\r
+# define BOOST_HAS_SCHED_YIELD\r
+# endif\r
+# ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE\r
+# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE\r
+# endif\r
+# ifndef BOOST_HAS_LOG1P\r
+# define BOOST_HAS_LOG1P\r
+# endif\r
+# ifndef BOOST_HAS_EXPM1\r
+# define BOOST_HAS_EXPM1\r
+# endif\r
+# ifndef BOOST_POSIX_API\r
+# define BOOST_POSIX_API\r
+# endif\r
+// endianess support\r
+# include <sys/endian.h>\r
+// Symbian SDK provides _BYTE_ORDER instead of __BYTE_ORDER\r
+# ifndef __LITTLE_ENDIAN\r
+# ifdef _LITTLE_ENDIAN\r
+# define __LITTLE_ENDIAN _LITTLE_ENDIAN\r
+# else\r
+# define __LITTLE_ENDIAN 1234\r
+# endif\r
+# endif\r
+# ifndef __BIG_ENDIAN\r
+# ifdef _BIG_ENDIAN\r
+# define __BIG_ENDIAN _BIG_ENDIAN\r
+# else\r
+# define __BIG_ENDIAN 4321\r
+# endif\r
+# endif\r
+# ifndef __BYTE_ORDER\r
+# define __BYTE_ORDER __LITTLE_ENDIAN // Symbian is LE\r
+# endif\r
+// Known limitations\r
+# define BOOST_ASIO_DISABLE_SERIAL_PORT\r
+# define BOOST_DATE_TIME_NO_LOCALE\r
+# define BOOST_NO_STD_WSTRING\r
+# define BOOST_EXCEPTION_DISABLE\r
+# define BOOST_NO_EXCEPTIONS\r
+\r
+#else // TODO: More platform support e.g. UIQ\r
+# error "Unsuppoted Symbian SDK"\r
+#endif\r
+\r
+#if defined(__WINSCW__) && !defined(BOOST_DISABLE_WIN32)\r
+# define BOOST_DISABLE_WIN32 // winscw defines WIN32 macro\r
+#endif\r
+\r
+\r
--- /dev/null
+// (C) Copyright Artyom Beilis 2010. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) \r
+\r
+#ifndef BOOST_CONFIG_PLATFORM_VMS_HPP \r
+#define BOOST_CONFIG_PLATFORM_VMS_HPP \r
+\r
+#define BOOST_PLATFORM "OpenVMS" \r
+\r
+#undef BOOST_HAS_STDINT_H \r
+#define BOOST_HAS_UNISTD_H \r
+#define BOOST_HAS_NL_TYPES_H \r
+#define BOOST_HAS_GETTIMEOFDAY \r
+#define BOOST_HAS_DIRENT_H \r
+#define BOOST_HAS_PTHREADS \r
+#define BOOST_HAS_NANOSLEEP \r
+#define BOOST_HAS_CLOCK_GETTIME \r
+#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE \r
+#define BOOST_HAS_LOG1P \r
+#define BOOST_HAS_EXPM1 \r
+#define BOOST_HAS_THREADS \r
+#undef BOOST_HAS_SCHED_YIELD \r
+\r
+#endif \r
--- /dev/null
+// (C) Copyright Dustin Spicuzza 2009. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// vxWorks specific config options:\r
+\r
+#define BOOST_PLATFORM "vxWorks"\r
+\r
+#define BOOST_NO_CWCHAR\r
+#define BOOST_NO_INTRINSIC_WCHAR_T\r
+\r
+#if defined(__GNUC__) && defined(__STRICT_ANSI__)\r
+#define BOOST_NO_INT64_T\r
+#endif\r
+\r
+#define BOOST_HAS_UNISTD_H\r
+\r
+// these allow posix_features to work, since vxWorks doesn't\r
+// define them itself\r
+#define _POSIX_TIMERS 1\r
+#define _POSIX_THREADS 1\r
+\r
+// vxworks doesn't work with asio serial ports\r
+#define BOOST_ASIO_DISABLE_SERIAL_PORT\r
+\r
+// boilerplate code:\r
+#include <boost/config/posix_features.hpp>\r
+ \r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Bill Kempf 2001. \r
+// (C) Copyright Aleksey Gurtovoy 2003. \r
+// (C) Copyright Rene Rivera 2005.\r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Win32 specific config options:\r
+\r
+#define BOOST_PLATFORM "Win32"\r
+\r
+// Get the information about the MinGW runtime, i.e. __MINGW32_*VERSION.\r
+#if defined(__MINGW32__)\r
+# include <_mingw.h>\r
+#endif\r
+\r
+#if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF)\r
+# define BOOST_NO_SWPRINTF\r
+#endif\r
+\r
+// Default defines for BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT\r
+// If a compiler doesn't support __declspec(dllexport)/__declspec(dllimport),\r
+// its boost/config/compiler/ file must define BOOST_SYMBOL_EXPORT and\r
+// BOOST_SYMBOL_IMPORT\r
+#ifndef BOOST_SYMBOL_EXPORT\r
+# define BOOST_HAS_DECLSPEC\r
+# define BOOST_SYMBOL_EXPORT __declspec(dllexport)\r
+# define BOOST_SYMBOL_IMPORT __declspec(dllimport)\r
+#endif\r
+\r
+#if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0)))\r
+# define BOOST_HAS_STDINT_H\r
+# define __STDC_LIMIT_MACROS\r
+# define BOOST_HAS_DIRENT_H\r
+# define BOOST_HAS_UNISTD_H\r
+#endif\r
+\r
+#if defined(__MINGW32__) && (__GNUC__ >= 4)\r
+# define BOOST_HAS_EXPM1\r
+# define BOOST_HAS_LOG1P\r
+# define BOOST_HAS_GETTIMEOFDAY\r
+#endif\r
+//\r
+// Win32 will normally be using native Win32 threads,\r
+// but there is a pthread library avaliable as an option,\r
+// we used to disable this when BOOST_DISABLE_WIN32 was \r
+// defined but no longer - this should allow some\r
+// files to be compiled in strict mode - while maintaining\r
+// a consistent setting of BOOST_HAS_THREADS across\r
+// all translation units (needed for shared_ptr etc).\r
+//\r
+\r
+#ifdef _WIN32_WCE\r
+# define BOOST_NO_ANSI_APIS\r
+#endif\r
+\r
+#ifndef BOOST_HAS_PTHREADS\r
+# define BOOST_HAS_WINTHREADS\r
+#endif\r
+\r
+#ifndef BOOST_DISABLE_WIN32\r
+// WEK: Added\r
+#define BOOST_HAS_FTIME\r
+#define BOOST_WINDOWS 1\r
+\r
+#endif\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// All POSIX feature tests go in this file,\r
+// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well\r
+// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's\r
+// may be present but none-functional unless _POSIX_C_SOURCE and\r
+// _XOPEN_SOURCE have been defined to the right value (it's up\r
+// to the user to do this *before* including any header, although\r
+// in most cases the compiler will do this for you).\r
+\r
+# if defined(BOOST_HAS_UNISTD_H)\r
+# include <unistd.h>\r
+\r
+ // XOpen has <nl_types.h>, but is this the correct version check?\r
+# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3)\r
+# define BOOST_HAS_NL_TYPES_H\r
+# endif\r
+\r
+ // POSIX version 6 requires <stdint.h>\r
+# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100)\r
+# define BOOST_HAS_STDINT_H\r
+# endif\r
+\r
+ // POSIX version 2 requires <dirent.h>\r
+# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L)\r
+# define BOOST_HAS_DIRENT_H\r
+# endif\r
+\r
+ // POSIX version 3 requires <signal.h> to have sigaction:\r
+# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L)\r
+# define BOOST_HAS_SIGACTION\r
+# endif\r
+ // POSIX defines _POSIX_THREADS > 0 for pthread support,\r
+ // however some platforms define _POSIX_THREADS without\r
+ // a value, hence the (_POSIX_THREADS+0 >= 0) check.\r
+ // Strictly speaking this may catch platforms with a\r
+ // non-functioning stub <pthreads.h>, but such occurrences should\r
+ // occur very rarely if at all.\r
+# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS)\r
+# define BOOST_HAS_PTHREADS\r
+# endif\r
+\r
+ // BOOST_HAS_NANOSLEEP:\r
+ // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME:\r
+# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \\r
+ || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))\r
+# define BOOST_HAS_NANOSLEEP\r
+# endif\r
+\r
+ // BOOST_HAS_CLOCK_GETTIME:\r
+ // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME\r
+ // but at least one platform - linux - defines that flag without\r
+ // defining clock_gettime):\r
+# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0))\r
+# define BOOST_HAS_CLOCK_GETTIME\r
+# endif\r
+\r
+ // BOOST_HAS_SCHED_YIELD:\r
+ // This is predicated on _POSIX_PRIORITY_SCHEDULING or\r
+ // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME.\r
+# if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\\r
+ || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\\r
+ || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))\r
+# define BOOST_HAS_SCHED_YIELD\r
+# endif\r
+\r
+ // BOOST_HAS_GETTIMEOFDAY:\r
+ // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE:\r
+ // These are predicated on _XOPEN_VERSION, and appears to be first released\r
+ // in issue 4, version 2 (_XOPEN_VERSION > 500).\r
+ // Likewise for the functions log1p and expm1.\r
+# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500)\r
+# define BOOST_HAS_GETTIMEOFDAY\r
+# if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500)\r
+# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE\r
+# endif\r
+# ifndef BOOST_HAS_LOG1P\r
+# define BOOST_HAS_LOG1P\r
+# endif\r
+# ifndef BOOST_HAS_EXPM1\r
+# define BOOST_HAS_EXPM1\r
+# endif\r
+# endif\r
+\r
+# endif\r
+\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+\r
+#ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP\r
+#define BOOST_CONFIG_REQUIRES_THREADS_HPP\r
+\r
+#ifndef BOOST_CONFIG_HPP\r
+# include <boost/config.hpp>\r
+#endif\r
+\r
+#if defined(BOOST_DISABLE_THREADS)\r
+\r
+//\r
+// special case to handle versions of gcc which don't currently support threads:\r
+//\r
+#if defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC_MINOR__ <= 3) || !defined(BOOST_STRICT_CONFIG))\r
+//\r
+// this is checked up to gcc 3.3:\r
+//\r
+#if defined(__sgi) || defined(__hpux)\r
+# error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)"\r
+#endif\r
+\r
+#endif\r
+\r
+# error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"\r
+\r
+#elif !defined(BOOST_HAS_THREADS)\r
+\r
+# if defined __COMO__\r
+// Comeau C++\r
+# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_MT (Windows) or -D_REENTRANT (Unix)"\r
+\r
+#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)\r
+// Intel\r
+#ifdef _WIN32\r
+# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"\r
+#else\r
+# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp"\r
+#endif\r
+\r
+# elif defined __GNUC__\r
+// GNU C++:\r
+# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"\r
+\r
+#elif defined __sgi\r
+// SGI MIPSpro C++\r
+# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE"\r
+\r
+#elif defined __DECCXX\r
+// Compaq Tru64 Unix cxx\r
+# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread"\r
+\r
+#elif defined __BORLANDC__\r
+// Borland\r
+# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM"\r
+\r
+#elif defined __MWERKS__\r
+// Metrowerks CodeWarrior\r
+# 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"\r
+\r
+#elif defined __SUNPRO_CC\r
+// Sun Workshop Compiler C++\r
+# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt"\r
+\r
+#elif defined __HP_aCC\r
+// HP aCC\r
+# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt"\r
+\r
+#elif defined(__IBMCPP__)\r
+// IBM Visual Age\r
+# error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler"\r
+\r
+#elif defined _MSC_VER\r
+// Microsoft Visual C++\r
+//\r
+// Must remain the last #elif since some other vendors (Metrowerks, for\r
+// example) also #define _MSC_VER\r
+# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"\r
+\r
+#else\r
+\r
+# error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use"\r
+\r
+#endif // compilers\r
+\r
+#endif // BOOST_HAS_THREADS\r
+\r
+#endif // BOOST_CONFIG_REQUIRES_THREADS_HPP\r
--- /dev/null
+// Boost compiler configuration selection header file\r
+\r
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Martin Wille 2003.\r
+// (C) Copyright Guillaume Melquiond 2003.\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// (See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org/ for most recent version.\r
+\r
+\r
+// one identification macro for each of the\r
+// compilers we support:\r
+\r
+# define BOOST_CXX_GCCXML 0\r
+# define BOOST_CXX_NVCC 0\r
+# define BOOST_CXX_COMO 0\r
+# define BOOST_CXX_PATHSCALE 0\r
+# define BOOST_CXX_CLANG 0\r
+# define BOOST_CXX_DMC 0\r
+# define BOOST_CXX_INTEL 0\r
+# define BOOST_CXX_GNUC 0\r
+# define BOOST_CXX_KCC 0\r
+# define BOOST_CXX_SGI 0\r
+# define BOOST_CXX_TRU64 0\r
+# define BOOST_CXX_GHS 0\r
+# define BOOST_CXX_BORLAND 0\r
+# define BOOST_CXX_CW 0\r
+# define BOOST_CXX_SUNPRO 0\r
+# define BOOST_CXX_HPACC 0\r
+# define BOOST_CXX_MPW 0\r
+# define BOOST_CXX_IBMCPP 0\r
+# define BOOST_CXX_MSVC 0\r
+# define BOOST_CXX_PGI 0\r
+# define BOOST_CXX_NVCC 0\r
+\r
+\r
+// locate which compiler we are using and define\r
+// BOOST_COMPILER_CONFIG as needed: \r
+\r
+#if defined(__GCCXML__)\r
+// GCC-XML emulates other compilers, it has to appear first here!\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"\r
+\r
+#elif defined __CUDACC__\r
+// NVIDIA CUDA C++ compiler for GPU\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/nvcc.hpp"\r
+\r
+#elif defined __COMO__\r
+// Comeau C++\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"\r
+\r
+#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4)\r
+// PathScale EKOPath compiler (has to come before clang and gcc)\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp"\r
+\r
+#elif defined __clang__\r
+// Clang C++ emulates GCC, so it has to appear early.\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp"\r
+\r
+#elif defined __DMC__\r
+// Digital Mars C++\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp"\r
+\r
+#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)\r
+// Intel\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp"\r
+\r
+# elif defined __GNUC__\r
+// GNU C++:\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp"\r
+\r
+#elif defined __KCC\r
+// Kai C++\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp"\r
+\r
+#elif defined __sgi\r
+// SGI MIPSpro C++\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp"\r
+\r
+#elif defined __DECCXX\r
+// Compaq Tru64 Unix cxx\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp"\r
+\r
+#elif defined __ghs\r
+// Greenhills C++\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp"\r
+\r
+#elif defined __CODEGEARC__\r
+// CodeGear - must be checked for before Borland\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp"\r
+\r
+#elif defined __BORLANDC__\r
+// Borland\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp"\r
+\r
+#elif defined __MWERKS__\r
+// Metrowerks CodeWarrior\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp"\r
+\r
+#elif defined __SUNPRO_CC\r
+// Sun Workshop Compiler C++\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp"\r
+\r
+#elif defined __HP_aCC\r
+// HP aCC\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp"\r
+\r
+#elif defined(__MRC__) || defined(__SC__)\r
+// MPW MrCpp or SCpp\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp"\r
+\r
+#elif defined(__IBMCPP__)\r
+// IBM Visual Age\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp"\r
+\r
+#elif defined(__PGI)\r
+// Portland Group Inc.\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp"\r
+\r
+#elif defined _MSC_VER\r
+// Microsoft Visual C++\r
+//\r
+// Must remain the last #elif since some other vendors (Metrowerks, for\r
+// example) also #define _MSC_VER\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp"\r
+\r
+#elif defined (BOOST_ASSERT_CONFIG)\r
+// this must come last - generate an error if we don't\r
+// recognise the compiler:\r
+# 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)"\r
+\r
+#endif\r
--- /dev/null
+// Boost compiler configuration selection header file\r
+\r
+// (C) Copyright John Maddock 2001 - 2002. \r
+// (C) Copyright Jens Maurer 2001. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed.\r
+// Note that we define the headers to include using "header_name" not\r
+// <header_name> in order to prevent macro expansion within the header\r
+// name (for example "linux" is a macro on linux systems).\r
+\r
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) \r
+// linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though?\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp"\r
+\r
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)\r
+// BSD:\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp"\r
+\r
+#elif defined(sun) || defined(__sun)\r
+// solaris:\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp"\r
+\r
+#elif defined(__sgi)\r
+// SGI Irix:\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp"\r
+\r
+#elif defined(__hpux)\r
+// hp unix:\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp"\r
+\r
+#elif defined(__CYGWIN__)\r
+// cygwin is not win32:\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp"\r
+\r
+#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)\r
+// win32:\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp"\r
+\r
+#elif defined(__BEOS__)\r
+// BeOS\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"\r
+\r
+#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)\r
+// MacOS\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp"\r
+\r
+#elif defined(__IBMCPP__) || defined(_AIX)\r
+// IBM\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp"\r
+\r
+#elif defined(__amigaos__)\r
+// AmigaOS\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp"\r
+\r
+#elif defined(__QNXNTO__)\r
+// QNX:\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp"\r
+\r
+#elif defined(__VXWORKS__)\r
+// vxWorks:\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp"\r
+\r
+#elif defined(__SYMBIAN32__) \r
+// Symbian: \r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp" \r
+\r
+#elif defined(__VMS) \r
+// VMS:\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" \r
+#else\r
+\r
+# if defined(unix) \\r
+ || defined(__unix) \\r
+ || defined(_XOPEN_SOURCE) \\r
+ || defined(_POSIX_SOURCE)\r
+\r
+ // generic unix platform:\r
+\r
+# ifndef BOOST_HAS_UNISTD_H\r
+# define BOOST_HAS_UNISTD_H\r
+# endif\r
+\r
+# include <boost/config/posix_features.hpp>\r
+\r
+# endif\r
+\r
+# if defined (BOOST_ASSERT_CONFIG)\r
+ // this must come last - generate an error if we don't\r
+ // recognise the platform:\r
+# error "Unknown platform - please configure and report the results to boost.org"\r
+# endif\r
+\r
+#endif\r
+\r
+\r
+\r
--- /dev/null
+// Boost compiler configuration selection header file\r
+\r
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Jens Maurer 2001 - 2002. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed:\r
+\r
+// First include <cstddef> to determine if some version of STLport is in use as the std lib\r
+// (do not rely on this header being included since users can short-circuit this header \r
+// if they know whose std lib they are using.)\r
+#include <cstddef>\r
+\r
+#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)\r
+// STLPort library; this _must_ come first, otherwise since\r
+// STLport typically sits on top of some other library, we\r
+// can end up detecting that first rather than STLport:\r
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp"\r
+\r
+#else\r
+\r
+// If our std lib was not some version of STLport, then include <utility> as it is about \r
+// the smallest of the std lib headers that includes real C++ stuff. (Some std libs do not\r
+// include their C++-related macros in <cstddef> so this additional include makes sure\r
+// we get those definitions)\r
+// (again do not rely on this header being included since users can short-circuit this \r
+// header if they know whose std lib they are using.)\r
+#include <boost/config/no_tr1/utility.hpp>\r
+\r
+#if defined(__LIBCOMO__)\r
+// Comeau STL:\r
+#define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp"\r
+\r
+#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)\r
+// Rogue Wave library:\r
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp"\r
+\r
+#elif defined(_LIBCPP_VERSION)\r
+// libc++\r
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp"\r
+\r
+#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)\r
+// GNU libstdc++ 3\r
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp"\r
+\r
+#elif defined(__STL_CONFIG_H)\r
+// generic SGI STL\r
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp"\r
+\r
+#elif defined(__MSL_CPP__)\r
+// MSL standard lib:\r
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp"\r
+\r
+#elif defined(__IBMCPP__)\r
+// take the default VACPP std lib\r
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp"\r
+\r
+#elif defined(MSIPL_COMPILE_H)\r
+// Modena C++ standard library\r
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp"\r
+\r
+#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)\r
+// Dinkumware Library (this has to appear after any possible replacement libraries):\r
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp"\r
+\r
+#elif defined (BOOST_ASSERT_CONFIG)\r
+// this must come last - generate an error if we don't\r
+// recognise the library:\r
+# error "Unknown standard library - please configure and report the results to boost.org"\r
+\r
+#endif\r
+\r
+#endif\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003.\r
+// (C) Copyright Jens Maurer 2001.\r
+// (C) Copyright Peter Dimov 2001.\r
+// (C) Copyright David Abrahams 2002.\r
+// (C) Copyright Guillaume Melquiond 2003.\r
+// Use, modification and distribution are subject to the\r
+// Boost Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Dinkumware standard library config:\r
+\r
+#if !defined(_YVALS) && !defined(_CPPLIB_VER)\r
+#include <boost/config/no_tr1/utility.hpp>\r
+#if !defined(_YVALS) && !defined(_CPPLIB_VER)\r
+#error This is not the Dinkumware lib!\r
+#endif\r
+#endif\r
+\r
+\r
+#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306)\r
+ // full dinkumware 3.06 and above\r
+ // fully conforming provided the compiler supports it:\r
+# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h\r
+# define BOOST_NO_STDC_NAMESPACE\r
+# endif\r
+# if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC)\r
+# define BOOST_NO_STD_ALLOCATOR\r
+# endif\r
+# define BOOST_HAS_PARTIAL_STD_ALLOCATOR\r
+# if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)\r
+ // if this lib version is set up for vc6 then there is no std::use_facet:\r
+# define BOOST_NO_STD_USE_FACET\r
+# define BOOST_HAS_TWO_ARG_USE_FACET\r
+ // C lib functions aren't in namespace std either:\r
+# define BOOST_NO_STDC_NAMESPACE\r
+ // and nor is <exception>\r
+# define BOOST_NO_EXCEPTION_STD_NAMESPACE\r
+# endif\r
+// There's no numeric_limits<long long> support unless _LONGLONG is defined:\r
+# if !defined(_LONGLONG) && (_CPPLIB_VER <= 310)\r
+# define BOOST_NO_MS_INT64_NUMERIC_LIMITS\r
+# endif\r
+// 3.06 appears to have (non-sgi versions of) <hash_set> & <hash_map>,\r
+// and no <slist> at all\r
+#else\r
+# define BOOST_MSVC_STD_ITERATOR 1\r
+# define BOOST_NO_STD_ITERATOR\r
+# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS\r
+# define BOOST_NO_STD_ALLOCATOR\r
+# define BOOST_NO_STDC_NAMESPACE\r
+# define BOOST_NO_STD_USE_FACET\r
+# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN\r
+# define BOOST_HAS_MACRO_USE_FACET\r
+# ifndef _CPPLIB_VER\r
+ // Updated Dinkum library defines this, and provides\r
+ // its own min and max definitions, as does MTA version.\r
+# ifndef __MTA__ \r
+# define BOOST_NO_STD_MIN_MAX\r
+# endif\r
+# define BOOST_NO_MS_INT64_NUMERIC_LIMITS\r
+# endif\r
+#endif\r
+\r
+//\r
+// std extension namespace is stdext for vc7.1 and later, \r
+// the same applies to other compilers that sit on top\r
+// of vc7.1 (Intel and Comeau):\r
+//\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__)\r
+# define BOOST_STD_EXTENSION_NAMESPACE stdext\r
+#endif\r
+\r
+\r
+#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306)\r
+ // if we're using a dinkum lib that's\r
+ // been configured for VC6/7 then there is\r
+ // no iterator traits (true even for icl)\r
+# define BOOST_NO_STD_ITERATOR_TRAITS\r
+#endif\r
+\r
+#if defined(__ICL) && (__ICL < 800) && defined(_CPPLIB_VER) && (_CPPLIB_VER <= 310)\r
+// Intel C++ chokes over any non-trivial use of <locale>\r
+// this may be an overly restrictive define, but regex fails without it:\r
+# define BOOST_NO_STD_LOCALE\r
+#endif\r
+\r
+#include <typeinfo>\r
+#if !_HAS_EXCEPTIONS\r
+# define BOOST_NO_STD_TYPEINFO \r
+#endif \r
+\r
+// C++0x headers implemented in 520 (as shipped by Microsoft)\r
+//\r
+#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520\r
+# define BOOST_NO_0X_HDR_ARRAY\r
+# define BOOST_NO_0X_HDR_CODECVT\r
+# define BOOST_NO_0X_HDR_FORWARD_LIST\r
+# define BOOST_NO_0X_HDR_INITIALIZER_LIST\r
+# define BOOST_NO_0X_HDR_RANDOM\r
+# define BOOST_NO_0X_HDR_REGEX\r
+# define BOOST_NO_0X_HDR_SYSTEM_ERROR\r
+# define BOOST_NO_0X_HDR_TYPE_TRAITS\r
+# define BOOST_NO_STD_UNORDERED // deprecated; see following\r
+# define BOOST_NO_0X_HDR_UNORDERED_MAP\r
+# define BOOST_NO_0X_HDR_UNORDERED_SET\r
+# define BOOST_NO_0X_HDR_TUPLE\r
+# define BOOST_NO_0X_HDR_TYPEINDEX\r
+# define BOOST_NO_NUMERIC_LIMITS_LOWEST\r
+#endif\r
+\r
+#if !defined(_HAS_TR1_IMPORTS) && !defined(BOOST_NO_0X_HDR_TUPLE)\r
+# define BOOST_NO_0X_HDR_TUPLE\r
+#endif\r
+\r
+// C++0x headers not yet implemented\r
+//\r
+# define BOOST_NO_0X_HDR_CHRONO\r
+# define BOOST_NO_0X_HDR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_CONDITION_VARIABLE\r
+# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS\r
+# define BOOST_NO_0X_HDR_FUTURE\r
+# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MUTEX\r
+# define BOOST_NO_0X_HDR_RATIO\r
+# define BOOST_NO_0X_HDR_THREAD\r
+\r
+#ifdef _CPPLIB_VER\r
+# define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER\r
+#else\r
+# define BOOST_DINKUMWARE_STDLIB 1\r
+#endif\r
+\r
+#ifdef _CPPLIB_VER\r
+# define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER)\r
+#else\r
+# define BOOST_STDLIB "Dinkumware standard library version 1.x"\r
+#endif\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2002 - 2003. \r
+// (C) Copyright Jens Maurer 2002 - 2003. \r
+// (C) Copyright Beman Dawes 2002 - 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Comeau STL:\r
+\r
+#if !defined(__LIBCOMO__)\r
+# include <boost/config/no_tr1/utility.hpp>\r
+# if !defined(__LIBCOMO__)\r
+# error "This is not the Comeau STL!"\r
+# endif\r
+#endif\r
+\r
+//\r
+// std::streambuf<wchar_t> is non-standard\r
+// NOTE: versions of libcomo prior to beta28 have octal version numbering,\r
+// e.g. version 25 is 21 (dec)\r
+#if __LIBCOMO_VERSION__ <= 22\r
+# define BOOST_NO_STD_WSTREAMBUF\r
+#endif\r
+\r
+#if (__LIBCOMO_VERSION__ <= 31) && defined(_WIN32)\r
+#define BOOST_NO_SWPRINTF\r
+#endif\r
+\r
+#if __LIBCOMO_VERSION__ >= 31\r
+# define BOOST_HAS_HASH\r
+# define BOOST_HAS_SLIST\r
+#endif\r
+\r
+// C++0x headers not yet implemented\r
+//\r
+# define BOOST_NO_0X_HDR_ARRAY\r
+# define BOOST_NO_0X_HDR_CHRONO\r
+# define BOOST_NO_0X_HDR_CODECVT\r
+# define BOOST_NO_0X_HDR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_CONDITION_VARIABLE\r
+# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS\r
+# define BOOST_NO_0X_HDR_FORWARD_LIST\r
+# define BOOST_NO_0X_HDR_FUTURE\r
+# define BOOST_NO_0X_HDR_INITIALIZER_LIST\r
+# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MUTEX\r
+# define BOOST_NO_0X_HDR_RANDOM\r
+# define BOOST_NO_0X_HDR_RATIO\r
+# define BOOST_NO_0X_HDR_REGEX\r
+# define BOOST_NO_0X_HDR_SYSTEM_ERROR\r
+# define BOOST_NO_0X_HDR_THREAD\r
+# define BOOST_NO_0X_HDR_TUPLE\r
+# define BOOST_NO_0X_HDR_TYPE_TRAITS\r
+# define BOOST_NO_0X_HDR_TYPEINDEX\r
+# define BOOST_NO_STD_UNORDERED // deprecated; see following\r
+# define BOOST_NO_0X_HDR_UNORDERED_MAP\r
+# define BOOST_NO_0X_HDR_UNORDERED_SET\r
+# define BOOST_NO_NUMERIC_LIMITS_LOWEST\r
+\r
+//\r
+// Intrinsic type_traits support.\r
+// The SGI STL has it's own __type_traits class, which\r
+// has intrinsic compiler support with SGI's compilers.\r
+// Whatever map SGI style type traits to boost equivalents:\r
+//\r
+#define BOOST_HAS_SGI_TYPE_TRAITS\r
+\r
+#define BOOST_STDLIB "Comeau standard library " BOOST_STRINGIZE(__LIBCOMO_VERSION__)\r
+\r
+\r
--- /dev/null
+// (C) Copyright Christopher Jefferson 2011.\r
+// Use, modification and distribution are subject to the\r
+// Boost Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// config for libc++\r
+// Might need more in here later.\r
+\r
+#if !defined(_LIBCPP_VERSION)\r
+# include <ciso646>\r
+# if !defined(_LIBCPP_VERSION)\r
+# error "This is not libc++!"\r
+# endif\r
+#endif\r
+\r
+#define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION)\r
+\r
+#define BOOST_HAS_THREADS\r
+\r
+#define BOOST_NO_0X_HDR_CONCEPTS\r
+#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS\r
+#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS\r
+#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS\r
+\r
+#ifdef _LIBCPP_HAS_NO_VARIADICS\r
+# define BOOST_NO_0X_HDR_TUPLE\r
+#endif\r
+\r
+// libc++ uses a non-standard messages_base\r
+#define BOOST_NO_STD_MESSAGES\r
+\r
+// --- end ---\r
--- /dev/null
+// (C) Copyright John Maddock 2001.\r
+// (C) Copyright Jens Maurer 2001.\r
+// Use, modification and distribution are subject to the\r
+// Boost Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// config for libstdc++ v3\r
+// not much to go in here:\r
+\r
+#define BOOST_GNU_STDLIB 1\r
+\r
+#ifdef __GLIBCXX__\r
+#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__)\r
+#else\r
+#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__)\r
+#endif\r
+\r
+#if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T)\r
+# define BOOST_NO_CWCHAR\r
+# define BOOST_NO_CWCTYPE\r
+# define BOOST_NO_STD_WSTRING\r
+# define BOOST_NO_STD_WSTREAMBUF\r
+#endif\r
+\r
+#if defined(__osf__) && !defined(_REENTRANT) \\r
+ && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) )\r
+// GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header\r
+// file is included, therefore for consistency we define it here as well.\r
+# define _REENTRANT\r
+#endif\r
+\r
+#ifdef __GLIBCXX__ // gcc 3.4 and greater:\r
+# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \\r
+ || defined(_GLIBCXX__PTHREADS)\r
+ //\r
+ // If the std lib has thread support turned on, then turn it on in Boost\r
+ // as well. We do this because some gcc-3.4 std lib headers define _REENTANT\r
+ // while others do not...\r
+ //\r
+# define BOOST_HAS_THREADS\r
+# else\r
+# define BOOST_DISABLE_THREADS\r
+# endif\r
+#elif defined(__GLIBCPP__) \\r
+ && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \\r
+ && !defined(_GLIBCPP__PTHREADS)\r
+ // disable thread support if the std lib was built single threaded:\r
+# define BOOST_DISABLE_THREADS\r
+#endif\r
+\r
+#if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT)\r
+// linux on arm apparently doesn't define _REENTRANT\r
+// so just turn on threading support whenever the std lib is thread safe:\r
+# define BOOST_HAS_THREADS\r
+#endif\r
+\r
+#if !defined(_GLIBCPP_USE_LONG_LONG) \\r
+ && !defined(_GLIBCXX_USE_LONG_LONG)\\r
+ && defined(BOOST_HAS_LONG_LONG)\r
+// May have been set by compiler/*.hpp, but "long long" without library\r
+// support is useless.\r
+# undef BOOST_HAS_LONG_LONG\r
+#endif\r
+\r
+// Apple doesn't seem to reliably defined a *unix* macro\r
+#if !defined(CYGWIN) && ( defined(__unix__) \\r
+ || defined(__unix) \\r
+ || defined(unix) \\r
+ || defined(__APPLE__) \\r
+ || defined(__APPLE) \\r
+ || defined(APPLE))\r
+# include <unistd.h>\r
+#endif\r
+\r
+#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0\r
+# define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx\r
+# define BOOST_HAS_SLIST\r
+# define BOOST_HAS_HASH\r
+# define BOOST_SLIST_HEADER <ext/slist>\r
+# if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)\r
+# define BOOST_HASH_SET_HEADER <ext/hash_set>\r
+# define BOOST_HASH_MAP_HEADER <ext/hash_map>\r
+# else\r
+# define BOOST_HASH_SET_HEADER <backward/hash_set>\r
+# define BOOST_HASH_MAP_HEADER <backward/hash_map>\r
+# endif\r
+#endif\r
+\r
+// stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly\r
+// __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++\r
+// developers. He also commented:\r
+//\r
+// "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in\r
+// GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305.\r
+// Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support\r
+// than any release in the 4.2 series."\r
+//\r
+// Another resource for understanding stdlibc++ features is:\r
+// http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x\r
+\r
+// C++0x headers in GCC 4.3.0 and later\r
+//\r
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(__GXX_EXPERIMENTAL_CXX0X__)\r
+# define BOOST_NO_0X_HDR_ARRAY\r
+# define BOOST_NO_0X_HDR_RANDOM\r
+# define BOOST_NO_0X_HDR_REGEX\r
+# define BOOST_NO_0X_HDR_TUPLE\r
+# define BOOST_NO_0X_HDR_TYPE_TRAITS\r
+# define BOOST_NO_STD_UNORDERED // deprecated; see following\r
+# define BOOST_NO_0X_HDR_UNORDERED_MAP\r
+# define BOOST_NO_0X_HDR_UNORDERED_SET\r
+#endif\r
+\r
+// C++0x headers in GCC 4.4.0 and later\r
+//\r
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)\r
+# define BOOST_NO_0X_HDR_CHRONO\r
+# define BOOST_NO_0X_HDR_CONDITION_VARIABLE\r
+# define BOOST_NO_0X_HDR_FORWARD_LIST\r
+# define BOOST_NO_0X_HDR_INITIALIZER_LIST\r
+# define BOOST_NO_0X_HDR_MUTEX\r
+# define BOOST_NO_0X_HDR_RATIO\r
+# define BOOST_NO_0X_HDR_SYSTEM_ERROR\r
+# define BOOST_NO_0X_HDR_THREAD\r
+#endif\r
+\r
+// C++0x features in GCC 4.5.0 and later\r
+//\r
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)\r
+# define BOOST_NO_NUMERIC_LIMITS_LOWEST\r
+#endif\r
+\r
+// C++0x headers not yet implemented\r
+//\r
+# define BOOST_NO_0X_HDR_CODECVT\r
+# define BOOST_NO_0X_HDR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS\r
+# define BOOST_NO_0X_HDR_FUTURE\r
+# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS\r
+# define BOOST_NO_0X_HDR_TYPEINDEX\r
+\r
+// --- end ---\r
--- /dev/null
+// (C) Copyright Jens Maurer 2001. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Modena C++ standard library (comes with KAI C++)\r
+\r
+#if !defined(MSIPL_COMPILE_H)\r
+# include <boost/config/no_tr1/utility.hpp>\r
+# if !defined(__MSIPL_COMPILE_H)\r
+# error "This is not the Modena C++ library!"\r
+# endif\r
+#endif\r
+\r
+#ifndef MSIPL_NL_TYPES\r
+#define BOOST_NO_STD_MESSAGES\r
+#endif\r
+\r
+#ifndef MSIPL_WCHART\r
+#define BOOST_NO_STD_WSTRING\r
+#endif\r
+\r
+// C++0x headers not yet implemented\r
+//\r
+# define BOOST_NO_0X_HDR_ARRAY\r
+# define BOOST_NO_0X_HDR_CHRONO\r
+# define BOOST_NO_0X_HDR_CODECVT\r
+# define BOOST_NO_0X_HDR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_CONDITION_VARIABLE\r
+# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS\r
+# define BOOST_NO_0X_HDR_FORWARD_LIST\r
+# define BOOST_NO_0X_HDR_FUTURE\r
+# define BOOST_NO_0X_HDR_INITIALIZER_LIST\r
+# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MUTEX\r
+# define BOOST_NO_0X_HDR_RANDOM\r
+# define BOOST_NO_0X_HDR_RATIO\r
+# define BOOST_NO_0X_HDR_REGEX\r
+# define BOOST_NO_0X_HDR_SYSTEM_ERROR\r
+# define BOOST_NO_0X_HDR_THREAD\r
+# define BOOST_NO_0X_HDR_TUPLE\r
+# define BOOST_NO_0X_HDR_TYPE_TRAITS\r
+# define BOOST_NO_0X_HDR_TYPEINDEX\r
+# define BOOST_NO_STD_UNORDERED // deprecated; see following\r
+# define BOOST_NO_0X_HDR_UNORDERED_MAP\r
+# define BOOST_NO_0X_HDR_UNORDERED_SET\r
+# define BOOST_NO_NUMERIC_LIMITS_LOWEST\r
+\r
+#define BOOST_STDLIB "Modena C++ standard library"\r
+\r
+\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001. \r
+// (C) Copyright Darin Adler 2001. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Metrowerks standard library:\r
+\r
+#ifndef __MSL_CPP__\r
+# include <boost/config/no_tr1/utility.hpp>\r
+# ifndef __MSL_CPP__\r
+# error This is not the MSL standard library!\r
+# endif\r
+#endif\r
+\r
+#if __MSL_CPP__ >= 0x6000 // Pro 6\r
+# define BOOST_HAS_HASH\r
+# define BOOST_STD_EXTENSION_NAMESPACE Metrowerks\r
+#endif\r
+#define BOOST_HAS_SLIST\r
+\r
+#if __MSL_CPP__ < 0x6209\r
+# define BOOST_NO_STD_MESSAGES\r
+#endif\r
+\r
+// check C lib version for <stdint.h>\r
+#include <cstddef>\r
+\r
+#if defined(__MSL__) && (__MSL__ >= 0x5000)\r
+# define BOOST_HAS_STDINT_H\r
+# if !defined(__PALMOS_TRAPS__)\r
+# define BOOST_HAS_UNISTD_H\r
+# endif\r
+ // boilerplate code:\r
+# include <boost/config/posix_features.hpp>\r
+#endif\r
+\r
+#if defined(_MWMT) || _MSL_THREADSAFE\r
+# define BOOST_HAS_THREADS\r
+#endif\r
+\r
+#ifdef _MSL_NO_EXPLICIT_FUNC_TEMPLATE_ARG\r
+# define BOOST_NO_STD_USE_FACET\r
+# define BOOST_HAS_TWO_ARG_USE_FACET\r
+#endif\r
+\r
+// C++0x headers not yet implemented\r
+//\r
+# define BOOST_NO_0X_HDR_ARRAY\r
+# define BOOST_NO_0X_HDR_CHRONO\r
+# define BOOST_NO_0X_HDR_CODECVT\r
+# define BOOST_NO_0X_HDR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_CONDITION_VARIABLE\r
+# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS\r
+# define BOOST_NO_0X_HDR_FORWARD_LIST\r
+# define BOOST_NO_0X_HDR_FUTURE\r
+# define BOOST_NO_0X_HDR_INITIALIZER_LIST\r
+# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MUTEX\r
+# define BOOST_NO_0X_HDR_RANDOM\r
+# define BOOST_NO_0X_HDR_RATIO\r
+# define BOOST_NO_0X_HDR_REGEX\r
+# define BOOST_NO_0X_HDR_SYSTEM_ERROR\r
+# define BOOST_NO_0X_HDR_THREAD\r
+# define BOOST_NO_0X_HDR_TUPLE\r
+# define BOOST_NO_0X_HDR_TYPE_TRAITS\r
+# define BOOST_NO_0X_HDR_TYPEINDEX\r
+# define BOOST_NO_STD_UNORDERED // deprecated; see following\r
+# define BOOST_NO_0X_HDR_UNORDERED_MAP\r
+# define BOOST_NO_0X_HDR_UNORDERED_SET\r
+# define BOOST_NO_NUMERIC_LIMITS_LOWEST\r
+\r
+#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__)\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Jens Maurer 2001. \r
+// (C) Copyright David Abrahams 2003. \r
+// (C) Copyright Boris Gubenko 2007. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// Rogue Wave std lib:\r
+\r
+#define BOOST_RW_STDLIB 1 \r
+\r
+#if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)\r
+# include <boost/config/no_tr1/utility.hpp>\r
+# if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)\r
+# error This is not the Rogue Wave standard library\r
+# endif\r
+#endif\r
+//\r
+// figure out a consistent version number:\r
+//\r
+#ifndef _RWSTD_VER\r
+# define BOOST_RWSTD_VER 0x010000\r
+#elif _RWSTD_VER < 0x010000\r
+# define BOOST_RWSTD_VER (_RWSTD_VER << 8)\r
+#else\r
+# define BOOST_RWSTD_VER _RWSTD_VER\r
+#endif\r
+\r
+#ifndef _RWSTD_VER\r
+# define BOOST_STDLIB "Rogue Wave standard library version (Unknown version)"\r
+#elif _RWSTD_VER < 0x04010200\r
+ # define BOOST_STDLIB "Rogue Wave standard library version " BOOST_STRINGIZE(_RWSTD_VER)\r
+#else\r
+# ifdef _RWSTD_VER_STR\r
+# define BOOST_STDLIB "Apache STDCXX standard library version " _RWSTD_VER_STR\r
+# else\r
+# define BOOST_STDLIB "Apache STDCXX standard library version " BOOST_STRINGIZE(_RWSTD_VER)\r
+# endif\r
+#endif\r
+\r
+//\r
+// Prior to version 2.2.0 the primary template for std::numeric_limits\r
+// does not have compile time constants, even though specializations of that\r
+// template do:\r
+//\r
+#if BOOST_RWSTD_VER < 0x020200\r
+# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS\r
+#endif\r
+\r
+// Sun CC 5.5 patch 113817-07 adds long long specialization, but does not change the\r
+// library version number (http://sunsolve6.sun.com/search/document.do?assetkey=1-21-113817):\r
+#if BOOST_RWSTD_VER <= 0x020101 && (!defined(__SUNPRO_CC) || (__SUNPRO_CC < 0x550))\r
+# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS\r
+# endif\r
+\r
+//\r
+// Borland version of numeric_limits lacks __int64 specialisation:\r
+//\r
+#ifdef __BORLANDC__\r
+# define BOOST_NO_MS_INT64_NUMERIC_LIMITS\r
+#endif\r
+\r
+//\r
+// No std::iterator if it can't figure out default template args:\r
+//\r
+#if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || (BOOST_RWSTD_VER < 0x020000)\r
+# define BOOST_NO_STD_ITERATOR\r
+#endif\r
+\r
+//\r
+// No iterator traits without partial specialization:\r
+//\r
+#if defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) || defined(RWSTD_NO_CLASS_PARTIAL_SPEC)\r
+# define BOOST_NO_STD_ITERATOR_TRAITS\r
+#endif\r
+\r
+//\r
+// Prior to version 2.0, std::auto_ptr was buggy, and there were no\r
+// new-style iostreams, and no conformant std::allocator:\r
+//\r
+#if (BOOST_RWSTD_VER < 0x020000)\r
+# define BOOST_NO_AUTO_PTR\r
+# define BOOST_NO_STRINGSTREAM\r
+# define BOOST_NO_STD_ALLOCATOR\r
+# define BOOST_NO_STD_LOCALE\r
+#endif\r
+\r
+//\r
+// No template iterator constructors without member template support:\r
+//\r
+#if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(_RWSTD_NO_MEMBER_TEMPLATES)\r
+# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS\r
+#endif\r
+\r
+//\r
+// RW defines _RWSTD_ALLOCATOR if the allocator is conformant and in use\r
+// (the or _HPACC_ part is a hack - the library seems to define _RWSTD_ALLOCATOR\r
+// on HP aCC systems even though the allocator is in fact broken):\r
+//\r
+#if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100)\r
+# define BOOST_NO_STD_ALLOCATOR\r
+#endif\r
+\r
+//\r
+// If we have a std::locale, we still may not have std::use_facet:\r
+//\r
+#if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(BOOST_NO_STD_LOCALE)\r
+# define BOOST_NO_STD_USE_FACET\r
+# define BOOST_HAS_TWO_ARG_USE_FACET\r
+#endif\r
+\r
+//\r
+// There's no std::distance prior to version 2, or without\r
+// partial specialization support:\r
+//\r
+#if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)\r
+ #define BOOST_NO_STD_DISTANCE\r
+#endif\r
+\r
+//\r
+// Some versions of the rogue wave library don't have assignable\r
+// OutputIterators:\r
+//\r
+#if BOOST_RWSTD_VER < 0x020100\r
+# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN\r
+#endif\r
+\r
+//\r
+// Disable BOOST_HAS_LONG_LONG when the library has no support for it.\r
+//\r
+#if !defined(_RWSTD_LONG_LONG) && defined(BOOST_HAS_LONG_LONG)\r
+# undef BOOST_HAS_LONG_LONG\r
+#endif\r
+\r
+//\r
+// check that on HP-UX, the proper RW library is used\r
+//\r
+#if defined(__HP_aCC) && !defined(_HP_NAMESPACE_STD)\r
+# error "Boost requires Standard RW library. Please compile and link with -AA"\r
+#endif\r
+\r
+//\r
+// Define macros specific to RW V2.2 on HP-UX\r
+//\r
+#if defined(__HP_aCC) && (BOOST_RWSTD_VER == 0x02020100)\r
+# ifndef __HP_TC1_MAKE_PAIR\r
+# define __HP_TC1_MAKE_PAIR\r
+# endif\r
+# ifndef _HP_INSTANTIATE_STD2_VL\r
+# define _HP_INSTANTIATE_STD2_VL\r
+# endif\r
+#endif\r
+\r
+// C++0x headers not yet implemented\r
+//\r
+#if _RWSTD_VER < 0x05000000\r
+# define BOOST_NO_0X_HDR_ARRAY\r
+# define BOOST_NO_0X_HDR_TYPE_TRAITS\r
+#endif\r
+# define BOOST_NO_0X_HDR_CHRONO\r
+# define BOOST_NO_0X_HDR_CODECVT\r
+# define BOOST_NO_0X_HDR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_CONDITION_VARIABLE\r
+# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS\r
+# define BOOST_NO_0X_HDR_FORWARD_LIST\r
+# define BOOST_NO_0X_HDR_FUTURE\r
+# define BOOST_NO_0X_HDR_INITIALIZER_LIST\r
+# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MUTEX\r
+# define BOOST_NO_0X_HDR_RANDOM\r
+# define BOOST_NO_0X_HDR_RATIO\r
+# define BOOST_NO_0X_HDR_REGEX\r
+# define BOOST_NO_0X_HDR_SYSTEM_ERROR\r
+# define BOOST_NO_0X_HDR_THREAD\r
+# define BOOST_NO_0X_HDR_TUPLE\r
+# define BOOST_NO_0X_HDR_TYPEINDEX\r
+# define BOOST_NO_STD_UNORDERED // deprecated; see following\r
+# define BOOST_NO_0X_HDR_UNORDERED_MAP\r
+# define BOOST_NO_0X_HDR_UNORDERED_SET\r
+# define BOOST_NO_NUMERIC_LIMITS_LOWEST\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003. \r
+// (C) Copyright Darin Adler 2001. \r
+// (C) Copyright Jens Maurer 2001 - 2003. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// generic SGI STL:\r
+\r
+#if !defined(__STL_CONFIG_H)\r
+# include <boost/config/no_tr1/utility.hpp>\r
+# if !defined(__STL_CONFIG_H)\r
+# error "This is not the SGI STL!"\r
+# endif\r
+#endif\r
+\r
+//\r
+// No std::iterator traits without partial specialisation:\r
+//\r
+#if !defined(__STL_CLASS_PARTIAL_SPECIALIZATION)\r
+# define BOOST_NO_STD_ITERATOR_TRAITS\r
+#endif\r
+\r
+//\r
+// No std::stringstream with gcc < 3\r
+//\r
+#if defined(__GNUC__) && (__GNUC__ < 3) && \\r
+ ((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)) && \\r
+ !defined(__STL_USE_NEW_IOSTREAMS) || \\r
+ defined(__APPLE_CC__)\r
+ // Note that we only set this for GNU C++ prior to 2.95 since the\r
+ // latest patches for that release do contain a minimal <sstream>\r
+ // If you are running a 2.95 release prior to 2.95.3 then this will need\r
+ // setting, but there is no way to detect that automatically (other\r
+ // than by running the configure script).\r
+ // Also, the unofficial GNU C++ 2.96 included in RedHat 7.1 doesn't\r
+ // have <sstream>.\r
+# define BOOST_NO_STRINGSTREAM\r
+#endif\r
+\r
+// Apple doesn't seem to reliably defined a *unix* macro\r
+#if !defined(CYGWIN) && ( defined(__unix__) \\r
+ || defined(__unix) \\r
+ || defined(unix) \\r
+ || defined(__APPLE__) \\r
+ || defined(__APPLE) \\r
+ || defined(APPLE))\r
+# include <unistd.h>\r
+#endif\r
+\r
+\r
+//\r
+// Assume no std::locale without own iostreams (this may be an\r
+// incorrect assumption in some cases):\r
+//\r
+#if !defined(__SGI_STL_OWN_IOSTREAMS) && !defined(__STL_USE_NEW_IOSTREAMS)\r
+# define BOOST_NO_STD_LOCALE\r
+#endif\r
+\r
+//\r
+// Original native SGI streams have non-standard std::messages facet:\r
+//\r
+#if defined(__sgi) && (_COMPILER_VERSION <= 650) && !defined(__SGI_STL_OWN_IOSTREAMS)\r
+# define BOOST_NO_STD_LOCALE\r
+#endif\r
+\r
+//\r
+// SGI's new iostreams have missing "const" in messages<>::open\r
+//\r
+#if defined(__sgi) && (_COMPILER_VERSION <= 740) && defined(__STL_USE_NEW_IOSTREAMS)\r
+# define BOOST_NO_STD_MESSAGES\r
+#endif\r
+\r
+//\r
+// No template iterator constructors, or std::allocator\r
+// without member templates:\r
+//\r
+#if !defined(__STL_MEMBER_TEMPLATES)\r
+# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS\r
+# define BOOST_NO_STD_ALLOCATOR\r
+#endif\r
+\r
+//\r
+// We always have SGI style hash_set, hash_map, and slist:\r
+//\r
+#define BOOST_HAS_HASH\r
+#define BOOST_HAS_SLIST\r
+\r
+//\r
+// If this is GNU libstdc++2, then no <limits> and no std::wstring:\r
+//\r
+#if (defined(__GNUC__) && (__GNUC__ < 3))\r
+# include <string>\r
+# if defined(__BASTRING__)\r
+# define BOOST_NO_LIMITS\r
+// Note: <boost/limits.hpp> will provide compile-time constants\r
+# undef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS\r
+# define BOOST_NO_STD_WSTRING\r
+# endif\r
+#endif\r
+\r
+//\r
+// There is no standard iterator unless we have namespace support:\r
+//\r
+#if !defined(__STL_USE_NAMESPACES)\r
+# define BOOST_NO_STD_ITERATOR\r
+#endif\r
+\r
+//\r
+// Intrinsic type_traits support.\r
+// The SGI STL has it's own __type_traits class, which\r
+// has intrinsic compiler support with SGI's compilers.\r
+// Whatever map SGI style type traits to boost equivalents:\r
+//\r
+#define BOOST_HAS_SGI_TYPE_TRAITS\r
+\r
+// C++0x headers not yet implemented\r
+//\r
+# define BOOST_NO_0X_HDR_ARRAY\r
+# define BOOST_NO_0X_HDR_CHRONO\r
+# define BOOST_NO_0X_HDR_CODECVT\r
+# define BOOST_NO_0X_HDR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_CONDITION_VARIABLE\r
+# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS\r
+# define BOOST_NO_0X_HDR_FORWARD_LIST\r
+# define BOOST_NO_0X_HDR_FUTURE\r
+# define BOOST_NO_0X_HDR_INITIALIZER_LIST\r
+# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MUTEX\r
+# define BOOST_NO_0X_HDR_RANDOM\r
+# define BOOST_NO_0X_HDR_RATIO\r
+# define BOOST_NO_0X_HDR_REGEX\r
+# define BOOST_NO_0X_HDR_SYSTEM_ERROR\r
+# define BOOST_NO_0X_HDR_THREAD\r
+# define BOOST_NO_0X_HDR_TUPLE\r
+# define BOOST_NO_0X_HDR_TYPE_TRAITS\r
+# define BOOST_NO_0X_HDR_TYPEINDEX\r
+# define BOOST_NO_STD_UNORDERED // deprecated; see following\r
+# define BOOST_NO_0X_HDR_UNORDERED_MAP\r
+# define BOOST_NO_0X_HDR_UNORDERED_SET\r
+# define BOOST_NO_NUMERIC_LIMITS_LOWEST\r
+\r
+#define BOOST_STDLIB "SGI standard library"\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2002. \r
+// (C) Copyright Darin Adler 2001. \r
+// (C) Copyright Jens Maurer 2001. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// STLPort standard library config:\r
+\r
+#if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)\r
+# include <cstddef>\r
+# if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)\r
+# error "This is not STLPort!"\r
+# endif\r
+#endif\r
+\r
+// Apple doesn't seem to reliably defined a *unix* macro\r
+#if !defined(CYGWIN) && ( defined(__unix__) \\r
+ || defined(__unix) \\r
+ || defined(unix) \\r
+ || defined(__APPLE__) \\r
+ || defined(__APPLE) \\r
+ || defined(APPLE))\r
+# include <unistd.h>\r
+#endif\r
+\r
+//\r
+// __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS\r
+// for versions prior to 4.1(beta)\r
+//\r
+#if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400)\r
+# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS\r
+#endif\r
+\r
+//\r
+// If STLport thinks that there is no partial specialisation, then there is no\r
+// std::iterator traits:\r
+//\r
+#if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION))\r
+# define BOOST_NO_STD_ITERATOR_TRAITS\r
+#endif\r
+\r
+//\r
+// No new style iostreams on GCC without STLport's iostreams enabled:\r
+//\r
+#if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS))\r
+# define BOOST_NO_STRINGSTREAM\r
+#endif\r
+\r
+//\r
+// No new iostreams implies no std::locale, and no std::stringstream:\r
+//\r
+#if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS)\r
+# define BOOST_NO_STD_LOCALE\r
+# define BOOST_NO_STRINGSTREAM\r
+#endif\r
+\r
+//\r
+// If the streams are not native, and we have a "using ::x" compiler bug\r
+// then the io stream facets are not available in namespace std::\r
+//\r
+#ifdef _STLPORT_VERSION\r
+# if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)\r
+# define BOOST_NO_STD_LOCALE\r
+# endif\r
+#else\r
+# if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)\r
+# define BOOST_NO_STD_LOCALE\r
+# endif\r
+#endif\r
+\r
+#if defined(_STLPORT_VERSION) && ((_STLPORT_VERSION < 0x500) || (_STLPORT_VERSION >= 0x520))\r
+# define BOOST_NO_STD_UNORDERED\r
+#endif\r
+\r
+#if defined(_STLPORT_VERSION) && (_STLPORT_VERSION >= 0x520)\r
+# define BOOST_HAS_TR1_UNORDERED_SET\r
+# define BOOST_HAS_TR1_UNORDERED_MAP\r
+#endif\r
+//\r
+// Without member template support enabled, their are no template\r
+// iterate constructors, and no std::allocator:\r
+//\r
+#if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES))\r
+# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS\r
+# define BOOST_NO_STD_ALLOCATOR\r
+#endif\r
+//\r
+// however we always have at least a partial allocator:\r
+//\r
+#define BOOST_HAS_PARTIAL_STD_ALLOCATOR\r
+\r
+#if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)\r
+# define BOOST_NO_STD_ALLOCATOR\r
+#endif\r
+\r
+#if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)\r
+# define BOOST_NO_STD_ALLOCATOR\r
+#endif\r
+\r
+//\r
+// If STLport thinks there is no wchar_t at all, then we have to disable\r
+// the support for the relevant specilazations of std:: templates.\r
+//\r
+#if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT)\r
+# ifndef BOOST_NO_STD_WSTRING\r
+# define BOOST_NO_STD_WSTRING\r
+# endif\r
+# ifndef BOOST_NO_STD_WSTREAMBUF\r
+# define BOOST_NO_STD_WSTREAMBUF\r
+# endif\r
+#endif\r
+\r
+//\r
+// We always have SGI style hash_set, hash_map, and slist:\r
+//\r
+#ifndef _STLP_NO_EXTENSIONS\r
+#define BOOST_HAS_HASH\r
+#define BOOST_HAS_SLIST\r
+#endif\r
+\r
+//\r
+// STLport does a good job of importing names into namespace std::,\r
+// but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our\r
+// workaround does not conflict with STLports:\r
+//\r
+//\r
+// Harold Howe says:\r
+// Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with\r
+// BCB6 does cause problems. If we detect C++ Builder, then don't define \r
+// BOOST_NO_STDC_NAMESPACE\r
+//\r
+#if !defined(__BORLANDC__) && !defined(__DMC__)\r
+//\r
+// If STLport is using it's own namespace, and the real names are in\r
+// the global namespace, then we duplicate STLport's using declarations\r
+// (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't\r
+// necessarily import all the names we need into namespace std::\r
+// \r
+# if (defined(__STL_IMPORT_VENDOR_CSTD) \\r
+ || defined(__STL_USE_OWN_NAMESPACE) \\r
+ || defined(_STLP_IMPORT_VENDOR_CSTD) \\r
+ || defined(_STLP_USE_OWN_NAMESPACE)) \\r
+ && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD))\r
+# define BOOST_NO_STDC_NAMESPACE\r
+# define BOOST_NO_EXCEPTION_STD_NAMESPACE\r
+# endif\r
+#elif defined(__BORLANDC__) && __BORLANDC__ < 0x560\r
+// STLport doesn't import std::abs correctly:\r
+#include <stdlib.h>\r
+namespace std { using ::abs; }\r
+// and strcmp/strcpy don't get imported either ('cos they are macros)\r
+#include <string.h>\r
+#ifdef strcpy\r
+# undef strcpy\r
+#endif\r
+#ifdef strcmp\r
+# undef strcmp\r
+#endif\r
+#ifdef _STLP_VENDOR_CSTD\r
+namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; }\r
+#endif\r
+#endif\r
+\r
+//\r
+// std::use_facet may be non-standard, uses a class instead:\r
+//\r
+#if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)\r
+# define BOOST_NO_STD_USE_FACET\r
+# define BOOST_HAS_STLP_USE_FACET\r
+#endif\r
+\r
+//\r
+// If STLport thinks there are no wide functions, <cwchar> etc. is not working; but\r
+// only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import \r
+// into std:: ourselves).\r
+//\r
+#if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE)\r
+# define BOOST_NO_CWCHAR\r
+# define BOOST_NO_CWCTYPE\r
+#endif\r
+\r
+//\r
+// If STLport for some reason was configured so that it thinks that wchar_t\r
+// is not an intrinsic type, then we have to disable the support for it as\r
+// well (we would be missing required specializations otherwise).\r
+//\r
+#if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT)\r
+# undef BOOST_NO_INTRINSIC_WCHAR_T\r
+# define BOOST_NO_INTRINSIC_WCHAR_T\r
+#endif\r
+\r
+//\r
+// Borland ships a version of STLport with C++ Builder 6 that lacks\r
+// hashtables and the like:\r
+//\r
+#if defined(__BORLANDC__) && (__BORLANDC__ == 0x560)\r
+# undef BOOST_HAS_HASH\r
+#endif\r
+\r
+//\r
+// gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max\r
+//\r
+#if defined(__GNUC__) && (__GNUC__ < 3)\r
+# include <algorithm> // for std::min and std::max\r
+# define BOOST_USING_STD_MIN() ((void)0)\r
+# define BOOST_USING_STD_MAX() ((void)0)\r
+namespace boost { using std::min; using std::max; }\r
+#endif\r
+\r
+// C++0x headers not yet implemented\r
+//\r
+# define BOOST_NO_0X_HDR_ARRAY\r
+# define BOOST_NO_0X_HDR_CHRONO\r
+# define BOOST_NO_0X_HDR_CODECVT\r
+# define BOOST_NO_0X_HDR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_CONDITION_VARIABLE\r
+# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS\r
+# define BOOST_NO_0X_HDR_FORWARD_LIST\r
+# define BOOST_NO_0X_HDR_FUTURE\r
+# define BOOST_NO_0X_HDR_INITIALIZER_LIST\r
+# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MUTEX\r
+# define BOOST_NO_0X_HDR_RANDOM\r
+# define BOOST_NO_0X_HDR_RATIO\r
+# define BOOST_NO_0X_HDR_REGEX\r
+# define BOOST_NO_0X_HDR_SYSTEM_ERROR\r
+# define BOOST_NO_0X_HDR_THREAD\r
+# define BOOST_NO_0X_HDR_TUPLE\r
+# define BOOST_NO_0X_HDR_TYPE_TRAITS\r
+# define BOOST_NO_0X_HDR_TYPEINDEX\r
+# define BOOST_NO_STD_UNORDERED // deprecated; see following\r
+# define BOOST_NO_0X_HDR_UNORDERED_MAP\r
+# define BOOST_NO_0X_HDR_UNORDERED_SET\r
+# define BOOST_NO_NUMERIC_LIMITS_LOWEST\r
+\r
+#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2002. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+#if __IBMCPP__ <= 501\r
+# define BOOST_NO_STD_ALLOCATOR\r
+#endif\r
+\r
+#define BOOST_HAS_MACRO_USE_FACET\r
+#define BOOST_NO_STD_MESSAGES\r
+\r
+// Apple doesn't seem to reliably defined a *unix* macro\r
+#if !defined(CYGWIN) && ( defined(__unix__) \\r
+ || defined(__unix) \\r
+ || defined(unix) \\r
+ || defined(__APPLE__) \\r
+ || defined(__APPLE) \\r
+ || defined(APPLE))\r
+# include <unistd.h>\r
+#endif\r
+\r
+// C++0x headers not yet implemented\r
+//\r
+# define BOOST_NO_0X_HDR_ARRAY\r
+# define BOOST_NO_0X_HDR_CHRONO\r
+# define BOOST_NO_0X_HDR_CODECVT\r
+# define BOOST_NO_0X_HDR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_CONDITION_VARIABLE\r
+# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS\r
+# define BOOST_NO_0X_HDR_FORWARD_LIST\r
+# define BOOST_NO_0X_HDR_FUTURE\r
+# define BOOST_NO_0X_HDR_INITIALIZER_LIST\r
+# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS\r
+# define BOOST_NO_0X_HDR_MUTEX\r
+# define BOOST_NO_0X_HDR_RANDOM\r
+# define BOOST_NO_0X_HDR_RATIO\r
+# define BOOST_NO_0X_HDR_REGEX\r
+# define BOOST_NO_0X_HDR_SYSTEM_ERROR\r
+# define BOOST_NO_0X_HDR_THREAD\r
+# define BOOST_NO_0X_HDR_TUPLE\r
+# define BOOST_NO_0X_HDR_TYPE_TRAITS\r
+# define BOOST_NO_0X_HDR_TYPEINDEX\r
+# define BOOST_NO_STD_UNORDERED // deprecated; see following\r
+# define BOOST_NO_0X_HDR_UNORDERED_MAP\r
+# define BOOST_NO_0X_HDR_UNORDERED_SET\r
+# define BOOST_NO_NUMERIC_LIMITS_LOWEST\r
+\r
+#define BOOST_STDLIB "Visual Age default standard library"\r
+\r
+\r
+\r
--- /dev/null
+// Boost config.hpp configuration header file ------------------------------//\r
+\r
+// Copyright (c) 2001-2003 John Maddock\r
+// Copyright (c) 2001 Darin Adler\r
+// Copyright (c) 2001 Peter Dimov\r
+// Copyright (c) 2002 Bill Kempf \r
+// Copyright (c) 2002 Jens Maurer\r
+// Copyright (c) 2002-2003 David Abrahams\r
+// Copyright (c) 2003 Gennaro Prota\r
+// Copyright (c) 2003 Eric Friedman\r
+// Copyright (c) 2010 Eric Jourdanneau, Joel Falcou\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org/ for most recent version.\r
+\r
+// Boost config.hpp policy and rationale documentation has been moved to\r
+// http://www.boost.org/libs/config/\r
+//\r
+// This file is intended to be stable, and relatively unchanging.\r
+// It should contain boilerplate code only - no compiler specific\r
+// code unless it is unavoidable - no changes unless unavoidable.\r
+\r
+#ifndef BOOST_CONFIG_SUFFIX_HPP\r
+#define BOOST_CONFIG_SUFFIX_HPP\r
+\r
+#if defined(__GNUC__) && (__GNUC__ >= 4)\r
+//\r
+// Some GCC-4.x versions issue warnings even when __extension__ is used,\r
+// so use this as a workaround:\r
+//\r
+#pragma GCC system_header\r
+#endif\r
+\r
+//\r
+// ensure that visibility macros are always defined, thus symplifying use\r
+//\r
+#ifndef BOOST_SYMBOL_EXPORT\r
+# define BOOST_SYMBOL_EXPORT\r
+#endif\r
+#ifndef BOOST_SYMBOL_IMPORT\r
+# define BOOST_SYMBOL_IMPORT\r
+#endif\r
+#ifndef BOOST_SYMBOL_VISIBLE\r
+# define BOOST_SYMBOL_VISIBLE\r
+#endif\r
+\r
+//\r
+// look for long long by looking for the appropriate macros in <limits.h>.\r
+// Note that we use limits.h rather than climits for maximal portability,\r
+// remember that since these just declare a bunch of macros, there should be\r
+// no namespace issues from this.\r
+//\r
+#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \\r
+ && !defined(BOOST_MSVC) && !defined(__BORLANDC__)\r
+# include <limits.h>\r
+# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))\r
+# define BOOST_HAS_LONG_LONG\r
+# else\r
+# define BOOST_NO_LONG_LONG\r
+# endif\r
+#endif\r
+\r
+// GCC 3.x will clean up all of those nasty macro definitions that\r
+// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine\r
+// it under GCC 3.x.\r
+#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS)\r
+# undef BOOST_NO_CTYPE_FUNCTIONS\r
+#endif\r
+\r
+//\r
+// Assume any extensions are in namespace std:: unless stated otherwise:\r
+//\r
+# ifndef BOOST_STD_EXTENSION_NAMESPACE\r
+# define BOOST_STD_EXTENSION_NAMESPACE std\r
+# endif\r
+\r
+//\r
+// If cv-qualified specializations are not allowed, then neither are cv-void ones:\r
+//\r
+# if defined(BOOST_NO_CV_SPECIALIZATIONS) \\r
+ && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)\r
+# define BOOST_NO_CV_VOID_SPECIALIZATIONS\r
+# endif\r
+\r
+//\r
+// If there is no numeric_limits template, then it can't have any compile time\r
+// constants either!\r
+//\r
+# if defined(BOOST_NO_LIMITS) \\r
+ && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)\r
+# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS\r
+# define BOOST_NO_MS_INT64_NUMERIC_LIMITS\r
+# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS\r
+# endif\r
+\r
+//\r
+// if there is no long long then there is no specialisation\r
+// for numeric_limits<long long> either:\r
+//\r
+#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)\r
+# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS\r
+#endif\r
+\r
+//\r
+// Normalize BOOST_NO_STATIC_ASSERT and (depricated) BOOST_HAS_STATIC_ASSERT:\r
+//\r
+#if !defined(BOOST_NO_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)\r
+# define BOOST_HAS_STATIC_ASSERT\r
+#endif\r
+\r
+//\r
+// if there is no __int64 then there is no specialisation\r
+// for numeric_limits<__int64> either:\r
+//\r
+#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)\r
+# define BOOST_NO_MS_INT64_NUMERIC_LIMITS\r
+#endif\r
+\r
+//\r
+// if member templates are supported then so is the\r
+// VC6 subset of member templates:\r
+//\r
+# if !defined(BOOST_NO_MEMBER_TEMPLATES) \\r
+ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)\r
+# define BOOST_MSVC6_MEMBER_TEMPLATES\r
+# endif\r
+\r
+//\r
+// Without partial specialization, can't test for partial specialisation bugs:\r
+//\r
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \\r
+ && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)\r
+# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG\r
+# endif\r
+\r
+//\r
+// Without partial specialization, we can't have array-type partial specialisations:\r
+//\r
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \\r
+ && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)\r
+# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS\r
+# endif\r
+\r
+//\r
+// Without partial specialization, std::iterator_traits can't work:\r
+//\r
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \\r
+ && !defined(BOOST_NO_STD_ITERATOR_TRAITS)\r
+# define BOOST_NO_STD_ITERATOR_TRAITS\r
+# endif\r
+\r
+//\r
+// Without partial specialization, partial \r
+// specialization with default args won't work either:\r
+//\r
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \\r
+ && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)\r
+# define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS\r
+# endif\r
+\r
+//\r
+// Without member template support, we can't have template constructors\r
+// in the standard library either:\r
+//\r
+# if defined(BOOST_NO_MEMBER_TEMPLATES) \\r
+ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \\r
+ && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\r
+# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS\r
+# endif\r
+\r
+//\r
+// Without member template support, we can't have a conforming\r
+// std::allocator template either:\r
+//\r
+# if defined(BOOST_NO_MEMBER_TEMPLATES) \\r
+ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \\r
+ && !defined(BOOST_NO_STD_ALLOCATOR)\r
+# define BOOST_NO_STD_ALLOCATOR\r
+# endif\r
+\r
+//\r
+// without ADL support then using declarations will break ADL as well:\r
+//\r
+#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)\r
+# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL\r
+#endif\r
+\r
+//\r
+// Without typeid support we have no dynamic RTTI either:\r
+//\r
+#if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)\r
+# define BOOST_NO_RTTI\r
+#endif\r
+\r
+//\r
+// If we have a standard allocator, then we have a partial one as well:\r
+//\r
+#if !defined(BOOST_NO_STD_ALLOCATOR)\r
+# define BOOST_HAS_PARTIAL_STD_ALLOCATOR\r
+#endif\r
+\r
+//\r
+// We can't have a working std::use_facet if there is no std::locale:\r
+//\r
+# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)\r
+# define BOOST_NO_STD_USE_FACET\r
+# endif\r
+\r
+//\r
+// We can't have a std::messages facet if there is no std::locale:\r
+//\r
+# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)\r
+# define BOOST_NO_STD_MESSAGES\r
+# endif\r
+\r
+//\r
+// We can't have a working std::wstreambuf if there is no std::locale:\r
+//\r
+# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)\r
+# define BOOST_NO_STD_WSTREAMBUF\r
+# endif\r
+\r
+//\r
+// We can't have a <cwctype> if there is no <cwchar>:\r
+//\r
+# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE)\r
+# define BOOST_NO_CWCTYPE\r
+# endif\r
+\r
+//\r
+// We can't have a swprintf if there is no <cwchar>:\r
+//\r
+# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF)\r
+# define BOOST_NO_SWPRINTF\r
+# endif\r
+\r
+//\r
+// If Win32 support is turned off, then we must turn off\r
+// threading support also, unless there is some other\r
+// thread API enabled:\r
+//\r
+#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \\r
+ && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS)\r
+# define BOOST_DISABLE_THREADS\r
+#endif\r
+\r
+//\r
+// Turn on threading support if the compiler thinks that it's in\r
+// multithreaded mode. We put this here because there are only a\r
+// limited number of macros that identify this (if there's any missing\r
+// from here then add to the appropriate compiler section):\r
+//\r
+#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \\r
+ || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \\r
+ && !defined(BOOST_HAS_THREADS)\r
+# define BOOST_HAS_THREADS\r
+#endif\r
+\r
+//\r
+// Turn threading support off if BOOST_DISABLE_THREADS is defined:\r
+//\r
+#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS)\r
+# undef BOOST_HAS_THREADS\r
+#endif\r
+\r
+//\r
+// Turn threading support off if we don't recognise the threading API:\r
+//\r
+#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\\r
+ && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\\r
+ && !defined(BOOST_HAS_MPTASKS)\r
+# undef BOOST_HAS_THREADS\r
+#endif\r
+\r
+//\r
+// Turn threading detail macros off if we don't (want to) use threading\r
+//\r
+#ifndef BOOST_HAS_THREADS\r
+# undef BOOST_HAS_PTHREADS\r
+# undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE\r
+# undef BOOST_HAS_PTHREAD_YIELD\r
+# undef BOOST_HAS_PTHREAD_DELAY_NP\r
+# undef BOOST_HAS_WINTHREADS\r
+# undef BOOST_HAS_BETHREADS\r
+# undef BOOST_HAS_MPTASKS\r
+#endif\r
+\r
+//\r
+// If the compiler claims to be C99 conformant, then it had better\r
+// have a <stdint.h>:\r
+//\r
+# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)\r
+# define BOOST_HAS_STDINT_H\r
+# ifndef BOOST_HAS_LOG1P\r
+# define BOOST_HAS_LOG1P\r
+# endif\r
+# ifndef BOOST_HAS_EXPM1\r
+# define BOOST_HAS_EXPM1\r
+# endif\r
+# endif\r
+\r
+//\r
+// Define BOOST_NO_SLIST and BOOST_NO_HASH if required.\r
+// Note that this is for backwards compatibility only.\r
+//\r
+# if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST)\r
+# define BOOST_NO_SLIST\r
+# endif\r
+\r
+# if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH)\r
+# define BOOST_NO_HASH\r
+# endif\r
+\r
+//\r
+// Set BOOST_SLIST_HEADER if not set already:\r
+//\r
+#if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER)\r
+# define BOOST_SLIST_HEADER <slist>\r
+#endif\r
+\r
+//\r
+// Set BOOST_HASH_SET_HEADER if not set already:\r
+//\r
+#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER)\r
+# define BOOST_HASH_SET_HEADER <hash_set>\r
+#endif\r
+\r
+//\r
+// Set BOOST_HASH_MAP_HEADER if not set already:\r
+//\r
+#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER)\r
+# define BOOST_HASH_MAP_HEADER <hash_map>\r
+#endif\r
+\r
+//\r
+// Set BOOST_NO_INITIALIZER_LISTS if there is no library support.\r
+//\r
+\r
+#if defined(BOOST_NO_0X_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)\r
+# define BOOST_NO_INITIALIZER_LISTS\r
+#endif\r
+\r
+//\r
+// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_RVALUE_REFERENCES is not defined\r
+//\r
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)\r
+#define BOOST_HAS_RVALUE_REFS\r
+#endif\r
+\r
+//\r
+// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_VARIADIC_TEMPLATES is not defined\r
+//\r
+#if !defined(BOOST_NO_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL)\r
+#define BOOST_HAS_VARIADIC_TMPL\r
+#endif\r
+\r
+// BOOST_HAS_ABI_HEADERS\r
+// This macro gets set if we have headers that fix the ABI,\r
+// and prevent ODR violations when linking to external libraries:\r
+#if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS)\r
+# define BOOST_HAS_ABI_HEADERS\r
+#endif\r
+\r
+#if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS)\r
+# undef BOOST_HAS_ABI_HEADERS\r
+#endif\r
+\r
+// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------//\r
+// Because std::size_t usage is so common, even in boost headers which do not\r
+// otherwise use the C library, the <cstddef> workaround is included here so\r
+// that ugly workaround code need not appear in many other boost headers.\r
+// NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>\r
+// must still be #included in the usual places so that <cstddef> inclusion\r
+// works as expected with standard conforming compilers. The resulting\r
+// double inclusion of <cstddef> is harmless.\r
+\r
+# ifdef BOOST_NO_STDC_NAMESPACE\r
+# include <cstddef>\r
+ namespace std { using ::ptrdiff_t; using ::size_t; }\r
+# endif\r
+\r
+// Workaround for the unfortunate min/max macros defined by some platform headers\r
+\r
+#define BOOST_PREVENT_MACRO_SUBSTITUTION\r
+\r
+#ifndef BOOST_USING_STD_MIN\r
+# define BOOST_USING_STD_MIN() using std::min\r
+#endif\r
+\r
+#ifndef BOOST_USING_STD_MAX\r
+# define BOOST_USING_STD_MAX() using std::max\r
+#endif\r
+\r
+// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------//\r
+\r
+# ifdef BOOST_NO_STD_MIN_MAX\r
+\r
+namespace std {\r
+ template <class _Tp>\r
+ inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {\r
+ return __b < __a ? __b : __a;\r
+ }\r
+ template <class _Tp>\r
+ inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {\r
+ return __a < __b ? __b : __a;\r
+ }\r
+}\r
+\r
+# endif\r
+\r
+// BOOST_STATIC_CONSTANT workaround --------------------------------------- //\r
+// On compilers which don't allow in-class initialization of static integral\r
+// constant members, we must use enums as a workaround if we want the constants\r
+// to be available at compile-time. This macro gives us a convenient way to\r
+// declare such constants.\r
+\r
+# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION\r
+# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }\r
+# else\r
+# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment\r
+# endif\r
+\r
+// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------//\r
+// When the standard library does not have a conforming std::use_facet there\r
+// are various workarounds available, but they differ from library to library.\r
+// The same problem occurs with has_facet.\r
+// These macros provide a consistent way to access a locale's facets.\r
+// Usage:\r
+// replace\r
+// std::use_facet<Type>(loc);\r
+// with\r
+// BOOST_USE_FACET(Type, loc);\r
+// Note do not add a std:: prefix to the front of BOOST_USE_FACET!\r
+// Use for BOOST_HAS_FACET is analogous.\r
+\r
+#if defined(BOOST_NO_STD_USE_FACET)\r
+# ifdef BOOST_HAS_TWO_ARG_USE_FACET\r
+# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))\r
+# define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast<Type*>(0))\r
+# elif defined(BOOST_HAS_MACRO_USE_FACET)\r
+# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)\r
+# define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type)\r
+# elif defined(BOOST_HAS_STLP_USE_FACET)\r
+# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type >(loc))\r
+# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)\r
+# endif\r
+#else\r
+# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc)\r
+# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)\r
+#endif\r
+\r
+// BOOST_NESTED_TEMPLATE workaround ------------------------------------------//\r
+// Member templates are supported by some compilers even though they can't use\r
+// the A::template member<U> syntax, as a workaround replace:\r
+//\r
+// typedef typename A::template rebind<U> binder;\r
+//\r
+// with:\r
+//\r
+// typedef typename A::BOOST_NESTED_TEMPLATE rebind<U> binder;\r
+\r
+#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD\r
+# define BOOST_NESTED_TEMPLATE template\r
+#else\r
+# define BOOST_NESTED_TEMPLATE\r
+#endif\r
+\r
+// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------//\r
+// Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION\r
+// is defined, in which case it evaluates to return x; Use when you have a return\r
+// statement that can never be reached.\r
+\r
+#ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION\r
+# define BOOST_UNREACHABLE_RETURN(x) return x;\r
+#else\r
+# define BOOST_UNREACHABLE_RETURN(x)\r
+#endif\r
+\r
+// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------//\r
+//\r
+// Some compilers don't support the use of `typename' for dependent\r
+// types in deduced contexts, e.g.\r
+//\r
+// template <class T> void f(T, typename T::type);\r
+// ^^^^^^^^\r
+// Replace these declarations with:\r
+//\r
+// template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);\r
+\r
+#ifndef BOOST_NO_DEDUCED_TYPENAME\r
+# define BOOST_DEDUCED_TYPENAME typename\r
+#else\r
+# define BOOST_DEDUCED_TYPENAME\r
+#endif\r
+\r
+#ifndef BOOST_NO_TYPENAME_WITH_CTOR\r
+# define BOOST_CTOR_TYPENAME typename\r
+#else\r
+# define BOOST_CTOR_TYPENAME\r
+#endif\r
+\r
+// long long workaround ------------------------------------------//\r
+// On gcc (and maybe other compilers?) long long is alway supported\r
+// but it's use may generate either warnings (with -ansi), or errors\r
+// (with -pedantic -ansi) unless it's use is prefixed by __extension__\r
+//\r
+#if defined(BOOST_HAS_LONG_LONG)\r
+namespace boost{\r
+# ifdef __GNUC__\r
+ __extension__ typedef long long long_long_type;\r
+ __extension__ typedef unsigned long long ulong_long_type;\r
+# else\r
+ typedef long long long_long_type;\r
+ typedef unsigned long long ulong_long_type;\r
+# endif\r
+}\r
+#endif\r
+\r
+// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//\r
+//\r
+// Some compilers have problems with function templates whose template\r
+// parameters don't appear in the function parameter list (basically\r
+// they just link one instantiation of the template in the final\r
+// executable). These macros provide a uniform way to cope with the\r
+// problem with no effects on the calling syntax.\r
+\r
+// Example:\r
+//\r
+// #include <iostream>\r
+// #include <ostream>\r
+// #include <typeinfo>\r
+//\r
+// template <int n>\r
+// void f() { std::cout << n << ' '; }\r
+//\r
+// template <typename T>\r
+// void g() { std::cout << typeid(T).name() << ' '; }\r
+//\r
+// int main() {\r
+// f<1>();\r
+// f<2>();\r
+//\r
+// g<int>();\r
+// g<double>();\r
+// }\r
+//\r
+// With VC++ 6.0 the output is:\r
+//\r
+// 2 2 double double\r
+//\r
+// To fix it, write\r
+//\r
+// template <int n>\r
+// void f(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, n)) { ... }\r
+//\r
+// template <typename T>\r
+// void g(BOOST_EXPLICIT_TEMPLATE_TYPE(T)) { ... }\r
+//\r
+\r
+\r
+#if defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS\r
+\r
+# include "boost/type.hpp"\r
+# include "boost/non_type.hpp"\r
+\r
+# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) boost::type<t>* = 0\r
+# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type<t>*\r
+# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type<t, v>* = 0\r
+# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type<t, v>*\r
+\r
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \\r
+ , BOOST_EXPLICIT_TEMPLATE_TYPE(t)\r
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \\r
+ , BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)\r
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \\r
+ , BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)\r
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \\r
+ , BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)\r
+\r
+#else\r
+\r
+// no workaround needed: expand to nothing\r
+\r
+# define BOOST_EXPLICIT_TEMPLATE_TYPE(t)\r
+# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)\r
+# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)\r
+# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)\r
+\r
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)\r
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)\r
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)\r
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)\r
+\r
+\r
+#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS\r
+\r
+// When BOOST_NO_STD_TYPEINFO is defined, we can just import\r
+// the global definition into std namespace:\r
+#ifdef BOOST_NO_STD_TYPEINFO\r
+#include <typeinfo>\r
+namespace std{ using ::type_info; }\r
+#endif\r
+\r
+// ---------------------------------------------------------------------------//\r
+\r
+//\r
+// Helper macro BOOST_STRINGIZE:\r
+// Converts the parameter X to a string after macro replacement\r
+// on X has been performed.\r
+//\r
+#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)\r
+#define BOOST_DO_STRINGIZE(X) #X\r
+\r
+//\r
+// Helper macro BOOST_JOIN:\r
+// The following piece of macro magic joins the two\r
+// arguments together, even when one of the arguments is\r
+// itself a macro (see 16.3.1 in C++ standard). The key\r
+// is that macro expansion of macro arguments does not\r
+// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.\r
+//\r
+#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )\r
+#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)\r
+#define BOOST_DO_JOIN2( X, Y ) X##Y\r
+\r
+//\r
+// Set some default values for compiler/library/platform names.\r
+// These are for debugging config setup only:\r
+//\r
+# ifndef BOOST_COMPILER\r
+# define BOOST_COMPILER "Unknown ISO C++ Compiler"\r
+# endif\r
+# ifndef BOOST_STDLIB\r
+# define BOOST_STDLIB "Unknown ISO standard library"\r
+# endif\r
+# ifndef BOOST_PLATFORM\r
+# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \\r
+ || defined(_POSIX_SOURCE)\r
+# define BOOST_PLATFORM "Generic Unix"\r
+# else\r
+# define BOOST_PLATFORM "Unknown"\r
+# endif\r
+# endif\r
+\r
+//\r
+// Set some default values GPU support\r
+//\r
+# ifndef BOOST_GPU_ENABLED\r
+# define BOOST_GPU_ENABLED \r
+# endif\r
+\r
+//\r
+// constexpr workarounds\r
+// \r
+#if defined(BOOST_NO_CONSTEXPR)\r
+#define BOOST_CONSTEXPR\r
+#define BOOST_CONSTEXPR_OR_CONST const\r
+#else\r
+#define BOOST_CONSTEXPR constexpr\r
+#define BOOST_CONSTEXPR_OR_CONST constexpr\r
+#endif\r
+\r
+#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST\r
+\r
+#endif\r
+\r
--- /dev/null
+// boost/config/user.hpp ---------------------------------------------------//\r
+\r
+// (C) Copyright John Maddock 2001. \r
+// Use, modification and distribution are subject to the \r
+// Boost Software License, Version 1.0. (See accompanying file \r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// Do not check in modified versions of this file,\r
+// This file may be customized by the end user, but not by boost.\r
+\r
+//\r
+// Use this file to define a site and compiler specific\r
+// configuration policy:\r
+//\r
+\r
+// define this to locate a compiler config file:\r
+// #define BOOST_COMPILER_CONFIG <myheader>\r
+\r
+// define this to locate a stdlib config file:\r
+// #define BOOST_STDLIB_CONFIG <myheader>\r
+\r
+// define this to locate a platform config file:\r
+// #define BOOST_PLATFORM_CONFIG <myheader>\r
+\r
+// define this to disable compiler config,\r
+// use if your compiler config has nothing to set:\r
+// #define BOOST_NO_COMPILER_CONFIG\r
+\r
+// define this to disable stdlib config,\r
+// use if your stdlib config has nothing to set:\r
+// #define BOOST_NO_STDLIB_CONFIG\r
+\r
+// define this to disable platform config,\r
+// use if your platform config has nothing to set:\r
+// #define BOOST_NO_PLATFORM_CONFIG\r
+\r
+// define this to disable all config options,\r
+// excluding the user config. Use if your\r
+// setup is fully ISO compliant, and has no\r
+// useful extensions, or for autoconf generated\r
+// setups:\r
+// #define BOOST_NO_CONFIG\r
+\r
+// define this to make the config "optimistic"\r
+// about unknown compiler versions. Normally\r
+// unknown compiler versions are assumed to have\r
+// all the defects of the last known version, however\r
+// setting this flag, causes the config to assume\r
+// that unknown compiler versions are fully conformant\r
+// with the standard:\r
+// #define BOOST_STRICT_CONFIG\r
+\r
+// define this to cause the config to halt compilation\r
+// with an #error if it encounters anything unknown --\r
+// either an unknown compiler version or an unknown\r
+// compiler/platform/library:\r
+// #define BOOST_ASSERT_CONFIG\r
+\r
+\r
+// define if you want to disable threading support, even\r
+// when available:\r
+// #define BOOST_DISABLE_THREADS\r
+\r
+// define when you want to disable Win32 specific features\r
+// even when available:\r
+// #define BOOST_DISABLE_WIN32\r
+\r
+// BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any \r
+// prefix/suffix headers that normally control things like struct \r
+// packing and alignment. \r
+// #define BOOST_DISABLE_ABI_HEADERS\r
+\r
+// BOOST_ABI_PREFIX: A prefix header to include in place of whatever\r
+// boost.config would normally select, any replacement should set up \r
+// struct packing and alignment options as required. \r
+// #define BOOST_ABI_PREFIX my-header-name\r
+\r
+// BOOST_ABI_SUFFIX: A suffix header to include in place of whatever \r
+// boost.config would normally select, any replacement should undo \r
+// the effects of the prefix header. \r
+// #define BOOST_ABI_SUFFIX my-header-name\r
+\r
+// BOOST_ALL_DYN_LINK: Forces all libraries that have separate source, \r
+// to be linked as dll's rather than static libraries on Microsoft Windows \r
+// (this macro is used to turn on __declspec(dllimport) modifiers, so that \r
+// the compiler knows which symbols to look for in a dll rather than in a \r
+// static library). Note that there may be some libraries that can only \r
+// be statically linked (Boost.Test for example) and others which may only \r
+// be dynamically linked (Boost.Threads for example), in these cases this \r
+// macro has no effect.\r
+// #define BOOST_ALL_DYN_LINK\r
+ \r
+// BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll \r
+// rather than a static library on Microsoft Windows: replace the WHATEVER \r
+// part of the macro name with the name of the library that you want to \r
+// dynamically link to, for example use BOOST_DATE_TIME_DYN_LINK or \r
+// BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport) \r
+// modifiers, so that the compiler knows which symbols to look for in a dll \r
+// rather than in a static library). \r
+// Note that there may be some libraries that can only be statically linked \r
+// (Boost.Test for example) and others which may only be dynamically linked \r
+// (Boost.Threads for example), in these cases this macro is unsupported.\r
+// #define BOOST_WHATEVER_DYN_LINK\r
+ \r
+// BOOST_ALL_NO_LIB: Tells the config system not to automatically select \r
+// which libraries to link against. \r
+// Normally if a compiler supports #pragma lib, then the correct library \r
+// build variant will be automatically selected and linked against, \r
+// simply by the act of including one of that library's headers. \r
+// This macro turns that feature off.\r
+// #define BOOST_ALL_NO_LIB\r
+ \r
+// BOOST_WHATEVER_NO_LIB: Tells the config system not to automatically \r
+// select which library to link against for library "whatever", \r
+// replace WHATEVER in the macro name with the name of the library; \r
+// for example BOOST_DATE_TIME_NO_LIB or BOOST_REGEX_NO_LIB. \r
+// Normally if a compiler supports #pragma lib, then the correct library \r
+// build variant will be automatically selected and linked against, simply \r
+// by the act of including one of that library's headers. This macro turns \r
+// that feature off.\r
+// #define BOOST_WHATEVER_NO_LIB\r
+ \r
+\r
+\r
--- /dev/null
+// Copyright John Maddock 2008\r
+// Use, modification, and distribution is subject to the Boost Software\r
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// This file exists to turn off some overly-pedantic warning emitted\r
+// by certain compilers. You should include this header only in:\r
+//\r
+// * A test case, before any other headers, or,\r
+// * A library source file before any other headers.\r
+//\r
+// IT SHOULD NOT BE INCLUDED BY ANY BOOST HEADER.\r
+//\r
+// YOU SHOULD NOT INCLUDE IT IF YOU CAN REASONABLY FIX THE WARNING.\r
+//\r
+// The only warnings disabled here are those that are:\r
+//\r
+// * Quite unreasonably pedantic.\r
+// * Generally only emitted by a single compiler.\r
+// * Can't easily be fixed: for example if the vendors own std lib \r
+// code emits these warnings!\r
+//\r
+// Note that THIS HEADER MUST NOT INCLUDE ANY OTHER HEADERS:\r
+// not even std library ones! Doing so may turn the warning\r
+// off too late to be of any use. For example the VC++ C4996\r
+// warning can be omitted from <iosfwd> if that header is included\r
+// before or by this one :-(\r
+//\r
+\r
+#ifndef BOOST_CONFIG_WARNING_DISABLE_HPP\r
+#define BOOST_CONFIG_WARNING_DISABLE_HPP\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) \r
+ // Error 'function': was declared deprecated\r
+ // http://msdn2.microsoft.com/en-us/library/ttcz0bys(VS.80).aspx\r
+ // This error is emitted when you use some perfectly conforming\r
+ // std lib functions in a perfectly correct way, and also by\r
+ // some of Microsoft's own std lib code !\r
+# pragma warning(disable:4996)\r
+#endif\r
+#if defined(__INTEL_COMPILER) || defined(__ICL)\r
+ // As above: gives warning when a "deprecated"\r
+ // std library function is encountered.\r
+# pragma warning(disable:1786)\r
+#endif\r
+\r
+#endif // BOOST_CONFIG_WARNING_DISABLE_HPP\r
--- /dev/null
+#ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED\r
+#define BOOST_CURRENT_FUNCTION_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/current_function.hpp - BOOST_CURRENT_FUNCTION\r
+//\r
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// http://www.boost.org/libs/utility/current_function.html\r
+//\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+inline void current_function_helper()\r
+{\r
+\r
+#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600))\r
+\r
+# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__\r
+\r
+#elif defined(__DMC__) && (__DMC__ >= 0x810)\r
+\r
+# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__\r
+\r
+#elif defined(__FUNCSIG__)\r
+\r
+# define BOOST_CURRENT_FUNCTION __FUNCSIG__\r
+\r
+#elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500))\r
+\r
+# define BOOST_CURRENT_FUNCTION __FUNCTION__\r
+\r
+#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)\r
+\r
+# define BOOST_CURRENT_FUNCTION __FUNC__\r
+\r
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)\r
+\r
+# define BOOST_CURRENT_FUNCTION __func__\r
+\r
+#else\r
+\r
+# define BOOST_CURRENT_FUNCTION "(unknown)"\r
+\r
+#endif\r
+\r
+}\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED\r
+#define BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/detail/interlocked.hpp\r
+//\r
+// Copyright 2005 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <boost/config.hpp>\r
+\r
+#if defined( BOOST_USE_WINDOWS_H )\r
+\r
+# include <windows.h>\r
+\r
+# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement\r
+# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement\r
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange\r
+# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange\r
+# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd\r
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER InterlockedCompareExchangePointer\r
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER InterlockedExchangePointer\r
+\r
+#elif defined(_WIN32_WCE)\r
+\r
+// under Windows CE we still have old-style Interlocked* functions\r
+\r
+extern "C" long __cdecl InterlockedIncrement( long* );\r
+extern "C" long __cdecl InterlockedDecrement( long* );\r
+extern "C" long __cdecl InterlockedCompareExchange( long*, long, long );\r
+extern "C" long __cdecl InterlockedExchange( long*, long );\r
+extern "C" long __cdecl InterlockedExchangeAdd( long*, long );\r
+\r
+# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement\r
+# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement\r
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange\r
+# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange\r
+# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd\r
+\r
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \\r
+ ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long*)(dest),(long)(exchange),(long)(compare)))\r
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \\r
+ ((void*)BOOST_INTERLOCKED_EXCHANGE((long*)(dest),(long)(exchange)))\r
+\r
+#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )\r
+\r
+#if defined( __CLRCALL_PURE_OR_CDECL )\r
+\r
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * );\r
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * );\r
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long );\r
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long );\r
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long );\r
+\r
+#else\r
+\r
+extern "C" long __cdecl _InterlockedIncrement( long volatile * );\r
+extern "C" long __cdecl _InterlockedDecrement( long volatile * );\r
+extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long );\r
+extern "C" long __cdecl _InterlockedExchange( long volatile *, long );\r
+extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );\r
+\r
+#endif\r
+\r
+# pragma intrinsic( _InterlockedIncrement )\r
+# pragma intrinsic( _InterlockedDecrement )\r
+# pragma intrinsic( _InterlockedCompareExchange )\r
+# pragma intrinsic( _InterlockedExchange )\r
+# pragma intrinsic( _InterlockedExchangeAdd )\r
+\r
+# if defined(_M_IA64) || defined(_M_AMD64)\r
+\r
+extern "C" void* __cdecl _InterlockedCompareExchangePointer( void* volatile *, void*, void* );\r
+extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* );\r
+\r
+# pragma intrinsic( _InterlockedCompareExchangePointer )\r
+# pragma intrinsic( _InterlockedExchangePointer )\r
+\r
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer\r
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer\r
+\r
+# else\r
+\r
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \\r
+ ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))\r
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \\r
+ ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))\r
+\r
+# endif\r
+\r
+# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement\r
+# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement\r
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange\r
+# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange\r
+# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd\r
+\r
+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+extern "C" __declspec(dllimport) long __stdcall InterlockedIncrement( long volatile * );\r
+extern "C" __declspec(dllimport) long __stdcall InterlockedDecrement( long volatile * );\r
+extern "C" __declspec(dllimport) long __stdcall InterlockedCompareExchange( long volatile *, long, long );\r
+extern "C" __declspec(dllimport) long __stdcall InterlockedExchange( long volatile *, long );\r
+extern "C" __declspec(dllimport) long __stdcall InterlockedExchangeAdd( long volatile *, long );\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+# define BOOST_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement\r
+# define BOOST_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement\r
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange\r
+# define BOOST_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange\r
+# define BOOST_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd\r
+\r
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \\r
+ ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))\r
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \\r
+ ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))\r
+\r
+#else\r
+\r
+# error "Interlocked intrinsics not available"\r
+\r
+#endif\r
+\r
+#endif // #ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED\r
+#define BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/detail/lightweight_mutex.hpp - lightweight mutex\r
+//\r
+// Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd.\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt\r
+//\r
+\r
+#include <boost/smart_ptr/detail/lightweight_mutex.hpp>\r
+\r
+#endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED\r
+#define BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+// detail/sp_typeinfo.hpp\r
+//\r
+// Copyright 2007 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#include <boost/config.hpp>\r
+\r
+#if defined( BOOST_NO_TYPEID )\r
+\r
+#include <boost/current_function.hpp>\r
+#include <functional>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class sp_typeinfo\r
+{\r
+private:\r
+\r
+ sp_typeinfo( sp_typeinfo const& );\r
+ sp_typeinfo& operator=( sp_typeinfo const& );\r
+\r
+ char const * name_;\r
+\r
+public:\r
+\r
+ explicit sp_typeinfo( char const * name ): name_( name )\r
+ {\r
+ }\r
+\r
+ bool operator==( sp_typeinfo const& rhs ) const\r
+ {\r
+ return this == &rhs;\r
+ }\r
+\r
+ bool operator!=( sp_typeinfo const& rhs ) const\r
+ {\r
+ return this != &rhs;\r
+ }\r
+\r
+ bool before( sp_typeinfo const& rhs ) const\r
+ {\r
+ return std::less< sp_typeinfo const* >()( this, &rhs );\r
+ }\r
+\r
+ char const* name() const\r
+ {\r
+ return name_;\r
+ }\r
+};\r
+\r
+template<class T> struct sp_typeid_\r
+{\r
+ static sp_typeinfo ti_;\r
+\r
+ static char const * name()\r
+ {\r
+ return BOOST_CURRENT_FUNCTION;\r
+ }\r
+};\r
+\r
+#if defined(__SUNPRO_CC)\r
+// see #4199, the Sun Studio compiler gets confused about static initialization \r
+// constructor arguments. But an assignment works just fine. \r
+template<class T> sp_typeinfo sp_typeid_< T >::ti_ = sp_typeid_< T >::name();\r
+#else\r
+template<class T> sp_typeinfo sp_typeid_< T >::ti_(sp_typeid_< T >::name());\r
+#endif\r
+\r
+template<class T> struct sp_typeid_< T & >: sp_typeid_< T >\r
+{\r
+};\r
+\r
+template<class T> struct sp_typeid_< T const >: sp_typeid_< T >\r
+{\r
+};\r
+\r
+template<class T> struct sp_typeid_< T volatile >: sp_typeid_< T >\r
+{\r
+};\r
+\r
+template<class T> struct sp_typeid_< T const volatile >: sp_typeid_< T >\r
+{\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#define BOOST_SP_TYPEID(T) (boost::detail::sp_typeid_<T>::ti_)\r
+\r
+#else\r
+\r
+#include <typeinfo>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+#if defined( BOOST_NO_STD_TYPEINFO )\r
+\r
+typedef ::type_info sp_typeinfo;\r
+\r
+#else\r
+\r
+typedef std::type_info sp_typeinfo;\r
+\r
+#endif\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#define BOOST_SP_TYPEID(T) typeid(T)\r
+\r
+#endif\r
+\r
+#endif // #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED\r
--- /dev/null
+// Copyright David Abrahams 2002.\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+#ifndef WORKAROUND_DWA2002126_HPP\r
+# define WORKAROUND_DWA2002126_HPP\r
+\r
+// Compiler/library version workaround macro\r
+//\r
+// Usage:\r
+//\r
+// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)\r
+// // workaround for eVC4 and VC6\r
+// ... // workaround code here\r
+// #endif\r
+//\r
+// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the\r
+// first argument must be undefined or expand to a numeric\r
+// value. The above expands to:\r
+//\r
+// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300\r
+//\r
+// When used for workarounds that apply to the latest known version \r
+// and all earlier versions of a compiler, the following convention \r
+// should be observed:\r
+//\r
+// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301))\r
+//\r
+// The version number in this case corresponds to the last version in\r
+// which the workaround was known to have been required. When\r
+// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro\r
+// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates\r
+// the workaround for any version of the compiler. When\r
+// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or\r
+// error will be issued if the compiler version exceeds the argument\r
+// to BOOST_TESTED_AT(). This can be used to locate workarounds which\r
+// may be obsoleted by newer versions.\r
+\r
+# ifndef BOOST_STRICT_CONFIG\r
+\r
+#include <boost/config.hpp>\r
+\r
+#ifndef __BORLANDC__\r
+#define __BORLANDC___WORKAROUND_GUARD 1\r
+#else\r
+#define __BORLANDC___WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __CODEGEARC__\r
+#define __CODEGEARC___WORKAROUND_GUARD 1\r
+#else\r
+#define __CODEGEARC___WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef _MSC_VER\r
+#define _MSC_VER_WORKAROUND_GUARD 1\r
+#else\r
+#define _MSC_VER_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef _MSC_FULL_VER\r
+#define _MSC_FULL_VER_WORKAROUND_GUARD 1\r
+#else\r
+#define _MSC_FULL_VER_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef BOOST_MSVC\r
+#define BOOST_MSVC_WORKAROUND_GUARD 1\r
+#else\r
+#define BOOST_MSVC_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef BOOST_MSVC_FULL_VER\r
+#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1\r
+#else\r
+#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __GNUC__\r
+#define __GNUC___WORKAROUND_GUARD 1\r
+#else\r
+#define __GNUC___WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __GNUC_MINOR__\r
+#define __GNUC_MINOR___WORKAROUND_GUARD 1\r
+#else\r
+#define __GNUC_MINOR___WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __GNUC_PATCHLEVEL__\r
+#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1\r
+#else\r
+#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __IBMCPP__\r
+#define __IBMCPP___WORKAROUND_GUARD 1\r
+#else\r
+#define __IBMCPP___WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __SUNPRO_CC\r
+#define __SUNPRO_CC_WORKAROUND_GUARD 1\r
+#else\r
+#define __SUNPRO_CC_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __DECCXX_VER\r
+#define __DECCXX_VER_WORKAROUND_GUARD 1\r
+#else\r
+#define __DECCXX_VER_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __MWERKS__\r
+#define __MWERKS___WORKAROUND_GUARD 1\r
+#else\r
+#define __MWERKS___WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __EDG__\r
+#define __EDG___WORKAROUND_GUARD 1\r
+#else\r
+#define __EDG___WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __EDG_VERSION__\r
+#define __EDG_VERSION___WORKAROUND_GUARD 1\r
+#else\r
+#define __EDG_VERSION___WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __HP_aCC\r
+#define __HP_aCC_WORKAROUND_GUARD 1\r
+#else\r
+#define __HP_aCC_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __hpxstd98\r
+#define __hpxstd98_WORKAROUND_GUARD 1\r
+#else\r
+#define __hpxstd98_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef _CRAYC\r
+#define _CRAYC_WORKAROUND_GUARD 1\r
+#else\r
+#define _CRAYC_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __DMC__\r
+#define __DMC___WORKAROUND_GUARD 1\r
+#else\r
+#define __DMC___WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef MPW_CPLUS\r
+#define MPW_CPLUS_WORKAROUND_GUARD 1\r
+#else\r
+#define MPW_CPLUS_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __COMO__\r
+#define __COMO___WORKAROUND_GUARD 1\r
+#else\r
+#define __COMO___WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __COMO_VERSION__\r
+#define __COMO_VERSION___WORKAROUND_GUARD 1\r
+#else\r
+#define __COMO_VERSION___WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __INTEL_COMPILER\r
+#define __INTEL_COMPILER_WORKAROUND_GUARD 1\r
+#else\r
+#define __INTEL_COMPILER_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __ICL\r
+#define __ICL_WORKAROUND_GUARD 1\r
+#else\r
+#define __ICL_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef _COMPILER_VERSION\r
+#define _COMPILER_VERSION_WORKAROUND_GUARD 1\r
+#else\r
+#define _COMPILER_VERSION_WORKAROUND_GUARD 0\r
+#endif\r
+\r
+#ifndef _RWSTD_VER\r
+#define _RWSTD_VER_WORKAROUND_GUARD 1\r
+#else\r
+#define _RWSTD_VER_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef BOOST_RWSTD_VER\r
+#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1\r
+#else\r
+#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __GLIBCPP__\r
+#define __GLIBCPP___WORKAROUND_GUARD 1\r
+#else\r
+#define __GLIBCPP___WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC\r
+#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1\r
+#else\r
+#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __SGI_STL_PORT\r
+#define __SGI_STL_PORT_WORKAROUND_GUARD 1\r
+#else\r
+#define __SGI_STL_PORT_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef _STLPORT_VERSION\r
+#define _STLPORT_VERSION_WORKAROUND_GUARD 1\r
+#else\r
+#define _STLPORT_VERSION_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef __LIBCOMO_VERSION__\r
+#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1\r
+#else\r
+#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef _CPPLIB_VER\r
+#define _CPPLIB_VER_WORKAROUND_GUARD 1\r
+#else\r
+#define _CPPLIB_VER_WORKAROUND_GUARD 0\r
+#endif\r
+\r
+#ifndef BOOST_INTEL_CXX_VERSION\r
+#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1\r
+#else\r
+#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef BOOST_INTEL_WIN\r
+#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1\r
+#else\r
+#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef BOOST_DINKUMWARE_STDLIB\r
+#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1\r
+#else\r
+#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0\r
+#endif\r
+#ifndef BOOST_INTEL\r
+#define BOOST_INTEL_WORKAROUND_GUARD 1\r
+#else\r
+#define BOOST_INTEL_WORKAROUND_GUARD 0\r
+#endif\r
+// Always define to zero, if it's used it'll be defined my MPL:\r
+#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0\r
+\r
+# define BOOST_WORKAROUND(symbol, test) \\r
+ ((symbol ## _WORKAROUND_GUARD + 0 == 0) && \\r
+ (symbol != 0) && (1 % (( (symbol test) ) + 1)))\r
+// ^ ^ ^ ^\r
+// The extra level of parenthesis nesting above, along with the\r
+// BOOST_OPEN_PAREN indirection below, is required to satisfy the\r
+// broken preprocessor in MWCW 8.3 and earlier.\r
+//\r
+// The basic mechanism works as follows:\r
+// (symbol test) + 1 => if (symbol test) then 2 else 1\r
+// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0\r
+//\r
+// The complication with % is for cooperation with BOOST_TESTED_AT().\r
+// When "test" is BOOST_TESTED_AT(x) and\r
+// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined,\r
+//\r
+// symbol test => if (symbol <= x) then 1 else -1\r
+// (symbol test) + 1 => if (symbol <= x) then 2 else 0\r
+// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero\r
+//\r
+\r
+# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS\r
+# define BOOST_OPEN_PAREN (\r
+# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1\r
+# else\r
+# define BOOST_TESTED_AT(value) != ((value)-(value))\r
+# endif\r
+\r
+# else\r
+\r
+# define BOOST_WORKAROUND(symbol, test) 0\r
+\r
+# endif \r
+\r
+#endif // WORKAROUND_DWA2002126_HPP\r
--- /dev/null
+//Copyright (c) 2006-2008 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_316FDA946C0D11DEA9CBAE5255D89593\r
+#define UUID_316FDA946C0D11DEA9CBAE5255D89593\r
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma GCC system_header\r
+#endif\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(push,1)\r
+#endif\r
+\r
+#include <boost/exception/diagnostic_information.hpp>\r
+#include <boost/exception/error_info.hpp>\r
+#include <boost/exception/exception.hpp>\r
+#include <boost/exception/get_error_info.hpp>\r
+#include <boost/exception/info.hpp>\r
+//GMX_REMOVED: #include <boost/exception/info_tuple.hpp>\r
+#include <boost/exception/errinfo_api_function.hpp>\r
+#include <boost/exception/errinfo_at_line.hpp>\r
+#include <boost/exception/errinfo_errno.hpp>\r
+#include <boost/exception/errinfo_file_handle.hpp>\r
+#include <boost/exception/errinfo_file_name.hpp>\r
+#include <boost/exception/errinfo_file_open_mode.hpp>\r
+#include <boost/exception/errinfo_type_info_name.hpp>\r
+#ifndef BOOST_NO_EXCEPTIONS\r
+#include <boost/exception/errinfo_nested_exception.hpp>\r
+#include <boost/exception_ptr.hpp>\r
+#endif\r
+\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(pop)\r
+#endif\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_7E83C166200811DE885E826156D89593\r
+#define UUID_7E83C166200811DE885E826156D89593\r
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma GCC system_header\r
+#endif\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(push,1)\r
+#endif\r
+\r
+namespace\r
+boost\r
+ {\r
+ template <class E>\r
+ inline\r
+ E *\r
+ current_exception_cast()\r
+ {\r
+ try\r
+ {\r
+ throw;\r
+ }\r
+ catch(\r
+ E & e )\r
+ {\r
+ return &e;\r
+ }\r
+ catch(\r
+ ...)\r
+ {\r
+ return 0;\r
+ }\r
+ }\r
+ }\r
+\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(pop)\r
+#endif\r
+#endif\r
--- /dev/null
+//Copyright (c) 2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_61531AB0680611DEADD5846855D89593\r
+#define UUID_61531AB0680611DEADD5846855D89593\r
+\r
+#if defined(_MSC_VER)\r
+#define BOOST_ATTRIBUTE_NORETURN __declspec(noreturn)\r
+#elif defined(__GNUC__)\r
+#define BOOST_ATTRIBUTE_NORETURN __attribute__((noreturn))\r
+#else\r
+#define BOOST_ATTRIBUTE_NORETURN\r
+#endif\r
+\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_CE6983AC753411DDA764247956D89593\r
+#define UUID_CE6983AC753411DDA764247956D89593\r
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma GCC system_header\r
+#endif\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(push,1)\r
+#endif\r
+\r
+#include <string>\r
+\r
+namespace\r
+boost\r
+ {\r
+ namespace\r
+ exception_detail\r
+ {\r
+ class\r
+ error_info_base\r
+ {\r
+ public:\r
+\r
+ virtual std::string tag_typeid_name() const = 0;\r
+ virtual std::string value_as_string() const = 0;\r
+\r
+ protected:\r
+\r
+ ~error_info_base() throw()\r
+ {\r
+ }\r
+ };\r
+ }\r
+\r
+ template <class Tag,class T>\r
+ class\r
+ error_info:\r
+ public exception_detail::error_info_base\r
+ {\r
+ public:\r
+\r
+ typedef T value_type;\r
+\r
+ error_info( value_type const & value );\r
+ ~error_info() throw();\r
+\r
+ value_type const &\r
+ value() const\r
+ {\r
+ return value_;\r
+ }\r
+\r
+ value_type &\r
+ value()\r
+ {\r
+ return value_;\r
+ }\r
+\r
+ private:\r
+\r
+ std::string tag_typeid_name() const;\r
+ std::string value_as_string() const;\r
+\r
+ value_type value_;\r
+ };\r
+ }\r
+\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(pop)\r
+#endif\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_618474C2DE1511DEB74A388C56D89593\r
+#define UUID_618474C2DE1511DEB74A388C56D89593\r
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma GCC system_header\r
+#endif\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(push,1)\r
+#endif\r
+\r
+#include <boost/config.hpp>\r
+#ifdef BOOST_NO_EXCEPTIONS\r
+#error This header requires exception handling to be enabled.\r
+#endif\r
+#include <boost/exception/exception.hpp>\r
+#include <boost/exception/info.hpp>\r
+#include <boost/exception/diagnostic_information.hpp>\r
+#include <boost/exception/detail/type_info.hpp>\r
+#include <boost/shared_ptr.hpp>\r
+#include <stdexcept>\r
+#include <new>\r
+#include <ios>\r
+\r
+namespace\r
+boost\r
+ {\r
+ typedef shared_ptr<exception_detail::clone_base const> exception_ptr;\r
+\r
+ exception_ptr current_exception();\r
+\r
+ template <class T>\r
+ inline\r
+ exception_ptr\r
+ copy_exception( T const & e )\r
+ {\r
+ try\r
+ {\r
+ throw enable_current_exception(e);\r
+ }\r
+ catch(\r
+ ... )\r
+ {\r
+ return current_exception();\r
+ }\r
+ }\r
+\r
+#ifndef BOOST_NO_RTTI\r
+ typedef error_info<struct tag_original_exception_type,std::type_info const *> original_exception_type;\r
+\r
+ inline\r
+ std::string\r
+ to_string( original_exception_type const & x )\r
+ {\r
+ return x.value()->name();\r
+ }\r
+#endif\r
+\r
+ namespace\r
+ exception_detail\r
+ {\r
+ struct\r
+ bad_alloc_:\r
+ boost::exception,\r
+ std::bad_alloc\r
+ {\r
+ };\r
+\r
+ template <int Dummy>\r
+ exception_ptr\r
+ get_bad_alloc()\r
+ {\r
+ bad_alloc_ ba;\r
+ exception_detail::clone_impl<bad_alloc_> c(ba);\r
+ c <<\r
+ throw_function(BOOST_CURRENT_FUNCTION) <<\r
+ throw_file(__FILE__) <<\r
+ throw_line(__LINE__);\r
+ static exception_ptr ep(new exception_detail::clone_impl<bad_alloc_>(c));\r
+ return ep;\r
+ }\r
+\r
+ template <int Dummy>\r
+ struct\r
+ exception_ptr_bad_alloc\r
+ {\r
+ static exception_ptr const e;\r
+ };\r
+\r
+ template <int Dummy>\r
+ exception_ptr const\r
+ exception_ptr_bad_alloc<Dummy>::\r
+ e = get_bad_alloc<Dummy>();\r
+ }\r
+\r
+ class\r
+ unknown_exception:\r
+ public boost::exception,\r
+ public std::exception\r
+ {\r
+ public:\r
+\r
+ unknown_exception()\r
+ {\r
+ }\r
+\r
+ explicit\r
+ unknown_exception( std::exception const & e )\r
+ {\r
+ add_original_type(e);\r
+ }\r
+\r
+ explicit\r
+ unknown_exception( boost::exception const & e ):\r
+ boost::exception(e)\r
+ {\r
+ add_original_type(e);\r
+ }\r
+\r
+ ~unknown_exception() throw()\r
+ {\r
+ }\r
+\r
+ private:\r
+\r
+ template <class E>\r
+ void\r
+ add_original_type( E const & e )\r
+ {\r
+#ifndef BOOST_NO_RTTI\r
+ (*this) << original_exception_type(&typeid(e));\r
+#endif\r
+ }\r
+ };\r
+\r
+ namespace\r
+ exception_detail\r
+ {\r
+ template <class T>\r
+ class\r
+ current_exception_std_exception_wrapper:\r
+ public T,\r
+ public boost::exception\r
+ {\r
+ public:\r
+\r
+ explicit\r
+ current_exception_std_exception_wrapper( T const & e1 ):\r
+ T(e1)\r
+ {\r
+ add_original_type(e1);\r
+ }\r
+\r
+ current_exception_std_exception_wrapper( T const & e1, boost::exception const & e2 ):\r
+ T(e1),\r
+ boost::exception(e2)\r
+ {\r
+ add_original_type(e1);\r
+ }\r
+\r
+ ~current_exception_std_exception_wrapper() throw()\r
+ {\r
+ }\r
+\r
+ private:\r
+\r
+ template <class E>\r
+ void\r
+ add_original_type( E const & e )\r
+ {\r
+#ifndef BOOST_NO_RTTI\r
+ (*this) << original_exception_type(&typeid(e));\r
+#endif\r
+ }\r
+ };\r
+\r
+#ifdef BOOST_NO_RTTI\r
+ template <class T>\r
+ boost::exception const *\r
+ get_boost_exception( T const * )\r
+ {\r
+ try\r
+ {\r
+ throw;\r
+ }\r
+ catch(\r
+ boost::exception & x )\r
+ {\r
+ return &x;\r
+ }\r
+ catch(...)\r
+ {\r
+ return 0;\r
+ }\r
+ }\r
+#else\r
+ template <class T>\r
+ boost::exception const *\r
+ get_boost_exception( T const * x )\r
+ {\r
+ return dynamic_cast<boost::exception const *>(x);\r
+ }\r
+#endif\r
+\r
+ template <class T>\r
+ inline\r
+ exception_ptr\r
+ current_exception_std_exception( T const & e1 )\r
+ {\r
+ if( boost::exception const * e2 = get_boost_exception(&e1) )\r
+ return boost::copy_exception(current_exception_std_exception_wrapper<T>(e1,*e2));\r
+ else\r
+ return boost::copy_exception(current_exception_std_exception_wrapper<T>(e1));\r
+ }\r
+\r
+ inline\r
+ exception_ptr\r
+ current_exception_unknown_exception()\r
+ {\r
+ return boost::copy_exception(unknown_exception());\r
+ }\r
+\r
+ inline\r
+ exception_ptr\r
+ current_exception_unknown_boost_exception( boost::exception const & e )\r
+ {\r
+ return boost::copy_exception(unknown_exception(e));\r
+ }\r
+\r
+ inline\r
+ exception_ptr\r
+ current_exception_unknown_std_exception( std::exception const & e )\r
+ {\r
+ if( boost::exception const * be = get_boost_exception(&e) )\r
+ return current_exception_unknown_boost_exception(*be);\r
+ else\r
+ return boost::copy_exception(unknown_exception(e));\r
+ }\r
+\r
+ inline\r
+ exception_ptr\r
+ current_exception_impl()\r
+ {\r
+ try\r
+ {\r
+ throw;\r
+ }\r
+ catch(\r
+ exception_detail::clone_base & e )\r
+ {\r
+ return exception_ptr(e.clone());\r
+ }\r
+ catch(\r
+ std::domain_error & e )\r
+ {\r
+ return exception_detail::current_exception_std_exception(e);\r
+ }\r
+ catch(\r
+ std::invalid_argument & e )\r
+ {\r
+ return exception_detail::current_exception_std_exception(e);\r
+ }\r
+ catch(\r
+ std::length_error & e )\r
+ {\r
+ return exception_detail::current_exception_std_exception(e);\r
+ }\r
+ catch(\r
+ std::out_of_range & e )\r
+ {\r
+ return exception_detail::current_exception_std_exception(e);\r
+ }\r
+ catch(\r
+ std::logic_error & e )\r
+ {\r
+ return exception_detail::current_exception_std_exception(e);\r
+ }\r
+ catch(\r
+ std::range_error & e )\r
+ {\r
+ return exception_detail::current_exception_std_exception(e);\r
+ }\r
+ catch(\r
+ std::overflow_error & e )\r
+ {\r
+ return exception_detail::current_exception_std_exception(e);\r
+ }\r
+ catch(\r
+ std::underflow_error & e )\r
+ {\r
+ return exception_detail::current_exception_std_exception(e);\r
+ }\r
+ catch(\r
+ std::ios_base::failure & e )\r
+ {\r
+ return exception_detail::current_exception_std_exception(e);\r
+ }\r
+ catch(\r
+ std::runtime_error & e )\r
+ {\r
+ return exception_detail::current_exception_std_exception(e);\r
+ }\r
+ catch(\r
+ std::bad_alloc & e )\r
+ {\r
+ return exception_detail::current_exception_std_exception(e);\r
+ }\r
+#ifndef BOOST_NO_TYPEID\r
+ catch(\r
+ std::bad_cast & e )\r
+ {\r
+ return exception_detail::current_exception_std_exception(e);\r
+ }\r
+ catch(\r
+ std::bad_typeid & e )\r
+ {\r
+ return exception_detail::current_exception_std_exception(e);\r
+ }\r
+#endif\r
+ catch(\r
+ std::bad_exception & e )\r
+ {\r
+ return exception_detail::current_exception_std_exception(e);\r
+ }\r
+ catch(\r
+ std::exception & e )\r
+ {\r
+ return exception_detail::current_exception_unknown_std_exception(e);\r
+ }\r
+ catch(\r
+ boost::exception & e )\r
+ {\r
+ return exception_detail::current_exception_unknown_boost_exception(e);\r
+ }\r
+ catch(\r
+ ... )\r
+ {\r
+ return exception_detail::current_exception_unknown_exception();\r
+ }\r
+ }\r
+ }\r
+\r
+ inline\r
+ exception_ptr\r
+ current_exception()\r
+ {\r
+ exception_ptr ret;\r
+ BOOST_ASSERT(!ret);\r
+ try\r
+ {\r
+ ret=exception_detail::current_exception_impl();\r
+ }\r
+ catch(\r
+ std::bad_alloc & )\r
+ {\r
+ ret=exception_detail::exception_ptr_bad_alloc<42>::e;\r
+ }\r
+ catch(\r
+ ... )\r
+ {\r
+ try\r
+ {\r
+ ret=exception_detail::current_exception_std_exception(std::bad_exception());\r
+ }\r
+ catch(\r
+ std::bad_alloc & )\r
+ {\r
+ ret=exception_detail::exception_ptr_bad_alloc<42>::e;\r
+ }\r
+ catch(\r
+ ... )\r
+ {\r
+ BOOST_ASSERT(0);\r
+ }\r
+ }\r
+ BOOST_ASSERT(ret);\r
+ return ret;\r
+ }\r
+\r
+ inline\r
+ void\r
+ rethrow_exception( exception_ptr const & p )\r
+ {\r
+ BOOST_ASSERT(p);\r
+ p->rethrow();\r
+ }\r
+\r
+ inline\r
+ std::string\r
+ diagnostic_information( exception_ptr const & p )\r
+ {\r
+ if( p )\r
+ try\r
+ {\r
+ rethrow_exception(p);\r
+ }\r
+ catch(\r
+ ... )\r
+ {\r
+ return current_exception_diagnostic_information();\r
+ }\r
+ return "<empty>";\r
+ }\r
+\r
+ inline\r
+ std::string\r
+ to_string( exception_ptr const & p )\r
+ {\r
+ std::string s='\n'+diagnostic_information(p);\r
+ std::string padding(" ");\r
+ std::string r;\r
+ bool f=false;\r
+ for( std::string::const_iterator i=s.begin(),e=s.end(); i!=e; ++i )\r
+ {\r
+ if( f )\r
+ r+=padding;\r
+ char c=*i;\r
+ r+=c;\r
+ f=(c=='\n');\r
+ }\r
+ return r;\r
+ }\r
+ }\r
+\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(pop)\r
+#endif\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_898984B4076411DD973EDFA055D89593\r
+#define UUID_898984B4076411DD973EDFA055D89593\r
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma GCC system_header\r
+#endif\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(push,1)\r
+#endif\r
+\r
+#include <ostream>\r
+\r
+namespace\r
+boost\r
+ {\r
+ namespace\r
+ to_string_detail\r
+ {\r
+ struct\r
+ partial_ordering_helper1\r
+ {\r
+ template <class CharT,class Traits>\r
+ partial_ordering_helper1( std::basic_ostream<CharT,Traits> & );\r
+ };\r
+\r
+ struct\r
+ partial_ordering_helper2\r
+ {\r
+ template <class T>\r
+ partial_ordering_helper2( T const & );\r
+ };\r
+\r
+ char operator<<( partial_ordering_helper1, partial_ordering_helper2 );\r
+\r
+ template <class T,class CharT,class Traits>\r
+ struct\r
+ is_output_streamable_impl\r
+ {\r
+ static std::basic_ostream<CharT,Traits> & f();\r
+ static T const & g();\r
+ enum e { value=1!=(sizeof(f()<<g())) };\r
+ };\r
+ }\r
+\r
+ template <class T, class CharT=char, class Traits=std::char_traits<CharT> >\r
+ struct\r
+ is_output_streamable\r
+ {\r
+ enum e { value=to_string_detail::is_output_streamable_impl<T,CharT,Traits>::value };\r
+ };\r
+ }\r
+\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(pop)\r
+#endif\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_6F463AC838DF11DDA3E6909F56D89593\r
+#define UUID_6F463AC838DF11DDA3E6909F56D89593\r
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma GCC system_header\r
+#endif\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(push,1)\r
+#endif\r
+\r
+#include <boost/exception/detail/type_info.hpp>\r
+#include <iomanip>\r
+#include <ios>\r
+#include <string>\r
+#include <sstream>\r
+#include <cstdlib>\r
+\r
+namespace\r
+boost\r
+ {\r
+ namespace\r
+ exception_detail\r
+ {\r
+ template <class T>\r
+ inline\r
+ std::string\r
+ object_hex_dump( T const & x, std::size_t max_size=16 )\r
+ {\r
+ std::ostringstream s;\r
+ s << "type: " << type_name<T>() << ", size: " << sizeof(T) << ", dump: ";\r
+ std::size_t n=sizeof(T)>max_size?max_size:sizeof(T);\r
+ s.fill('0');\r
+ s.width(2);\r
+ unsigned char const * b=reinterpret_cast<unsigned char const *>(&x);\r
+ s << std::setw(2) << std::hex << (unsigned int)*b;\r
+ for( unsigned char const * e=b+n; ++b!=e; )\r
+ s << " " << std::setw(2) << std::hex << (unsigned int)*b;\r
+ return s.str();\r
+ }\r
+ }\r
+ }\r
+\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(pop)\r
+#endif\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_C3E1741C754311DDB2834CCA55D89593\r
+#define UUID_C3E1741C754311DDB2834CCA55D89593\r
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma GCC system_header\r
+#endif\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(push,1)\r
+#endif\r
+\r
+#include <boost/detail/sp_typeinfo.hpp>\r
+#include <boost/current_function.hpp>\r
+#include <boost/config.hpp>\r
+#ifndef BOOST_NO_TYPEID\r
+//GMX_REMOVED #include <boost/units/detail/utility.hpp> -- doesn't support not having set BOOST_NO_TYPEID\r
+#endif\r
+#include <string>\r
+\r
+namespace\r
+boost\r
+ {\r
+ template <class T>\r
+ inline\r
+ std::string\r
+ tag_type_name()\r
+ {\r
+#ifdef BOOST_NO_TYPEID\r
+ return BOOST_CURRENT_FUNCTION;\r
+#else\r
+ return units::detail::demangle(typeid(T*).name());\r
+#endif\r
+ }\r
+\r
+ template <class T>\r
+ inline\r
+ std::string\r
+ type_name()\r
+ {\r
+#ifdef BOOST_NO_TYPEID\r
+ return BOOST_CURRENT_FUNCTION;\r
+#else\r
+ return units::detail::demangle(typeid(T).name());\r
+#endif\r
+ }\r
+\r
+ namespace\r
+ exception_detail\r
+ {\r
+ struct\r
+ type_info_\r
+ {\r
+ detail::sp_typeinfo const & type_;\r
+\r
+ explicit\r
+ type_info_( detail::sp_typeinfo const & type ):\r
+ type_(type)\r
+ {\r
+ }\r
+\r
+ friend\r
+ bool\r
+ operator<( type_info_ const & a, type_info_ const & b )\r
+ {\r
+ return 0!=(a.type_.before(b.type_));\r
+ }\r
+ };\r
+ }\r
+ }\r
+\r
+#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_SP_TYPEID(T))\r
+\r
+#ifndef BOOST_NO_RTTI\r
+#define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::boost::exception_detail::type_info_(typeid(x))\r
+#endif\r
+\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(pop)\r
+#endif\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_0552D49838DD11DD90146B8956D89593\r
+#define UUID_0552D49838DD11DD90146B8956D89593\r
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma GCC system_header\r
+#endif\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(push,1)\r
+#endif\r
+\r
+#include <boost/config.hpp>\r
+#include <boost/exception/get_error_info.hpp>\r
+#include <boost/utility/enable_if.hpp>\r
+#ifndef BOOST_NO_RTTI\r
+#error GMX_REMOVED: #include <boost/units/detail/utility.hpp> -- doesn't suport not having set NO_RTTI\r
+#endif\r
+#include <exception>\r
+#include <sstream>\r
+#include <string>\r
+\r
+#ifndef BOOST_NO_EXCEPTIONS\r
+#include <boost/exception/current_exception_cast.hpp>\r
+namespace\r
+boost\r
+ {\r
+ namespace\r
+ exception_detail\r
+ {\r
+ std::string diagnostic_information_impl( boost::exception const *, std::exception const *, bool );\r
+ }\r
+\r
+ inline\r
+ std::string\r
+ current_exception_diagnostic_information()\r
+ {\r
+ boost::exception const * be=current_exception_cast<boost::exception const>();\r
+ std::exception const * se=current_exception_cast<std::exception const>();\r
+ if( be || se )\r
+ return exception_detail::diagnostic_information_impl(be,se,true);\r
+ else\r
+ return "No diagnostic information available.";\r
+ }\r
+ }\r
+#endif\r
+\r
+namespace\r
+boost\r
+ {\r
+ namespace\r
+ exception_detail\r
+ {\r
+ inline\r
+ exception const *\r
+ get_boost_exception( exception const * e )\r
+ {\r
+ return e;\r
+ }\r
+\r
+ inline\r
+ exception const *\r
+ get_boost_exception( ... )\r
+ {\r
+ return 0;\r
+ }\r
+\r
+ inline\r
+ std::exception const *\r
+ get_std_exception( std::exception const * e )\r
+ {\r
+ return e;\r
+ }\r
+\r
+ inline\r
+ std::exception const *\r
+ get_std_exception( ... )\r
+ {\r
+ return 0;\r
+ }\r
+\r
+ inline\r
+ char const *\r
+ get_diagnostic_information( exception const & x, char const * header )\r
+ {\r
+ if( error_info_container * c=x.data_.get() )\r
+#ifndef BOOST_NO_EXCEPTIONS\r
+ try\r
+ {\r
+#endif\r
+ return c->diagnostic_information(header);\r
+#ifndef BOOST_NO_EXCEPTIONS\r
+ }\r
+ catch(...)\r
+ {\r
+ }\r
+#endif\r
+ return 0;\r
+ }\r
+\r
+ inline\r
+ std::string\r
+ diagnostic_information_impl( boost::exception const * be, std::exception const * se, bool with_what )\r
+ {\r
+ if( !be && !se )\r
+ return "Unknown exception.";\r
+#ifndef BOOST_NO_RTTI\r
+ if( !be )\r
+ be=dynamic_cast<boost::exception const *>(se);\r
+ if( !se )\r
+ se=dynamic_cast<std::exception const *>(be);\r
+#endif\r
+ char const * wh=0;\r
+ if( with_what && se )\r
+ {\r
+ wh=se->what();\r
+ if( be && exception_detail::get_diagnostic_information(*be,0)==wh )\r
+ return wh;\r
+ }\r
+ std::ostringstream tmp;\r
+ if( be )\r
+ {\r
+ if( char const * const * f=get_error_info<throw_file>(*be) )\r
+ {\r
+ tmp << *f;\r
+ if( int const * l=get_error_info<throw_line>(*be) )\r
+ tmp << '(' << *l << "): ";\r
+ }\r
+ tmp << "Throw in function ";\r
+ if( char const * const * fn=get_error_info<throw_function>(*be) )\r
+ tmp << *fn;\r
+ else\r
+ tmp << "(unknown)";\r
+ tmp << '\n';\r
+ }\r
+#ifndef BOOST_NO_RTTI\r
+ tmp << std::string("Dynamic exception type: ") <<\r
+ units::detail::demangle((be?(BOOST_EXCEPTION_DYNAMIC_TYPEID(*be)):(BOOST_EXCEPTION_DYNAMIC_TYPEID(*se))).type_.name()) << '\n';\r
+#endif\r
+ if( with_what && se )\r
+ tmp << "std::exception::what: " << wh << '\n';\r
+ if( be )\r
+ if( char const * s=exception_detail::get_diagnostic_information(*be,tmp.str().c_str()) )\r
+ if( *s )\r
+ return s;\r
+ return tmp.str();\r
+ }\r
+ }\r
+\r
+ template <class T>\r
+ std::string\r
+ diagnostic_information( T const & e )\r
+ {\r
+ return exception_detail::diagnostic_information_impl(exception_detail::get_boost_exception(&e),exception_detail::get_std_exception(&e),true);\r
+ }\r
+\r
+ inline\r
+ char const *\r
+ diagnostic_information_what( exception const & e ) throw()\r
+ {\r
+ char const * w=0;\r
+#ifndef BOOST_NO_EXCEPTIONS\r
+ try\r
+ {\r
+#endif\r
+ (void) exception_detail::diagnostic_information_impl(&e,0,false);\r
+ return exception_detail::get_diagnostic_information(e,0);\r
+#ifndef BOOST_NO_EXCEPTIONS\r
+ }\r
+ catch(\r
+ ... )\r
+ {\r
+ }\r
+#endif\r
+ return w;\r
+ }\r
+ }\r
+\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(pop)\r
+#endif\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_DDFBB4546C1211DEA4659E9055D89593\r
+#define UUID_DDFBB4546C1211DEA4659E9055D89593\r
+\r
+#include "boost/exception/error_info.hpp"\r
+\r
+namespace\r
+boost\r
+ {\r
+ //Usage hint:\r
+ //if( api_function(....)!=0 )\r
+ // BOOST_THROW_EXCEPTION(\r
+ // failure() <<\r
+ // errinfo_api_function("api_function") );\r
+ typedef error_info<struct errinfo_api_function_,char const *> errinfo_api_function;\r
+ }\r
+\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_E7255CE26C1211DE85800C9155D89593\r
+#define UUID_E7255CE26C1211DE85800C9155D89593\r
+\r
+namespace\r
+boost\r
+ {\r
+ template <class Tag,class T> class error_info;\r
+\r
+ //Use with parsing errors exceptions, for example in a XML file parser.\r
+ typedef error_info<struct errinfo_at_line_,int> errinfo_at_line;\r
+ }\r
+\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_F0EE17BE6C1211DE87FF459155D89593\r
+#define UUID_F0EE17BE6C1211DE87FF459155D89593\r
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma GCC system_header\r
+#endif\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(push,1)\r
+#endif\r
+\r
+#include "boost/exception/info.hpp"\r
+#include <errno.h>\r
+#include <string.h>\r
+\r
+namespace\r
+boost\r
+ {\r
+ typedef error_info<struct errinfo_errno_,int> errinfo_errno;\r
+\r
+ //Usage hint:\r
+ //if( c_function(....)!=0 )\r
+ // BOOST_THROW_EXCEPTION(\r
+ // failure() <<\r
+ // errinfo_errno(errno) <<\r
+ // errinfo_api_function("c_function") );\r
+ inline\r
+ std::string\r
+ to_string( errinfo_errno const & e )\r
+ {\r
+ std::ostringstream tmp;\r
+ int v=e.value();\r
+ tmp << v << ", \"" << strerror(v) << "\"";\r
+ return tmp.str();\r
+ }\r
+ }\r
+\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(pop)\r
+#endif\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_F79E6EE26C1211DEB26E929155D89593\r
+#define UUID_F79E6EE26C1211DEB26E929155D89593\r
+\r
+#include <stdio.h>\r
+\r
+namespace\r
+boost\r
+ {\r
+ template <class> class weak_ptr;\r
+ template <class Tag,class T> class error_info;\r
+\r
+ typedef error_info<struct errinfo_file_handle_,weak_ptr<FILE> > errinfo_file_handle;\r
+ }\r
+\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_FEE5120A6C1211DE94E8BC9155D89593\r
+#define UUID_FEE5120A6C1211DE94E8BC9155D89593\r
+\r
+#include <string>\r
+\r
+namespace\r
+boost\r
+ {\r
+ template <class Tag,class T> class error_info;\r
+\r
+ //Usage hint:\r
+ //FILE * f=fopen(name,mode);\r
+ //if( !f )\r
+ // BOOST_THROW_EXCEPTION(\r
+ // file_open_error() <<\r
+ // errinfo_file_name(name) <<\r
+ // errinfo_file_open_mode(mode) );\r
+ typedef error_info<struct errinfo_file_name_,std::string> errinfo_file_name;\r
+ }\r
+\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_056F1F266C1311DE8E74299255D89593\r
+#define UUID_056F1F266C1311DE8E74299255D89593\r
+\r
+#include <string>\r
+\r
+namespace\r
+boost\r
+ {\r
+ template <class Tag,class T> class error_info;\r
+\r
+ //Usage hint:\r
+ //FILE * f=fopen(name,mode);\r
+ //if( !f )\r
+ // BOOST_THROW_EXCEPTION(\r
+ // file_open_error() <<\r
+ // errinfo_file_name(name) <<\r
+ // errinfo_file_open_mode(mode) );\r
+ typedef error_info<struct errinfo_file_open_mode_,std::string> errinfo_file_open_mode;\r
+ }\r
+\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_45CC9A82B77511DEB330FC4956D89593\r
+#define UUID_45CC9A82B77511DEB330FC4956D89593\r
+\r
+namespace\r
+boost\r
+ {\r
+ namespace exception_detail { class clone_base; };\r
+ template <class Tag,class T> class error_info;\r
+ template <class T> class shared_ptr;\r
+ typedef shared_ptr<exception_detail::clone_base const> exception_ptr;\r
+ typedef error_info<struct errinfo_nested_exception_,exception_ptr> errinfo_nested_exception;\r
+ }\r
+\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_0E11109E6C1311DEB7EA649255D89593\r
+#define UUID_0E11109E6C1311DEB7EA649255D89593\r
+\r
+#include <string>\r
+\r
+namespace\r
+boost\r
+ {\r
+ template <class Tag,class T> class error_info;\r
+\r
+ //Usage hint:\r
+ //BOOST_THROW_EXCEPTION(\r
+ // bad_type() <<\r
+ // errinfo_type_info_name(typeid(x).name()) );\r
+ typedef error_info<struct errinfo_type_info_name_,std::string> errinfo_type_info_name;\r
+ }\r
+\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+namespace boost { template <class Tag,class T> class error_info; }\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_274DA366004E11DCB1DDFE2E56D89593\r
+#define UUID_274DA366004E11DCB1DDFE2E56D89593\r
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma GCC system_header\r
+#endif\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(push,1)\r
+#endif\r
+\r
+namespace\r
+boost\r
+ {\r
+ namespace\r
+ exception_detail\r
+ {\r
+ template <class T>\r
+ class\r
+ refcount_ptr\r
+ {\r
+ public:\r
+\r
+ refcount_ptr():\r
+ px_(0)\r
+ {\r
+ }\r
+\r
+ ~refcount_ptr()\r
+ {\r
+ release();\r
+ }\r
+\r
+ refcount_ptr( refcount_ptr const & x ):\r
+ px_(x.px_)\r
+ {\r
+ add_ref();\r
+ }\r
+\r
+ refcount_ptr &\r
+ operator=( refcount_ptr const & x )\r
+ {\r
+ adopt(x.px_);\r
+ return *this;\r
+ }\r
+\r
+ void\r
+ adopt( T * px )\r
+ {\r
+ release();\r
+ px_=px;\r
+ add_ref();\r
+ }\r
+\r
+ T *\r
+ get() const\r
+ {\r
+ return px_;\r
+ }\r
+\r
+ private:\r
+\r
+ T * px_;\r
+\r
+ void\r
+ add_ref()\r
+ {\r
+ if( px_ )\r
+ px_->add_ref();\r
+ }\r
+\r
+ void\r
+ release()\r
+ {\r
+ if( px_ && px_->release() )\r
+ px_=0;\r
+ }\r
+ };\r
+ }\r
+\r
+ ////////////////////////////////////////////////////////////////////////\r
+\r
+ template <class Tag,class T>\r
+ class error_info;\r
+\r
+ typedef error_info<struct throw_function_,char const *> throw_function;\r
+ typedef error_info<struct throw_file_,char const *> throw_file;\r
+ typedef error_info<struct throw_line_,int> throw_line;\r
+\r
+ template <>\r
+ class\r
+ error_info<throw_function_,char const *>\r
+ {\r
+ public:\r
+ typedef char const * value_type;\r
+ value_type v_;\r
+ explicit\r
+ error_info( value_type v ):\r
+ v_(v)\r
+ {\r
+ }\r
+ };\r
+\r
+ template <>\r
+ class\r
+ error_info<throw_file_,char const *>\r
+ {\r
+ public:\r
+ typedef char const * value_type;\r
+ value_type v_;\r
+ explicit\r
+ error_info( value_type v ):\r
+ v_(v)\r
+ {\r
+ }\r
+ };\r
+\r
+ template <>\r
+ class\r
+ error_info<throw_line_,int>\r
+ {\r
+ public:\r
+ typedef int value_type;\r
+ value_type v_;\r
+ explicit\r
+ error_info( value_type v ):\r
+ v_(v)\r
+ {\r
+ }\r
+ };\r
+\r
+ class exception;\r
+\r
+ template <class T>\r
+ class shared_ptr;\r
+\r
+ namespace\r
+ exception_detail\r
+ {\r
+ class error_info_base;\r
+ struct type_info_;\r
+\r
+ struct\r
+ error_info_container\r
+ {\r
+ virtual char const * diagnostic_information( char const * ) const = 0;\r
+ virtual shared_ptr<error_info_base> get( type_info_ const & ) const = 0;\r
+ virtual void set( shared_ptr<error_info_base> const &, type_info_ const & ) = 0;\r
+ virtual void add_ref() const = 0;\r
+ virtual bool release() const = 0;\r
+ virtual refcount_ptr<exception_detail::error_info_container> clone() const = 0;\r
+\r
+ protected:\r
+\r
+ ~error_info_container() throw()\r
+ {\r
+ }\r
+ };\r
+\r
+ template <class>\r
+ struct get_info;\r
+\r
+ template <>\r
+ struct get_info<throw_function>;\r
+\r
+ template <>\r
+ struct get_info<throw_file>;\r
+\r
+ template <>\r
+ struct get_info<throw_line>;\r
+\r
+ char const * get_diagnostic_information( exception const &, char const * );\r
+\r
+ void copy_boost_exception( exception *, exception const * );\r
+\r
+ template <class E,class Tag,class T>\r
+ E const & set_info( E const &, error_info<Tag,T> const & );\r
+\r
+ template <class E>\r
+ E const & set_info( E const &, throw_function const & );\r
+\r
+ template <class E>\r
+ E const & set_info( E const &, throw_file const & );\r
+\r
+ template <class E>\r
+ E const & set_info( E const &, throw_line const & );\r
+ }\r
+\r
+ class\r
+ exception\r
+ {\r
+ protected:\r
+\r
+ exception():\r
+ throw_function_(0),\r
+ throw_file_(0),\r
+ throw_line_(-1)\r
+ {\r
+ }\r
+\r
+#ifdef __HP_aCC\r
+ //On HP aCC, this protected copy constructor prevents throwing boost::exception.\r
+ //On all other platforms, the same effect is achieved by the pure virtual destructor.\r
+ exception( exception const & x ) throw():\r
+ data_(x.data_),\r
+ throw_function_(x.throw_function_),\r
+ throw_file_(x.throw_file_),\r
+ throw_line_(x.throw_line_)\r
+ {\r
+ }\r
+#endif\r
+\r
+ virtual ~exception() throw()\r
+#ifndef __HP_aCC\r
+ = 0 //Workaround for HP aCC, =0 incorrectly leads to link errors.\r
+#endif\r
+ ;\r
+\r
+#if (defined(__MWERKS__) && __MWERKS__<=0x3207) || (defined(_MSC_VER) && _MSC_VER<=1310)\r
+ public:\r
+#else\r
+ private:\r
+\r
+ template <class E>\r
+ friend E const & exception_detail::set_info( E const &, throw_function const & );\r
+\r
+ template <class E>\r
+ friend E const & exception_detail::set_info( E const &, throw_file const & );\r
+\r
+ template <class E>\r
+ friend E const & exception_detail::set_info( E const &, throw_line const & );\r
+\r
+ template <class E,class Tag,class T>\r
+ friend E const & exception_detail::set_info( E const &, error_info<Tag,T> const & );\r
+\r
+ friend char const * exception_detail::get_diagnostic_information( exception const &, char const * );\r
+\r
+ template <class>\r
+ friend struct exception_detail::get_info;\r
+ friend struct exception_detail::get_info<throw_function>;\r
+ friend struct exception_detail::get_info<throw_file>;\r
+ friend struct exception_detail::get_info<throw_line>;\r
+ friend void exception_detail::copy_boost_exception( exception *, exception const * );\r
+#endif\r
+ mutable exception_detail::refcount_ptr<exception_detail::error_info_container> data_;\r
+ mutable char const * throw_function_;\r
+ mutable char const * throw_file_;\r
+ mutable int throw_line_;\r
+ };\r
+\r
+ inline\r
+ exception::\r
+ ~exception() throw()\r
+ {\r
+ }\r
+\r
+ namespace\r
+ exception_detail\r
+ {\r
+ template <class E>\r
+ E const &\r
+ set_info( E const & x, throw_function const & y )\r
+ {\r
+ x.throw_function_=y.v_;\r
+ return x;\r
+ }\r
+\r
+ template <class E>\r
+ E const &\r
+ set_info( E const & x, throw_file const & y )\r
+ {\r
+ x.throw_file_=y.v_;\r
+ return x;\r
+ }\r
+\r
+ template <class E>\r
+ E const &\r
+ set_info( E const & x, throw_line const & y )\r
+ {\r
+ x.throw_line_=y.v_;\r
+ return x;\r
+ }\r
+ }\r
+\r
+ ////////////////////////////////////////////////////////////////////////\r
+\r
+ namespace\r
+ exception_detail\r
+ {\r
+ template <class T>\r
+ struct\r
+ error_info_injector:\r
+ public T,\r
+ public exception\r
+ {\r
+ explicit\r
+ error_info_injector( T const & x ):\r
+ T(x)\r
+ {\r
+ }\r
+\r
+ ~error_info_injector() throw()\r
+ {\r
+ }\r
+ };\r
+\r
+ struct large_size { char c[256]; };\r
+ large_size dispatch_boost_exception( exception const * );\r
+\r
+ struct small_size { };\r
+ small_size dispatch_boost_exception( void const * );\r
+\r
+ template <class,int>\r
+ struct enable_error_info_helper;\r
+\r
+ template <class T>\r
+ struct\r
+ enable_error_info_helper<T,sizeof(large_size)>\r
+ {\r
+ typedef T type;\r
+ };\r
+\r
+ template <class T>\r
+ struct\r
+ enable_error_info_helper<T,sizeof(small_size)>\r
+ {\r
+ typedef error_info_injector<T> type;\r
+ };\r
+\r
+ template <class T>\r
+ struct\r
+ enable_error_info_return_type\r
+ {\r
+ typedef typename enable_error_info_helper<T,sizeof(exception_detail::dispatch_boost_exception((T*)0))>::type type;\r
+ };\r
+ }\r
+\r
+ template <class T>\r
+ inline\r
+ typename\r
+ exception_detail::enable_error_info_return_type<T>::type\r
+ enable_error_info( T const & x )\r
+ {\r
+ typedef typename exception_detail::enable_error_info_return_type<T>::type rt;\r
+ return rt(x);\r
+ }\r
+\r
+ ////////////////////////////////////////////////////////////////////////\r
+\r
+ namespace\r
+ exception_detail\r
+ {\r
+ class\r
+ clone_base\r
+ {\r
+ public:\r
+\r
+ virtual clone_base const * clone() const = 0;\r
+ virtual void rethrow() const = 0;\r
+\r
+ virtual\r
+ ~clone_base() throw()\r
+ {\r
+ }\r
+ };\r
+\r
+ inline\r
+ void\r
+ copy_boost_exception( exception * a, exception const * b )\r
+ {\r
+ refcount_ptr<error_info_container> data;\r
+ if( error_info_container * d=b->data_.get() )\r
+ data = d->clone();\r
+ a->throw_file_ = b->throw_file_;\r
+ a->throw_line_ = b->throw_line_;\r
+ a->throw_function_ = b->throw_function_;\r
+ a->data_ = data;\r
+ }\r
+\r
+ inline\r
+ void\r
+ copy_boost_exception( void *, void const * )\r
+ {\r
+ }\r
+\r
+ template <class T>\r
+ class\r
+ clone_impl:\r
+ public T,\r
+ public clone_base\r
+ {\r
+ public:\r
+\r
+ explicit\r
+ clone_impl( T const & x ):\r
+ T(x)\r
+ {\r
+ copy_boost_exception(this,&x);\r
+ }\r
+\r
+ ~clone_impl() throw()\r
+ {\r
+ }\r
+\r
+ private:\r
+\r
+ clone_base const *\r
+ clone() const\r
+ {\r
+ return new clone_impl(*this);\r
+ }\r
+\r
+ void\r
+ rethrow() const\r
+ {\r
+ throw*this;\r
+ }\r
+ };\r
+ }\r
+\r
+ template <class T>\r
+ inline\r
+ exception_detail::clone_impl<T>\r
+ enable_current_exception( T const & x )\r
+ {\r
+ return exception_detail::clone_impl<T>(x);\r
+ }\r
+ }\r
+\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(pop)\r
+#endif\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_1A590226753311DD9E4CCF6156D89593\r
+#define UUID_1A590226753311DD9E4CCF6156D89593\r
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma GCC system_header\r
+#endif\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(push,1)\r
+#endif\r
+\r
+#include <boost/exception/exception.hpp>\r
+#include <boost/exception/detail/error_info_impl.hpp>\r
+#include <boost/exception/detail/type_info.hpp>\r
+#include <boost/shared_ptr.hpp>\r
+\r
+namespace\r
+boost\r
+ {\r
+ namespace\r
+ exception_detail\r
+ {\r
+ template <class ErrorInfo>\r
+ struct\r
+ get_info\r
+ {\r
+ static\r
+ typename ErrorInfo::value_type *\r
+ get( exception const & x )\r
+ {\r
+ if( exception_detail::error_info_container * c=x.data_.get() )\r
+ if( shared_ptr<exception_detail::error_info_base> eib = c->get(BOOST_EXCEPTION_STATIC_TYPEID(ErrorInfo)) )\r
+ {\r
+#ifndef BOOST_NO_RTTI\r
+ BOOST_ASSERT( 0!=dynamic_cast<ErrorInfo *>(eib.get()) );\r
+#endif\r
+ ErrorInfo * w = static_cast<ErrorInfo *>(eib.get());\r
+ return &w->value();\r
+ }\r
+ return 0;\r
+ }\r
+ };\r
+\r
+ template <>\r
+ struct\r
+ get_info<throw_function>\r
+ {\r
+ static\r
+ char const * *\r
+ get( exception const & x )\r
+ {\r
+ return x.throw_function_ ? &x.throw_function_ : 0;\r
+ }\r
+ };\r
+\r
+ template <>\r
+ struct\r
+ get_info<throw_file>\r
+ {\r
+ static\r
+ char const * *\r
+ get( exception const & x )\r
+ {\r
+ return x.throw_file_ ? &x.throw_file_ : 0;\r
+ }\r
+ };\r
+\r
+ template <>\r
+ struct\r
+ get_info<throw_line>\r
+ {\r
+ static\r
+ int *\r
+ get( exception const & x )\r
+ {\r
+ return x.throw_line_!=-1 ? &x.throw_line_ : 0;\r
+ }\r
+ };\r
+\r
+ template <class T,class R>\r
+ struct\r
+ get_error_info_return_type\r
+ {\r
+ typedef R * type;\r
+ };\r
+\r
+ template <class T,class R>\r
+ struct\r
+ get_error_info_return_type<T const,R>\r
+ {\r
+ typedef R const * type;\r
+ };\r
+ }\r
+\r
+#ifdef BOOST_NO_RTTI\r
+ template <class ErrorInfo>\r
+ inline\r
+ typename ErrorInfo::value_type const *\r
+ get_error_info( boost::exception const & x )\r
+ {\r
+ return exception_detail::get_info<ErrorInfo>::get(x);\r
+ }\r
+ template <class ErrorInfo>\r
+ inline\r
+ typename ErrorInfo::value_type *\r
+ get_error_info( boost::exception & x )\r
+ {\r
+ return exception_detail::get_info<ErrorInfo>::get(x);\r
+ }\r
+#else\r
+ template <class ErrorInfo,class E>\r
+ inline\r
+ typename exception_detail::get_error_info_return_type<E,typename ErrorInfo::value_type>::type\r
+ get_error_info( E & some_exception )\r
+ {\r
+ if( exception const * x = dynamic_cast<exception const *>(&some_exception) )\r
+ return exception_detail::get_info<ErrorInfo>::get(*x);\r
+ else\r
+ return 0;\r
+ }\r
+#endif\r
+ }\r
+\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(pop)\r
+#endif\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_8D22C4CA9CC811DCAA9133D256D89593\r
+#define UUID_8D22C4CA9CC811DCAA9133D256D89593\r
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma GCC system_header\r
+#endif\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(push,1)\r
+#endif\r
+\r
+#include <boost/exception/exception.hpp>\r
+#include <boost/exception/to_string_stub.hpp>\r
+#include <boost/exception/detail/error_info_impl.hpp>\r
+#include <boost/shared_ptr.hpp>\r
+#include <boost/config.hpp>\r
+#include <map>\r
+\r
+namespace\r
+boost\r
+ {\r
+ template <class Tag,class T>\r
+ inline\r
+ typename enable_if<has_to_string<T>,std::string>::type\r
+ to_string( error_info<Tag,T> const & x )\r
+ {\r
+ return to_string(x.value());\r
+ }\r
+\r
+ template <class Tag,class T>\r
+ inline\r
+ error_info<Tag,T>::\r
+ error_info( value_type const & value ):\r
+ value_(value)\r
+ {\r
+ }\r
+\r
+ template <class Tag,class T>\r
+ inline\r
+ error_info<Tag,T>::\r
+ ~error_info() throw()\r
+ {\r
+ }\r
+\r
+ template <class Tag,class T>\r
+ inline\r
+ std::string\r
+ error_info<Tag,T>::\r
+ tag_typeid_name() const\r
+ {\r
+ return tag_type_name<Tag>();\r
+ }\r
+\r
+ template <class Tag,class T>\r
+ inline\r
+ std::string\r
+ error_info<Tag,T>::\r
+ value_as_string() const\r
+ {\r
+ return to_string_stub(*this);\r
+ }\r
+\r
+ namespace\r
+ exception_detail\r
+ {\r
+ class\r
+ error_info_container_impl:\r
+ public error_info_container\r
+ {\r
+ public:\r
+\r
+ error_info_container_impl():\r
+ count_(0)\r
+ {\r
+ }\r
+\r
+ ~error_info_container_impl() throw()\r
+ {\r
+ }\r
+\r
+ void\r
+ set( shared_ptr<error_info_base> const & x, type_info_ const & typeid_ )\r
+ {\r
+ BOOST_ASSERT(x);\r
+ info_[typeid_] = x;\r
+ diagnostic_info_str_.clear();\r
+ }\r
+\r
+ shared_ptr<error_info_base>\r
+ get( type_info_ const & ti ) const\r
+ {\r
+ error_info_map::const_iterator i=info_.find(ti);\r
+ if( info_.end()!=i )\r
+ {\r
+ shared_ptr<error_info_base> const & p = i->second;\r
+#ifndef BOOST_NO_RTTI\r
+ BOOST_ASSERT( BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==ti.type_ );\r
+#endif\r
+ return p;\r
+ }\r
+ return shared_ptr<error_info_base>();\r
+ }\r
+\r
+ char const *\r
+ diagnostic_information( char const * header ) const\r
+ {\r
+ if( header )\r
+ {\r
+ BOOST_ASSERT(*header!=0);\r
+ std::ostringstream tmp;\r
+ tmp << header;\r
+ for( error_info_map::const_iterator i=info_.begin(),end=info_.end(); i!=end; ++i )\r
+ {\r
+ error_info_base const & x = *i->second;\r
+ tmp << '[' << x.tag_typeid_name() << "] = " << x.value_as_string() << '\n';\r
+ }\r
+ tmp.str().swap(diagnostic_info_str_);\r
+ }\r
+ return diagnostic_info_str_.c_str();\r
+ }\r
+\r
+ private:\r
+\r
+ friend class boost::exception;\r
+\r
+ typedef std::map< type_info_, shared_ptr<error_info_base> > error_info_map;\r
+ error_info_map info_;\r
+ mutable std::string diagnostic_info_str_;\r
+ mutable int count_;\r
+\r
+ error_info_container_impl( error_info_container_impl const & );\r
+ error_info_container_impl & operator=( error_info_container const & );\r
+\r
+ void\r
+ add_ref() const\r
+ {\r
+ ++count_;\r
+ }\r
+\r
+ bool\r
+ release() const\r
+ {\r
+ if( --count_ )\r
+ return false;\r
+ else\r
+ {\r
+ delete this;\r
+ return true;\r
+ }\r
+ }\r
+\r
+ refcount_ptr<error_info_container>\r
+ clone() const\r
+ {\r
+ refcount_ptr<error_info_container> p;\r
+ error_info_container_impl * c=new error_info_container_impl;\r
+ p.adopt(c);\r
+ c->info_ = info_;\r
+ return p;\r
+ }\r
+ };\r
+\r
+ template <class E,class Tag,class T>\r
+ inline\r
+ E const &\r
+ set_info( E const & x, error_info<Tag,T> const & v )\r
+ {\r
+ typedef error_info<Tag,T> error_info_tag_t;\r
+ shared_ptr<error_info_tag_t> p( new error_info_tag_t(v) );\r
+ exception_detail::error_info_container * c=x.data_.get();\r
+ if( !c )\r
+ x.data_.adopt(c=new exception_detail::error_info_container_impl);\r
+ c->set(p,BOOST_EXCEPTION_STATIC_TYPEID(error_info_tag_t));\r
+ return x;\r
+ }\r
+\r
+ template <class T>\r
+ struct\r
+ derives_boost_exception\r
+ {\r
+ enum e { value = (sizeof(dispatch_boost_exception((T*)0))==sizeof(large_size)) };\r
+ };\r
+ }\r
+\r
+ template <class E,class Tag,class T>\r
+ inline\r
+ typename enable_if<exception_detail::derives_boost_exception<E>,E const &>::type\r
+ operator<<( E const & x, error_info<Tag,T> const & v )\r
+ {\r
+ return exception_detail::set_info(x,v);\r
+ }\r
+ }\r
+\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(pop)\r
+#endif\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_7E48761AD92811DC9011477D56D89593\r
+#define UUID_7E48761AD92811DC9011477D56D89593\r
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma GCC system_header\r
+#endif\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(push,1)\r
+#endif\r
+\r
+#include <boost/utility/enable_if.hpp>\r
+#include <boost/exception/detail/is_output_streamable.hpp>\r
+#include <sstream>\r
+\r
+namespace\r
+boost\r
+ {\r
+ namespace\r
+ to_string_detail\r
+ {\r
+ template <class T>\r
+ typename disable_if<is_output_streamable<T>,char>::type to_string( T const & );\r
+\r
+ template <class,bool IsOutputStreamable>\r
+ struct has_to_string_impl;\r
+\r
+ template <class T>\r
+ struct\r
+ has_to_string_impl<T,true>\r
+ {\r
+ enum e { value=1 };\r
+ };\r
+\r
+ template <class T>\r
+ struct\r
+ has_to_string_impl<T,false>\r
+ {\r
+ static T const & f();\r
+ enum e { value=1!=sizeof(to_string(f())) };\r
+ };\r
+ }\r
+\r
+ template <class T>\r
+ inline\r
+ typename enable_if<is_output_streamable<T>,std::string>::type\r
+ to_string( T const & x )\r
+ {\r
+ std::ostringstream out;\r
+ out << x;\r
+ return out.str();\r
+ }\r
+\r
+ template <class T>\r
+ struct\r
+ has_to_string\r
+ {\r
+ enum e { value=to_string_detail::has_to_string_impl<T,is_output_streamable<T>::value>::value };\r
+ };\r
+\r
+ template <class T,class U>\r
+ inline\r
+ std::string\r
+ to_string( std::pair<T,U> const & x )\r
+ {\r
+ return std::string("(") + to_string(x.first) + ',' + to_string(x.second) + ')';\r
+ }\r
+\r
+ inline\r
+ std::string\r
+ to_string( std::exception const & x )\r
+ {\r
+ return x.what();\r
+ }\r
+ }\r
+\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(pop)\r
+#endif\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_E788439ED9F011DCB181F25B55D89593\r
+#define UUID_E788439ED9F011DCB181F25B55D89593\r
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma GCC system_header\r
+#endif\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(push,1)\r
+#endif\r
+\r
+#include <boost/exception/to_string.hpp>\r
+#include <boost/exception/detail/object_hex_dump.hpp>\r
+#include <boost/assert.hpp>\r
+\r
+namespace\r
+boost\r
+ {\r
+ namespace\r
+ exception_detail\r
+ {\r
+ template <bool ToStringAvailable>\r
+ struct\r
+ to_string_dispatcher\r
+ {\r
+ template <class T,class Stub>\r
+ static\r
+ std::string\r
+ convert( T const & x, Stub )\r
+ {\r
+ return to_string(x);\r
+ }\r
+ };\r
+\r
+ template <>\r
+ struct\r
+ to_string_dispatcher<false>\r
+ {\r
+ template <class T,class Stub>\r
+ static\r
+ std::string\r
+ convert( T const & x, Stub s )\r
+ {\r
+ return s(x);\r
+ }\r
+\r
+ template <class T>\r
+ static\r
+ std::string\r
+ convert( T const & x, std::string s )\r
+ {\r
+ return s;\r
+ }\r
+\r
+ template <class T>\r
+ static\r
+ std::string\r
+ convert( T const & x, char const * s )\r
+ {\r
+ BOOST_ASSERT(s!=0);\r
+ return s;\r
+ }\r
+ };\r
+\r
+ namespace\r
+ to_string_dispatch\r
+ {\r
+ template <class T,class Stub>\r
+ inline\r
+ std::string\r
+ dispatch( T const & x, Stub s )\r
+ {\r
+ return to_string_dispatcher<has_to_string<T>::value>::convert(x,s);\r
+ }\r
+ }\r
+\r
+ template <class T>\r
+ inline\r
+ std::string\r
+ string_stub_dump( T const & x )\r
+ {\r
+ return "[ " + exception_detail::object_hex_dump(x) + " ]";\r
+ }\r
+ }\r
+\r
+ template <class T>\r
+ inline\r
+ std::string\r
+ to_string_stub( T const & x )\r
+ {\r
+ return exception_detail::to_string_dispatch::dispatch(x,&exception_detail::string_stub_dump<T>);\r
+ }\r
+\r
+ template <class T,class Stub>\r
+ inline\r
+ std::string\r
+ to_string_stub( T const & x, Stub s )\r
+ {\r
+ return exception_detail::to_string_dispatch::dispatch(x,s);\r
+ }\r
+ }\r
+\r
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
+#pragma warning(pop)\r
+#endif\r
+#endif\r
--- /dev/null
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+\r
+//Distributed under the Boost Software License, Version 1.0. (See accompanying\r
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef UUID_FA5836A2CADA11DC8CD47C8555D89593\r
+#define UUID_FA5836A2CADA11DC8CD47C8555D89593\r
+\r
+#include <boost/exception/detail/exception_ptr.hpp>\r
+\r
+#endif\r
--- /dev/null
+#ifndef BOOST_MEMORY_ORDER_HPP_INCLUDED\r
+#define BOOST_MEMORY_ORDER_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+// boost/memory_order.hpp\r
+//\r
+// Defines enum boost::memory_order per the C++0x working draft\r
+//\r
+// Copyright (c) 2008, 2009 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+\r
+namespace boost\r
+{\r
+\r
+//\r
+// Enum values are chosen so that code that needs to insert\r
+// a trailing fence for acquire semantics can use a single\r
+// test such as:\r
+//\r
+// if( mo & memory_order_acquire ) { ...fence... }\r
+//\r
+// For leading fences one can use:\r
+//\r
+// if( mo & memory_order_release ) { ...fence... }\r
+//\r
+// Architectures such as Alpha that need a fence on consume\r
+// can use:\r
+//\r
+// if( mo & ( memory_order_acquire | memory_order_consume ) ) { ...fence... }\r
+//\r
+\r
+enum memory_order\r
+{\r
+ memory_order_relaxed = 0,\r
+ memory_order_acquire = 1,\r
+ memory_order_release = 2,\r
+ memory_order_acq_rel = 3, // acquire | release\r
+ memory_order_seq_cst = 7, // acq_rel | 4\r
+ memory_order_consume = 8\r
+};\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_MEMORY_ORDER_HPP_INCLUDED\r
--- /dev/null
+// -------------------------------------\r
+//\r
+// (C) Copyright Gennaro Prota 2003.\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// (See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// ------------------------------------------------------\r
+\r
+#ifndef BOOST_NON_TYPE_HPP_GP_20030417\r
+#define BOOST_NON_TYPE_HPP_GP_20030417\r
+\r
+\r
+namespace boost {\r
+\r
+ // Just a simple "envelope" for non-type template parameters. Useful\r
+ // to work around some MSVC deficiencies.\r
+\r
+ template <typename T, T n>\r
+ struct non_type { };\r
+\r
+\r
+}\r
+\r
+\r
+#endif // include guard\r
--- /dev/null
+#ifndef BOOST_SHARED_PTR_HPP_INCLUDED\r
+#define BOOST_SHARED_PTR_HPP_INCLUDED\r
+\r
+//\r
+// shared_ptr.hpp\r
+//\r
+// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.\r
+// Copyright (c) 2001-2008 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation.\r
+//\r
+\r
+#include <boost/smart_ptr/shared_ptr.hpp>\r
+\r
+#endif // #ifndef BOOST_SHARED_PTR_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/smart_ptr/bad_weak_ptr.hpp\r
+//\r
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <exception>\r
+\r
+#ifdef __BORLANDC__\r
+# pragma warn -8026 // Functions with excep. spec. are not expanded inline\r
+#endif\r
+\r
+namespace boost\r
+{\r
+\r
+// The standard library that comes with Borland C++ 5.5.1, 5.6.4\r
+// defines std::exception and its members as having C calling\r
+// convention (-pc). When the definition of bad_weak_ptr\r
+// is compiled with -ps, the compiler issues an error.\r
+// Hence, the temporary #pragma option -pc below.\r
+\r
+#if defined(__BORLANDC__) && __BORLANDC__ <= 0x564\r
+# pragma option push -pc\r
+#endif\r
+\r
+class bad_weak_ptr: public std::exception\r
+{\r
+public:\r
+\r
+ virtual char const * what() const throw()\r
+ {\r
+ return "tr1::bad_weak_ptr";\r
+ }\r
+};\r
+\r
+#if defined(__BORLANDC__) && __BORLANDC__ <= 0x564\r
+# pragma option pop\r
+#endif\r
+\r
+} // namespace boost\r
+\r
+#ifdef __BORLANDC__\r
+# pragma warn .8026 // Functions with excep. spec. are not expanded inline\r
+#endif\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/detail/atomic_count.hpp - thread/SMP safe reference counter\r
+//\r
+// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// typedef <implementation-defined> boost::detail::atomic_count;\r
+//\r
+// atomic_count a(n);\r
+//\r
+// (n is convertible to long)\r
+//\r
+// Effects: Constructs an atomic_count with an initial value of n\r
+//\r
+// a;\r
+//\r
+// Returns: (long) the current value of a\r
+//\r
+// ++a;\r
+//\r
+// Effects: Atomically increments the value of a\r
+// Returns: (long) the new value of a\r
+//\r
+// --a;\r
+//\r
+// Effects: Atomically decrements the value of a\r
+// Returns: (long) the new value of a\r
+//\r
+// Important note: when --a returns zero, it must act as a\r
+// read memory barrier (RMB); i.e. the calling thread must\r
+// have a synchronized view of the memory\r
+//\r
+// On Intel IA-32 (x86) memory is always synchronized, so this\r
+// is not a problem.\r
+//\r
+// On many architectures the atomic instructions already act as\r
+// a memory barrier.\r
+//\r
+// This property is necessary for proper reference counting, since\r
+// a thread can update the contents of a shared object, then\r
+// release its reference, and another thread may immediately\r
+// release the last reference causing object destruction.\r
+//\r
+// The destructor needs to have a synchronized view of the\r
+// object to perform proper cleanup.\r
+//\r
+// Original example by Alexander Terekhov:\r
+//\r
+// Given:\r
+//\r
+// - a mutable shared object OBJ;\r
+// - two threads THREAD1 and THREAD2 each holding \r
+// a private smart_ptr object pointing to that OBJ.\r
+//\r
+// t1: THREAD1 updates OBJ (thread-safe via some synchronization)\r
+// and a few cycles later (after "unlock") destroys smart_ptr;\r
+//\r
+// t2: THREAD2 destroys smart_ptr WITHOUT doing any synchronization \r
+// with respect to shared mutable object OBJ; OBJ destructors\r
+// are called driven by smart_ptr interface...\r
+//\r
+\r
+#include <boost/config.hpp>\r
+#include <boost/smart_ptr/detail/sp_has_sync.hpp>\r
+\r
+#ifndef BOOST_HAS_THREADS\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+typedef long atomic_count;\r
+\r
+}\r
+\r
+}\r
+\r
+#elif defined(BOOST_AC_USE_PTHREADS)\r
+# include <boost/smart_ptr/detail/atomic_count_pthreads.hpp>\r
+\r
+#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )\r
+# include <boost/smart_ptr/detail/atomic_count_gcc_x86.hpp>\r
+\r
+#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)\r
+# include <boost/smart_ptr/detail/atomic_count_win32.hpp>\r
+\r
+#elif defined( BOOST_SP_HAS_SYNC )\r
+# include <boost/smart_ptr/detail/atomic_count_sync.hpp>\r
+\r
+#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)\r
+# include <boost/smart_ptr/detail/atomic_count_gcc.hpp>\r
+\r
+#elif defined(BOOST_HAS_PTHREADS)\r
+\r
+# define BOOST_AC_USE_PTHREADS\r
+# include <boost/smart_ptr/detail/atomic_count_pthreads.hpp>\r
+\r
+#else\r
+\r
+// Use #define BOOST_DISABLE_THREADS to avoid the error\r
+#error Unrecognized threading platform\r
+\r
+#endif\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED\r
+\r
+//\r
+// boost/detail/atomic_count_gcc.hpp\r
+//\r
+// atomic_count for GNU libstdc++ v3\r
+//\r
+// http://gcc.gnu.org/onlinedocs/porting/Thread-safety.html\r
+//\r
+// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.\r
+// Copyright (c) 2002 Lars Gullik Bj�nnes <larsbj@lyx.org>\r
+// Copyright 2003-2005 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#if __GNUC__ * 100 + __GNUC_MINOR__ >= 402\r
+# include <ext/atomicity.h> \r
+#else \r
+# include <bits/atomicity.h>\r
+#endif\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+#if defined(__GLIBCXX__) // g++ 3.4+\r
+\r
+using __gnu_cxx::__atomic_add;\r
+using __gnu_cxx::__exchange_and_add;\r
+\r
+#endif\r
+\r
+class atomic_count\r
+{\r
+public:\r
+\r
+ explicit atomic_count( long v ) : value_( v ) {}\r
+\r
+ long operator++()\r
+ {\r
+ return __exchange_and_add( &value_, +1 ) + 1;\r
+ }\r
+\r
+ long operator--()\r
+ {\r
+ return __exchange_and_add( &value_, -1 ) - 1;\r
+ }\r
+\r
+ operator long() const\r
+ {\r
+ return __exchange_and_add( &value_, 0 );\r
+ }\r
+\r
+private:\r
+\r
+ atomic_count(atomic_count const &);\r
+ atomic_count & operator=(atomic_count const &);\r
+\r
+ mutable _Atomic_word value_;\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_X86_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_X86_HPP_INCLUDED\r
+\r
+//\r
+// boost/detail/atomic_count_gcc_x86.hpp\r
+//\r
+// atomic_count for g++ on 486+/AMD64\r
+//\r
+// Copyright 2007 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class atomic_count\r
+{\r
+public:\r
+\r
+ explicit atomic_count( long v ) : value_( static_cast< int >( v ) ) {}\r
+\r
+ long operator++()\r
+ {\r
+ return atomic_exchange_and_add( &value_, +1 ) + 1;\r
+ }\r
+\r
+ long operator--()\r
+ {\r
+ return atomic_exchange_and_add( &value_, -1 ) - 1;\r
+ }\r
+\r
+ operator long() const\r
+ {\r
+ return atomic_exchange_and_add( &value_, 0 );\r
+ }\r
+\r
+private:\r
+\r
+ atomic_count(atomic_count const &);\r
+ atomic_count & operator=(atomic_count const &);\r
+\r
+ mutable int value_;\r
+\r
+private:\r
+\r
+ static int atomic_exchange_and_add( int * pw, int dv )\r
+ {\r
+ // int r = *pw;\r
+ // *pw += dv;\r
+ // return r;\r
+\r
+ int r;\r
+\r
+ __asm__ __volatile__\r
+ (\r
+ "lock\n\t"\r
+ "xadd %1, %0":\r
+ "+m"( *pw ), "=r"( r ): // outputs (%0, %1)\r
+ "1"( dv ): // inputs (%2 == %1)\r
+ "memory", "cc" // clobbers\r
+ );\r
+\r
+ return r;\r
+ }\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_X86_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_PTHREADS_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_PTHREADS_HPP_INCLUDED\r
+\r
+//\r
+// boost/detail/atomic_count_pthreads.hpp\r
+//\r
+// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <pthread.h>\r
+\r
+//\r
+// The generic pthread_mutex-based implementation sometimes leads to\r
+// inefficiencies. Example: a class with two atomic_count members\r
+// can get away with a single mutex.\r
+//\r
+// Users can detect this situation by checking BOOST_AC_USE_PTHREADS.\r
+//\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class atomic_count\r
+{\r
+private:\r
+\r
+ class scoped_lock\r
+ {\r
+ public:\r
+\r
+ scoped_lock(pthread_mutex_t & m): m_(m)\r
+ {\r
+ pthread_mutex_lock(&m_);\r
+ }\r
+\r
+ ~scoped_lock()\r
+ {\r
+ pthread_mutex_unlock(&m_);\r
+ }\r
+\r
+ private:\r
+\r
+ pthread_mutex_t & m_;\r
+ };\r
+\r
+public:\r
+\r
+ explicit atomic_count(long v): value_(v)\r
+ {\r
+ pthread_mutex_init(&mutex_, 0);\r
+ }\r
+\r
+ ~atomic_count()\r
+ {\r
+ pthread_mutex_destroy(&mutex_);\r
+ }\r
+\r
+ long operator++()\r
+ {\r
+ scoped_lock lock(mutex_);\r
+ return ++value_;\r
+ }\r
+\r
+ long operator--()\r
+ {\r
+ scoped_lock lock(mutex_);\r
+ return --value_;\r
+ }\r
+\r
+ operator long() const\r
+ {\r
+ scoped_lock lock(mutex_);\r
+ return value_;\r
+ }\r
+\r
+private:\r
+\r
+ atomic_count(atomic_count const &);\r
+ atomic_count & operator=(atomic_count const &);\r
+\r
+ mutable pthread_mutex_t mutex_;\r
+ long value_;\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_PTHREADS_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_SYNC_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_SYNC_HPP_INCLUDED\r
+\r
+//\r
+// boost/detail/atomic_count_sync.hpp\r
+//\r
+// atomic_count for g++ 4.1+\r
+//\r
+// http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html\r
+//\r
+// Copyright 2007 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#if defined( __ia64__ ) && defined( __INTEL_COMPILER )\r
+# include <ia64intrin.h>\r
+#endif\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class atomic_count\r
+{\r
+public:\r
+\r
+ explicit atomic_count( long v ) : value_( v ) {}\r
+\r
+ long operator++()\r
+ {\r
+ return __sync_add_and_fetch( &value_, 1 );\r
+ }\r
+\r
+ long operator--()\r
+ {\r
+ return __sync_add_and_fetch( &value_, -1 );\r
+ }\r
+\r
+ operator long() const\r
+ {\r
+ return __sync_fetch_and_add( &value_, 0 );\r
+ }\r
+\r
+private:\r
+\r
+ atomic_count(atomic_count const &);\r
+ atomic_count & operator=(atomic_count const &);\r
+\r
+ mutable long value_;\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_SYNC_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/detail/atomic_count_win32.hpp\r
+//\r
+// Copyright (c) 2001-2005 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <boost/detail/interlocked.hpp>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class atomic_count\r
+{\r
+public:\r
+\r
+ explicit atomic_count( long v ): value_( v )\r
+ {\r
+ }\r
+\r
+ long operator++()\r
+ {\r
+ return BOOST_INTERLOCKED_INCREMENT( &value_ );\r
+ }\r
+\r
+ long operator--()\r
+ {\r
+ return BOOST_INTERLOCKED_DECREMENT( &value_ );\r
+ }\r
+\r
+ operator long() const\r
+ {\r
+ return static_cast<long const volatile &>( value_ );\r
+ }\r
+\r
+private:\r
+\r
+ atomic_count( atomic_count const & );\r
+ atomic_count & operator=( atomic_count const & );\r
+\r
+ long value_;\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/detail/lightweight_mutex.hpp - lightweight mutex\r
+//\r
+// Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd.\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// typedef <unspecified> boost::detail::lightweight_mutex;\r
+//\r
+// boost::detail::lightweight_mutex is a header-only implementation of\r
+// a subset of the Mutex concept requirements:\r
+//\r
+// http://www.boost.org/doc/html/threads/concepts.html#threads.concepts.Mutex\r
+//\r
+// It maps to a CRITICAL_SECTION on Windows or a pthread_mutex on POSIX.\r
+//\r
+\r
+#include <boost/config.hpp>\r
+\r
+#if !defined(BOOST_HAS_THREADS)\r
+# include <boost/smart_ptr/detail/lwm_nop.hpp>\r
+#elif defined(BOOST_HAS_PTHREADS)\r
+# include <boost/smart_ptr/detail/lwm_pthreads.hpp>\r
+#elif defined(BOOST_HAS_WINTHREADS) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)\r
+# include <boost/smart_ptr/detail/lwm_win32_cs.hpp>\r
+#else\r
+// Use #define BOOST_DISABLE_THREADS to avoid the error\r
+# error Unrecognized threading platform\r
+#endif\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_LWM_NOP_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_LWM_NOP_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/detail/lwm_nop.hpp\r
+//\r
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class lightweight_mutex\r
+{\r
+public:\r
+\r
+ typedef lightweight_mutex scoped_lock;\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_LWM_NOP_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/detail/lwm_pthreads.hpp\r
+//\r
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <boost/assert.hpp>\r
+#include <pthread.h>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class lightweight_mutex\r
+{\r
+private:\r
+\r
+ pthread_mutex_t m_;\r
+\r
+ lightweight_mutex(lightweight_mutex const &);\r
+ lightweight_mutex & operator=(lightweight_mutex const &);\r
+\r
+public:\r
+\r
+ lightweight_mutex()\r
+ {\r
+\r
+// HPUX 10.20 / DCE has a nonstandard pthread_mutex_init\r
+\r
+#if defined(__hpux) && defined(_DECTHREADS_)\r
+ BOOST_VERIFY( pthread_mutex_init( &m_, pthread_mutexattr_default ) == 0 );\r
+#else\r
+ BOOST_VERIFY( pthread_mutex_init( &m_, 0 ) == 0 );\r
+#endif\r
+ }\r
+\r
+ ~lightweight_mutex()\r
+ {\r
+ BOOST_VERIFY( pthread_mutex_destroy( &m_ ) == 0 );\r
+ }\r
+\r
+ class scoped_lock;\r
+ friend class scoped_lock;\r
+\r
+ class scoped_lock\r
+ {\r
+ private:\r
+\r
+ pthread_mutex_t & m_;\r
+\r
+ scoped_lock(scoped_lock const &);\r
+ scoped_lock & operator=(scoped_lock const &);\r
+\r
+ public:\r
+\r
+ scoped_lock(lightweight_mutex & m): m_(m.m_)\r
+ {\r
+ BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );\r
+ }\r
+\r
+ ~scoped_lock()\r
+ {\r
+ BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );\r
+ }\r
+ };\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_LWM_PTHREADS_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_LWM_WIN32_CS_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_LWM_WIN32_CS_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/detail/lwm_win32_cs.hpp\r
+//\r
+// Copyright (c) 2002, 2003 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#ifdef BOOST_USE_WINDOWS_H\r
+# include <windows.h>\r
+#endif\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+#ifndef BOOST_USE_WINDOWS_H\r
+\r
+struct critical_section\r
+{\r
+ struct critical_section_debug * DebugInfo;\r
+ long LockCount;\r
+ long RecursionCount;\r
+ void * OwningThread;\r
+ void * LockSemaphore;\r
+#if defined(_WIN64)\r
+ unsigned __int64 SpinCount;\r
+#else\r
+ unsigned long SpinCount;\r
+#endif\r
+};\r
+\r
+extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(critical_section *);\r
+extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(critical_section *);\r
+extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(critical_section *);\r
+extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(critical_section *);\r
+\r
+#else\r
+\r
+typedef ::CRITICAL_SECTION critical_section;\r
+\r
+#endif // #ifndef BOOST_USE_WINDOWS_H\r
+\r
+class lightweight_mutex\r
+{\r
+private:\r
+\r
+ critical_section cs_;\r
+\r
+ lightweight_mutex(lightweight_mutex const &);\r
+ lightweight_mutex & operator=(lightweight_mutex const &);\r
+\r
+public:\r
+\r
+ lightweight_mutex()\r
+ {\r
+ InitializeCriticalSection(&cs_);\r
+ }\r
+\r
+ ~lightweight_mutex()\r
+ {\r
+ DeleteCriticalSection(&cs_);\r
+ }\r
+\r
+ class scoped_lock;\r
+ friend class scoped_lock;\r
+\r
+ class scoped_lock\r
+ {\r
+ private:\r
+\r
+ lightweight_mutex & m_;\r
+\r
+ scoped_lock(scoped_lock const &);\r
+ scoped_lock & operator=(scoped_lock const &);\r
+\r
+ public:\r
+\r
+ explicit scoped_lock(lightweight_mutex & m): m_(m)\r
+ {\r
+ EnterCriticalSection(&m_.cs_);\r
+ }\r
+\r
+ ~scoped_lock()\r
+ {\r
+ LeaveCriticalSection(&m_.cs_);\r
+ }\r
+ };\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_LWM_WIN32_CS_HPP_INCLUDED\r
--- /dev/null
+// This header intentionally has no include guards.\r
+//\r
+// Copyright (c) 2001-2009 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt\r
+\r
+#if ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__)\r
+\r
+ operator bool () const\r
+ {\r
+ return px != 0;\r
+ }\r
+\r
+#elif defined( _MANAGED )\r
+\r
+ static void unspecified_bool( this_type*** )\r
+ {\r
+ }\r
+\r
+ typedef void (*unspecified_bool_type)( this_type*** );\r
+\r
+ operator unspecified_bool_type() const // never throws\r
+ {\r
+ return px == 0? 0: unspecified_bool;\r
+ }\r
+\r
+#elif \\r
+ ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \\r
+ ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \\r
+ ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) )\r
+\r
+ typedef T * (this_type::*unspecified_bool_type)() const;\r
+\r
+ operator unspecified_bool_type() const // never throws\r
+ {\r
+ return px == 0? 0: &this_type::get;\r
+ }\r
+\r
+#else\r
+\r
+ typedef T * this_type::*unspecified_bool_type;\r
+\r
+ operator unspecified_bool_type() const // never throws\r
+ {\r
+ return px == 0? 0: &this_type::px;\r
+ }\r
+\r
+#endif\r
+\r
+ // operator! is redundant, but some compilers need it\r
+ bool operator! () const // never throws\r
+ {\r
+ return px == 0;\r
+ }\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// detail/shared_count.hpp\r
+//\r
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.\r
+// Copyright 2004-2005 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#ifdef __BORLANDC__\r
+# pragma warn -8027 // Functions containing try are not expanded inline\r
+#endif\r
+\r
+#include <boost/config.hpp>\r
+#include <boost/checked_delete.hpp>\r
+#include <boost/throw_exception.hpp>\r
+#include <boost/smart_ptr/bad_weak_ptr.hpp>\r
+#include <boost/smart_ptr/detail/sp_counted_base.hpp>\r
+#include <boost/smart_ptr/detail/sp_counted_impl.hpp>\r
+#include <boost/detail/workaround.hpp>\r
+// In order to avoid circular dependencies with Boost.TR1\r
+// we make sure that our include of <memory> doesn't try to\r
+// pull in the TR1 headers: that's why we use this header \r
+// rather than including <memory> directly:\r
+#include <boost/config/no_tr1/memory.hpp> // std::auto_ptr\r
+#include <functional> // std::less\r
+#include <new> // std::bad_alloc\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+\r
+int const shared_count_id = 0x2C35F101;\r
+int const weak_count_id = 0x298C38A4;\r
+\r
+#endif\r
+\r
+struct sp_nothrow_tag {};\r
+\r
+class weak_count;\r
+\r
+class shared_count\r
+{\r
+private:\r
+\r
+ sp_counted_base * pi_;\r
+\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ int id_;\r
+#endif\r
+\r
+ friend class weak_count;\r
+\r
+public:\r
+\r
+ shared_count(): pi_(0) // nothrow\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ , id_(shared_count_id)\r
+#endif\r
+ {\r
+ }\r
+\r
+ template<class Y> explicit shared_count( Y * p ): pi_( 0 )\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ , id_(shared_count_id)\r
+#endif\r
+ {\r
+#ifndef BOOST_NO_EXCEPTIONS\r
+\r
+ try\r
+ {\r
+ pi_ = new sp_counted_impl_p<Y>( p );\r
+ }\r
+ catch(...)\r
+ {\r
+ boost::checked_delete( p );\r
+ throw;\r
+ }\r
+\r
+#else\r
+\r
+ pi_ = new sp_counted_impl_p<Y>( p );\r
+\r
+ if( pi_ == 0 )\r
+ {\r
+ boost::checked_delete( p );\r
+ boost::throw_exception( std::bad_alloc() );\r
+ }\r
+\r
+#endif\r
+ }\r
+\r
+#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 )\r
+ template<class Y, class D> shared_count( Y * p, D d ): pi_(0)\r
+#else\r
+ template<class P, class D> shared_count( P p, D d ): pi_(0)\r
+#endif\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ , id_(shared_count_id)\r
+#endif\r
+ {\r
+#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 )\r
+ typedef Y* P;\r
+#endif\r
+#ifndef BOOST_NO_EXCEPTIONS\r
+\r
+ try\r
+ {\r
+ pi_ = new sp_counted_impl_pd<P, D>(p, d);\r
+ }\r
+ catch(...)\r
+ {\r
+ d(p); // delete p\r
+ throw;\r
+ }\r
+\r
+#else\r
+\r
+ pi_ = new sp_counted_impl_pd<P, D>(p, d);\r
+\r
+ if(pi_ == 0)\r
+ {\r
+ d(p); // delete p\r
+ boost::throw_exception(std::bad_alloc());\r
+ }\r
+\r
+#endif\r
+ }\r
+\r
+ template<class P, class D, class A> shared_count( P p, D d, A a ): pi_( 0 )\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ , id_(shared_count_id)\r
+#endif\r
+ {\r
+ typedef sp_counted_impl_pda<P, D, A> impl_type;\r
+ typedef typename A::template rebind< impl_type >::other A2;\r
+\r
+ A2 a2( a );\r
+\r
+#ifndef BOOST_NO_EXCEPTIONS\r
+\r
+ try\r
+ {\r
+ pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) );\r
+ new( static_cast< void* >( pi_ ) ) impl_type( p, d, a );\r
+ }\r
+ catch(...)\r
+ {\r
+ d( p );\r
+\r
+ if( pi_ != 0 )\r
+ {\r
+ a2.deallocate( static_cast< impl_type* >( pi_ ), 1 );\r
+ }\r
+\r
+ throw;\r
+ }\r
+\r
+#else\r
+\r
+ pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) );\r
+\r
+ if( pi_ != 0 )\r
+ {\r
+ new( static_cast< void* >( pi_ ) ) impl_type( p, d, a );\r
+ }\r
+ else\r
+ {\r
+ d( p );\r
+ boost::throw_exception( std::bad_alloc() );\r
+ }\r
+\r
+#endif\r
+ }\r
+\r
+#ifndef BOOST_NO_AUTO_PTR\r
+\r
+ // auto_ptr<Y> is special cased to provide the strong guarantee\r
+\r
+ template<class Y>\r
+ explicit shared_count( std::auto_ptr<Y> & r ): pi_( new sp_counted_impl_p<Y>( r.get() ) )\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ , id_(shared_count_id)\r
+#endif\r
+ {\r
+#ifdef BOOST_NO_EXCEPTIONS\r
+\r
+ if( pi_ == 0 )\r
+ {\r
+ boost::throw_exception(std::bad_alloc());\r
+ }\r
+\r
+#endif\r
+\r
+ r.release();\r
+ }\r
+\r
+#endif \r
+\r
+ ~shared_count() // nothrow\r
+ {\r
+ if( pi_ != 0 ) pi_->release();\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ id_ = 0;\r
+#endif\r
+ }\r
+\r
+ shared_count(shared_count const & r): pi_(r.pi_) // nothrow\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ , id_(shared_count_id)\r
+#endif\r
+ {\r
+ if( pi_ != 0 ) pi_->add_ref_copy();\r
+ }\r
+\r
+#if defined( BOOST_HAS_RVALUE_REFS )\r
+\r
+ shared_count(shared_count && r): pi_(r.pi_) // nothrow\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ , id_(shared_count_id)\r
+#endif\r
+ {\r
+ r.pi_ = 0;\r
+ }\r
+\r
+#endif\r
+\r
+ explicit shared_count(weak_count const & r); // throws bad_weak_ptr when r.use_count() == 0\r
+ shared_count( weak_count const & r, sp_nothrow_tag ); // constructs an empty *this when r.use_count() == 0\r
+\r
+ shared_count & operator= (shared_count const & r) // nothrow\r
+ {\r
+ sp_counted_base * tmp = r.pi_;\r
+\r
+ if( tmp != pi_ )\r
+ {\r
+ if( tmp != 0 ) tmp->add_ref_copy();\r
+ if( pi_ != 0 ) pi_->release();\r
+ pi_ = tmp;\r
+ }\r
+\r
+ return *this;\r
+ }\r
+\r
+ void swap(shared_count & r) // nothrow\r
+ {\r
+ sp_counted_base * tmp = r.pi_;\r
+ r.pi_ = pi_;\r
+ pi_ = tmp;\r
+ }\r
+\r
+ long use_count() const // nothrow\r
+ {\r
+ return pi_ != 0? pi_->use_count(): 0;\r
+ }\r
+\r
+ bool unique() const // nothrow\r
+ {\r
+ return use_count() == 1;\r
+ }\r
+\r
+ bool empty() const // nothrow\r
+ {\r
+ return pi_ == 0;\r
+ }\r
+\r
+ friend inline bool operator==(shared_count const & a, shared_count const & b)\r
+ {\r
+ return a.pi_ == b.pi_;\r
+ }\r
+\r
+ friend inline bool operator<(shared_count const & a, shared_count const & b)\r
+ {\r
+ return std::less<sp_counted_base *>()( a.pi_, b.pi_ );\r
+ }\r
+\r
+ void * get_deleter( sp_typeinfo const & ti ) const\r
+ {\r
+ return pi_? pi_->get_deleter( ti ): 0;\r
+ }\r
+};\r
+\r
+\r
+class weak_count\r
+{\r
+private:\r
+\r
+ sp_counted_base * pi_;\r
+\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ int id_;\r
+#endif\r
+\r
+ friend class shared_count;\r
+\r
+public:\r
+\r
+ weak_count(): pi_(0) // nothrow\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ , id_(weak_count_id)\r
+#endif\r
+ {\r
+ }\r
+\r
+ weak_count(shared_count const & r): pi_(r.pi_) // nothrow\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ , id_(weak_count_id)\r
+#endif\r
+ {\r
+ if(pi_ != 0) pi_->weak_add_ref();\r
+ }\r
+\r
+ weak_count(weak_count const & r): pi_(r.pi_) // nothrow\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ , id_(weak_count_id)\r
+#endif\r
+ {\r
+ if(pi_ != 0) pi_->weak_add_ref();\r
+ }\r
+\r
+// Move support\r
+\r
+#if defined( BOOST_HAS_RVALUE_REFS )\r
+\r
+ weak_count(weak_count && r): pi_(r.pi_) // nothrow\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ , id_(weak_count_id)\r
+#endif\r
+ {\r
+ r.pi_ = 0;\r
+ }\r
+\r
+#endif\r
+\r
+ ~weak_count() // nothrow\r
+ {\r
+ if(pi_ != 0) pi_->weak_release();\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ id_ = 0;\r
+#endif\r
+ }\r
+\r
+ weak_count & operator= (shared_count const & r) // nothrow\r
+ {\r
+ sp_counted_base * tmp = r.pi_;\r
+\r
+ if( tmp != pi_ )\r
+ {\r
+ if(tmp != 0) tmp->weak_add_ref();\r
+ if(pi_ != 0) pi_->weak_release();\r
+ pi_ = tmp;\r
+ }\r
+\r
+ return *this;\r
+ }\r
+\r
+ weak_count & operator= (weak_count const & r) // nothrow\r
+ {\r
+ sp_counted_base * tmp = r.pi_;\r
+\r
+ if( tmp != pi_ )\r
+ {\r
+ if(tmp != 0) tmp->weak_add_ref();\r
+ if(pi_ != 0) pi_->weak_release();\r
+ pi_ = tmp;\r
+ }\r
+\r
+ return *this;\r
+ }\r
+\r
+ void swap(weak_count & r) // nothrow\r
+ {\r
+ sp_counted_base * tmp = r.pi_;\r
+ r.pi_ = pi_;\r
+ pi_ = tmp;\r
+ }\r
+\r
+ long use_count() const // nothrow\r
+ {\r
+ return pi_ != 0? pi_->use_count(): 0;\r
+ }\r
+\r
+ bool empty() const // nothrow\r
+ {\r
+ return pi_ == 0;\r
+ }\r
+\r
+ friend inline bool operator==(weak_count const & a, weak_count const & b)\r
+ {\r
+ return a.pi_ == b.pi_;\r
+ }\r
+\r
+ friend inline bool operator<(weak_count const & a, weak_count const & b)\r
+ {\r
+ return std::less<sp_counted_base *>()(a.pi_, b.pi_);\r
+ }\r
+};\r
+\r
+inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ )\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ , id_(shared_count_id)\r
+#endif\r
+{\r
+ if( pi_ == 0 || !pi_->add_ref_lock() )\r
+ {\r
+ boost::throw_exception( boost::bad_weak_ptr() );\r
+ }\r
+}\r
+\r
+inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ): pi_( r.pi_ )\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ , id_(shared_count_id)\r
+#endif\r
+{\r
+ if( pi_ != 0 && !pi_->add_ref_lock() )\r
+ {\r
+ pi_ = 0;\r
+ }\r
+}\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#ifdef __BORLANDC__\r
+# pragma warn .8027 // Functions containing try are not expanded inline\r
+#endif\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SHARED_PTR_NMT_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SHARED_PTR_NMT_HPP_INCLUDED\r
+\r
+//\r
+// detail/shared_ptr_nmt.hpp - shared_ptr.hpp without member templates\r
+//\r
+// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.\r
+// Copyright (c) 2001, 2002 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation.\r
+//\r
+\r
+#include <boost/assert.hpp>\r
+#include <boost/checked_delete.hpp>\r
+#include <boost/throw_exception.hpp>\r
+#include <boost/smart_ptr/detail/atomic_count.hpp>\r
+\r
+#ifndef BOOST_NO_AUTO_PTR\r
+# include <memory> // for std::auto_ptr\r
+#endif\r
+\r
+#include <algorithm> // for std::swap\r
+#include <functional> // for std::less\r
+#include <new> // for std::bad_alloc\r
+\r
+namespace boost\r
+{\r
+\r
+template<class T> class shared_ptr\r
+{\r
+private:\r
+\r
+ typedef detail::atomic_count count_type;\r
+\r
+public:\r
+\r
+ typedef T element_type;\r
+ typedef T value_type;\r
+\r
+ explicit shared_ptr(T * p = 0): px(p)\r
+ {\r
+#ifndef BOOST_NO_EXCEPTIONS\r
+\r
+ try // prevent leak if new throws\r
+ {\r
+ pn = new count_type(1);\r
+ }\r
+ catch(...)\r
+ {\r
+ boost::checked_delete(p);\r
+ throw;\r
+ }\r
+\r
+#else\r
+\r
+ pn = new count_type(1);\r
+\r
+ if(pn == 0)\r
+ {\r
+ boost::checked_delete(p);\r
+ boost::throw_exception(std::bad_alloc());\r
+ }\r
+\r
+#endif\r
+ }\r
+\r
+ ~shared_ptr()\r
+ {\r
+ if(--*pn == 0)\r
+ {\r
+ boost::checked_delete(px);\r
+ delete pn;\r
+ }\r
+ }\r
+\r
+ shared_ptr(shared_ptr const & r): px(r.px) // never throws\r
+ {\r
+ pn = r.pn;\r
+ ++*pn;\r
+ }\r
+\r
+ shared_ptr & operator=(shared_ptr const & r)\r
+ {\r
+ shared_ptr(r).swap(*this);\r
+ return *this;\r
+ }\r
+\r
+#ifndef BOOST_NO_AUTO_PTR\r
+\r
+ explicit shared_ptr(std::auto_ptr<T> & r)\r
+ { \r
+ pn = new count_type(1); // may throw\r
+ px = r.release(); // fix: moved here to stop leak if new throws\r
+ } \r
+\r
+ shared_ptr & operator=(std::auto_ptr<T> & r)\r
+ {\r
+ shared_ptr(r).swap(*this);\r
+ return *this;\r
+ }\r
+\r
+#endif\r
+\r
+ void reset(T * p = 0)\r
+ {\r
+ BOOST_ASSERT(p == 0 || p != px);\r
+ shared_ptr(p).swap(*this);\r
+ }\r
+\r
+ T & operator*() const // never throws\r
+ {\r
+ BOOST_ASSERT(px != 0);\r
+ return *px;\r
+ }\r
+\r
+ T * operator->() const // never throws\r
+ {\r
+ BOOST_ASSERT(px != 0);\r
+ return px;\r
+ }\r
+\r
+ T * get() const // never throws\r
+ {\r
+ return px;\r
+ }\r
+\r
+ long use_count() const // never throws\r
+ {\r
+ return *pn;\r
+ }\r
+\r
+ bool unique() const // never throws\r
+ {\r
+ return *pn == 1;\r
+ }\r
+ \r
+ void swap(shared_ptr<T> & other) // never throws\r
+ {\r
+ std::swap(px, other.px);\r
+ std::swap(pn, other.pn);\r
+ }\r
+\r
+private:\r
+\r
+ T * px; // contained pointer\r
+ count_type * pn; // ptr to reference counter\r
+};\r
+\r
+template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b)\r
+{\r
+ return a.get() == b.get();\r
+}\r
+\r
+template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b)\r
+{\r
+ return a.get() != b.get();\r
+}\r
+\r
+template<class T> inline bool operator<(shared_ptr<T> const & a, shared_ptr<T> const & b)\r
+{\r
+ return std::less<T*>()(a.get(), b.get());\r
+}\r
+\r
+template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b)\r
+{\r
+ a.swap(b);\r
+}\r
+\r
+// get_pointer() enables boost::mem_fn to recognize shared_ptr\r
+\r
+template<class T> inline T * get_pointer(shared_ptr<T> const & p)\r
+{\r
+ return p.get();\r
+}\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SHARED_PTR_NMT_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+// detail/sp_convertible.hpp\r
+//\r
+// Copyright 2008 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt\r
+\r
+#include <boost/config.hpp>\r
+\r
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( BOOST_NO_SFINAE )\r
+# define BOOST_SP_NO_SP_CONVERTIBLE\r
+#endif\r
+\r
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ < 303 )\r
+# define BOOST_SP_NO_SP_CONVERTIBLE\r
+#endif\r
+\r
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x630 )\r
+# define BOOST_SP_NO_SP_CONVERTIBLE\r
+#endif\r
+\r
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+template< class Y, class T > struct sp_convertible\r
+{\r
+ typedef char (&yes) [1];\r
+ typedef char (&no) [2];\r
+\r
+ static yes f( T* );\r
+ static no f( ... );\r
+\r
+ enum _vt { value = sizeof( (f)( static_cast<Y*>(0) ) ) == sizeof(yes) };\r
+};\r
+\r
+struct sp_empty\r
+{\r
+};\r
+\r
+template< bool > struct sp_enable_if_convertible_impl;\r
+\r
+template<> struct sp_enable_if_convertible_impl<true>\r
+{\r
+ typedef sp_empty type;\r
+};\r
+\r
+template<> struct sp_enable_if_convertible_impl<false>\r
+{\r
+};\r
+\r
+template< class Y, class T > struct sp_enable_if_convertible: public sp_enable_if_convertible_impl< sp_convertible< Y, T >::value >\r
+{\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // !defined( BOOST_SP_NO_SP_CONVERTIBLE )\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// detail/sp_counted_base.hpp\r
+//\r
+// Copyright 2005, 2006 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <boost/config.hpp>\r
+#include <boost/smart_ptr/detail/sp_has_sync.hpp>\r
+\r
+#if defined( BOOST_SP_DISABLE_THREADS )\r
+# include <boost/smart_ptr/detail/sp_counted_base_nt.hpp>\r
+\r
+#elif defined( BOOST_SP_USE_SPINLOCK )\r
+# include <boost/smart_ptr/detail/sp_counted_base_spin.hpp>\r
+\r
+#elif defined( BOOST_SP_USE_PTHREADS )\r
+# include <boost/smart_ptr/detail/sp_counted_base_pt.hpp>\r
+\r
+#elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 )\r
+# include <boost/smart_ptr/detail/sp_counted_base_nt.hpp>\r
+\r
+#elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )\r
+# include <boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp>\r
+\r
+#elif defined( __GNUC__ ) && defined( __ia64__ ) && !defined( __INTEL_COMPILER )\r
+# include <boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp>\r
+\r
+#elif defined(__HP_aCC) && defined(__ia64)\r
+# include <boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp>\r
+\r
+#elif defined( __MWERKS__ ) && defined( __POWERPC__ )\r
+# include <boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp>\r
+\r
+#elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) )\r
+# include <boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp>\r
+\r
+#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) )\r
+# include <boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp>\r
+\r
+#elif defined( BOOST_SP_HAS_SYNC )\r
+# include <boost/smart_ptr/detail/sp_counted_base_sync.hpp>\r
+\r
+#elif defined(__GNUC__) && ( defined( __sparcv9 ) || ( defined( __sparcv8 ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 402 ) ) )\r
+# include <boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp>\r
+\r
+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__)\r
+# include <boost/smart_ptr/detail/sp_counted_base_w32.hpp>\r
+\r
+#elif !defined( BOOST_HAS_THREADS )\r
+# include <boost/smart_ptr/detail/sp_counted_base_nt.hpp>\r
+\r
+#else\r
+# include <boost/smart_ptr/detail/sp_counted_base_spin.hpp>\r
+\r
+#endif\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED\r
+\r
+//\r
+// detail/sp_counted_base_acc_ia64.hpp - aC++ on HP-UX IA64\r
+//\r
+// Copyright 2007 Baruch Zilber\r
+// Copyright 2007 Boris Gubenko\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+//\r
+// Lock-free algorithm by Alexander Terekhov\r
+//\r
+\r
+#include <boost/detail/sp_typeinfo.hpp>\r
+#include <machine/sys/inline.h>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+inline void atomic_increment( int * pw )\r
+{\r
+ // ++*pw;\r
+\r
+ _Asm_fetchadd(_FASZ_W, _SEM_REL, pw, +1, _LDHINT_NONE);\r
+} \r
+\r
+inline int atomic_decrement( int * pw )\r
+{\r
+ // return --*pw;\r
+\r
+ int r = static_cast<int>(_Asm_fetchadd(_FASZ_W, _SEM_REL, pw, -1, _LDHINT_NONE));\r
+ if (1 == r)\r
+ {\r
+ _Asm_mf();\r
+ }\r
+ \r
+ return r - 1;\r
+}\r
+\r
+inline int atomic_conditional_increment( int * pw )\r
+{\r
+ // if( *pw != 0 ) ++*pw;\r
+ // return *pw;\r
+\r
+ int v = *pw;\r
+ \r
+ for (;;)\r
+ {\r
+ if (0 == v)\r
+ {\r
+ return 0;\r
+ }\r
+ \r
+ _Asm_mov_to_ar(_AREG_CCV,\r
+ v,\r
+ (_UP_CALL_FENCE | _UP_SYS_FENCE | _DOWN_CALL_FENCE | _DOWN_SYS_FENCE));\r
+ int r = static_cast<int>(_Asm_cmpxchg(_SZ_W, _SEM_ACQ, pw, v + 1, _LDHINT_NONE));\r
+ if (r == v)\r
+ {\r
+ return r + 1;\r
+ }\r
+ \r
+ v = r;\r
+ }\r
+}\r
+\r
+class sp_counted_base\r
+{\r
+private:\r
+\r
+ sp_counted_base( sp_counted_base const & );\r
+ sp_counted_base & operator= ( sp_counted_base const & );\r
+\r
+ int use_count_; // #shared\r
+ int weak_count_; // #weak + (#shared != 0)\r
+\r
+public:\r
+\r
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )\r
+ {\r
+ }\r
+\r
+ virtual ~sp_counted_base() // nothrow\r
+ {\r
+ }\r
+\r
+ // dispose() is called when use_count_ drops to zero, to release\r
+ // the resources managed by *this.\r
+\r
+ virtual void dispose() = 0; // nothrow\r
+\r
+ // destroy() is called when weak_count_ drops to zero.\r
+\r
+ virtual void destroy() // nothrow\r
+ {\r
+ delete this;\r
+ }\r
+\r
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;\r
+\r
+ void add_ref_copy()\r
+ {\r
+ atomic_increment( &use_count_ );\r
+ }\r
+\r
+ bool add_ref_lock() // true on success\r
+ {\r
+ return atomic_conditional_increment( &use_count_ ) != 0;\r
+ }\r
+\r
+ void release() // nothrow\r
+ {\r
+ if( atomic_decrement( &use_count_ ) == 0 )\r
+ {\r
+ dispose();\r
+ weak_release();\r
+ }\r
+ }\r
+\r
+ void weak_add_ref() // nothrow\r
+ {\r
+ atomic_increment( &weak_count_ );\r
+ }\r
+\r
+ void weak_release() // nothrow\r
+ {\r
+ if( atomic_decrement( &weak_count_ ) == 0 )\r
+ {\r
+ destroy();\r
+ }\r
+ }\r
+\r
+ long use_count() const // nothrow\r
+ {\r
+ return static_cast<int const volatile &>( use_count_ ); // TODO use ld.acq here\r
+ }\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// detail/sp_counted_base_cw_ppc.hpp - CodeWarrior on PowerPC\r
+//\r
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.\r
+// Copyright 2004-2005 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+//\r
+// Lock-free algorithm by Alexander Terekhov\r
+//\r
+// Thanks to Ben Hitchings for the #weak + (#shared != 0)\r
+// formulation\r
+//\r
+\r
+#include <boost/detail/sp_typeinfo.hpp>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+inline void atomic_increment( register long * pw )\r
+{\r
+ register int a;\r
+\r
+ asm\r
+ {\r
+loop:\r
+\r
+ lwarx a, 0, pw\r
+ addi a, a, 1\r
+ stwcx. a, 0, pw\r
+ bne- loop\r
+ }\r
+}\r
+\r
+inline long atomic_decrement( register long * pw )\r
+{\r
+ register int a;\r
+\r
+ asm\r
+ {\r
+ sync\r
+\r
+loop:\r
+\r
+ lwarx a, 0, pw\r
+ addi a, a, -1\r
+ stwcx. a, 0, pw\r
+ bne- loop\r
+\r
+ isync\r
+ }\r
+\r
+ return a;\r
+}\r
+\r
+inline long atomic_conditional_increment( register long * pw )\r
+{\r
+ register int a;\r
+\r
+ asm\r
+ {\r
+loop:\r
+\r
+ lwarx a, 0, pw\r
+ cmpwi a, 0\r
+ beq store\r
+\r
+ addi a, a, 1\r
+\r
+store:\r
+\r
+ stwcx. a, 0, pw\r
+ bne- loop\r
+ }\r
+\r
+ return a;\r
+}\r
+\r
+class sp_counted_base\r
+{\r
+private:\r
+\r
+ sp_counted_base( sp_counted_base const & );\r
+ sp_counted_base & operator= ( sp_counted_base const & );\r
+\r
+ long use_count_; // #shared\r
+ long weak_count_; // #weak + (#shared != 0)\r
+\r
+public:\r
+\r
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )\r
+ {\r
+ }\r
+\r
+ virtual ~sp_counted_base() // nothrow\r
+ {\r
+ }\r
+\r
+ // dispose() is called when use_count_ drops to zero, to release\r
+ // the resources managed by *this.\r
+\r
+ virtual void dispose() = 0; // nothrow\r
+\r
+ // destroy() is called when weak_count_ drops to zero.\r
+\r
+ virtual void destroy() // nothrow\r
+ {\r
+ delete this;\r
+ }\r
+\r
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;\r
+\r
+ void add_ref_copy()\r
+ {\r
+ atomic_increment( &use_count_ );\r
+ }\r
+\r
+ bool add_ref_lock() // true on success\r
+ {\r
+ return atomic_conditional_increment( &use_count_ ) != 0;\r
+ }\r
+\r
+ void release() // nothrow\r
+ {\r
+ if( atomic_decrement( &use_count_ ) == 0 )\r
+ {\r
+ dispose();\r
+ weak_release();\r
+ }\r
+ }\r
+\r
+ void weak_add_ref() // nothrow\r
+ {\r
+ atomic_increment( &weak_count_ );\r
+ }\r
+\r
+ void weak_release() // nothrow\r
+ {\r
+ if( atomic_decrement( &weak_count_ ) == 0 )\r
+ {\r
+ destroy();\r
+ }\r
+ }\r
+\r
+ long use_count() const // nothrow\r
+ {\r
+ return static_cast<long const volatile &>( use_count_ );\r
+ }\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED\r
+\r
+//\r
+// detail/sp_counted_base_gcc_ia64.hpp - g++ on IA64\r
+//\r
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.\r
+// Copyright 2004-2006 Peter Dimov\r
+// Copyright 2005 Ben Hutchings\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+//\r
+// Lock-free algorithm by Alexander Terekhov\r
+//\r
+\r
+#include <boost/detail/sp_typeinfo.hpp>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+inline void atomic_increment( int * pw )\r
+{\r
+ // ++*pw;\r
+\r
+ int tmp;\r
+\r
+ // No barrier is required here but fetchadd always has an acquire or\r
+ // release barrier associated with it. We choose release as it should be\r
+ // cheaper.\r
+ __asm__ ("fetchadd4.rel %0=%1,1" :\r
+ "=r"(tmp), "=m"(*pw) :\r
+ "m"( *pw ));\r
+}\r
+\r
+inline int atomic_decrement( int * pw )\r
+{\r
+ // return --*pw;\r
+\r
+ int rv;\r
+\r
+ __asm__ (" fetchadd4.rel %0=%1,-1 ;; \n"\r
+ " cmp.eq p7,p0=1,%0 ;; \n"\r
+ "(p7) ld4.acq %0=%1 " :\r
+ "=&r"(rv), "=m"(*pw) :\r
+ "m"( *pw ) :\r
+ "p7");\r
+\r
+ return rv;\r
+}\r
+\r
+inline int atomic_conditional_increment( int * pw )\r
+{\r
+ // if( *pw != 0 ) ++*pw;\r
+ // return *pw;\r
+\r
+ int rv, tmp, tmp2;\r
+\r
+ __asm__ ("0: ld4 %0=%3 ;; \n"\r
+ " cmp.eq p7,p0=0,%0 ;; \n"\r
+ "(p7) br.cond.spnt 1f \n"\r
+ " mov ar.ccv=%0 \n"\r
+ " add %1=1,%0 ;; \n"\r
+ " cmpxchg4.acq %2=%3,%1,ar.ccv ;; \n"\r
+ " cmp.ne p7,p0=%0,%2 ;; \n"\r
+ "(p7) br.cond.spnt 0b \n"\r
+ " mov %0=%1 ;; \n"\r
+ "1:" : \r
+ "=&r"(rv), "=&r"(tmp), "=&r"(tmp2), "=m"(*pw) :\r
+ "m"( *pw ) :\r
+ "ar.ccv", "p7");\r
+\r
+ return rv;\r
+}\r
+\r
+class sp_counted_base\r
+{\r
+private:\r
+\r
+ sp_counted_base( sp_counted_base const & );\r
+ sp_counted_base & operator= ( sp_counted_base const & );\r
+\r
+ int use_count_; // #shared\r
+ int weak_count_; // #weak + (#shared != 0)\r
+\r
+public:\r
+\r
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )\r
+ {\r
+ }\r
+\r
+ virtual ~sp_counted_base() // nothrow\r
+ {\r
+ }\r
+\r
+ // dispose() is called when use_count_ drops to zero, to release\r
+ // the resources managed by *this.\r
+\r
+ virtual void dispose() = 0; // nothrow\r
+\r
+ // destroy() is called when weak_count_ drops to zero.\r
+\r
+ virtual void destroy() // nothrow\r
+ {\r
+ delete this;\r
+ }\r
+\r
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;\r
+\r
+ void add_ref_copy()\r
+ {\r
+ atomic_increment( &use_count_ );\r
+ }\r
+\r
+ bool add_ref_lock() // true on success\r
+ {\r
+ return atomic_conditional_increment( &use_count_ ) != 0;\r
+ }\r
+\r
+ void release() // nothrow\r
+ {\r
+ if( atomic_decrement( &use_count_ ) == 0 )\r
+ {\r
+ dispose();\r
+ weak_release();\r
+ }\r
+ }\r
+\r
+ void weak_add_ref() // nothrow\r
+ {\r
+ atomic_increment( &weak_count_ );\r
+ }\r
+\r
+ void weak_release() // nothrow\r
+ {\r
+ if( atomic_decrement( &weak_count_ ) == 0 )\r
+ {\r
+ destroy();\r
+ }\r
+ }\r
+\r
+ long use_count() const // nothrow\r
+ {\r
+ return static_cast<int const volatile &>( use_count_ ); // TODO use ld.acq here\r
+ }\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED\r
+#define BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// detail/sp_counted_base_gcc_mips.hpp - g++ on MIPS\r
+//\r
+// Copyright (c) 2009, Spirent Communications, Inc.\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+//\r
+// Lock-free algorithm by Alexander Terekhov\r
+//\r
+\r
+#include <boost/detail/sp_typeinfo.hpp>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+inline void atomic_increment( int * pw )\r
+{\r
+ // ++*pw;\r
+\r
+ int tmp;\r
+\r
+ __asm__ __volatile__\r
+ (\r
+ "0:\n\t"\r
+ "ll %0, %1\n\t"\r
+ "addiu %0, 1\n\t"\r
+ "sc %0, %1\n\t"\r
+ "beqz %0, 0b":\r
+ "=&r"( tmp ), "=m"( *pw ):\r
+ "m"( *pw )\r
+ );\r
+}\r
+\r
+inline int atomic_decrement( int * pw )\r
+{\r
+ // return --*pw;\r
+\r
+ int rv, tmp;\r
+\r
+ __asm__ __volatile__\r
+ (\r
+ "0:\n\t"\r
+ "ll %1, %2\n\t"\r
+ "addiu %0, %1, -1\n\t"\r
+ "sc %0, %2\n\t"\r
+ "beqz %0, 0b\n\t"\r
+ "addiu %0, %1, -1":\r
+ "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ):\r
+ "m"( *pw ):\r
+ "memory"\r
+ );\r
+\r
+ return rv;\r
+}\r
+\r
+inline int atomic_conditional_increment( int * pw )\r
+{\r
+ // if( *pw != 0 ) ++*pw;\r
+ // return *pw;\r
+\r
+ int rv, tmp;\r
+\r
+ __asm__ __volatile__\r
+ (\r
+ "0:\n\t"\r
+ "ll %0, %2\n\t"\r
+ "beqz %0, 1f\n\t"\r
+ "addiu %1, %0, 1\n\t"\r
+ "sc %1, %2\n\t"\r
+ "beqz %1, 0b\n\t"\r
+ "addiu %0, %0, 1\n\t"\r
+ "1:":\r
+ "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ):\r
+ "m"( *pw ):\r
+ "memory"\r
+ );\r
+\r
+ return rv;\r
+}\r
+\r
+class sp_counted_base\r
+{\r
+private:\r
+\r
+ sp_counted_base( sp_counted_base const & );\r
+ sp_counted_base & operator= ( sp_counted_base const & );\r
+\r
+ int use_count_; // #shared\r
+ int weak_count_; // #weak + (#shared != 0)\r
+\r
+public:\r
+\r
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )\r
+ {\r
+ }\r
+\r
+ virtual ~sp_counted_base() // nothrow\r
+ {\r
+ }\r
+\r
+ // dispose() is called when use_count_ drops to zero, to release\r
+ // the resources managed by *this.\r
+\r
+ virtual void dispose() = 0; // nothrow\r
+\r
+ // destroy() is called when weak_count_ drops to zero.\r
+\r
+ virtual void destroy() // nothrow\r
+ {\r
+ delete this;\r
+ }\r
+\r
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;\r
+\r
+ void add_ref_copy()\r
+ {\r
+ atomic_increment( &use_count_ );\r
+ }\r
+\r
+ bool add_ref_lock() // true on success\r
+ {\r
+ return atomic_conditional_increment( &use_count_ ) != 0;\r
+ }\r
+\r
+ void release() // nothrow\r
+ {\r
+ if( atomic_decrement( &use_count_ ) == 0 )\r
+ {\r
+ dispose();\r
+ weak_release();\r
+ }\r
+ }\r
+\r
+ void weak_add_ref() // nothrow\r
+ {\r
+ atomic_increment( &weak_count_ );\r
+ }\r
+\r
+ void weak_release() // nothrow\r
+ {\r
+ if( atomic_decrement( &weak_count_ ) == 0 )\r
+ {\r
+ destroy();\r
+ }\r
+ }\r
+\r
+ long use_count() const // nothrow\r
+ {\r
+ return static_cast<int const volatile &>( use_count_ );\r
+ }\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// detail/sp_counted_base_gcc_ppc.hpp - g++ on PowerPC\r
+//\r
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.\r
+// Copyright 2004-2005 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+//\r
+// Lock-free algorithm by Alexander Terekhov\r
+//\r
+// Thanks to Ben Hitchings for the #weak + (#shared != 0)\r
+// formulation\r
+//\r
+\r
+#include <boost/detail/sp_typeinfo.hpp>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+inline void atomic_increment( int * pw )\r
+{\r
+ // ++*pw;\r
+\r
+ int tmp;\r
+\r
+ __asm__\r
+ (\r
+ "0:\n\t"\r
+ "lwarx %1, 0, %2\n\t"\r
+ "addi %1, %1, 1\n\t"\r
+ "stwcx. %1, 0, %2\n\t"\r
+ "bne- 0b":\r
+\r
+ "=m"( *pw ), "=&b"( tmp ):\r
+ "r"( pw ), "m"( *pw ):\r
+ "cc"\r
+ );\r
+}\r
+\r
+inline int atomic_decrement( int * pw )\r
+{\r
+ // return --*pw;\r
+\r
+ int rv;\r
+\r
+ __asm__ __volatile__\r
+ (\r
+ "sync\n\t"\r
+ "0:\n\t"\r
+ "lwarx %1, 0, %2\n\t"\r
+ "addi %1, %1, -1\n\t"\r
+ "stwcx. %1, 0, %2\n\t"\r
+ "bne- 0b\n\t"\r
+ "isync":\r
+\r
+ "=m"( *pw ), "=&b"( rv ):\r
+ "r"( pw ), "m"( *pw ):\r
+ "memory", "cc"\r
+ );\r
+\r
+ return rv;\r
+}\r
+\r
+inline int atomic_conditional_increment( int * pw )\r
+{\r
+ // if( *pw != 0 ) ++*pw;\r
+ // return *pw;\r
+\r
+ int rv;\r
+\r
+ __asm__\r
+ (\r
+ "0:\n\t"\r
+ "lwarx %1, 0, %2\n\t"\r
+ "cmpwi %1, 0\n\t"\r
+ "beq 1f\n\t"\r
+ "addi %1, %1, 1\n\t"\r
+ "1:\n\t"\r
+ "stwcx. %1, 0, %2\n\t"\r
+ "bne- 0b":\r
+\r
+ "=m"( *pw ), "=&b"( rv ):\r
+ "r"( pw ), "m"( *pw ):\r
+ "cc"\r
+ );\r
+\r
+ return rv;\r
+}\r
+\r
+class sp_counted_base\r
+{\r
+private:\r
+\r
+ sp_counted_base( sp_counted_base const & );\r
+ sp_counted_base & operator= ( sp_counted_base const & );\r
+\r
+ int use_count_; // #shared\r
+ int weak_count_; // #weak + (#shared != 0)\r
+\r
+public:\r
+\r
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )\r
+ {\r
+ }\r
+\r
+ virtual ~sp_counted_base() // nothrow\r
+ {\r
+ }\r
+\r
+ // dispose() is called when use_count_ drops to zero, to release\r
+ // the resources managed by *this.\r
+\r
+ virtual void dispose() = 0; // nothrow\r
+\r
+ // destroy() is called when weak_count_ drops to zero.\r
+\r
+ virtual void destroy() // nothrow\r
+ {\r
+ delete this;\r
+ }\r
+\r
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;\r
+\r
+ void add_ref_copy()\r
+ {\r
+ atomic_increment( &use_count_ );\r
+ }\r
+\r
+ bool add_ref_lock() // true on success\r
+ {\r
+ return atomic_conditional_increment( &use_count_ ) != 0;\r
+ }\r
+\r
+ void release() // nothrow\r
+ {\r
+ if( atomic_decrement( &use_count_ ) == 0 )\r
+ {\r
+ dispose();\r
+ weak_release();\r
+ }\r
+ }\r
+\r
+ void weak_add_ref() // nothrow\r
+ {\r
+ atomic_increment( &weak_count_ );\r
+ }\r
+\r
+ void weak_release() // nothrow\r
+ {\r
+ if( atomic_decrement( &weak_count_ ) == 0 )\r
+ {\r
+ destroy();\r
+ }\r
+ }\r
+\r
+ long use_count() const // nothrow\r
+ {\r
+ return static_cast<int const volatile &>( use_count_ );\r
+ }\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+// detail/sp_counted_base_gcc_sparc.hpp - g++ on Sparc V8+\r
+//\r
+// Copyright (c) 2006 Piotr Wyderski\r
+// Copyright (c) 2006 Tomas Puverle\r
+// Copyright (c) 2006 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt\r
+//\r
+// Thanks to Michael van der Westhuizen\r
+\r
+#include <boost/detail/sp_typeinfo.hpp>\r
+#include <inttypes.h> // int32_t\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+inline int32_t compare_and_swap( int32_t * dest_, int32_t compare_, int32_t swap_ )\r
+{\r
+ __asm__ __volatile__( "cas [%1], %2, %0"\r
+ : "+r" (swap_)\r
+ : "r" (dest_), "r" (compare_)\r
+ : "memory" );\r
+\r
+ return swap_;\r
+}\r
+\r
+inline int32_t atomic_fetch_and_add( int32_t * pw, int32_t dv )\r
+{\r
+ // long r = *pw;\r
+ // *pw += dv;\r
+ // return r;\r
+\r
+ for( ;; )\r
+ {\r
+ int32_t r = *pw;\r
+\r
+ if( __builtin_expect((compare_and_swap(pw, r, r + dv) == r), 1) )\r
+ {\r
+ return r;\r
+ }\r
+ }\r
+}\r
+\r
+inline void atomic_increment( int32_t * pw )\r
+{\r
+ atomic_fetch_and_add( pw, 1 );\r
+}\r
+\r
+inline int32_t atomic_decrement( int32_t * pw )\r
+{\r
+ return atomic_fetch_and_add( pw, -1 );\r
+}\r
+\r
+inline int32_t atomic_conditional_increment( int32_t * pw )\r
+{\r
+ // long r = *pw;\r
+ // if( r != 0 ) ++*pw;\r
+ // return r;\r
+\r
+ for( ;; )\r
+ {\r
+ int32_t r = *pw;\r
+\r
+ if( r == 0 )\r
+ {\r
+ return r;\r
+ }\r
+\r
+ if( __builtin_expect( ( compare_and_swap( pw, r, r + 1 ) == r ), 1 ) )\r
+ {\r
+ return r;\r
+ }\r
+ } \r
+}\r
+\r
+class sp_counted_base\r
+{\r
+private:\r
+\r
+ sp_counted_base( sp_counted_base const & );\r
+ sp_counted_base & operator= ( sp_counted_base const & );\r
+\r
+ int32_t use_count_; // #shared\r
+ int32_t weak_count_; // #weak + (#shared != 0)\r
+\r
+public:\r
+\r
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )\r
+ {\r
+ }\r
+\r
+ virtual ~sp_counted_base() // nothrow\r
+ {\r
+ }\r
+\r
+ // dispose() is called when use_count_ drops to zero, to release\r
+ // the resources managed by *this.\r
+\r
+ virtual void dispose() = 0; // nothrow\r
+\r
+ // destroy() is called when weak_count_ drops to zero.\r
+\r
+ virtual void destroy() // nothrow\r
+ {\r
+ delete this;\r
+ }\r
+\r
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;\r
+\r
+ void add_ref_copy()\r
+ {\r
+ atomic_increment( &use_count_ );\r
+ }\r
+\r
+ bool add_ref_lock() // true on success\r
+ {\r
+ return atomic_conditional_increment( &use_count_ ) != 0;\r
+ }\r
+\r
+ void release() // nothrow\r
+ {\r
+ if( atomic_decrement( &use_count_ ) == 1 )\r
+ {\r
+ dispose();\r
+ weak_release();\r
+ }\r
+ }\r
+\r
+ void weak_add_ref() // nothrow\r
+ {\r
+ atomic_increment( &weak_count_ );\r
+ }\r
+\r
+ void weak_release() // nothrow\r
+ {\r
+ if( atomic_decrement( &weak_count_ ) == 1 )\r
+ {\r
+ destroy();\r
+ }\r
+ }\r
+\r
+ long use_count() const // nothrow\r
+ {\r
+ return const_cast< int32_t const volatile & >( use_count_ );\r
+ }\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// detail/sp_counted_base_gcc_x86.hpp - g++ on 486+ or AMD64\r
+//\r
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.\r
+// Copyright 2004-2005 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+//\r
+// Lock-free algorithm by Alexander Terekhov\r
+//\r
+// Thanks to Ben Hitchings for the #weak + (#shared != 0)\r
+// formulation\r
+//\r
+\r
+#include <boost/detail/sp_typeinfo.hpp>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+inline int atomic_exchange_and_add( int * pw, int dv )\r
+{\r
+ // int r = *pw;\r
+ // *pw += dv;\r
+ // return r;\r
+\r
+ int r;\r
+\r
+ __asm__ __volatile__\r
+ (\r
+ "lock\n\t"\r
+ "xadd %1, %0":\r
+ "=m"( *pw ), "=r"( r ): // outputs (%0, %1)\r
+ "m"( *pw ), "1"( dv ): // inputs (%2, %3 == %1)\r
+ "memory", "cc" // clobbers\r
+ );\r
+\r
+ return r;\r
+}\r
+\r
+inline void atomic_increment( int * pw )\r
+{\r
+ //atomic_exchange_and_add( pw, 1 );\r
+\r
+ __asm__\r
+ (\r
+ "lock\n\t"\r
+ "incl %0":\r
+ "=m"( *pw ): // output (%0)\r
+ "m"( *pw ): // input (%1)\r
+ "cc" // clobbers\r
+ );\r
+}\r
+\r
+inline int atomic_conditional_increment( int * pw )\r
+{\r
+ // int rv = *pw;\r
+ // if( rv != 0 ) ++*pw;\r
+ // return rv;\r
+\r
+ int rv, tmp;\r
+\r
+ __asm__\r
+ (\r
+ "movl %0, %%eax\n\t"\r
+ "0:\n\t"\r
+ "test %%eax, %%eax\n\t"\r
+ "je 1f\n\t"\r
+ "movl %%eax, %2\n\t"\r
+ "incl %2\n\t"\r
+ "lock\n\t"\r
+ "cmpxchgl %2, %0\n\t"\r
+ "jne 0b\n\t"\r
+ "1:":\r
+ "=m"( *pw ), "=&a"( rv ), "=&r"( tmp ): // outputs (%0, %1, %2)\r
+ "m"( *pw ): // input (%3)\r
+ "cc" // clobbers\r
+ );\r
+\r
+ return rv;\r
+}\r
+\r
+class sp_counted_base\r
+{\r
+private:\r
+\r
+ sp_counted_base( sp_counted_base const & );\r
+ sp_counted_base & operator= ( sp_counted_base const & );\r
+\r
+ int use_count_; // #shared\r
+ int weak_count_; // #weak + (#shared != 0)\r
+\r
+public:\r
+\r
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )\r
+ {\r
+ }\r
+\r
+ virtual ~sp_counted_base() // nothrow\r
+ {\r
+ }\r
+\r
+ // dispose() is called when use_count_ drops to zero, to release\r
+ // the resources managed by *this.\r
+\r
+ virtual void dispose() = 0; // nothrow\r
+\r
+ // destroy() is called when weak_count_ drops to zero.\r
+\r
+ virtual void destroy() // nothrow\r
+ {\r
+ delete this;\r
+ }\r
+\r
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;\r
+\r
+ void add_ref_copy()\r
+ {\r
+ atomic_increment( &use_count_ );\r
+ }\r
+\r
+ bool add_ref_lock() // true on success\r
+ {\r
+ return atomic_conditional_increment( &use_count_ ) != 0;\r
+ }\r
+\r
+ void release() // nothrow\r
+ {\r
+ if( atomic_exchange_and_add( &use_count_, -1 ) == 1 )\r
+ {\r
+ dispose();\r
+ weak_release();\r
+ }\r
+ }\r
+\r
+ void weak_add_ref() // nothrow\r
+ {\r
+ atomic_increment( &weak_count_ );\r
+ }\r
+\r
+ void weak_release() // nothrow\r
+ {\r
+ if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 )\r
+ {\r
+ destroy();\r
+ }\r
+ }\r
+\r
+ long use_count() const // nothrow\r
+ {\r
+ return static_cast<int const volatile &>( use_count_ );\r
+ }\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// detail/sp_counted_base_nt.hpp\r
+//\r
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.\r
+// Copyright 2004-2005 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <boost/detail/sp_typeinfo.hpp>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class sp_counted_base\r
+{\r
+private:\r
+\r
+ sp_counted_base( sp_counted_base const & );\r
+ sp_counted_base & operator= ( sp_counted_base const & );\r
+\r
+ long use_count_; // #shared\r
+ long weak_count_; // #weak + (#shared != 0)\r
+\r
+public:\r
+\r
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )\r
+ {\r
+ }\r
+\r
+ virtual ~sp_counted_base() // nothrow\r
+ {\r
+ }\r
+\r
+ // dispose() is called when use_count_ drops to zero, to release\r
+ // the resources managed by *this.\r
+\r
+ virtual void dispose() = 0; // nothrow\r
+\r
+ // destroy() is called when weak_count_ drops to zero.\r
+\r
+ virtual void destroy() // nothrow\r
+ {\r
+ delete this;\r
+ }\r
+\r
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;\r
+\r
+ void add_ref_copy()\r
+ {\r
+ ++use_count_;\r
+ }\r
+\r
+ bool add_ref_lock() // true on success\r
+ {\r
+ if( use_count_ == 0 ) return false;\r
+ ++use_count_;\r
+ return true;\r
+ }\r
+\r
+ void release() // nothrow\r
+ {\r
+ if( --use_count_ == 0 )\r
+ {\r
+ dispose();\r
+ weak_release();\r
+ }\r
+ }\r
+\r
+ void weak_add_ref() // nothrow\r
+ {\r
+ ++weak_count_;\r
+ }\r
+\r
+ void weak_release() // nothrow\r
+ {\r
+ if( --weak_count_ == 0 )\r
+ {\r
+ destroy();\r
+ }\r
+ }\r
+\r
+ long use_count() const // nothrow\r
+ {\r
+ return use_count_;\r
+ }\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// detail/sp_counted_base_pt.hpp\r
+//\r
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.\r
+// Copyright 2004-2005 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <boost/detail/sp_typeinfo.hpp>\r
+#include <pthread.h>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class sp_counted_base\r
+{\r
+private:\r
+\r
+ sp_counted_base( sp_counted_base const & );\r
+ sp_counted_base & operator= ( sp_counted_base const & );\r
+\r
+ long use_count_; // #shared\r
+ long weak_count_; // #weak + (#shared != 0)\r
+\r
+ mutable pthread_mutex_t m_;\r
+\r
+public:\r
+\r
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )\r
+ {\r
+// HPUX 10.20 / DCE has a nonstandard pthread_mutex_init\r
+\r
+#if defined(__hpux) && defined(_DECTHREADS_)\r
+ pthread_mutex_init( &m_, pthread_mutexattr_default );\r
+#else\r
+ pthread_mutex_init( &m_, 0 );\r
+#endif\r
+ }\r
+\r
+ virtual ~sp_counted_base() // nothrow\r
+ {\r
+ pthread_mutex_destroy( &m_ );\r
+ }\r
+\r
+ // dispose() is called when use_count_ drops to zero, to release\r
+ // the resources managed by *this.\r
+\r
+ virtual void dispose() = 0; // nothrow\r
+\r
+ // destroy() is called when weak_count_ drops to zero.\r
+\r
+ virtual void destroy() // nothrow\r
+ {\r
+ delete this;\r
+ }\r
+\r
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;\r
+\r
+ void add_ref_copy()\r
+ {\r
+ pthread_mutex_lock( &m_ );\r
+ ++use_count_;\r
+ pthread_mutex_unlock( &m_ );\r
+ }\r
+\r
+ bool add_ref_lock() // true on success\r
+ {\r
+ pthread_mutex_lock( &m_ );\r
+ bool r = use_count_ == 0? false: ( ++use_count_, true );\r
+ pthread_mutex_unlock( &m_ );\r
+ return r;\r
+ }\r
+\r
+ void release() // nothrow\r
+ {\r
+ pthread_mutex_lock( &m_ );\r
+ long new_use_count = --use_count_;\r
+ pthread_mutex_unlock( &m_ );\r
+\r
+ if( new_use_count == 0 )\r
+ {\r
+ dispose();\r
+ weak_release();\r
+ }\r
+ }\r
+\r
+ void weak_add_ref() // nothrow\r
+ {\r
+ pthread_mutex_lock( &m_ );\r
+ ++weak_count_;\r
+ pthread_mutex_unlock( &m_ );\r
+ }\r
+\r
+ void weak_release() // nothrow\r
+ {\r
+ pthread_mutex_lock( &m_ );\r
+ long new_weak_count = --weak_count_;\r
+ pthread_mutex_unlock( &m_ );\r
+\r
+ if( new_weak_count == 0 )\r
+ {\r
+ destroy();\r
+ }\r
+ }\r
+\r
+ long use_count() const // nothrow\r
+ {\r
+ pthread_mutex_lock( &m_ );\r
+ long r = use_count_;\r
+ pthread_mutex_unlock( &m_ );\r
+\r
+ return r;\r
+ }\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// detail/sp_counted_base_spin.hpp - spinlock pool atomic emulation\r
+//\r
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.\r
+// Copyright 2004-2008 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <boost/detail/sp_typeinfo.hpp>\r
+#include <boost/smart_ptr/detail/spinlock_pool.hpp>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+inline int atomic_exchange_and_add( int * pw, int dv )\r
+{\r
+ spinlock_pool<1>::scoped_lock lock( pw );\r
+\r
+ int r = *pw;\r
+ *pw += dv;\r
+ return r;\r
+}\r
+\r
+inline void atomic_increment( int * pw )\r
+{\r
+ spinlock_pool<1>::scoped_lock lock( pw );\r
+ ++*pw;\r
+}\r
+\r
+inline int atomic_conditional_increment( int * pw )\r
+{\r
+ spinlock_pool<1>::scoped_lock lock( pw );\r
+\r
+ int rv = *pw;\r
+ if( rv != 0 ) ++*pw;\r
+ return rv;\r
+}\r
+\r
+class sp_counted_base\r
+{\r
+private:\r
+\r
+ sp_counted_base( sp_counted_base const & );\r
+ sp_counted_base & operator= ( sp_counted_base const & );\r
+\r
+ int use_count_; // #shared\r
+ int weak_count_; // #weak + (#shared != 0)\r
+\r
+public:\r
+\r
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )\r
+ {\r
+ }\r
+\r
+ virtual ~sp_counted_base() // nothrow\r
+ {\r
+ }\r
+\r
+ // dispose() is called when use_count_ drops to zero, to release\r
+ // the resources managed by *this.\r
+\r
+ virtual void dispose() = 0; // nothrow\r
+\r
+ // destroy() is called when weak_count_ drops to zero.\r
+\r
+ virtual void destroy() // nothrow\r
+ {\r
+ delete this;\r
+ }\r
+\r
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;\r
+\r
+ void add_ref_copy()\r
+ {\r
+ atomic_increment( &use_count_ );\r
+ }\r
+\r
+ bool add_ref_lock() // true on success\r
+ {\r
+ return atomic_conditional_increment( &use_count_ ) != 0;\r
+ }\r
+\r
+ void release() // nothrow\r
+ {\r
+ if( atomic_exchange_and_add( &use_count_, -1 ) == 1 )\r
+ {\r
+ dispose();\r
+ weak_release();\r
+ }\r
+ }\r
+\r
+ void weak_add_ref() // nothrow\r
+ {\r
+ atomic_increment( &weak_count_ );\r
+ }\r
+\r
+ void weak_release() // nothrow\r
+ {\r
+ if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 )\r
+ {\r
+ destroy();\r
+ }\r
+ }\r
+\r
+ long use_count() const // nothrow\r
+ {\r
+ spinlock_pool<1>::scoped_lock lock( &use_count_ );\r
+ return use_count_;\r
+ }\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+// detail/sp_counted_base_sync.hpp - g++ 4.1+ __sync intrinsics\r
+//\r
+// Copyright (c) 2007 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt\r
+\r
+#include <boost/detail/sp_typeinfo.hpp>\r
+#include <limits.h>\r
+\r
+#if defined( __ia64__ ) && defined( __INTEL_COMPILER )\r
+# include <ia64intrin.h>\r
+#endif\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+#if INT_MAX >= 2147483647\r
+\r
+typedef int sp_int32_t;\r
+\r
+#else\r
+\r
+typedef long sp_int32_t;\r
+\r
+#endif\r
+\r
+inline void atomic_increment( sp_int32_t * pw )\r
+{\r
+ __sync_fetch_and_add( pw, 1 );\r
+}\r
+\r
+inline sp_int32_t atomic_decrement( sp_int32_t * pw )\r
+{\r
+ return __sync_fetch_and_add( pw, -1 );\r
+}\r
+\r
+inline sp_int32_t atomic_conditional_increment( sp_int32_t * pw )\r
+{\r
+ // long r = *pw;\r
+ // if( r != 0 ) ++*pw;\r
+ // return r;\r
+\r
+ sp_int32_t r = *pw;\r
+\r
+ for( ;; )\r
+ {\r
+ if( r == 0 )\r
+ {\r
+ return r;\r
+ }\r
+\r
+ sp_int32_t r2 = __sync_val_compare_and_swap( pw, r, r + 1 );\r
+\r
+ if( r2 == r )\r
+ {\r
+ return r;\r
+ }\r
+ else\r
+ {\r
+ r = r2;\r
+ }\r
+ } \r
+}\r
+\r
+class sp_counted_base\r
+{\r
+private:\r
+\r
+ sp_counted_base( sp_counted_base const & );\r
+ sp_counted_base & operator= ( sp_counted_base const & );\r
+\r
+ sp_int32_t use_count_; // #shared\r
+ sp_int32_t weak_count_; // #weak + (#shared != 0)\r
+\r
+public:\r
+\r
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )\r
+ {\r
+ }\r
+\r
+ virtual ~sp_counted_base() // nothrow\r
+ {\r
+ }\r
+\r
+ // dispose() is called when use_count_ drops to zero, to release\r
+ // the resources managed by *this.\r
+\r
+ virtual void dispose() = 0; // nothrow\r
+\r
+ // destroy() is called when weak_count_ drops to zero.\r
+\r
+ virtual void destroy() // nothrow\r
+ {\r
+ delete this;\r
+ }\r
+\r
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;\r
+\r
+ void add_ref_copy()\r
+ {\r
+ atomic_increment( &use_count_ );\r
+ }\r
+\r
+ bool add_ref_lock() // true on success\r
+ {\r
+ return atomic_conditional_increment( &use_count_ ) != 0;\r
+ }\r
+\r
+ void release() // nothrow\r
+ {\r
+ if( atomic_decrement( &use_count_ ) == 1 )\r
+ {\r
+ dispose();\r
+ weak_release();\r
+ }\r
+ }\r
+\r
+ void weak_add_ref() // nothrow\r
+ {\r
+ atomic_increment( &weak_count_ );\r
+ }\r
+\r
+ void weak_release() // nothrow\r
+ {\r
+ if( atomic_decrement( &weak_count_ ) == 1 )\r
+ {\r
+ destroy();\r
+ }\r
+ }\r
+\r
+ long use_count() const // nothrow\r
+ {\r
+ return const_cast< sp_int32_t const volatile & >( use_count_ );\r
+ }\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// detail/sp_counted_base_w32.hpp\r
+//\r
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.\r
+// Copyright 2004-2005 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+//\r
+// Lock-free algorithm by Alexander Terekhov\r
+//\r
+// Thanks to Ben Hitchings for the #weak + (#shared != 0)\r
+// formulation\r
+//\r
+\r
+#include <boost/detail/interlocked.hpp>\r
+#include <boost/detail/workaround.hpp>\r
+#include <boost/detail/sp_typeinfo.hpp>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class sp_counted_base\r
+{\r
+private:\r
+\r
+ sp_counted_base( sp_counted_base const & );\r
+ sp_counted_base & operator= ( sp_counted_base const & );\r
+\r
+ long use_count_; // #shared\r
+ long weak_count_; // #weak + (#shared != 0)\r
+\r
+public:\r
+\r
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )\r
+ {\r
+ }\r
+\r
+ virtual ~sp_counted_base() // nothrow\r
+ {\r
+ }\r
+\r
+ // dispose() is called when use_count_ drops to zero, to release\r
+ // the resources managed by *this.\r
+\r
+ virtual void dispose() = 0; // nothrow\r
+\r
+ // destroy() is called when weak_count_ drops to zero.\r
+\r
+ virtual void destroy() // nothrow\r
+ {\r
+ delete this;\r
+ }\r
+\r
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;\r
+\r
+ void add_ref_copy()\r
+ {\r
+ BOOST_INTERLOCKED_INCREMENT( &use_count_ );\r
+ }\r
+\r
+ bool add_ref_lock() // true on success\r
+ {\r
+ for( ;; )\r
+ {\r
+ long tmp = static_cast< long const volatile& >( use_count_ );\r
+ if( tmp == 0 ) return false;\r
+\r
+#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1200 )\r
+\r
+ // work around a code generation bug\r
+\r
+ long tmp2 = tmp + 1;\r
+ if( BOOST_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp2, tmp ) == tmp2 - 1 ) return true;\r
+\r
+#else\r
+\r
+ if( BOOST_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp + 1, tmp ) == tmp ) return true;\r
+\r
+#endif\r
+ }\r
+ }\r
+\r
+ void release() // nothrow\r
+ {\r
+ if( BOOST_INTERLOCKED_DECREMENT( &use_count_ ) == 0 )\r
+ {\r
+ dispose();\r
+ weak_release();\r
+ }\r
+ }\r
+\r
+ void weak_add_ref() // nothrow\r
+ {\r
+ BOOST_INTERLOCKED_INCREMENT( &weak_count_ );\r
+ }\r
+\r
+ void weak_release() // nothrow\r
+ {\r
+ if( BOOST_INTERLOCKED_DECREMENT( &weak_count_ ) == 0 )\r
+ {\r
+ destroy();\r
+ }\r
+ }\r
+\r
+ long use_count() const // nothrow\r
+ {\r
+ return static_cast<long const volatile &>( use_count_ );\r
+ }\r
+};\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// detail/sp_counted_impl.hpp\r
+//\r
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.\r
+// Copyright 2004-2005 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <boost/config.hpp>\r
+\r
+#if defined(BOOST_SP_USE_STD_ALLOCATOR) && defined(BOOST_SP_USE_QUICK_ALLOCATOR)\r
+# error BOOST_SP_USE_STD_ALLOCATOR and BOOST_SP_USE_QUICK_ALLOCATOR are incompatible.\r
+#endif\r
+\r
+#include <boost/checked_delete.hpp>\r
+#include <boost/smart_ptr/detail/sp_counted_base.hpp>\r
+\r
+#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)\r
+#error GMX_REMOVED: #include <boost/smart_ptr/detail/quick_allocator.hpp>\r
+#endif\r
+\r
+#if defined(BOOST_SP_USE_STD_ALLOCATOR)\r
+#include <memory> // std::allocator\r
+#endif\r
+\r
+#include <cstddef> // std::size_t\r
+\r
+namespace boost\r
+{\r
+\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+\r
+void sp_scalar_constructor_hook( void * px, std::size_t size, void * pn );\r
+void sp_scalar_destructor_hook( void * px, std::size_t size, void * pn );\r
+\r
+#endif\r
+\r
+namespace detail\r
+{\r
+\r
+template<class X> class sp_counted_impl_p: public sp_counted_base\r
+{\r
+private:\r
+\r
+ X * px_;\r
+\r
+ sp_counted_impl_p( sp_counted_impl_p const & );\r
+ sp_counted_impl_p & operator= ( sp_counted_impl_p const & );\r
+\r
+ typedef sp_counted_impl_p<X> this_type;\r
+\r
+public:\r
+\r
+ explicit sp_counted_impl_p( X * px ): px_( px )\r
+ {\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ boost::sp_scalar_constructor_hook( px, sizeof(X), this );\r
+#endif\r
+ }\r
+\r
+ virtual void dispose() // nothrow\r
+ {\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+ boost::sp_scalar_destructor_hook( px_, sizeof(X), this );\r
+#endif\r
+ boost::checked_delete( px_ );\r
+ }\r
+\r
+ virtual void * get_deleter( detail::sp_typeinfo const & )\r
+ {\r
+ return 0;\r
+ }\r
+\r
+#if defined(BOOST_SP_USE_STD_ALLOCATOR)\r
+\r
+ void * operator new( std::size_t )\r
+ {\r
+ return std::allocator<this_type>().allocate( 1, static_cast<this_type *>(0) );\r
+ }\r
+\r
+ void operator delete( void * p )\r
+ {\r
+ std::allocator<this_type>().deallocate( static_cast<this_type *>(p), 1 );\r
+ }\r
+\r
+#endif\r
+\r
+#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)\r
+\r
+ void * operator new( std::size_t )\r
+ {\r
+ return quick_allocator<this_type>::alloc();\r
+ }\r
+\r
+ void operator delete( void * p )\r
+ {\r
+ quick_allocator<this_type>::dealloc( p );\r
+ }\r
+\r
+#endif\r
+};\r
+\r
+//\r
+// Borland's Codeguard trips up over the -Vx- option here:\r
+//\r
+#ifdef __CODEGUARD__\r
+# pragma option push -Vx-\r
+#endif\r
+\r
+template<class P, class D> class sp_counted_impl_pd: public sp_counted_base\r
+{\r
+private:\r
+\r
+ P ptr; // copy constructor must not throw\r
+ D del; // copy constructor must not throw\r
+\r
+ sp_counted_impl_pd( sp_counted_impl_pd const & );\r
+ sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & );\r
+\r
+ typedef sp_counted_impl_pd<P, D> this_type;\r
+\r
+public:\r
+\r
+ // pre: d(p) must not throw\r
+\r
+ sp_counted_impl_pd( P p, D d ): ptr(p), del(d)\r
+ {\r
+ }\r
+\r
+ virtual void dispose() // nothrow\r
+ {\r
+ del( ptr );\r
+ }\r
+\r
+ virtual void * get_deleter( detail::sp_typeinfo const & ti )\r
+ {\r
+ return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast<char&>( del ): 0;\r
+ }\r
+\r
+#if defined(BOOST_SP_USE_STD_ALLOCATOR)\r
+\r
+ void * operator new( std::size_t )\r
+ {\r
+ return std::allocator<this_type>().allocate( 1, static_cast<this_type *>(0) );\r
+ }\r
+\r
+ void operator delete( void * p )\r
+ {\r
+ std::allocator<this_type>().deallocate( static_cast<this_type *>(p), 1 );\r
+ }\r
+\r
+#endif\r
+\r
+#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)\r
+\r
+ void * operator new( std::size_t )\r
+ {\r
+ return quick_allocator<this_type>::alloc();\r
+ }\r
+\r
+ void operator delete( void * p )\r
+ {\r
+ quick_allocator<this_type>::dealloc( p );\r
+ }\r
+\r
+#endif\r
+};\r
+\r
+template<class P, class D, class A> class sp_counted_impl_pda: public sp_counted_base\r
+{\r
+private:\r
+\r
+ P p_; // copy constructor must not throw\r
+ D d_; // copy constructor must not throw\r
+ A a_; // copy constructor must not throw\r
+\r
+ sp_counted_impl_pda( sp_counted_impl_pda const & );\r
+ sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & );\r
+\r
+ typedef sp_counted_impl_pda<P, D, A> this_type;\r
+\r
+public:\r
+\r
+ // pre: d( p ) must not throw\r
+\r
+ sp_counted_impl_pda( P p, D d, A a ): p_( p ), d_( d ), a_( a )\r
+ {\r
+ }\r
+\r
+ virtual void dispose() // nothrow\r
+ {\r
+ d_( p_ );\r
+ }\r
+\r
+ virtual void destroy() // nothrow\r
+ {\r
+ typedef typename A::template rebind< this_type >::other A2;\r
+\r
+ A2 a2( a_ );\r
+\r
+ this->~this_type();\r
+ a2.deallocate( this, 1 );\r
+ }\r
+\r
+ virtual void * get_deleter( detail::sp_typeinfo const & ti )\r
+ {\r
+ return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast<char&>( d_ ): 0;\r
+ }\r
+};\r
+\r
+#ifdef __CODEGUARD__\r
+# pragma option pop\r
+#endif\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/smart_ptr/detail/sp_has_sync.hpp\r
+//\r
+// Copyright (c) 2008, 2009 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// Defines the BOOST_SP_HAS_SYNC macro if the __sync_* intrinsics\r
+// are available.\r
+//\r
+\r
+#if defined(__GNUC__) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 )\r
+\r
+#define BOOST_SP_HAS_SYNC\r
+\r
+#if defined( __arm__ ) || defined( __armel__ )\r
+#undef BOOST_SP_HAS_SYNC\r
+#endif\r
+\r
+#if defined( __hppa ) || defined( __hppa__ )\r
+#undef BOOST_SP_HAS_SYNC\r
+#endif\r
+\r
+#if defined( __m68k__ )\r
+#undef BOOST_SP_HAS_SYNC\r
+#endif\r
+\r
+#if defined( __sparc__ )\r
+#undef BOOST_SP_HAS_SYNC\r
+#endif\r
+\r
+#if defined( __INTEL_COMPILER ) && !defined( __ia64__ ) && ( __INTEL_COMPILER < 1100 )\r
+#undef BOOST_SP_HAS_SYNC\r
+#endif\r
+\r
+#endif // __GNUC__ * 100 + __GNUC_MINOR__ >= 401\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/detail/spinlock.hpp\r
+//\r
+// Copyright (c) 2008 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// struct spinlock\r
+// {\r
+// void lock();\r
+// bool try_lock();\r
+// void unlock();\r
+//\r
+// class scoped_lock;\r
+// };\r
+//\r
+// #define BOOST_DETAIL_SPINLOCK_INIT <unspecified>\r
+//\r
+\r
+#include <boost/config.hpp>\r
+#include <boost/smart_ptr/detail/sp_has_sync.hpp>\r
+\r
+#if defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ )\r
+# include <boost/smart_ptr/detail/spinlock_gcc_arm.hpp>\r
+\r
+#elif defined( BOOST_SP_HAS_SYNC )\r
+# include <boost/smart_ptr/detail/spinlock_sync.hpp>\r
+\r
+#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)\r
+# include <boost/smart_ptr/detail/spinlock_w32.hpp>\r
+\r
+#elif defined(BOOST_HAS_PTHREADS)\r
+# include <boost/smart_ptr/detail/spinlock_pt.hpp>\r
+\r
+#elif !defined(BOOST_HAS_THREADS)\r
+# include <boost/smart_ptr/detail/spinlock_nt.hpp>\r
+\r
+#else\r
+# error Unrecognized threading platform\r
+#endif\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED\r
+\r
+//\r
+// Copyright (c) 2008 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <boost/smart_ptr/detail/yield_k.hpp>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class spinlock\r
+{\r
+public:\r
+\r
+ int v_;\r
+\r
+public:\r
+\r
+ bool try_lock()\r
+ {\r
+ int r;\r
+\r
+ __asm__ __volatile__(\r
+ "swp %0, %1, [%2]":\r
+ "=&r"( r ): // outputs\r
+ "r"( 1 ), "r"( &v_ ): // inputs\r
+ "memory", "cc" );\r
+\r
+ return r == 0;\r
+ }\r
+\r
+ void lock()\r
+ {\r
+ for( unsigned k = 0; !try_lock(); ++k )\r
+ {\r
+ boost::detail::yield( k );\r
+ }\r
+ }\r
+\r
+ void unlock()\r
+ {\r
+ __asm__ __volatile__( "" ::: "memory" );\r
+ *const_cast< int volatile* >( &v_ ) = 0;\r
+ }\r
+\r
+public:\r
+\r
+ class scoped_lock\r
+ {\r
+ private:\r
+\r
+ spinlock & sp_;\r
+\r
+ scoped_lock( scoped_lock const & );\r
+ scoped_lock & operator=( scoped_lock const & );\r
+\r
+ public:\r
+\r
+ explicit scoped_lock( spinlock & sp ): sp_( sp )\r
+ {\r
+ sp.lock();\r
+ }\r
+\r
+ ~scoped_lock()\r
+ {\r
+ sp_.unlock();\r
+ }\r
+ };\r
+};\r
+\r
+} // namespace detail\r
+} // namespace boost\r
+\r
+#define BOOST_DETAIL_SPINLOCK_INIT {0}\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// Copyright (c) 2008 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <boost/assert.hpp>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class spinlock\r
+{\r
+public:\r
+\r
+ bool locked_;\r
+\r
+public:\r
+\r
+ inline bool try_lock()\r
+ {\r
+ if( locked_ )\r
+ {\r
+ return false;\r
+ }\r
+ else\r
+ {\r
+ locked_ = true;\r
+ return true;\r
+ }\r
+ }\r
+\r
+ inline void lock()\r
+ {\r
+ BOOST_ASSERT( !locked_ );\r
+ locked_ = true;\r
+ }\r
+\r
+ inline void unlock()\r
+ {\r
+ BOOST_ASSERT( locked_ );\r
+ locked_ = false;\r
+ }\r
+\r
+public:\r
+\r
+ class scoped_lock\r
+ {\r
+ private:\r
+\r
+ spinlock & sp_;\r
+\r
+ scoped_lock( scoped_lock const & );\r
+ scoped_lock & operator=( scoped_lock const & );\r
+\r
+ public:\r
+\r
+ explicit scoped_lock( spinlock & sp ): sp_( sp )\r
+ {\r
+ sp.lock();\r
+ }\r
+\r
+ ~scoped_lock()\r
+ {\r
+ sp_.unlock();\r
+ }\r
+ };\r
+};\r
+\r
+} // namespace detail\r
+} // namespace boost\r
+\r
+#define BOOST_DETAIL_SPINLOCK_INIT { false }\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_POOL_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SPINLOCK_POOL_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/detail/spinlock_pool.hpp\r
+//\r
+// Copyright (c) 2008 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// spinlock_pool<0> is reserved for atomic<>, when/if it arrives\r
+// spinlock_pool<1> is reserved for shared_ptr reference counts\r
+// spinlock_pool<2> is reserved for shared_ptr atomic access\r
+//\r
+\r
+#include <boost/config.hpp>\r
+#include <boost/smart_ptr/detail/spinlock.hpp>\r
+#include <cstddef>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+template< int I > class spinlock_pool\r
+{\r
+private:\r
+\r
+ static spinlock pool_[ 41 ];\r
+\r
+public:\r
+\r
+ static spinlock & spinlock_for( void const * pv )\r
+ {\r
+ std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41;\r
+ return pool_[ i ];\r
+ }\r
+\r
+ class scoped_lock\r
+ {\r
+ private:\r
+\r
+ spinlock & sp_;\r
+\r
+ scoped_lock( scoped_lock const & );\r
+ scoped_lock & operator=( scoped_lock const & );\r
+\r
+ public:\r
+\r
+ explicit scoped_lock( void const * pv ): sp_( spinlock_for( pv ) )\r
+ {\r
+ sp_.lock();\r
+ }\r
+\r
+ ~scoped_lock()\r
+ {\r
+ sp_.unlock();\r
+ }\r
+ };\r
+};\r
+\r
+template< int I > spinlock spinlock_pool< I >::pool_[ 41 ] =\r
+{\r
+ BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, \r
+ BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, \r
+ BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, \r
+ BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, \r
+ BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, \r
+ BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, \r
+ BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, \r
+ BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, \r
+ BOOST_DETAIL_SPINLOCK_INIT\r
+};\r
+\r
+} // namespace detail\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_POOL_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_PT_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SPINLOCK_PT_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// Copyright (c) 2008 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <pthread.h>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class spinlock\r
+{\r
+public:\r
+\r
+ pthread_mutex_t v_;\r
+\r
+public:\r
+\r
+ bool try_lock()\r
+ {\r
+ return pthread_mutex_trylock( &v_ ) == 0;\r
+ }\r
+\r
+ void lock()\r
+ {\r
+ pthread_mutex_lock( &v_ );\r
+ }\r
+\r
+ void unlock()\r
+ {\r
+ pthread_mutex_unlock( &v_ );\r
+ }\r
+\r
+public:\r
+\r
+ class scoped_lock\r
+ {\r
+ private:\r
+\r
+ spinlock & sp_;\r
+\r
+ scoped_lock( scoped_lock const & );\r
+ scoped_lock & operator=( scoped_lock const & );\r
+\r
+ public:\r
+\r
+ explicit scoped_lock( spinlock & sp ): sp_( sp )\r
+ {\r
+ sp.lock();\r
+ }\r
+\r
+ ~scoped_lock()\r
+ {\r
+ sp_.unlock();\r
+ }\r
+ };\r
+};\r
+\r
+} // namespace detail\r
+} // namespace boost\r
+\r
+#define BOOST_DETAIL_SPINLOCK_INIT { PTHREAD_MUTEX_INITIALIZER }\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_PT_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_SYNC_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SPINLOCK_SYNC_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// Copyright (c) 2008 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <boost/smart_ptr/detail/yield_k.hpp>\r
+\r
+#if defined( __ia64__ ) && defined( __INTEL_COMPILER )\r
+# include <ia64intrin.h>\r
+#endif\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class spinlock\r
+{\r
+public:\r
+\r
+ int v_;\r
+\r
+public:\r
+\r
+ bool try_lock()\r
+ {\r
+ int r = __sync_lock_test_and_set( &v_, 1 );\r
+ return r == 0;\r
+ }\r
+\r
+ void lock()\r
+ {\r
+ for( unsigned k = 0; !try_lock(); ++k )\r
+ {\r
+ boost::detail::yield( k );\r
+ }\r
+ }\r
+\r
+ void unlock()\r
+ {\r
+ __sync_lock_release( &v_ );\r
+ }\r
+\r
+public:\r
+\r
+ class scoped_lock\r
+ {\r
+ private:\r
+\r
+ spinlock & sp_;\r
+\r
+ scoped_lock( scoped_lock const & );\r
+ scoped_lock & operator=( scoped_lock const & );\r
+\r
+ public:\r
+\r
+ explicit scoped_lock( spinlock & sp ): sp_( sp )\r
+ {\r
+ sp.lock();\r
+ }\r
+\r
+ ~scoped_lock()\r
+ {\r
+ sp_.unlock();\r
+ }\r
+ };\r
+};\r
+\r
+} // namespace detail\r
+} // namespace boost\r
+\r
+#define BOOST_DETAIL_SPINLOCK_INIT {0}\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_SYNC_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_W32_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_SPINLOCK_W32_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// Copyright (c) 2008 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#include <boost/detail/interlocked.hpp>\r
+#include <boost/smart_ptr/detail/yield_k.hpp>\r
+\r
+// BOOST_COMPILER_FENCE\r
+\r
+#if defined(__INTEL_COMPILER)\r
+\r
+#define BOOST_COMPILER_FENCE __memory_barrier();\r
+\r
+#elif defined( _MSC_VER ) && _MSC_VER >= 1310\r
+\r
+extern "C" void _ReadWriteBarrier();\r
+#pragma intrinsic( _ReadWriteBarrier )\r
+\r
+#define BOOST_COMPILER_FENCE _ReadWriteBarrier();\r
+\r
+#elif defined(__GNUC__)\r
+\r
+#define BOOST_COMPILER_FENCE __asm__ __volatile__( "" : : : "memory" );\r
+\r
+#else\r
+\r
+#define BOOST_COMPILER_FENCE\r
+\r
+#endif\r
+\r
+//\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+class spinlock\r
+{\r
+public:\r
+\r
+ long v_;\r
+\r
+public:\r
+\r
+ bool try_lock()\r
+ {\r
+ long r = BOOST_INTERLOCKED_EXCHANGE( &v_, 1 );\r
+\r
+ BOOST_COMPILER_FENCE\r
+\r
+ return r == 0;\r
+ }\r
+\r
+ void lock()\r
+ {\r
+ for( unsigned k = 0; !try_lock(); ++k )\r
+ {\r
+ boost::detail::yield( k );\r
+ }\r
+ }\r
+\r
+ void unlock()\r
+ {\r
+ BOOST_COMPILER_FENCE\r
+ *const_cast< long volatile* >( &v_ ) = 0;\r
+ }\r
+\r
+public:\r
+\r
+ class scoped_lock\r
+ {\r
+ private:\r
+\r
+ spinlock & sp_;\r
+\r
+ scoped_lock( scoped_lock const & );\r
+ scoped_lock & operator=( scoped_lock const & );\r
+\r
+ public:\r
+\r
+ explicit scoped_lock( spinlock & sp ): sp_( sp )\r
+ {\r
+ sp.lock();\r
+ }\r
+\r
+ ~scoped_lock()\r
+ {\r
+ sp_.unlock();\r
+ }\r
+ };\r
+};\r
+\r
+} // namespace detail\r
+} // namespace boost\r
+\r
+#define BOOST_DETAIL_SPINLOCK_INIT {0}\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_W32_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// yield_k.hpp\r
+//\r
+// Copyright (c) 2008 Peter Dimov\r
+//\r
+// void yield( unsigned k );\r
+//\r
+// Typical use:\r
+//\r
+// for( unsigned k = 0; !try_lock(); ++k ) yield( k );\r
+//\r
+// Distributed under the Boost Software License, Version 1.0.\r
+// See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt\r
+//\r
+\r
+#include <boost/config.hpp>\r
+\r
+// BOOST_SMT_PAUSE\r
+\r
+#if defined(_MSC_VER) && _MSC_VER >= 1310 && ( defined(_M_IX86) || defined(_M_X64) )\r
+\r
+extern "C" void _mm_pause();\r
+#pragma intrinsic( _mm_pause )\r
+\r
+#define BOOST_SMT_PAUSE _mm_pause();\r
+\r
+#elif defined(__GNUC__) && ( defined(__i386__) || defined(__x86_64__) )\r
+\r
+#define BOOST_SMT_PAUSE __asm__ __volatile__( "rep; nop" : : : "memory" );\r
+\r
+#endif\r
+\r
+//\r
+\r
+#if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )\r
+\r
+#if defined( BOOST_USE_WINDOWS_H )\r
+# include <windows.h>\r
+#endif\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+#if !defined( BOOST_USE_WINDOWS_H )\r
+ extern "C" void __stdcall Sleep( unsigned long ms );\r
+#endif\r
+\r
+inline void yield( unsigned k )\r
+{\r
+ if( k < 4 )\r
+ {\r
+ }\r
+#if defined( BOOST_SMT_PAUSE )\r
+ else if( k < 16 )\r
+ {\r
+ BOOST_SMT_PAUSE\r
+ }\r
+#endif\r
+ else if( k < 32 )\r
+ {\r
+ Sleep( 0 );\r
+ }\r
+ else\r
+ {\r
+ Sleep( 1 );\r
+ }\r
+}\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#elif defined( BOOST_HAS_PTHREADS )\r
+\r
+#include <sched.h>\r
+#include <time.h>\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+inline void yield( unsigned k )\r
+{\r
+ if( k < 4 )\r
+ {\r
+ }\r
+#if defined( BOOST_SMT_PAUSE )\r
+ else if( k < 16 )\r
+ {\r
+ BOOST_SMT_PAUSE\r
+ }\r
+#endif\r
+ else if( k < 32 || k & 1 )\r
+ {\r
+ sched_yield();\r
+ }\r
+ else\r
+ {\r
+ // g++ -Wextra warns on {} or {0}\r
+ struct timespec rqtp = { 0, 0 };\r
+\r
+ // POSIX says that timespec has tv_sec and tv_nsec\r
+ // But it doesn't guarantee order or placement\r
+\r
+ rqtp.tv_sec = 0;\r
+ rqtp.tv_nsec = 1000;\r
+\r
+ nanosleep( &rqtp, 0 );\r
+ }\r
+}\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#else\r
+\r
+namespace boost\r
+{\r
+\r
+namespace detail\r
+{\r
+\r
+inline void yield( unsigned )\r
+{\r
+}\r
+\r
+} // namespace detail\r
+\r
+} // namespace boost\r
+\r
+#endif\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED\r
+#define BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED\r
+\r
+//\r
+// shared_ptr.hpp\r
+//\r
+// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.\r
+// Copyright (c) 2001-2008 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation.\r
+//\r
+\r
+#include <boost/config.hpp> // for broken compiler workarounds\r
+\r
+#if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)\r
+#include <boost/smart_ptr/detail/shared_ptr_nmt.hpp>\r
+#else\r
+\r
+// In order to avoid circular dependencies with Boost.TR1\r
+// we make sure that our include of <memory> doesn't try to\r
+// pull in the TR1 headers: that's why we use this header \r
+// rather than including <memory> directly:\r
+#include <boost/config/no_tr1/memory.hpp> // std::auto_ptr\r
+\r
+#include <boost/assert.hpp>\r
+#include <boost/checked_delete.hpp>\r
+#include <boost/throw_exception.hpp>\r
+#include <boost/smart_ptr/detail/shared_count.hpp>\r
+#include <boost/detail/workaround.hpp>\r
+#include <boost/smart_ptr/detail/sp_convertible.hpp>\r
+\r
+#if !defined(BOOST_SP_NO_ATOMIC_ACCESS)\r
+#include <boost/smart_ptr/detail/spinlock_pool.hpp>\r
+#include <boost/memory_order.hpp>\r
+#endif\r
+\r
+#include <algorithm> // for std::swap\r
+#include <functional> // for std::less\r
+#include <typeinfo> // for std::bad_cast\r
+\r
+#if !defined(BOOST_NO_IOSTREAM)\r
+#if !defined(BOOST_NO_IOSFWD)\r
+#include <iosfwd> // for std::basic_ostream\r
+#else\r
+#include <ostream>\r
+#endif\r
+#endif\r
+\r
+#ifdef BOOST_MSVC // moved here to work around VC++ compiler crash\r
+# pragma warning(push)\r
+# pragma warning(disable:4284) // odd return type for operator->\r
+#endif\r
+\r
+namespace boost\r
+{\r
+\r
+template<class T> class shared_ptr;\r
+template<class T> class weak_ptr;\r
+template<class T> class enable_shared_from_this;\r
+template<class T> class enable_shared_from_this2;\r
+\r
+namespace detail\r
+{\r
+\r
+struct static_cast_tag {};\r
+struct const_cast_tag {};\r
+struct dynamic_cast_tag {};\r
+struct polymorphic_cast_tag {};\r
+\r
+template<class T> struct shared_ptr_traits\r
+{\r
+ typedef T & reference;\r
+};\r
+\r
+template<> struct shared_ptr_traits<void>\r
+{\r
+ typedef void reference;\r
+};\r
+\r
+#if !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)\r
+\r
+template<> struct shared_ptr_traits<void const>\r
+{\r
+ typedef void reference;\r
+};\r
+\r
+template<> struct shared_ptr_traits<void volatile>\r
+{\r
+ typedef void reference;\r
+};\r
+\r
+template<> struct shared_ptr_traits<void const volatile>\r
+{\r
+ typedef void reference;\r
+};\r
+\r
+#endif\r
+\r
+// enable_shared_from_this support\r
+\r
+template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr<X> const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe )\r
+{\r
+ if( pe != 0 )\r
+ {\r
+ pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) );\r
+ }\r
+}\r
+\r
+template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_this2< T > const * pe )\r
+{\r
+ if( pe != 0 )\r
+ {\r
+ pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) );\r
+ }\r
+}\r
+\r
+#ifdef _MANAGED\r
+\r
+// Avoid C4793, ... causes native code generation\r
+\r
+struct sp_any_pointer\r
+{\r
+ template<class T> sp_any_pointer( T* ) {}\r
+};\r
+\r
+inline void sp_enable_shared_from_this( sp_any_pointer, sp_any_pointer, sp_any_pointer )\r
+{\r
+}\r
+\r
+#else // _MANAGED\r
+\r
+inline void sp_enable_shared_from_this( ... )\r
+{\r
+}\r
+\r
+#endif // _MANAGED\r
+\r
+#if !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( BOOST_NO_AUTO_PTR )\r
+\r
+// rvalue auto_ptr support based on a technique by Dave Abrahams\r
+\r
+template< class T, class R > struct sp_enable_if_auto_ptr\r
+{\r
+};\r
+\r
+template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R >\r
+{\r
+ typedef R type;\r
+}; \r
+\r
+#endif\r
+\r
+} // namespace detail\r
+\r
+\r
+//\r
+// shared_ptr\r
+//\r
+// An enhanced relative of scoped_ptr with reference counted copy semantics.\r
+// The object pointed to is deleted when the last shared_ptr pointing to it\r
+// is destroyed or reset.\r
+//\r
+\r
+template<class T> class shared_ptr\r
+{\r
+private:\r
+\r
+ // Borland 5.5.1 specific workaround\r
+ typedef shared_ptr<T> this_type;\r
+\r
+public:\r
+\r
+ typedef T element_type;\r
+ typedef T value_type;\r
+ typedef T * pointer;\r
+ typedef typename boost::detail::shared_ptr_traits<T>::reference reference;\r
+\r
+ shared_ptr(): px(0), pn() // never throws in 1.30+\r
+ {\r
+ }\r
+\r
+ template<class Y>\r
+ explicit shared_ptr( Y * p ): px( p ), pn( p ) // Y must be complete\r
+ {\r
+ boost::detail::sp_enable_shared_from_this( this, p, p );\r
+ }\r
+\r
+ //\r
+ // Requirements: D's copy constructor must not throw\r
+ //\r
+ // shared_ptr will release p by calling d(p)\r
+ //\r
+\r
+ template<class Y, class D> shared_ptr(Y * p, D d): px(p), pn(p, d)\r
+ {\r
+ boost::detail::sp_enable_shared_from_this( this, p, p );\r
+ }\r
+\r
+ // As above, but with allocator. A's copy constructor shall not throw.\r
+\r
+ template<class Y, class D, class A> shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a )\r
+ {\r
+ boost::detail::sp_enable_shared_from_this( this, p, p );\r
+ }\r
+\r
+// generated copy constructor, destructor are fine\r
+\r
+ template<class Y>\r
+ explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn) // may throw\r
+ {\r
+ // it is now safe to copy r.px, as pn(r.pn) did not throw\r
+ px = r.px;\r
+ }\r
+\r
+ template<class Y>\r
+ shared_ptr( weak_ptr<Y> const & r, boost::detail::sp_nothrow_tag ): px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) // never throws\r
+ {\r
+ if( !pn.empty() )\r
+ {\r
+ px = r.px;\r
+ }\r
+ }\r
+\r
+ template<class Y>\r
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )\r
+\r
+ shared_ptr( shared_ptr<Y> const & r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() )\r
+\r
+#else\r
+\r
+ shared_ptr( shared_ptr<Y> const & r )\r
+\r
+#endif\r
+ : px( r.px ), pn( r.pn ) // never throws\r
+ {\r
+ }\r
+\r
+ // aliasing\r
+ template< class Y >\r
+ shared_ptr( shared_ptr<Y> const & r, T * p ): px( p ), pn( r.pn ) // never throws\r
+ {\r
+ }\r
+\r
+ template<class Y>\r
+ shared_ptr(shared_ptr<Y> const & r, boost::detail::static_cast_tag): px(static_cast<element_type *>(r.px)), pn(r.pn)\r
+ {\r
+ }\r
+\r
+ template<class Y>\r
+ shared_ptr(shared_ptr<Y> const & r, boost::detail::const_cast_tag): px(const_cast<element_type *>(r.px)), pn(r.pn)\r
+ {\r
+ }\r
+\r
+ template<class Y>\r
+ shared_ptr(shared_ptr<Y> const & r, boost::detail::dynamic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn)\r
+ {\r
+ if(px == 0) // need to allocate new counter -- the cast failed\r
+ {\r
+ pn = boost::detail::shared_count();\r
+ }\r
+ }\r
+\r
+ template<class Y>\r
+ shared_ptr(shared_ptr<Y> const & r, boost::detail::polymorphic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn)\r
+ {\r
+ if(px == 0)\r
+ {\r
+ boost::throw_exception(std::bad_cast());\r
+ }\r
+ }\r
+\r
+#ifndef BOOST_NO_AUTO_PTR\r
+\r
+ template<class Y>\r
+ explicit shared_ptr(std::auto_ptr<Y> & r): px(r.get()), pn()\r
+ {\r
+ Y * tmp = r.get();\r
+ pn = boost::detail::shared_count(r);\r
+ boost::detail::sp_enable_shared_from_this( this, tmp, tmp );\r
+ }\r
+\r
+#if !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )\r
+\r
+ template<class Ap>\r
+ explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr<Ap, int>::type = 0 ): px( r.get() ), pn()\r
+ {\r
+ typename Ap::element_type * tmp = r.get();\r
+ pn = boost::detail::shared_count( r );\r
+ boost::detail::sp_enable_shared_from_this( this, tmp, tmp );\r
+ }\r
+\r
+\r
+#endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION\r
+\r
+#endif // BOOST_NO_AUTO_PTR\r
+\r
+ // assignment\r
+\r
+ shared_ptr & operator=( shared_ptr const & r ) // never throws\r
+ {\r
+ this_type(r).swap(*this);\r
+ return *this;\r
+ }\r
+\r
+#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400)\r
+\r
+ template<class Y>\r
+ shared_ptr & operator=(shared_ptr<Y> const & r) // never throws\r
+ {\r
+ this_type(r).swap(*this);\r
+ return *this;\r
+ }\r
+\r
+#endif\r
+\r
+#ifndef BOOST_NO_AUTO_PTR\r
+\r
+ template<class Y>\r
+ shared_ptr & operator=( std::auto_ptr<Y> & r )\r
+ {\r
+ this_type(r).swap(*this);\r
+ return *this;\r
+ }\r
+\r
+#if !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )\r
+\r
+ template<class Ap>\r
+ typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r )\r
+ {\r
+ this_type( r ).swap( *this );\r
+ return *this;\r
+ }\r
+\r
+\r
+#endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION\r
+\r
+#endif // BOOST_NO_AUTO_PTR\r
+\r
+// Move support\r
+\r
+#if defined( BOOST_HAS_RVALUE_REFS )\r
+\r
+ shared_ptr( shared_ptr && r ): px( r.px ), pn() // never throws\r
+ {\r
+ pn.swap( r.pn );\r
+ r.px = 0;\r
+ }\r
+\r
+ template<class Y>\r
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )\r
+\r
+ shared_ptr( shared_ptr<Y> && r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() )\r
+\r
+#else\r
+\r
+ shared_ptr( shared_ptr<Y> && r )\r
+\r
+#endif\r
+ : px( r.px ), pn() // never throws\r
+ {\r
+ pn.swap( r.pn );\r
+ r.px = 0;\r
+ }\r
+\r
+ shared_ptr & operator=( shared_ptr && r ) // never throws\r
+ {\r
+ this_type( static_cast< shared_ptr && >( r ) ).swap( *this );\r
+ return *this;\r
+ }\r
+\r
+ template<class Y>\r
+ shared_ptr & operator=( shared_ptr<Y> && r ) // never throws\r
+ {\r
+ this_type( static_cast< shared_ptr<Y> && >( r ) ).swap( *this );\r
+ return *this;\r
+ }\r
+\r
+#endif\r
+\r
+ void reset() // never throws in 1.30+\r
+ {\r
+ this_type().swap(*this);\r
+ }\r
+\r
+ template<class Y> void reset(Y * p) // Y must be complete\r
+ {\r
+ BOOST_ASSERT(p == 0 || p != px); // catch self-reset errors\r
+ this_type(p).swap(*this);\r
+ }\r
+\r
+ template<class Y, class D> void reset( Y * p, D d )\r
+ {\r
+ this_type( p, d ).swap( *this );\r
+ }\r
+\r
+ template<class Y, class D, class A> void reset( Y * p, D d, A a )\r
+ {\r
+ this_type( p, d, a ).swap( *this );\r
+ }\r
+\r
+ template<class Y> void reset( shared_ptr<Y> const & r, T * p )\r
+ {\r
+ this_type( r, p ).swap( *this );\r
+ }\r
+\r
+ reference operator* () const // never throws\r
+ {\r
+ BOOST_ASSERT(px != 0);\r
+ return *px;\r
+ }\r
+\r
+ T * operator-> () const // never throws\r
+ {\r
+ BOOST_ASSERT(px != 0);\r
+ return px;\r
+ }\r
+\r
+ T * get() const // never throws\r
+ {\r
+ return px;\r
+ }\r
+\r
+// implicit conversion to "bool"\r
+#include <boost/smart_ptr/detail/operator_bool.hpp>\r
+\r
+ bool unique() const // never throws\r
+ {\r
+ return pn.unique();\r
+ }\r
+\r
+ long use_count() const // never throws\r
+ {\r
+ return pn.use_count();\r
+ }\r
+\r
+ void swap(shared_ptr<T> & other) // never throws\r
+ {\r
+ std::swap(px, other.px);\r
+ pn.swap(other.pn);\r
+ }\r
+\r
+ template<class Y> bool _internal_less(shared_ptr<Y> const & rhs) const\r
+ {\r
+ return pn < rhs.pn;\r
+ }\r
+\r
+ void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const\r
+ {\r
+ return pn.get_deleter( ti );\r
+ }\r
+\r
+ bool _internal_equiv( shared_ptr const & r ) const\r
+ {\r
+ return px == r.px && pn == r.pn;\r
+ }\r
+\r
+// Tasteless as this may seem, making all members public allows member templates\r
+// to work in the absence of member template friends. (Matthew Langston)\r
+\r
+#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS\r
+\r
+private:\r
+\r
+ template<class Y> friend class shared_ptr;\r
+ template<class Y> friend class weak_ptr;\r
+\r
+\r
+#endif\r
+\r
+ T * px; // contained pointer\r
+ boost::detail::shared_count pn; // reference counter\r
+\r
+}; // shared_ptr\r
+\r
+template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b)\r
+{\r
+ return a.get() == b.get();\r
+}\r
+\r
+template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b)\r
+{\r
+ return a.get() != b.get();\r
+}\r
+\r
+#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96\r
+\r
+// Resolve the ambiguity between our op!= and the one in rel_ops\r
+\r
+template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T> const & b)\r
+{\r
+ return a.get() != b.get();\r
+}\r
+\r
+#endif\r
+\r
+template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b)\r
+{\r
+ return a._internal_less(b);\r
+}\r
+\r
+template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b)\r
+{\r
+ a.swap(b);\r
+}\r
+\r
+template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r)\r
+{\r
+ return shared_ptr<T>(r, boost::detail::static_cast_tag());\r
+}\r
+\r
+template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r)\r
+{\r
+ return shared_ptr<T>(r, boost::detail::const_cast_tag());\r
+}\r
+\r
+template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r)\r
+{\r
+ return shared_ptr<T>(r, boost::detail::dynamic_cast_tag());\r
+}\r
+\r
+// shared_*_cast names are deprecated. Use *_pointer_cast instead.\r
+\r
+template<class T, class U> shared_ptr<T> shared_static_cast(shared_ptr<U> const & r)\r
+{\r
+ return shared_ptr<T>(r, boost::detail::static_cast_tag());\r
+}\r
+\r
+template<class T, class U> shared_ptr<T> shared_dynamic_cast(shared_ptr<U> const & r)\r
+{\r
+ return shared_ptr<T>(r, boost::detail::dynamic_cast_tag());\r
+}\r
+\r
+template<class T, class U> shared_ptr<T> shared_polymorphic_cast(shared_ptr<U> const & r)\r
+{\r
+ return shared_ptr<T>(r, boost::detail::polymorphic_cast_tag());\r
+}\r
+\r
+template<class T, class U> shared_ptr<T> shared_polymorphic_downcast(shared_ptr<U> const & r)\r
+{\r
+ BOOST_ASSERT(dynamic_cast<T *>(r.get()) == r.get());\r
+ return shared_static_cast<T>(r);\r
+}\r
+\r
+// get_pointer() enables boost::mem_fn to recognize shared_ptr\r
+\r
+template<class T> inline T * get_pointer(shared_ptr<T> const & p)\r
+{\r
+ return p.get();\r
+}\r
+\r
+// operator<<\r
+\r
+#if !defined(BOOST_NO_IOSTREAM)\r
+\r
+#if defined(BOOST_NO_TEMPLATED_IOSTREAMS) || ( defined(__GNUC__) && (__GNUC__ < 3) )\r
+\r
+template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> const & p)\r
+{\r
+ os << p.get();\r
+ return os;\r
+}\r
+\r
+#else\r
+\r
+// in STLport's no-iostreams mode no iostream symbols can be used\r
+#ifndef _STLP_NO_IOSTREAMS\r
+\r
+# if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300 && __SGI_STL_PORT)\r
+// MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL\r
+using std::basic_ostream;\r
+template<class E, class T, class Y> basic_ostream<E, T> & operator<< (basic_ostream<E, T> & os, shared_ptr<Y> const & p)\r
+# else\r
+template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p)\r
+# endif\r
+{\r
+ os << p.get();\r
+ return os;\r
+}\r
+\r
+#endif // _STLP_NO_IOSTREAMS\r
+\r
+#endif // __GNUC__ < 3\r
+\r
+#endif // !defined(BOOST_NO_IOSTREAM)\r
+\r
+// get_deleter\r
+\r
+#if ( defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) ) || \\r
+ ( defined(__EDG_VERSION__) && BOOST_WORKAROUND(__EDG_VERSION__, <= 238) ) || \\r
+ ( defined(__HP_aCC) && BOOST_WORKAROUND(__HP_aCC, <= 33500) )\r
+\r
+// g++ 2.9x doesn't allow static_cast<X const *>(void *)\r
+// apparently EDG 2.38 and HP aCC A.03.35 also don't accept it\r
+\r
+template<class D, class T> D * get_deleter(shared_ptr<T> const & p)\r
+{\r
+ void const * q = p._internal_get_deleter(BOOST_SP_TYPEID(D));\r
+ return const_cast<D *>(static_cast<D const *>(q));\r
+}\r
+\r
+#else\r
+\r
+template<class D, class T> D * get_deleter(shared_ptr<T> const & p)\r
+{\r
+ return static_cast<D *>(p._internal_get_deleter(BOOST_SP_TYPEID(D)));\r
+}\r
+\r
+#endif\r
+\r
+// atomic access\r
+\r
+#if !defined(BOOST_SP_NO_ATOMIC_ACCESS)\r
+\r
+template<class T> inline bool atomic_is_lock_free( shared_ptr<T> const * /*p*/ )\r
+{\r
+ return false;\r
+}\r
+\r
+template<class T> shared_ptr<T> atomic_load( shared_ptr<T> const * p )\r
+{\r
+ boost::detail::spinlock_pool<2>::scoped_lock lock( p );\r
+ return *p;\r
+}\r
+\r
+template<class T> inline shared_ptr<T> atomic_load_explicit( shared_ptr<T> const * p, memory_order /*mo*/ )\r
+{\r
+ return atomic_load( p );\r
+}\r
+\r
+template<class T> void atomic_store( shared_ptr<T> * p, shared_ptr<T> r )\r
+{\r
+ boost::detail::spinlock_pool<2>::scoped_lock lock( p );\r
+ p->swap( r );\r
+}\r
+\r
+template<class T> inline void atomic_store_explicit( shared_ptr<T> * p, shared_ptr<T> r, memory_order /*mo*/ )\r
+{\r
+ atomic_store( p, r ); // std::move( r )\r
+}\r
+\r
+template<class T> shared_ptr<T> atomic_exchange( shared_ptr<T> * p, shared_ptr<T> r )\r
+{\r
+ boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p );\r
+\r
+ sp.lock();\r
+ p->swap( r );\r
+ sp.unlock();\r
+\r
+ return r; // return std::move( r )\r
+}\r
+\r
+template<class T> shared_ptr<T> atomic_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> r, memory_order /*mo*/ )\r
+{\r
+ return atomic_exchange( p, r ); // std::move( r )\r
+}\r
+\r
+template<class T> bool atomic_compare_exchange( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w )\r
+{\r
+ boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p );\r
+\r
+ sp.lock();\r
+\r
+ if( p->_internal_equiv( *v ) )\r
+ {\r
+ p->swap( w );\r
+\r
+ sp.unlock();\r
+\r
+ return true;\r
+ }\r
+ else\r
+ {\r
+ shared_ptr<T> tmp( *p );\r
+\r
+ sp.unlock();\r
+\r
+ tmp.swap( *v );\r
+ return false;\r
+ }\r
+}\r
+\r
+template<class T> inline bool atomic_compare_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w, memory_order /*success*/, memory_order /*failure*/ )\r
+{\r
+ return atomic_compare_exchange( p, v, w ); // std::move( w )\r
+}\r
+\r
+#endif\r
+\r
+} // namespace boost\r
+\r
+#ifdef BOOST_MSVC\r
+# pragma warning(pop)\r
+#endif\r
+\r
+#endif // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)\r
+\r
+#endif // #ifndef BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED\r
--- /dev/null
+#ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED\r
+#define BOOST_THROW_EXCEPTION_HPP_INCLUDED\r
+\r
+// MS compatible compilers support #pragma once\r
+\r
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
+# pragma once\r
+#endif\r
+\r
+//\r
+// boost/throw_exception.hpp\r
+//\r
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.\r
+// Copyright (c) 2008-2009 Emil Dotchevski and Reverge Studios, Inc.\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// http://www.boost.org/libs/utility/throw_exception.html\r
+//\r
+\r
+#include <boost/exception/detail/attribute_noreturn.hpp>\r
+#include <boost/detail/workaround.hpp>\r
+#include <boost/config.hpp>\r
+#include <exception>\r
+\r
+#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x593) )\r
+# define BOOST_EXCEPTION_DISABLE\r
+#endif\r
+\r
+#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1310 )\r
+# define BOOST_EXCEPTION_DISABLE\r
+#endif\r
+\r
+#if !defined( BOOST_EXCEPTION_DISABLE )\r
+# include <boost/exception/exception.hpp>\r
+# include <boost/current_function.hpp>\r
+# define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_CURRENT_FUNCTION,__FILE__,__LINE__)\r
+#else\r
+# define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x)\r
+#endif\r
+\r
+namespace boost\r
+{\r
+#ifdef BOOST_NO_EXCEPTIONS\r
+\r
+void throw_exception( std::exception const & e ); // user defined\r
+\r
+#else\r
+\r
+inline void throw_exception_assert_compatibility( std::exception const & ) { }\r
+\r
+template<class E> BOOST_ATTRIBUTE_NORETURN inline void throw_exception( E const & e )\r
+{\r
+ //All boost exceptions are required to derive from std::exception,\r
+ //to ensure compatibility with BOOST_NO_EXCEPTIONS.\r
+ throw_exception_assert_compatibility(e);\r
+\r
+#ifndef BOOST_EXCEPTION_DISABLE\r
+ throw enable_current_exception(enable_error_info(e));\r
+#else\r
+ throw e;\r
+#endif\r
+}\r
+\r
+#endif\r
+\r
+#if !defined( BOOST_EXCEPTION_DISABLE )\r
+ namespace\r
+ exception_detail\r
+ {\r
+ template <class E>\r
+ BOOST_ATTRIBUTE_NORETURN\r
+ void\r
+ throw_exception_( E const & x, char const * current_function, char const * file, int line )\r
+ {\r
+ boost::throw_exception(\r
+ set_info(\r
+ set_info(\r
+ set_info(\r
+ boost::enable_error_info(x),\r
+ throw_function(current_function)),\r
+ throw_file(file)),\r
+ throw_line(line)));\r
+ }\r
+ }\r
+#endif\r
+} // namespace boost\r
+\r
+#endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED\r
--- /dev/null
+// (C) Copyright David Abrahams 2001.\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+#ifndef BOOST_TYPE_DWA20010120_HPP\r
+# define BOOST_TYPE_DWA20010120_HPP\r
+\r
+namespace boost {\r
+\r
+ // Just a simple "type envelope". Useful in various contexts, mostly to work\r
+ // around some MSVC deficiencies.\r
+ template <class T>\r
+ struct type {};\r
+\r
+}\r
+\r
+#endif // BOOST_TYPE_DWA20010120_HPP\r
--- /dev/null
+// Boost enable_if library\r
+\r
+// Copyright 2003 (c) The Trustees of Indiana University.\r
+\r
+// Use, modification, and distribution is subject to the Boost Software\r
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// Authors: Jaakko Jarvi (jajarvi at osl.iu.edu)\r
+// Jeremiah Willcock (jewillco at osl.iu.edu)\r
+// Andrew Lumsdaine (lums at osl.iu.edu)\r
+\r
+\r
+#ifndef BOOST_UTILITY_ENABLE_IF_HPP\r
+#define BOOST_UTILITY_ENABLE_IF_HPP\r
+\r
+#include "boost/config.hpp"\r
+\r
+// Even the definition of enable_if causes problems on some compilers,\r
+// so it's macroed out for all compilers that do not support SFINAE\r
+\r
+#ifndef BOOST_NO_SFINAE\r
+\r
+namespace boost\r
+{\r
+ \r
+ template <bool B, class T = void>\r
+ struct enable_if_c {\r
+ typedef T type;\r
+ };\r
+\r
+ template <class T>\r
+ struct enable_if_c<false, T> {};\r
+\r
+ template <class Cond, class T = void> \r
+ struct enable_if : public enable_if_c<Cond::value, T> {};\r
+\r
+ template <bool B, class T>\r
+ struct lazy_enable_if_c {\r
+ typedef typename T::type type;\r
+ };\r
+\r
+ template <class T>\r
+ struct lazy_enable_if_c<false, T> {};\r
+\r
+ template <class Cond, class T> \r
+ struct lazy_enable_if : public lazy_enable_if_c<Cond::value, T> {};\r
+\r
+\r
+ template <bool B, class T = void>\r
+ struct disable_if_c {\r
+ typedef T type;\r
+ };\r
+\r
+ template <class T>\r
+ struct disable_if_c<true, T> {};\r
+\r
+ template <class Cond, class T = void> \r
+ struct disable_if : public disable_if_c<Cond::value, T> {};\r
+\r
+ template <bool B, class T>\r
+ struct lazy_disable_if_c {\r
+ typedef typename T::type type;\r
+ };\r
+\r
+ template <class T>\r
+ struct lazy_disable_if_c<true, T> {};\r
+\r
+ template <class Cond, class T> \r
+ struct lazy_disable_if : public lazy_disable_if_c<Cond::value, T> {};\r
+\r
+} // namespace boost\r
+\r
+#else\r
+\r
+namespace boost {\r
+\r
+ namespace detail { typedef void enable_if_default_T; }\r
+\r
+ template <typename T>\r
+ struct enable_if_does_not_work_on_this_compiler;\r
+\r
+ template <bool B, class T = detail::enable_if_default_T>\r
+ struct enable_if_c : enable_if_does_not_work_on_this_compiler<T>\r
+ { };\r
+\r
+ template <bool B, class T = detail::enable_if_default_T> \r
+ struct disable_if_c : enable_if_does_not_work_on_this_compiler<T>\r
+ { };\r
+\r
+ template <bool B, class T = detail::enable_if_default_T> \r
+ struct lazy_enable_if_c : enable_if_does_not_work_on_this_compiler<T>\r
+ { };\r
+\r
+ template <bool B, class T = detail::enable_if_default_T> \r
+ struct lazy_disable_if_c : enable_if_does_not_work_on_this_compiler<T>\r
+ { };\r
+\r
+ template <class Cond, class T = detail::enable_if_default_T> \r
+ struct enable_if : enable_if_does_not_work_on_this_compiler<T>\r
+ { };\r
+\r
+ template <class Cond, class T = detail::enable_if_default_T> \r
+ struct disable_if : enable_if_does_not_work_on_this_compiler<T>\r
+ { };\r
+\r
+ template <class Cond, class T = detail::enable_if_default_T> \r
+ struct lazy_enable_if : enable_if_does_not_work_on_this_compiler<T>\r
+ { };\r
+\r
+ template <class Cond, class T = detail::enable_if_default_T> \r
+ struct lazy_disable_if : enable_if_does_not_work_on_this_compiler<T>\r
+ { };\r
+\r
+} // namespace boost\r
+\r
+#endif // BOOST_NO_SFINAE\r
+\r
+#endif\r
--- /dev/null
+// Boost version.hpp configuration header file ------------------------------//\r
+\r
+// (C) Copyright John maddock 1999. Distributed under the Boost\r
+// Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+\r
+// See http://www.boost.org/libs/config for documentation\r
+\r
+#ifndef BOOST_VERSION_HPP\r
+#define BOOST_VERSION_HPP\r
+\r
+//\r
+// Caution, this is the only boost header that is guarenteed\r
+// to change with every boost release, including this header\r
+// will cause a recompile every time a new boost version is\r
+// released.\r
+//\r
+// BOOST_VERSION % 100 is the patch level\r
+// BOOST_VERSION / 100 % 1000 is the minor version\r
+// BOOST_VERSION / 100000 is the major version\r
+\r
+#define BOOST_VERSION 104601\r
+\r
+//\r
+// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION\r
+// but as a *string* in the form "x_y[_z]" where x is the major version\r
+// number, y is the minor version number, and z is the patch level if not 0.\r
+// This is used by <config/auto_link.hpp> to select which library version to link to.\r
+\r
+#define BOOST_LIB_VERSION "1_46_1"\r
+\r
+#endif\r
+\r
+\r
+\r
--- /dev/null
+//\r
+// sp_collector.cpp\r
+//\r
+// Copyright (c) 2002, 2003 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+\r
+#include <boost/assert.hpp>\r
+#include <boost/shared_ptr.hpp>\r
+#include <boost/detail/lightweight_mutex.hpp>\r
+#include <cstdlib>\r
+#include <map>\r
+#include <deque>\r
+#include <iostream>\r
+\r
+typedef std::map< void const *, std::pair<void *, size_t> > map_type;\r
+\r
+static map_type & get_map()\r
+{\r
+ static map_type m;\r
+ return m;\r
+}\r
+\r
+typedef boost::detail::lightweight_mutex mutex_type;\r
+\r
+static mutex_type & get_mutex()\r
+{\r
+ static mutex_type m;\r
+ return m;\r
+}\r
+\r
+static void * init_mutex_before_main = &get_mutex();\r
+\r
+namespace\r
+{\r
+ class X;\r
+\r
+ struct count_layout\r
+ {\r
+ boost::detail::sp_counted_base * pi;\r
+ int id;\r
+ };\r
+\r
+ struct shared_ptr_layout\r
+ {\r
+ X * px;\r
+ count_layout pn;\r
+ };\r
+}\r
+\r
+// assume 4 byte alignment for pointers when scanning\r
+size_t const pointer_align = 4;\r
+\r
+typedef std::map<void const *, long> map2_type;\r
+\r
+static void scan_and_count(void const * area, size_t size, map_type const & m, map2_type & m2)\r
+{\r
+ unsigned char const * p = static_cast<unsigned char const *>(area);\r
+\r
+ for(size_t n = 0; n + sizeof(shared_ptr_layout) <= size; p += pointer_align, n += pointer_align)\r
+ {\r
+ shared_ptr_layout const * q = reinterpret_cast<shared_ptr_layout const *>(p);\r
+\r
+ if(q->pn.id == boost::detail::shared_count_id && q->pn.pi != 0 && m.count(q->pn.pi) != 0)\r
+ {\r
+ ++m2[q->pn.pi];\r
+ }\r
+ }\r
+}\r
+\r
+typedef std::deque<void const *> open_type;\r
+\r
+static void scan_and_mark(void const * area, size_t size, map2_type & m2, open_type & open)\r
+{\r
+ unsigned char const * p = static_cast<unsigned char const *>(area);\r
+\r
+ for(size_t n = 0; n + sizeof(shared_ptr_layout) <= size; p += pointer_align, n += pointer_align)\r
+ {\r
+ shared_ptr_layout const * q = reinterpret_cast<shared_ptr_layout const *>(p);\r
+\r
+ if(q->pn.id == boost::detail::shared_count_id && q->pn.pi != 0 && m2.count(q->pn.pi) != 0)\r
+ {\r
+ open.push_back(q->pn.pi);\r
+ m2.erase(q->pn.pi);\r
+ }\r
+ }\r
+}\r
+\r
+static void find_unreachable_objects_impl(map_type const & m, map2_type & m2)\r
+{\r
+ // scan objects for shared_ptr members, compute internal counts\r
+\r
+ {\r
+ std::cout << "... " << m.size() << " objects in m.\n";\r
+\r
+ for(map_type::const_iterator i = m.begin(); i != m.end(); ++i)\r
+ {\r
+ boost::detail::sp_counted_base const * p = static_cast<boost::detail::sp_counted_base const *>(i->first);\r
+\r
+ BOOST_ASSERT(p->use_count() != 0); // there should be no inactive counts in the map\r
+\r
+ m2[ i->first ];\r
+\r
+ scan_and_count(i->second.first, i->second.second, m, m2);\r
+ }\r
+\r
+ std::cout << "... " << m2.size() << " objects in m2.\n";\r
+ }\r
+\r
+ // mark reachable objects\r
+\r
+ {\r
+ open_type open;\r
+\r
+ for(map2_type::iterator i = m2.begin(); i != m2.end(); ++i)\r
+ {\r
+ boost::detail::sp_counted_base const * p = static_cast<boost::detail::sp_counted_base const *>(i->first);\r
+ if(p->use_count() != i->second) open.push_back(p);\r
+ }\r
+\r
+ std::cout << "... " << open.size() << " objects in open.\n";\r
+\r
+ for(open_type::iterator j = open.begin(); j != open.end(); ++j)\r
+ {\r
+ m2.erase(*j);\r
+ }\r
+\r
+ while(!open.empty())\r
+ {\r
+ void const * p = open.front();\r
+ open.pop_front();\r
+\r
+ map_type::const_iterator i = m.find(p);\r
+ BOOST_ASSERT(i != m.end());\r
+\r
+ scan_and_mark(i->second.first, i->second.second, m2, open);\r
+ }\r
+ }\r
+\r
+ // m2 now contains the unreachable objects\r
+}\r
+\r
+std::size_t find_unreachable_objects(bool report)\r
+{\r
+ map2_type m2;\r
+\r
+#ifdef BOOST_HAS_THREADS\r
+\r
+ // This will work without the #ifdef, but some compilers warn\r
+ // that lock is not referenced\r
+\r
+ mutex_type::scoped_lock lock(get_mutex());\r
+\r
+#endif\r
+\r
+ map_type const & m = get_map();\r
+\r
+ find_unreachable_objects_impl(m, m2);\r
+\r
+ if(report)\r
+ {\r
+ for(map2_type::iterator j = m2.begin(); j != m2.end(); ++j)\r
+ {\r
+ map_type::const_iterator i = m.find(j->first);\r
+ BOOST_ASSERT(i != m.end());\r
+ std::cout << "Unreachable object at " << i->second.first << ", " << i->second.second << " bytes long.\n";\r
+ }\r
+ }\r
+\r
+ return m2.size();\r
+}\r
+\r
+typedef std::deque< boost::shared_ptr<X> > free_list_type;\r
+\r
+static void scan_and_free(void * area, size_t size, map2_type const & m2, free_list_type & free)\r
+{\r
+ unsigned char * p = static_cast<unsigned char *>(area);\r
+\r
+ for(size_t n = 0; n + sizeof(shared_ptr_layout) <= size; p += pointer_align, n += pointer_align)\r
+ {\r
+ shared_ptr_layout * q = reinterpret_cast<shared_ptr_layout *>(p);\r
+\r
+ if(q->pn.id == boost::detail::shared_count_id && q->pn.pi != 0 && m2.count(q->pn.pi) != 0 && q->px != 0)\r
+ {\r
+ boost::shared_ptr<X> * ppx = reinterpret_cast< boost::shared_ptr<X> * >(p);\r
+ free.push_back(*ppx);\r
+ ppx->reset();\r
+ }\r
+ }\r
+}\r
+\r
+void free_unreachable_objects()\r
+{\r
+ free_list_type free;\r
+\r
+ {\r
+ map2_type m2;\r
+\r
+#ifdef BOOST_HAS_THREADS\r
+\r
+ mutex_type::scoped_lock lock(get_mutex());\r
+\r
+#endif\r
+\r
+ map_type const & m = get_map();\r
+\r
+ find_unreachable_objects_impl(m, m2);\r
+\r
+ for(map2_type::iterator j = m2.begin(); j != m2.end(); ++j)\r
+ {\r
+ map_type::const_iterator i = m.find(j->first);\r
+ BOOST_ASSERT(i != m.end());\r
+ scan_and_free(i->second.first, i->second.second, m2, free);\r
+ }\r
+ }\r
+\r
+ std::cout << "... about to free " << free.size() << " objects.\n";\r
+}\r
+\r
+// debug hooks\r
+\r
+namespace boost\r
+{\r
+\r
+void sp_scalar_constructor_hook(void *)\r
+{\r
+}\r
+\r
+void sp_scalar_constructor_hook(void * px, std::size_t size, void * pn)\r
+{\r
+#ifdef BOOST_HAS_THREADS\r
+\r
+ mutex_type::scoped_lock lock(get_mutex());\r
+\r
+#endif\r
+\r
+ get_map()[pn] = std::make_pair(px, size);\r
+}\r
+\r
+void sp_scalar_destructor_hook(void *)\r
+{\r
+}\r
+\r
+void sp_scalar_destructor_hook(void *, std::size_t, void * pn)\r
+{\r
+#ifdef BOOST_HAS_THREADS\r
+\r
+ mutex_type::scoped_lock lock(get_mutex());\r
+\r
+#endif\r
+\r
+ get_map().erase(pn);\r
+}\r
+\r
+void sp_array_constructor_hook(void *)\r
+{\r
+}\r
+\r
+void sp_array_destructor_hook(void *)\r
+{\r
+}\r
+\r
+} // namespace boost\r
+\r
+#endif // defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
--- /dev/null
+//\r
+// sp_debug_hooks.cpp\r
+//\r
+// Copyright (c) 2002, 2003 Peter Dimov\r
+//\r
+// Distributed under the Boost Software License, Version 1.0. (See\r
+// accompanying file LICENSE_1_0.txt or copy at\r
+// http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+\r
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
+\r
+#include <boost/assert.hpp>\r
+#include <new>\r
+#include <cstdlib>\r
+\r
+int const m = 2; // m * sizeof(int) must be aligned appropriately\r
+\r
+// magic values to mark heap blocks with\r
+\r
+int const allocated_scalar = 0x1234560C;\r
+int const allocated_array = 0x1234560A;\r
+int const adopted_scalar = 0x0567890C;\r
+int const adopted_array = 0x0567890A;\r
+int const deleted = 0x498769DE;\r
+\r
+using namespace std; // for compilers where things aren't in std\r
+\r
+// operator new\r
+\r
+static new_handler get_new_handler()\r
+{\r
+ new_handler p = set_new_handler(0);\r
+ set_new_handler(p);\r
+ return p;\r
+}\r
+\r
+static void * allocate(size_t n, int mark)\r
+{\r
+ int * pm;\r
+\r
+ for(;;)\r
+ {\r
+ pm = static_cast<int*>(malloc(n + m * sizeof(int)));\r
+\r
+ if(pm != 0) break;\r
+\r
+ if(new_handler pnh = get_new_handler())\r
+ {\r
+ pnh();\r
+ }\r
+ else\r
+ {\r
+ return 0;\r
+ }\r
+ }\r
+\r
+ *pm = mark;\r
+\r
+ return pm + m;\r
+}\r
+\r
+void * operator new(size_t n) throw(bad_alloc)\r
+{\r
+ void * p = allocate(n, allocated_scalar);\r
+\r
+#if !defined(BOOST_NO_EXCEPTIONS)\r
+\r
+ if(p == 0) throw bad_alloc();\r
+\r
+#endif\r
+\r
+ return p;\r
+}\r
+\r
+#if !defined(__BORLANDC__) || (__BORLANDC__ > 0x551)\r
+\r
+void * operator new(size_t n, nothrow_t const &) throw()\r
+{\r
+ return allocate(n, allocated_scalar);\r
+}\r
+\r
+#endif\r
+\r
+void * operator new[](size_t n) throw(bad_alloc)\r
+{\r
+ void * p = allocate(n, allocated_array);\r
+\r
+#if !defined(BOOST_NO_EXCEPTIONS)\r
+\r
+ if(p == 0) throw bad_alloc();\r
+\r
+#endif\r
+\r
+ return p;\r
+}\r
+\r
+#if !defined(__BORLANDC__) || (__BORLANDC__ > 0x551)\r
+\r
+void * operator new[](size_t n, nothrow_t const &) throw()\r
+{\r
+ return allocate(n, allocated_array);\r
+}\r
+\r
+#endif\r
+\r
+// debug hooks\r
+\r
+namespace boost\r
+{\r
+\r
+void sp_scalar_constructor_hook(void * p)\r
+{\r
+ if(p == 0) return;\r
+\r
+ int * pm = static_cast<int*>(p);\r
+ pm -= m;\r
+\r
+ BOOST_ASSERT(*pm != adopted_scalar); // second smart pointer to the same address\r
+ BOOST_ASSERT(*pm != allocated_array); // allocated with new[]\r
+ BOOST_ASSERT(*pm == allocated_scalar); // not allocated with new\r
+\r
+ *pm = adopted_scalar;\r
+}\r
+\r
+void sp_scalar_constructor_hook(void * px, std::size_t, void *)\r
+{\r
+ sp_scalar_constructor_hook(px);\r
+}\r
+\r
+void sp_scalar_destructor_hook(void * p)\r
+{\r
+ if(p == 0) return;\r
+\r
+ int * pm = static_cast<int*>(p);\r
+ pm -= m;\r
+\r
+ BOOST_ASSERT(*pm == adopted_scalar); // attempt to destroy nonmanaged block\r
+\r
+ *pm = allocated_scalar;\r
+}\r
+\r
+void sp_scalar_destructor_hook(void * px, std::size_t, void *)\r
+{\r
+ sp_scalar_destructor_hook(px);\r
+}\r
+\r
+// It is not possible to handle the array hooks in a portable manner.\r
+// The implementation typically reserves a bit of storage for the number\r
+// of objects in the array, and the argument of the array hook isn't\r
+// equal to the return value of operator new[].\r
+\r
+void sp_array_constructor_hook(void * /* p */)\r
+{\r
+/*\r
+ if(p == 0) return;\r
+\r
+ // adjust p depending on the implementation\r
+\r
+ int * pm = static_cast<int*>(p);\r
+ pm -= m;\r
+\r
+ BOOST_ASSERT(*pm != adopted_array); // second smart array pointer to the same address\r
+ BOOST_ASSERT(*pm != allocated_scalar); // allocated with new\r
+ BOOST_ASSERT(*pm == allocated_array); // not allocated with new[]\r
+\r
+ *pm = adopted_array;\r
+*/\r
+}\r
+\r
+void sp_array_destructor_hook(void * /* p */)\r
+{\r
+/*\r
+ if(p == 0) return;\r
+\r
+ // adjust p depending on the implementation\r
+\r
+ int * pm = static_cast<int*>(p);\r
+ pm -= m;\r
+\r
+ BOOST_ASSERT(*pm == adopted_array); // attempt to destroy nonmanaged block\r
+\r
+ *pm = allocated_array;\r
+*/\r
+}\r
+\r
+} // namespace boost\r
+\r
+// operator delete\r
+\r
+void operator delete(void * p) throw()\r
+{\r
+ if(p == 0) return;\r
+\r
+ int * pm = static_cast<int*>(p);\r
+ pm -= m;\r
+\r
+ BOOST_ASSERT(*pm != deleted); // double delete\r
+ BOOST_ASSERT(*pm != adopted_scalar); // delete p.get();\r
+ BOOST_ASSERT(*pm != allocated_array); // allocated with new[]\r
+ BOOST_ASSERT(*pm == allocated_scalar); // not allocated with new\r
+\r
+ *pm = deleted;\r
+\r
+ free(pm);\r
+}\r
+\r
+#if !defined(__BORLANDC__) || (__BORLANDC__ > 0x551)\r
+\r
+void operator delete(void * p, nothrow_t const &) throw()\r
+{\r
+ ::operator delete(p);\r
+}\r
+\r
+#endif\r
+\r
+void operator delete[](void * p) throw()\r
+{\r
+ if(p == 0) return;\r
+\r
+ int * pm = static_cast<int*>(p);\r
+ pm -= m;\r
+\r
+ BOOST_ASSERT(*pm != deleted); // double delete\r
+ BOOST_ASSERT(*pm != adopted_scalar); // delete p.get();\r
+ BOOST_ASSERT(*pm != allocated_scalar); // allocated with new\r
+ BOOST_ASSERT(*pm == allocated_array); // not allocated with new[]\r
+\r
+ *pm = deleted;\r
+\r
+ free(pm);\r
+}\r
+\r
+#if !defined(__BORLANDC__) || (__BORLANDC__ > 0x551)\r
+\r
+void operator delete[](void * p, nothrow_t const &) throw()\r
+{\r
+ ::operator delete[](p);\r
+}\r
+\r
+#endif\r
+\r
+#endif // defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r