Also: Clarified README regarding source files.
Removed uneeded source files.
Added #error directives to cause compile error when
features requiring source files are chosen.
Change-Id: I111d540b1038d7c3ac0541a5aa92c39aa9fe40c2
Steps to produce minimal version of BOOST:
-1) Download Boost (current minimal version is derived from 1.46_1)
+1) Download Boost (current minimal version is derived from 1.48.0)
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)
+5) delete source files which are not required. Currently:
+ libs/exception/src/clone_current_exception_non_intrusive.cpp
+ libs/smart_ptr/src/sp_collector.cpp
+ libs/smart_ptr/src/sp_debug_hooks.cpp
+ Make sure that they are really not needed and that activating the feature they implement gives a compiler
+ not linker error (by adding an appropriate #error directive). If any source files are added make sure
+ to add them to cmake.
+
#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
+#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) && defined(__cplusplus)\r
# include <boost/config/select_stdlib_config.hpp>\r
#endif\r
// if we have a std library config, include it now:\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
+# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")\r
# endif\r
#elif defined(BOOST_AUTO_LINK_NOMANGLE)\r
# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")\r
# define BOOST_NO_CV_VOID_SPECIALIZATIONS\r
# define BOOST_NO_DEDUCED_TYPENAME\r
// workaround for missing WCHAR_MAX/WCHAR_MIN:\r
+#ifdef __cplusplus\r
#include <climits>\r
#include <cwchar>\r
+#else\r
+#include <limits.h>\r
+#include <wchar.h>\r
+#endif // __cplusplus\r
#ifndef WCHAR_MAX\r
# define WCHAR_MAX 0xffff\r
#endif\r
// Borland C++ Builder 6 and below:\r
#if (__BORLANDC__ <= 0x564)\r
\r
-# ifdef NDEBUG\r
+# if defined(NDEBUG) && defined(__cplusplus)\r
// fix broken <cstring> so that Boost.test works:\r
# include <cstring>\r
# undef strcmp\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_DECLTYPE_N3276\r
#define BOOST_NO_DEFAULTED_FUNCTIONS\r
#define BOOST_NO_DELETED_FUNCTIONS\r
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
#define BOOST_NO_TEMPLATE_ALIASES\r
#define BOOST_NO_UNICODE_LITERALS // UTF-8 still not supported\r
#define BOOST_NO_VARIADIC_TEMPLATES\r
+#define BOOST_NO_NOEXCEPT\r
+#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX\r
\r
#if __BORLANDC__ >= 0x590\r
# define BOOST_HAS_TR1_HASH\r
\r
\r
\r
+\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_DECLTYPE_N3276\r
#define BOOST_NO_DEFAULTED_FUNCTIONS\r
\r
#if !__has_feature(cxx_deleted_functions)\r
\r
#define BOOST_NO_INITIALIZER_LISTS\r
#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NOEXCEPT\r
#define BOOST_NO_NULLPTR\r
#define BOOST_NO_RAW_LITERALS\r
+#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX\r
\r
#if !__has_feature(cxx_rvalue_references)\r
# define BOOST_NO_RVALUE_REFERENCES\r
// (Niels Dekker, LKEB, April 2010)\r
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION\r
\r
-# ifdef NDEBUG\r
+# if defined(NDEBUG) && defined(__cplusplus)\r
// fix broken <cstring> so that Boost.test works:\r
# include <cstring>\r
# undef strcmp\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_NOEXCEPT\r
#define BOOST_NO_NULLPTR\r
#define BOOST_NO_RAW_LITERALS\r
#define BOOST_NO_RVALUE_REFERENCES\r
#define BOOST_NO_TEMPLATE_ALIASES\r
#define BOOST_NO_UNICODE_LITERALS\r
#define BOOST_NO_VARIADIC_TEMPLATES\r
+#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX\r
\r
//\r
// TR1 macros:\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_DECLTYPE_N3276\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_NOEXCEPT\r
#define BOOST_NO_NULLPTR\r
#define BOOST_NO_RAW_LITERALS\r
#define BOOST_NO_RVALUE_REFERENCES\r
#define BOOST_NO_TEMPLATE_ALIASES\r
#define BOOST_NO_UNICODE_LITERALS\r
#define BOOST_NO_VARIADIC_TEMPLATES\r
+#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX\r
\r
#ifdef c_plusplus\r
// EDG has "long long" in non-strict mode\r
--- /dev/null
+// (C) Copyright John Maddock 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
+// Greenhills C compiler setup:\r
+\r
+#define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE)\r
+\r
+#if _RELEASE < 7\r
+# error "Boost is not configured for Cray compilers prior to version 7, please try the configure script."\r
+#endif\r
+\r
+//\r
+// Check this is a recent EDG based compiler, otherwise we don't support it here:\r
+//\r
+#ifndef __EDG_VERSION__\r
+# error "Unsupported Cray compiler, please try running the configure script."\r
+#endif\r
+\r
+#include "boost/config/compiler/common_edg.hpp"\r
+\r
+//\r
+// Cray peculiarities, probably version 7 specific:\r
+//\r
+#undef BOOST_NO_AUTO_DECLARATIONS\r
+#undef BOOST_NO_AUTO_MULTIDECLARATIONS\r
+#define BOOST_HAS_NRVO\r
+#define BOOST_NO_VARIADIC_TEMPLATES\r
+#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX\r
+#define BOOST_NO_UNICODE_LITERALS\r
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+#define BOOST_HAS_NRVO\r
+#define BOOST_NO_TEMPLATE_ALIASES\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_NOEXCEPT\r
+#define BOOST_NO_LAMBDAS\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_N3276\r
+#define BOOST_NO_DECLTYPE\r
+#define BOOST_NO_CONSTEXPR\r
+#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION\r
+#define BOOST_NO_CHAR32_T\r
+#define BOOST_NO_CHAR16_T\r
+//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG\r
+#define BOOST_MATH_DISABLE_STD_FPCLASSIFY\r
+//#define BOOST_HAS_FPCLASSIFY\r
+\r
+#define BOOST_SP_USE_PTHREADS \r
+#define BOOST_AC_USE_PTHREADS \r
+\r
//\r
// Is this really the best way to detect whether the std lib is in namespace std?\r
//\r
+#ifdef __cplusplus\r
#include <cstddef>\r
+#endif\r
#if !defined(__STL_IMPORT_VENDOR_CSTD) && !defined(_STLP_IMPORT_VENDOR_CSTD)\r
# define BOOST_NO_STDC_NAMESPACE\r
#endif\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_DECLTYPE_N3276\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_NOEXCEPT\r
#define BOOST_NO_NULLPTR\r
#define BOOST_NO_RAW_LITERALS\r
#define BOOST_NO_RVALUE_REFERENCES\r
#define BOOST_NO_TEMPLATE_ALIASES\r
#define BOOST_NO_UNICODE_LITERALS\r
#define BOOST_NO_VARIADIC_TEMPLATES\r
+#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX\r
+\r
#if (__DMC__ < 0x812)\r
#define BOOST_NO_VARIADIC_MACROS\r
#endif\r
\r
// Variadic templates compiler: \r
// http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html\r
-# ifdef __VARIADIC_TEMPLATES\r
+# if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__))\r
# define BOOST_HAS_VARIADIC_TMPL\r
# else\r
# define BOOST_NO_VARIADIC_TEMPLATES\r
# define BOOST_NO_AUTO_MULTIDECLARATIONS\r
# define BOOST_NO_CHAR16_T\r
# define BOOST_NO_CHAR32_T\r
+# define BOOST_NO_INITIALIZER_LISTS\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
+// C++0x features in 4.5.0 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_UNICODE_LITERALS\r
#endif\r
\r
-// C++0x features in 4.5.n and later\r
+// C++0x features in 4.5.1 and later\r
+//\r
+#if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40501) || !defined(__GXX_EXPERIMENTAL_CXX0X__)\r
+// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_SCOPED_ENUMS before 4.5.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.6.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_NOEXCEPT\r
#define BOOST_NO_NULLPTR\r
+#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX\r
+#endif\r
+\r
+// C++0x features not supported at all yet\r
+//\r
+#define BOOST_NO_DECLTYPE_N3276\r
+\r
+#ifndef BOOST_COMPILER\r
+# define BOOST_COMPILER "GNU C++ version " __VERSION__\r
#endif\r
\r
// ConceptGCC compiler:\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
# define BOOST_NO_NULLPTR\r
# define BOOST_NO_TEMPLATE_ALIASES\r
# define BOOST_NO_DECLTYPE\r
+# define BOOST_NO_DECLTYPE_N3276\r
# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS\r
# define BOOST_NO_RVALUE_REFERENCES\r
# define BOOST_NO_STATIC_ASSERT\r
# define BOOST_NO_LAMBDAS\r
# define BOOST_NO_RAW_LITERALS\r
# define BOOST_NO_UNICODE_LITERALS\r
+# define BOOST_NO_NOEXCEPT\r
+#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX\r
\r
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__\r
\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_DECLTYPE_N3276\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_INITIALIZER_LISTS\r
#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NOEXCEPT\r
#define BOOST_NO_NULLPTR\r
#define BOOST_NO_RAW_LITERALS\r
#define BOOST_NO_RVALUE_REFERENCES\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
+#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__)\r
# define BOOST_INTEL_STDCXX0X\r
#endif\r
#if defined(_MSC_VER) && (_MSC_VER >= 1600)\r
// in type_traits code among other things, getting this correct\r
// for the Intel compiler is actually remarkably fragile and tricky:\r
//\r
+#ifdef __cplusplus\r
#if defined(BOOST_NO_INTRINSIC_WCHAR_T)\r
#include <cwchar>\r
template< typename T > struct assert_no_intrinsic_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
+#endif\r
\r
-#if _MSC_VER+0 >= 1000\r
+#if defined(_MSC_VER) && (_MSC_VER+0 >= 1000)\r
# if _MSC_VER >= 1200\r
# define BOOST_HAS_MS_INT64\r
# endif\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
+// Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression).\r
#if defined(__INTEL_COMPILER)\r
-# if __INTEL_COMPILER <= 1110\r
+# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999)\r
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION\r
# endif\r
#endif\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_RVALUE_REFERENCES // Enabling this breaks Filesystem and Exception libraries\r
+//# undef BOOST_NO_SCOPED_ENUMS // doesn't really work!!\r
# undef BOOST_NO_DELETED_FUNCTIONS\r
# undef BOOST_NO_DEFAULTED_FUNCTIONS\r
# undef BOOST_NO_LAMBDAS\r
# undef BOOST_NO_AUTO_MULTIDECLARATIONS\r
#endif\r
\r
+#if (BOOST_INTEL_CXX_VERSION < 1200)\r
+//\r
+// fenv.h appears not to work with Intel prior to 12.0:\r
+//\r
+# define BOOST_NO_FENV_H\r
+#endif\r
+\r
//\r
// last known and checked version:\r
-#if (BOOST_INTEL_CXX_VERSION > 1110)\r
+#if (BOOST_INTEL_CXX_VERSION > 1200)\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
#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_DECLTYPE_N3276\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_INITIALIZER_LISTS\r
#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NOEXCEPT\r
#define BOOST_NO_NULLPTR\r
#define BOOST_NO_RAW_LITERALS\r
#define BOOST_NO_SCOPED_ENUMS\r
#define BOOST_NO_UNICODE_LITERALS\r
#define BOOST_NO_VARIADIC_TEMPLATES\r
#define BOOST_NO_VARIADIC_MACROS\r
+#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX\r
\r
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)\r
\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_DECLTYPE_N3276\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_INITIALIZER_LISTS\r
#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NOEXCEPT\r
#define BOOST_NO_NULLPTR\r
#define BOOST_NO_RAW_LITERALS\r
#define BOOST_NO_RVALUE_REFERENCES\r
#define BOOST_NO_UNICODE_LITERALS\r
#define BOOST_NO_VARIADIC_TEMPLATES\r
#define BOOST_NO_VARIADIC_MACROS\r
+#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX\r
\r
//\r
// versions check:\r
# define BOOST_NO_RAW_LITERALS\r
# define BOOST_NO_NULLPTR\r
# define BOOST_NO_NUMERIC_LIMITS_LOWEST\r
+# define BOOST_NO_NOEXCEPT\r
# define BOOST_NO_LAMBDAS\r
# define BOOST_NO_INITIALIZER_LISTS\r
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS\r
# define BOOST_NO_DELETED_FUNCTIONS\r
# define BOOST_NO_DEFAULTED_FUNCTIONS\r
# define BOOST_NO_DECLTYPE\r
+# define BOOST_NO_DECLTYPE_N3276\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_UNIFIED_INITIALIZATION_SYNTAX\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_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
#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_DECLTYPE_N3276\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_INITIALIZER_LISTS\r
#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NOEXCEPT\r
#define BOOST_NO_NULLPTR\r
#define BOOST_NO_RAW_LITERALS\r
#define BOOST_NO_RVALUE_REFERENCES\r
#define BOOST_NO_UNICODE_LITERALS\r
#define BOOST_NO_VARIADIC_TEMPLATES\r
#define BOOST_NO_VARIADIC_MACROS\r
+#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX\r
\r
//\r
// version check:\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_DECLTYPE_N3276\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_INITIALIZER_LISTS\r
#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NOEXCEPT\r
#define BOOST_NO_NULLPTR\r
#define BOOST_NO_RAW_LITERALS\r
#define BOOST_NO_RVALUE_REFERENCES\r
#define BOOST_NO_UNICODE_LITERALS\r
#define BOOST_NO_VARIADIC_TEMPLATES\r
#define BOOST_NO_VARIADIC_MACROS\r
+#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX\r
\r
//\r
// Version\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_DECLTYPE_N3276\r
#define BOOST_NO_DEFAULTED_FUNCTIONS\r
#define BOOST_NO_DELETED_FUNCTIONS\r
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS\r
#endif\r
#define BOOST_NO_INITIALIZER_LISTS\r
#define BOOST_NO_LAMBDAS\r
+#define BOOST_NO_NOEXCEPT\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_UNIFIED_INITIALIZATION_SYNTAX\r
#if ! __IBMCPP_STATIC_ASSERT\r
# define BOOST_NO_STATIC_ASSERT\r
#endif\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
+// we have ThreadEx or GetSystemTimeAsFileTime unless we're running WindowsCE\r
+#if !defined(_WIN32_WCE) && !defined(UNDER_CE)\r
+# define BOOST_HAS_THREADEX\r
+# define BOOST_HAS_GETSYSTEMTIMEASFILETIME\r
+#endif\r
+\r
// \r
// check for exception handling support: \r
#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)\r
#define BOOST_NO_RVALUE_REFERENCES\r
#define BOOST_NO_STATIC_ASSERT\r
#define BOOST_NO_NULLPTR\r
+#define BOOST_NO_DECLTYPE\r
#endif // _MSC_VER < 1600\r
\r
#if _MSC_VER >= 1600\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_DECLTYPE_N3276\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_NOEXCEPT\r
#define BOOST_NO_RAW_LITERALS\r
#define BOOST_NO_SCOPED_ENUMS\r
#define BOOST_NO_TEMPLATE_ALIASES\r
#define BOOST_NO_VARIADIC_TEMPLATES\r
#define BOOST_NO_SFINAE_EXPR\r
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP\r
+#define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX\r
//\r
// prefix and suffix headers:\r
//\r
--- /dev/null
+// (C) Copyright John Maddock 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
+\r
+// See http://www.boost.org for most recent version.\r
+\r
+// SGI Irix specific config options:\r
+\r
+#define BOOST_PLATFORM "Cray"\r
+\r
+// boilerplate code:\r
+#define BOOST_HAS_UNISTD_H\r
+#include <boost/config/posix_features.hpp>\r
+\r
+\r
+\r
#define BOOST_PLATFORM "linux"\r
\r
// make sure we have __GLIBC_PREREQ if available at all\r
+#ifdef __cplusplus\r
#include <cstdlib>\r
+#else\r
+#include <stdlib.h>\r
+#endif\r
\r
//\r
// <stdint.h> added to glibc 2.1.1\r
// boilerplate code:\r
#define BOOST_HAS_UNISTD_H\r
#include <boost/config/posix_features.hpp>\r
+#define BOOST_HAS_PTHREAD_YIELD\r
\r
#ifndef __GNUC__\r
//\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
+// MPTasks support is deprecated/removed from Boost:\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
+#ifdef BOOST_HAS_PTHREADS\r
+# define BOOST_HAS_THREADS\r
+#endif\r
\r
// The remote call manager depends on this.\r
# define BOOST_BIND_ENABLE_PASCAL\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
+#ifdef __cplusplus\r
+#include <cstdlib>\r
+#else\r
+#include <stdlib.h>\r
+#endif// 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
\r
#ifdef _WIN32_WCE\r
# define BOOST_NO_ANSI_APIS\r
+#else\r
+# define BOOST_HAS_GETSYSTEMTIMEASFILETIME\r
#endif\r
\r
#ifndef BOOST_HAS_PTHREADS\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
// 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(_CRAYC)\r
+// EDG based Cray compiler:\r
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp"\r
+\r
#elif defined __CUDACC__\r
// NVIDIA CUDA C++ compiler for GPU\r
# define BOOST_COMPILER_CONFIG "boost/config/compiler/nvcc.hpp"\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
+#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC)\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
// Symbian: \r
# define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp" \r
\r
+#elif defined(_CRAYC)\r
+// Cray:\r
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp" \r
+\r
#elif defined(__VMS) \r
// VMS:\r
# define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" \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
+#ifdef __cplusplus\r
+# include <cstddef>\r
+#else\r
+# include <stddef.h>\r
+#endif\r
\r
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)\r
// STLPort library; this _must_ come first, otherwise since\r
#endif\r
\r
#include <typeinfo>\r
-#if !_HAS_EXCEPTIONS\r
+#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) \r
# define BOOST_NO_STD_TYPEINFO \r
#endif \r
\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
#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
+// C++0x headers not yet (fully) implemented:\r
+//\r
+# define BOOST_NO_0X_HDR_TYPE_TRAITS\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
# 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
\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
+//\r
+// These appear to be unusable/incomplete so far:\r
+//\r
+# define BOOST_NO_0X_HDR_CHRONO\r
+# define BOOST_NO_0X_HDR_FUTURE\r
+# define BOOST_NO_0X_HDR_TYPE_TRAITS\r
+\r
// libc++ uses a non-standard messages_base\r
#define BOOST_NO_STD_MESSAGES\r
\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
# 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
+#else\r
+# define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG \r
+# define BOOST_HAS_TR1_COMPLEX_OVERLOADS \r
+#endif\r
+\r
+#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) && (!defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE) || !defined(BOOST_NO_0X_HDR_MUTEX))\r
+# define BOOST_NO_0X_HDR_CONDITION_VARIABLE\r
+# define BOOST_NO_0X_HDR_MUTEX\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
+# define BOOST_NO_0X_HDR_FUTURE\r
+# define BOOST_NO_0X_HDR_RANDOM\r
#endif\r
\r
-// C++0x headers not yet implemented\r
+// C++0x features in GCC 4.5.0 and later\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
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)\r
# define BOOST_NO_0X_HDR_TYPEINDEX\r
+#endif\r
+// C++0x headers not yet (fully!) implemented\r
+//\r
+# define BOOST_NO_0X_HDR_THREAD\r
+# define BOOST_NO_0X_HDR_TYPE_TRAITS\r
+# define BOOST_NO_0X_HDR_CODECVT\r
\r
// --- end ---\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_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
# 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
+// type_traits header is incomplete:\r
+# define BOOST_NO_0X_HDR_TYPE_TRAITS\r
+//\r
+// C++0x headers not yet implemented\r
+//\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_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_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_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
#if defined(BOOST_NO_0X_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)\r
# define BOOST_NO_INITIALIZER_LISTS\r
#endif\r
+#if defined(BOOST_NO_INITIALIZER_LISTS) && !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)\r
+# define BOOST_NO_0X_HDR_INITIALIZER_LIST\r
+#endif\r
\r
//\r
// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_RVALUE_REFERENCES is not defined\r
#define BOOST_HAS_VARIADIC_TMPL\r
#endif\r
\r
+//\r
+// Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined\r
+//\r
+#if !defined(BOOST_NO_DECLTYPE_N3276) && defined(BOOST_NO_DECLTYPE)\r
+#define BOOST_NO_DECLTYPE_N3276\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
// works as expected with standard conforming compilers. The resulting\r
// double inclusion of <cstddef> is harmless.\r
\r
-# ifdef BOOST_NO_STDC_NAMESPACE\r
+# if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus)\r
# include <cstddef>\r
namespace std { using ::ptrdiff_t; using ::size_t; }\r
# endif\r
\r
// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------//\r
\r
-# ifdef BOOST_NO_STD_MIN_MAX\r
+# if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus)\r
\r
namespace std {\r
template <class _Tp>\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
+#if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus)\r
namespace boost{\r
# ifdef __GNUC__\r
__extension__ typedef long long long_long_type;\r
//\r
\r
\r
-#if defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS\r
+#if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) && defined(__cplusplus)\r
\r
# include "boost/type.hpp"\r
# include "boost/non_type.hpp"\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
+#if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus)\r
#include <typeinfo>\r
namespace std{ using ::type_info; }\r
#endif\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
+// warning can be emitted from <iosfwd> if that header is included\r
// before or by this one :-(\r
//\r
\r
inline void current_function_helper()\r
{\r
\r
-#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600))\r
+#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__)\r
\r
# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__\r
\r
} // namespace boost\r
\r
#endif // #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED\r
+\r
\r
#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )\r
\r
+#if defined(__MINGW64__)\r
+#define BOOST_INTERLOCKED_IMPORT\r
+#else\r
+#define BOOST_INTERLOCKED_IMPORT __declspec(dllimport)\r
+#endif\r
+\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
+extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedIncrement( long volatile * );\r
+extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedDecrement( long volatile * );\r
+extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange( long volatile *, long, long );\r
+extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchange( long volatile *, long );\r
+extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd( long volatile *, long );\r
+\r
+# if defined(_M_IA64) || defined(_M_AMD64)\r
+extern "C"BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* );\r
+extern "C"BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* );\r
+# endif\r
\r
} // namespace detail\r
\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
+# if defined(_M_IA64) || defined(_M_AMD64)\r
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER ::boost::detail::InterlockedCompareExchangePointer\r
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER ::boost::detail::InterlockedExchangePointer\r
+# else\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
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \\r
((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))\r
+# endif\r
\r
#else\r
\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_81522C0EB56511DFAB613DB0DFD72085\r
+#define UUID_81522C0EB56511DFAB613DB0DFD72085\r
+\r
+#ifdef BOOST_NO_EXCEPTIONS\r
+# error This header requires exception handling to be enabled.\r
+#endif\r
+\r
+namespace\r
+boost\r
+ {\r
+ namespace\r
+ exception_detail\r
+ {\r
+ class clone_base;\r
+\r
+#ifdef BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR\r
+ #error GMX_REMOVED\r
+ int clone_current_exception_non_intrusive( clone_base const * & cloned );\r
+#endif\r
+\r
+ namespace\r
+ clone_current_exception_result\r
+ {\r
+ int const success=0;\r
+ int const bad_alloc=1;\r
+ int const bad_exception=2;\r
+ int const not_supported=3;\r
+ }\r
+\r
+ inline\r
+ int\r
+ clone_current_exception( clone_base const * & cloned )\r
+ {\r
+#ifdef BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR\r
+ return clone_current_exception_non_intrusive(cloned);\r
+#else\r
+ return clone_current_exception_result::not_supported;\r
+#endif\r
+ }\r
+ }\r
+ }\r
+\r
+#endif\r
#include <boost/exception/info.hpp>\r
#include <boost/exception/diagnostic_information.hpp>\r
#include <boost/exception/detail/type_info.hpp>\r
+#include <boost/exception/detail/clone_current_exception.hpp>\r
#include <boost/shared_ptr.hpp>\r
#include <stdexcept>\r
#include <new>\r
#include <ios>\r
+#include <cstdlib>\r
\r
namespace\r
boost\r
{\r
- typedef shared_ptr<exception_detail::clone_base const> exception_ptr;\r
-\r
+ class exception_ptr;\r
+ BOOST_ATTRIBUTE_NORETURN void rethrow_exception( exception_ptr const & );\r
exception_ptr current_exception();\r
\r
+ class\r
+ exception_ptr\r
+ {\r
+ typedef boost::shared_ptr<exception_detail::clone_base const> impl;\r
+ impl ptr_;\r
+ friend void rethrow_exception( exception_ptr const & );\r
+ typedef exception_detail::clone_base const * (impl::*unspecified_bool_type)() const;\r
+ public:\r
+ exception_ptr()\r
+ {\r
+ }\r
+ explicit\r
+ exception_ptr( impl const & ptr ):\r
+ ptr_(ptr)\r
+ {\r
+ }\r
+ bool\r
+ operator==( exception_ptr const & other ) const\r
+ {\r
+ return ptr_==other.ptr_;\r
+ }\r
+ bool\r
+ operator!=( exception_ptr const & other ) const\r
+ {\r
+ return ptr_!=other.ptr_;\r
+ }\r
+ operator unspecified_bool_type() const\r
+ {\r
+ return ptr_?&impl::get:0;\r
+ }\r
+ };\r
+\r
template <class T>\r
inline\r
exception_ptr\r
boost::exception,\r
std::bad_alloc\r
{\r
+ ~bad_alloc_() throw() { }\r
};\r
\r
- template <int Dummy>\r
+ struct\r
+ bad_exception_:\r
+ boost::exception,\r
+ std::bad_exception\r
+ {\r
+ ~bad_exception_() throw() { }\r
+ };\r
+\r
+ template <class Exception>\r
exception_ptr\r
- get_bad_alloc()\r
+ get_static_exception_object()\r
{\r
- bad_alloc_ ba;\r
- exception_detail::clone_impl<bad_alloc_> c(ba);\r
+ Exception ba;\r
+ exception_detail::clone_impl<Exception> 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
+ static exception_ptr ep(shared_ptr<exception_detail::clone_base const>(new exception_detail::clone_impl<Exception>(c)));\r
return ep;\r
}\r
\r
- template <int Dummy>\r
+ template <class Exception>\r
struct\r
- exception_ptr_bad_alloc\r
+ exception_ptr_static_exception_object\r
{\r
static exception_ptr const e;\r
};\r
\r
- template <int Dummy>\r
+ template <class Exception>\r
exception_ptr const\r
- exception_ptr_bad_alloc<Dummy>::\r
- e = get_bad_alloc<Dummy>();\r
+ exception_ptr_static_exception_object<Exception>::\r
+ e = get_static_exception_object<Exception>();\r
}\r
\r
+#if defined(__GNUC__)\r
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)\r
+# pragma GCC visibility push (default)\r
+# endif\r
+#endif\r
class\r
unknown_exception:\r
public boost::exception,\r
#endif\r
}\r
};\r
+#if defined(__GNUC__)\r
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)\r
+# pragma GCC visibility pop\r
+# endif\r
+#endif\r
\r
namespace\r
exception_detail\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
+ exception_detail::clone_base const * e=0;\r
+ switch(\r
+ exception_detail::clone_current_exception(e) )\r
+ {\r
+ case exception_detail::clone_current_exception_result::\r
+ success:\r
+ {\r
+ BOOST_ASSERT(e!=0);\r
+ return exception_ptr(shared_ptr<exception_detail::clone_base const>(e));\r
+ }\r
+ case exception_detail::clone_current_exception_result::\r
+ bad_alloc:\r
+ {\r
+ BOOST_ASSERT(!e);\r
+ return exception_detail::exception_ptr_static_exception_object<bad_alloc_>::e;\r
+ }\r
+ case exception_detail::clone_current_exception_result::\r
+ bad_exception:\r
+ {\r
+ BOOST_ASSERT(!e);\r
+ return exception_detail::exception_ptr_static_exception_object<bad_exception_>::e;\r
+ }\r
+ default:\r
+ BOOST_ASSERT(0);\r
+ case exception_detail::clone_current_exception_result::\r
+ not_supported:\r
+ {\r
+ BOOST_ASSERT(!e);\r
+ try\r
+ {\r
+ throw;\r
+ }\r
+ catch(\r
+ exception_detail::clone_base & e )\r
+ {\r
+ return exception_ptr(shared_ptr<exception_detail::clone_base const>(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
+ 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
+ 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
}\r
current_exception()\r
{\r
exception_ptr ret;\r
- BOOST_ASSERT(!ret);\r
try\r
{\r
ret=exception_detail::current_exception_impl();\r
catch(\r
std::bad_alloc & )\r
{\r
- ret=exception_detail::exception_ptr_bad_alloc<42>::e;\r
+ ret=exception_detail::exception_ptr_static_exception_object<exception_detail::bad_alloc_>::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
+ ret=exception_detail::exception_ptr_static_exception_object<exception_detail::bad_exception_>::e;\r
}\r
BOOST_ASSERT(ret);\r
return ret;\r
}\r
\r
+ BOOST_ATTRIBUTE_NORETURN\r
inline\r
void\r
rethrow_exception( exception_ptr const & p )\r
{\r
BOOST_ASSERT(p);\r
- p->rethrow();\r
+ p.ptr_->rethrow();\r
+ BOOST_ASSERT(0);\r
+ std::abort();\r
}\r
\r
inline\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
+#error GMX_REMOVED: #include <boost/units/detail/utility.hpp>\r
#endif\r
#include <string>\r
\r
struct\r
type_info_\r
{\r
- detail::sp_typeinfo const & type_;\r
+ detail::sp_typeinfo const * type_;\r
\r
explicit\r
type_info_( detail::sp_typeinfo const & type ):\r
- type_(type)\r
+ type_(&type)\r
{\r
}\r
\r
bool\r
operator<( type_info_ const & a, type_info_ const & b )\r
{\r
- return 0!=(a.type_.before(b.type_));\r
+ return 0!=(a.type_->before(*b.type_));\r
}\r
};\r
}\r
\r
#include <boost/config.hpp>\r
#include <boost/exception/get_error_info.hpp>\r
+#include <boost/exception/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
+#error GMX_REMOVED: #include <boost/units/detail/utility.hpp>\r
#endif\r
#include <exception>\r
#include <sstream>\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
+ try\r
+ {\r
#endif\r
- return c->diagnostic_information(header);\r
+ error_info_container * c=x.data_.get();\r
+ if( !c )\r
+ x.data_.adopt(c=new exception_detail::error_info_container_impl);\r
+ char const * di=c->diagnostic_information(header);\r
+ BOOST_ASSERT(di!=0);\r
+ return di;\r
#ifndef BOOST_NO_EXCEPTIONS\r
- }\r
- catch(...)\r
- {\r
- }\r
+ }\r
+ catch(...)\r
+ {\r
+ return 0;\r
+ }\r
#endif\r
- return 0;\r
}\r
\r
inline\r
std::ostringstream tmp;\r
if( be )\r
{\r
- if( char const * const * f=get_error_info<throw_file>(*be) )\r
+ char const * const * f=get_error_info<throw_file>(*be);\r
+ int const * l=get_error_info<throw_line>(*be);\r
+ char const * const * fn=get_error_info<throw_function>(*be);\r
+ if( !f && !l && !fn )\r
+ tmp << "Throw location unknown (consider using BOOST_THROW_EXCEPTION)\n";\r
+ else\r
{\r
- tmp << *f;\r
- if( int const * l=get_error_info<throw_line>(*be) )\r
- tmp << '(' << *l << "): ";\r
+ if( f )\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
- 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
+ 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
{\r
#endif\r
(void) exception_detail::diagnostic_information_impl(&e,0,false);\r
- return exception_detail::get_diagnostic_information(e,0);\r
+ if( char const * di=exception_detail::get_diagnostic_information(e,0) )\r
+ return di;\r
+ else\r
+ return "Failed to produce boost::diagnostic_information_what()";\r
#ifndef BOOST_NO_EXCEPTIONS\r
}\r
catch(\r
namespace\r
boost\r
{\r
- namespace exception_detail { class clone_base; };\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
+ class exception_ptr;\r
typedef error_info<struct errinfo_nested_exception_,exception_ptr> errinfo_nested_exception;\r
}\r
\r
}\r
};\r
\r
+#if defined(__GNUC__)\r
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)\r
+# pragma GCC visibility push (default)\r
+# endif\r
+#endif\r
class exception;\r
+#if defined(__GNUC__)\r
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)\r
+# pragma GCC visibility pop\r
+# endif\r
+#endif\r
\r
template <class T>\r
class shared_ptr;\r
E const & set_info( E const &, throw_line const & );\r
}\r
\r
+#if defined(__GNUC__)\r
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)\r
+# pragma GCC visibility push (default)\r
+# endif\r
+#endif\r
class\r
exception\r
{\r
mutable char const * throw_file_;\r
mutable int throw_line_;\r
};\r
+#if defined(__GNUC__)\r
+# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)\r
+# pragma GCC visibility pop\r
+# endif\r
+#endif\r
\r
inline\r
exception::\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
+ typedef typename enable_error_info_helper<T,sizeof(exception_detail::dispatch_boost_exception(static_cast<T *>(0)))>::type type;\r
};\r
}\r
\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
struct sp_nothrow_tag {};\r
\r
+template< class D > struct sp_inplace_tag\r
+{\r
+};\r
+\r
class weak_count;\r
\r
class shared_count\r
#endif\r
}\r
\r
+#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )\r
+\r
+ template< class P, class D > shared_count( P p, sp_inplace_tag<D> ): 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_pd< P, D >( p );\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 );\r
+\r
+ if( pi_ == 0 )\r
+ {\r
+ D()( p ); // delete p\r
+ boost::throw_exception( std::bad_alloc() );\r
+ }\r
+\r
+#endif // #ifndef BOOST_NO_EXCEPTIONS\r
+ }\r
+\r
+#endif // !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )\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
\r
+#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )\r
+\r
+ template< class P, class D, class A > shared_count( P p, sp_inplace_tag< 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, 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, a );\r
+ }\r
+ else\r
+ {\r
+ D()( p );\r
+ boost::throw_exception( std::bad_alloc() );\r
+ }\r
+\r
+#endif // #ifndef BOOST_NO_EXCEPTIONS\r
+ }\r
+\r
+#endif // !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )\r
+\r
#ifndef BOOST_NO_AUTO_PTR\r
\r
// auto_ptr<Y> is special cased to provide the strong guarantee\r
__asm__ __volatile__\r
(\r
"0:\n\t"\r
+ ".set push\n\t"\r
+ ".set mips2\n\t"\r
"ll %0, %1\n\t"\r
"addiu %0, 1\n\t"\r
"sc %0, %1\n\t"\r
+ ".set pop\n\t"\r
"beqz %0, 0b":\r
"=&r"( tmp ), "=m"( *pw ):\r
"m"( *pw )\r
__asm__ __volatile__\r
(\r
"0:\n\t"\r
+ ".set push\n\t"\r
+ ".set mips2\n\t"\r
"ll %1, %2\n\t"\r
"addiu %0, %1, -1\n\t"\r
"sc %0, %2\n\t"\r
+ ".set pop\n\t"\r
"beqz %0, 0b\n\t"\r
"addiu %0, %1, -1":\r
"=&r"( rv ), "=&r"( tmp ), "=m"( *pw ):\r
__asm__ __volatile__\r
(\r
"0:\n\t"\r
+ ".set push\n\t"\r
+ ".set mips2\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
+ ".set pop\n\t"\r
"beqz %1, 0b\n\t"\r
"addiu %0, %0, 1\n\t"\r
"1:":\r
{\r
\r
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)\r
-\r
+#error GMX_REMOVED\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
\r
// pre: d(p) must not throw\r
\r
- sp_counted_impl_pd( P p, D d ): ptr(p), del(d)\r
+ sp_counted_impl_pd( P p, D & d ): ptr( p ), del( d )\r
+ {\r
+ }\r
+\r
+ sp_counted_impl_pd( P p ): ptr( p ), del()\r
{\r
}\r
\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
+ sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( d ), a_( a )\r
+ {\r
+ }\r
+\r
+ sp_counted_impl_pda( P p, A a ): p_( p ), d_(), a_( a )\r
{\r
}\r
\r
// are available.\r
//\r
\r
-#if defined(__GNUC__) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 )\r
+#if defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) && !defined( BOOST_SP_NO_SYNC )\r
\r
#define BOOST_SP_HAS_SYNC\r
\r
#undef BOOST_SP_HAS_SYNC\r
#endif\r
\r
+#if defined( __sh__ )\r
+#undef BOOST_SP_HAS_SYNC\r
+#endif\r
+\r
#if defined( __sparc__ )\r
#undef BOOST_SP_HAS_SYNC\r
#endif\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
+#if defined( BOOST_SP_USE_PTHREADS )\r
+# include <boost/smart_ptr/detail/spinlock_pt.hpp>\r
+\r
+#elif 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
\r
static spinlock & spinlock_for( void const * pv )\r
{\r
+#if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 \r
+ std::size_t i = reinterpret_cast< unsigned long long >( pv ) % 41;\r
+#else \r
std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41;\r
+#endif \r
return pool_[ i ];\r
}\r
\r
#include <algorithm> // for std::swap\r
#include <functional> // for std::less\r
#include <typeinfo> // for std::bad_cast\r
+#include <cstddef> // for std::size_t\r
\r
#if !defined(BOOST_NO_IOSTREAM)\r
#if !defined(BOOST_NO_IOSFWD)\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
boost::detail::sp_enable_shared_from_this( this, p, p );\r
}\r
\r
-// generated copy constructor, destructor are fine\r
+// generated copy constructor, destructor are fine...\r
+\r
+#if defined( BOOST_HAS_RVALUE_REFS )\r
+\r
+// ... except in C++0x, move disables the implicit copy\r
+\r
+ shared_ptr( shared_ptr const & r ): px( r.px ), pn( r.pn ) // never throws\r
+ {\r
+ }\r
+\r
+#endif\r
\r
template<class Y>\r
explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn) // may throw\r
return atomic_compare_exchange( p, v, w ); // std::move( w )\r
}\r
\r
-#endif\r
+#endif // !defined(BOOST_SP_NO_ATOMIC_ACCESS)\r
\r
-} // namespace boost\r
+// hash_value\r
\r
-#ifdef BOOST_MSVC\r
-# pragma warning(pop)\r
-#endif\r
+template< class T > struct hash;\r
+\r
+template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p )\r
+{\r
+ return boost::hash< T* >()( p.get() );\r
+}\r
+\r
+} // namespace boost\r
\r
#endif // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)\r
\r
// BOOST_VERSION / 100 % 1000 is the minor version\r
// BOOST_VERSION / 100000 is the major version\r
\r
-#define BOOST_VERSION 104601\r
+#define BOOST_VERSION 104800\r
\r
//\r
// BOOST_LIB_VERSION must be defined to be the same as BOOST_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
+#define BOOST_LIB_VERSION "1_48"\r
\r
#endif\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