diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index eacbf8e7..7f84ef44 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -71,6 +71,11 @@ The Platform does not provide `` and ``. [[`BOOST_NO_CWCTYPE`][Platform][ The Platform does not provide `` and ``. ]] +[[`BOOST_NO_FENV_H`][Platform, Standard library][ +The C standard library doesn't provide ``. [@../../../../boost/detail/fenv.hpp +``] should be included instead of `` for maximum +portability on platforms which do provide ``. +]] [[`BOOST_NO_DEPENDENT_NESTED_DERIVATIONS`][Compiler][ The compiler fails to compile a nested class that has a dependent base class: `` @@ -399,11 +404,6 @@ The platform has the POSIX API `sched_yield`. [[`BOOST_HAS_SGI_TYPE_TRAITS`][Compiler, Standard library][ The compiler has native support for SGI style type traits. ]] -[[`BOOST_HAS_FENV_H`][Platform, Standard library][ -The platform has a ``. [@../../../../boost/detail/fenv.hpp -``] should be included instead of `` for maximum -portability. -]] [[`BOOST_HAS_STDINT_H`][Platform][ The platform has a `` ]] diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index 2816ab88..a989fd63 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -12,9 +12,6 @@ // // versions check: // we don't support Borland prior to version 5.4: - -#define BOOST_BORLAND __BORLANDC__ - #if __BORLANDC__ < 0x540 # error "Compiler not supported or configured - please reconfigure" #endif diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 2ce67732..08930337 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -13,8 +13,7 @@ # define BOOST_NO_EXCEPTIONS #endif -#if __has_feature(cxx_rtti) -#else +#if !__has_feature(cxx_rtti) # define BOOST_NO_RTTI #endif @@ -24,35 +23,57 @@ #define BOOST_HAS_NRVO -// NOTE: Clang's C++0x support is not worth detecting. However, it -// supports both extern templates and "long long" even in C++98/03 -// mode. +// Clang supports "long long" in all compilation modes. + #define BOOST_NO_AUTO_DECLARATIONS #define BOOST_NO_AUTO_MULTIDECLARATIONS #define BOOST_NO_CHAR16_T #define BOOST_NO_CHAR32_T #define BOOST_NO_CONCEPTS #define BOOST_NO_CONSTEXPR -#define BOOST_NO_DECLTYPE + +#if !__has_feature(cxx_decltype) +# define BOOST_NO_DECLTYPE +#endif + #define BOOST_NO_DEFAULTED_FUNCTIONS -#define BOOST_NO_DELETED_FUNCTIONS + +#if !__has_feature(cxx_deleted_functions) +# define BOOST_NO_DELETED_FUNCTIONS +#endif + #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS + +#if !__has_feature(cxx_default_function_template_args) + #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#endif + #define BOOST_NO_INITIALIZER_LISTS #define BOOST_NO_LAMBDAS #define BOOST_NO_NULLPTR #define BOOST_NO_RAW_LITERALS -#define BOOST_NO_RVALUE_REFERENCES -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_STATIC_ASSERT + +#if !__has_feature(cxx_rvalue_references) +# define BOOST_NO_RVALUE_REFERENCES +#endif + +#if !__has_feature(cxx_strong_enums) +# define BOOST_NO_SCOPED_ENUMS +#endif + +#if !__has_feature(cxx_static_assert) +# define BOOST_NO_STATIC_ASSERT +#endif + #define BOOST_NO_TEMPLATE_ALIASES #define BOOST_NO_UNICODE_LITERALS -#define BOOST_NO_VARIADIC_TEMPLATES -#define BOOST_NO_VARIADIC_MACROS -// HACK: Clang does support extern templates, but Boost's test for -// them is wrong. -#define BOOST_NO_EXTERN_TEMPLATE +#if !__has_feature(cxx_variadic_templates) +# define BOOST_NO_VARIADIC_TEMPLATES +#endif + +// Clang always supports variadic macros +// Clang always supports extern templates #ifndef BOOST_COMPILER # define BOOST_COMPILER "Clang version " __clang_version__ diff --git a/include/boost/config/compiler/comeau.hpp b/include/boost/config/compiler/comeau.hpp index c2cedb17..278222dc 100644 --- a/include/boost/config/compiler/comeau.hpp +++ b/include/boost/config/compiler/comeau.hpp @@ -14,8 +14,6 @@ #include "boost/config/compiler/common_edg.hpp" -#define BOOST_COMO __COMO_VERSION__ - #if (__COMO_VERSION__ <= 4245) # if defined(_MSC_VER) && _MSC_VER <= 1300 diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 7ce7fe6b..f633647d 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -89,6 +89,7 @@ # define BOOST_NO_EXCEPTIONS #endif + // // Threading support: Turn this on unconditionally here (except for // those platforms where we can know for sure). It will get turned off again diff --git a/include/boost/config/compiler/intel.hpp b/include/boost/config/compiler/intel.hpp index e7bc95ba..f209ae77 100644 --- a/include/boost/config/compiler/intel.hpp +++ b/include/boost/config/compiler/intel.hpp @@ -26,7 +26,19 @@ # define BOOST_INTEL_CXX_VERSION __ECC #endif +// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x' +#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && __STDC_HOSTED__) || defined(__GXX_EXPERIMENTAL_CPP0X__) +# define BOOST_INTEL_STDCXX0X +#endif +#if defined(_MSC_VER) && (_MSC_VER >= 1600) +# define BOOST_INTEL_STDCXX0X +#endif + +#ifdef BOOST_INTEL_STDCXX0X +#define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +#else #define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +#endif #define BOOST_INTEL BOOST_INTEL_CXX_VERSION #if defined(_WIN32) || defined(_WIN64) @@ -99,7 +111,7 @@ # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL # endif #endif -#if (defined(__GNUC__) && (__GNUC__ < 4)) || defined(_WIN32) || (BOOST_INTEL_CXX_VERSION <= 1110) +#if (defined(__GNUC__) && (__GNUC__ < 4)) || defined(_WIN32) || (BOOST_INTEL_CXX_VERSION <= 1200) // GCC or VC emulation: #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #endif @@ -179,6 +191,32 @@ template<> struct assert_intrinsic_wchar_t {}; # define BOOST_SYMBOL_IMPORT # define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) #endif +// +// C++0x features +// - ICC added static_assert in 11.0 (first version with C++0x support) +// +#if defined(BOOST_INTEL_STDCXX0X) +# undef BOOST_NO_STATIC_ASSERT +// +// These pass our test cases, but aren't officially supported according to: +// http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ +// +//# undef BOOST_NO_LAMBDAS +//# undef BOOST_NO_DECLTYPE +//# undef BOOST_NO_AUTO_DECLARATIONS +//# undef BOOST_NO_AUTO_MULTIDECLARATIONS +#endif + +#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1200) +# undef BOOST_NO_RVALUE_REFERENCES +# undef BOOST_NO_SCOPED_ENUMS +# undef BOOST_NO_DELETED_FUNCTIONS +# undef BOOST_NO_DEFAULTED_FUNCTIONS +# undef BOOST_NO_LAMBDAS +# undef BOOST_NO_DECLTYPE +# undef BOOST_NO_AUTO_DECLARATIONS +# undef BOOST_NO_AUTO_MULTIDECLARATIONS +#endif // // last known and checked version: diff --git a/include/boost/config/compiler/metrowerks.hpp b/include/boost/config/compiler/metrowerks.hpp index 81854a0f..21083b7a 100644 --- a/include/boost/config/compiler/metrowerks.hpp +++ b/include/boost/config/compiler/metrowerks.hpp @@ -12,8 +12,6 @@ // Metrowerks C++ compiler setup: -#define BOOST_MWERKS __MWERKS__ - // locale support is disabled when linking with the dynamic runtime # ifdef _MSL_NO_LOCALE # define BOOST_NO_STD_LOCALE diff --git a/include/boost/config/compiler/nvcc.hpp b/include/boost/config/compiler/nvcc.hpp index eaecf374..03203fb5 100644 --- a/include/boost/config/compiler/nvcc.hpp +++ b/include/boost/config/compiler/nvcc.hpp @@ -17,71 +17,12 @@ // Boost support macro for NVCC // NVCC Basically behaves like some flavor of MSVC6 + some specific quirks -#define BOOST_NO_INCLASS_MEMBER_INITIALIZATION -#define BOOST_MSVC6_MEMBER_TEMPLATES -#define BOOST_HAS_UNISTD_H -#define BOOST_HAS_STDINT_H -#define BOOST_HAS_SIGACTION -#define BOOST_HAS_SCHED_YIELD -#define BOOST_HAS_PTHREADS -#define BOOST_HAS_PTHREAD_YIELD -#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -#define BOOST_HAS_PARTIAL_STD_ALLOCATOR -#define BOOST_HAS_NRVO -#define BOOST_HAS_NL_TYPES_H -#define BOOST_HAS_NANOSLEEP -#define BOOST_HAS_LONG_LONG -#define BOOST_HAS_LOG1P -#define BOOST_HAS_GETTIMEOFDAY -#define BOOST_HAS_EXPM1 -#define BOOST_HAS_DIRENT_H -#define BOOST_HAS_CLOCK_GETTIME -#define BOOST_NO_VARIADIC_TEMPLATES -#define BOOST_NO_VARIADIC_MACROS -#define BOOST_NO_UNICODE_LITERALS -#define BOOST_NO_TEMPLATE_ALIASES -#define BOOST_NO_STD_UNORDERED -#define BOOST_NO_STATIC_ASSERT -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_RVALUE_REFERENCES -#define BOOST_NO_RAW_LITERALS -#define BOOST_NO_NULLPTR -#define BOOST_NO_LAMBDAS -#define BOOST_NO_INITIALIZER_LISTS -#define BOOST_NO_MS_INT64_NUMERIC_LIMITS -#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_DELETED_FUNCTIONS -#define BOOST_NO_DEFAULTED_FUNCTIONS -#define BOOST_NO_DECLTYPE -#define BOOST_NO_CONSTEXPR -#define BOOST_NO_CONCEPTS -#define BOOST_NO_CHAR32_T -#define BOOST_NO_CHAR16_T -#define BOOST_NO_AUTO_MULTIDECLARATIONS -#define BOOST_NO_AUTO_DECLARATIONS -#define BOOST_NO_0X_HDR_UNORDERED_SET -#define BOOST_NO_0X_HDR_UNORDERED_MAP -#define BOOST_NO_0X_HDR_TYPE_TRAITS -#define BOOST_NO_0X_HDR_TUPLE -#define BOOST_NO_0X_HDR_THREAD -#define BOOST_NO_0X_HDR_TYPEINDEX -#define BOOST_NO_0X_HDR_SYSTEM_ERROR -#define BOOST_NO_0X_HDR_REGEX -#define BOOST_NO_0X_HDR_RATIO -#define BOOST_NO_0X_HDR_RANDOM -#define BOOST_NO_0X_HDR_MUTEX -#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS -#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS -#define BOOST_NO_0X_HDR_INITIALIZER_LIST -#define BOOST_NO_0X_HDR_FUTURE -#define BOOST_NO_0X_HDR_FORWARD_LIST -#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS -#define BOOST_NO_0X_HDR_CONDITION_VARIABLE -#define BOOST_NO_0X_HDR_CONCEPTS -#define BOOST_NO_0X_HDR_CODECVT -#define BOOST_NO_0X_HDR_CHRONO -#define BOOST_NO_0X_HDR_ARRAY +#ifdef __GNUC__ +#include + +#elif defined(_MSC_VER) + +#include + +#endif diff --git a/include/boost/config/compiler/sunpro_cc.hpp b/include/boost/config/compiler/sunpro_cc.hpp index e718dbb6..85fa4625 100644 --- a/include/boost/config/compiler/sunpro_cc.hpp +++ b/include/boost/config/compiler/sunpro_cc.hpp @@ -11,10 +11,6 @@ // Sun C++ compiler setup: -// Macro identifying the Sun compiler - -#define BOOST_SUNCC __SUNPRO_CC - # if __SUNPRO_CC <= 0x500 # define BOOST_NO_MEMBER_TEMPLATES # define BOOST_NO_FUNCTION_TEMPLATE_ORDERING diff --git a/include/boost/config/compiler/vacpp.hpp b/include/boost/config/compiler/vacpp.hpp index 5ae9c285..7ad616e4 100644 --- a/include/boost/config/compiler/vacpp.hpp +++ b/include/boost/config/compiler/vacpp.hpp @@ -27,7 +27,6 @@ #if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG) # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS -# define BOOST_NO_INITIALIZER_LISTS #endif #if (__IBMCPP__ <= 1110) @@ -54,44 +53,66 @@ #error "Compiler not supported or configured - please reconfigure" #endif // -// last known and checked version is 600: -#if (__IBMCPP__ > 1010) +// last known and checked version is 1110: +#if (__IBMCPP__ > 1110) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif // Some versions of the compiler have issues with default arguments on partial specializations +#if __IBMCPP__ <= 1010 #define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS +#endif // // C++0x features // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // -#define BOOST_NO_AUTO_DECLARATIONS -#define BOOST_NO_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CHAR16_T -#define BOOST_NO_CHAR32_T +#if ! __IBMCPP_AUTO_TYPEDEDUCTION +# define BOOST_NO_AUTO_DECLARATIONS +# define BOOST_NO_AUTO_MULTIDECLARATIONS +#endif +#if ! __IBMCPP_UTF_LITERAL__ +# define BOOST_NO_CHAR16_T +# define BOOST_NO_CHAR32_T +#endif #define BOOST_NO_CONCEPTS #define BOOST_NO_CONSTEXPR -#define BOOST_NO_DECLTYPE +#if ! __IBMCPP_DECLTYPE +# define BOOST_NO_DECLTYPE +#else +# define BOOST_HAS_DECLTYPE +#endif #define BOOST_NO_DEFAULTED_FUNCTIONS #define BOOST_NO_DELETED_FUNCTIONS #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_EXTERN_TEMPLATE -#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#if ! __IBMCPP_EXTERN_TEMPLATE +# define BOOST_NO_EXTERN_TEMPLATE +#endif +#if ! __IBMCPP_VARIADIC_TEMPLATES +// not enabled separately at this time +# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +#endif +#define BOOST_NO_INITIALIZER_LISTS #define BOOST_NO_LAMBDAS #define BOOST_NO_NULLPTR #define BOOST_NO_RAW_LITERALS #define BOOST_NO_RVALUE_REFERENCES #define BOOST_NO_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_STATIC_ASSERT +#if ! __IBMCPP_STATIC_ASSERT +# define BOOST_NO_STATIC_ASSERT +#endif #define BOOST_NO_TEMPLATE_ALIASES #define BOOST_NO_UNICODE_LITERALS -#define BOOST_NO_VARIADIC_TEMPLATES -#define BOOST_NO_VARIADIC_MACROS +#if ! __IBMCPP_VARIADIC_TEMPLATES +# define BOOST_NO_VARIADIC_TEMPLATES +#endif +#if ! __C99_MACRO_WITH_VA_ARGS +# define BOOST_NO_VARIADIC_MACROS +#endif diff --git a/include/boost/config/platform/aix.hpp b/include/boost/config/platform/aix.hpp index ec22a42f..894ef42c 100644 --- a/include/boost/config/platform/aix.hpp +++ b/include/boost/config/platform/aix.hpp @@ -1,5 +1,4 @@ // (C) Copyright John Maddock 2001 - 2002. -// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -10,13 +9,6 @@ #define BOOST_PLATFORM "IBM Aix" -#define BOOST_NIX 1 -//#define BOOST_GENETIC_NIX 1 -#define BOOST_TRADEMARK_NIX 1 -//#define BOOST_FUNCTIONAL_NIX 1 - -#define BOOST_AIX 1 - #define BOOST_HAS_UNISTD_H #define BOOST_HAS_NL_TYPES_H #define BOOST_HAS_NANOSLEEP diff --git a/include/boost/config/platform/amigaos.hpp b/include/boost/config/platform/amigaos.hpp index a1f12f6d..34bcf412 100644 --- a/include/boost/config/platform/amigaos.hpp +++ b/include/boost/config/platform/amigaos.hpp @@ -1,5 +1,4 @@ // (C) Copyright John Maddock 2002. -// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,8 +7,6 @@ #define BOOST_PLATFORM "AmigaOS" -#define BOOST_AMIGA 1 - #define BOOST_DISABLE_THREADS #define BOOST_NO_CWCHAR #define BOOST_NO_STD_WSTRING diff --git a/include/boost/config/platform/beos.hpp b/include/boost/config/platform/beos.hpp index cda00164..48c3d8dc 100644 --- a/include/boost/config/platform/beos.hpp +++ b/include/boost/config/platform/beos.hpp @@ -1,5 +1,4 @@ // (C) Copyright John Maddock 2001. -// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -10,13 +9,6 @@ #define BOOST_PLATFORM "BeOS" -#define BOOST_BEOS 1 - -#define BOOST_NIX 1 -//#define BOOST_GENETIC_NIX 1 -//#define BOOST_TRADEMARK_NIX 1 -#define BOOST_FUNCTIONAL_NIX 1 - #define BOOST_NO_CWCHAR #define BOOST_NO_CWCTYPE #define BOOST_HAS_UNISTD_H diff --git a/include/boost/config/platform/bsd.hpp b/include/boost/config/platform/bsd.hpp index 9720c777..a0142978 100644 --- a/include/boost/config/platform/bsd.hpp +++ b/include/boost/config/platform/bsd.hpp @@ -1,7 +1,6 @@ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001. // (C) Copyright Douglas Gregor 2002. -// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -10,30 +9,18 @@ // generic BSD config options: -#if !defined(__FreeBSD__) && \ - !defined(__NetBSD__) && \ - !defined(__OpenBSD__) && \ - !defined(__DragonFly__) - #error "This platform is not BSD" +#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) +#error "This platform is not BSD" #endif -#define BOOST_NIX 1 -#define BOOST_GENETIC_NIX 1 -//#define BOOST_TRADEMARK_NIX 1 -//#define BOOST_FUNCTIONAL_NIX 1 - #ifdef __FreeBSD__ - #define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__) - #define BOOST_FREEBSD __FreeBSD__ +#define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__) #elif defined(__NetBSD__) - #define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__) - #define BOOST_NETBSD __NetBSD__ +#define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__) #elif defined(__OpenBSD__) - #define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__) - #define BOOST_OPENBSD __OpenBSD__ +#define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__) #elif defined(__DragonFly__) - #define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__) - #define BOOST_DFBSD __DragonFly__ +#define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__) #endif // diff --git a/include/boost/config/platform/cygwin.hpp b/include/boost/config/platform/cygwin.hpp index aba37193..b7ef572f 100644 --- a/include/boost/config/platform/cygwin.hpp +++ b/include/boost/config/platform/cygwin.hpp @@ -1,56 +1,55 @@ -// (C) Copyright John Maddock 2001 - 2003 -// (C) Copyright Bryce Lelbach 2010 -// -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// See http://www.boost.org for most recent version. +// (C) Copyright John Maddock 2001 - 2003. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#define BOOST_PLATFORM "Cygwin" // Platform name. -#define BOOST_CYGWIN __CYGWIN__ // Boost platform ID macros. +// See http://www.boost.org for most recent version. +// cygwin specific config options: + +#define BOOST_PLATFORM "Cygwin" #define BOOST_HAS_DIRENT_H #define BOOST_HAS_LOG1P #define BOOST_HAS_EXPM1 -#define BOOST_NIX 1 -//#define BOOST_GENETIC_NIX 1 -//#define BOOST_TRADEMARK_NIX 1 -#define BOOST_FUNCTIONAL_NIX 1 - -// See if we have POSIX threads, otherwise revert to native Win threads. +// +// Threading API: +// See if we have POSIX threads, if we do use them, otherwise +// revert to native Win threads. #define BOOST_HAS_UNISTD_H #include - -#if defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0) && \ - !defined(BOOST_HAS_WINTHREADS) - #define BOOST_HAS_PTHREADS - #define BOOST_HAS_SCHED_YIELD - #define BOOST_HAS_GETTIMEOFDAY - #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE - #define BOOST_HAS_SIGACTION +#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) +# define BOOST_HAS_PTHREADS +# define BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_SIGACTION #else - #if !defined(BOOST_HAS_WINTHREADS) - #define BOOST_HAS_WINTHREADS - #endif - #define BOOST_HAS_FTIME +# if !defined(BOOST_HAS_WINTHREADS) +# define BOOST_HAS_WINTHREADS +# endif +# define BOOST_HAS_FTIME #endif -// Find out if we have a stdint.h, there should be a better way to do this. +// +// find out if we have a stdint.h, there should be a better way to do this: +// #include - #ifdef _STDINT_H - #define BOOST_HAS_STDINT_H +#define BOOST_HAS_STDINT_H #endif /// Cygwin has no fenv.h #define BOOST_NO_FENV_H +// boilerplate code: #include -// Cygwin lies about XSI conformance, there is no nl_types.h. +// +// Cygwin lies about XSI conformance, there is no nl_types.h: +// #ifdef BOOST_HAS_NL_TYPES_H - #undef BOOST_HAS_NL_TYPES_H +# undef BOOST_HAS_NL_TYPES_H #endif diff --git a/include/boost/config/platform/hpux.hpp b/include/boost/config/platform/hpux.hpp index 2aefb2d2..19ce68e5 100644 --- a/include/boost/config/platform/hpux.hpp +++ b/include/boost/config/platform/hpux.hpp @@ -3,7 +3,6 @@ // (C) Copyright David Abrahams 2002. // (C) Copyright Toon Knapen 2003. // (C) Copyright Boris Gubenko 2006 - 2007. -// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -14,13 +13,6 @@ #define BOOST_PLATFORM "HP-UX" -#define BOOST_HPUX 1 // platform ID macro - -#define BOOST_NIX 1 -//#define BOOST_GENETIC_NIX 1 -#define BOOST_TRADEMARK_NIX 1 -//#define BOOST_FUNCTIONAL_NIX 1 - // In principle, HP-UX has a nice under the name // However, it has the following problem: // Use of UINT32_C(0) results in "0u l" for the preprocessed source diff --git a/include/boost/config/platform/irix.hpp b/include/boost/config/platform/irix.hpp index 4915d813..aeae49c8 100644 --- a/include/boost/config/platform/irix.hpp +++ b/include/boost/config/platform/irix.hpp @@ -1,6 +1,5 @@ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2003. -// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -12,11 +11,6 @@ #define BOOST_PLATFORM "SGI Irix" -#define BOOST_NIX 1 -//#define BOOST_GENETIC_NIX 1 -#define BOOST_TRADEMARK_NIX 1 -//#define BOOST_FUNCTIONAL_NIX 1 - #define BOOST_NO_SWPRINTF // // these are not auto detected by POSIX feature tests: diff --git a/include/boost/config/platform/linux.hpp b/include/boost/config/platform/linux.hpp index 3e7f02c7..51ae1334 100644 --- a/include/boost/config/platform/linux.hpp +++ b/include/boost/config/platform/linux.hpp @@ -1,6 +1,5 @@ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001 - 2003. -// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -14,13 +13,6 @@ // make sure we have __GLIBC_PREREQ if available at all #include -#define BOOST_NIX 1 -//#define BOOST_GENETIC_NIX 1 -//#define BOOST_TRADEMARK_NIX 1 -#define BOOST_FUNCTIONAL_NIX 1 - -#define BOOST_LINUX 1 - // // added to glibc 2.1.1 // We can only test for 2.1 though: diff --git a/include/boost/config/platform/macos.hpp b/include/boost/config/platform/macos.hpp index d018703d..2780ef99 100644 --- a/include/boost/config/platform/macos.hpp +++ b/include/boost/config/platform/macos.hpp @@ -1,7 +1,6 @@ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001 - 2002. // (C) Copyright Bill Kempf 2002. -// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -14,11 +13,6 @@ #if __MACH__ && !defined(_MSL_USING_MSL_C) -#define BOOST_NIX 1 -//#define BOOST_GENETIC_NIX 1 -#define BOOST_TRADEMARK_NIX 1 -//#define BOOST_FUNCTIONAL_NIX 1 - // Using the Mac OS X system BSD-style C library. # ifndef BOOST_HAS_UNISTD_H diff --git a/include/boost/config/platform/qnxnto.hpp b/include/boost/config/platform/qnxnto.hpp index 0c54373d..b1377c8d 100644 --- a/include/boost/config/platform/qnxnto.hpp +++ b/include/boost/config/platform/qnxnto.hpp @@ -1,5 +1,4 @@ // (C) Copyright Jim Douglas 2005. -// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,15 +7,8 @@ // QNX specific config options: -#define BOOST_QNX 1 - #define BOOST_PLATFORM "QNX" -#define BOOST_NIX 1 -//#define BOOST_GENETIC_NIX 1 -//#define BOOST_TRADEMARK_NIX 1 -#define BOOST_FUNCTIONAL_NIX 1 - #define BOOST_HAS_UNISTD_H #include diff --git a/include/boost/config/platform/solaris.hpp b/include/boost/config/platform/solaris.hpp index 9a9e1f46..9f925666 100644 --- a/include/boost/config/platform/solaris.hpp +++ b/include/boost/config/platform/solaris.hpp @@ -1,6 +1,5 @@ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2003. -// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -11,11 +10,6 @@ #define BOOST_PLATFORM "Sun Solaris" -#define BOOST_NIX 1 -//#define BOOST_GENETIC_NIX 1 -#define BOOST_TRADEMARK_NIX 1 -//#define BOOST_FUNCTIONAL_NIX 1 - #define BOOST_HAS_GETTIMEOFDAY // boilerplate code: diff --git a/include/boost/config/platform/symbian.hpp b/include/boost/config/platform/symbian.hpp index 798dfac4..ad379431 100644 --- a/include/boost/config/platform/symbian.hpp +++ b/include/boost/config/platform/symbian.hpp @@ -1,7 +1,6 @@ // (C) Copyright Yuriy Krasnoschek 2009. // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001 - 2003. -// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -10,16 +9,13 @@ // symbian specific config options: + #define BOOST_PLATFORM "Symbian" #define BOOST_SYMBIAN 1 + #if defined(__S60_3X__) -// Open C / C++ plugin was introdused in this SDK, earlier versions don't have -// CRT / STL -# define BOOST_NIX 1 -//# define BOOST_GENETIC_NIX 1 -//# define BOOST_TRADEMARK_NIX 1 -# define BOOST_FUNCTIONAL_NIX 1 +// Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL # define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK // make sure we have __GLIBC_PREREQ if available at all # include diff --git a/include/boost/config/platform/vxworks.hpp b/include/boost/config/platform/vxworks.hpp index 3b128bf4..6ec5171e 100644 --- a/include/boost/config/platform/vxworks.hpp +++ b/include/boost/config/platform/vxworks.hpp @@ -1,5 +1,4 @@ // (C) Copyright Dustin Spicuzza 2009. -// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -24,11 +23,6 @@ #define _POSIX_TIMERS 1 #define _POSIX_THREADS 1 -#define BOOST_NIX 1 -//#define BOOST_GENETIC_NIX 1 -#define BOOST_TRADEMARK_NIX 1 -//#define BOOST_FUNCTIONAL_NIX 1 - // vxworks doesn't work with asio serial ports #define BOOST_ASIO_DISABLE_SERIAL_PORT diff --git a/include/boost/config/select_stdlib_config.hpp b/include/boost/config/select_stdlib_config.hpp index 2a1430ae..f0204823 100644 --- a/include/boost/config/select_stdlib_config.hpp +++ b/include/boost/config/select_stdlib_config.hpp @@ -40,6 +40,10 @@ // Rogue Wave library: # define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp" +#elif defined(_LIBCPP_VERSION) +// libc++ +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp" + #elif defined(__GLIBCPP__) || defined(__GLIBCXX__) // GNU libstdc++ 3 # define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp" diff --git a/include/boost/config/stdlib/libcpp.hpp b/include/boost/config/stdlib/libcpp.hpp new file mode 100644 index 00000000..db7f6f15 --- /dev/null +++ b/include/boost/config/stdlib/libcpp.hpp @@ -0,0 +1,34 @@ +// (C) Copyright Christopher Jefferson 2011. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// config for libc++ +// Might need more in here later. + +#if !defined(_LIBCPP_VERSION) +# include +# if !defined(_LIBCPP_VERSION) +# error "This is not libc++!" +# endif +#endif + +#define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION) + +#define BOOST_HAS_THREADS + +#define BOOST_NO_0X_HDR_CONCEPTS +#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS +#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS +#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS + +#ifdef _LIBCPP_HAS_NO_VARIADICS +# define BOOST_NO_0X_HDR_TUPLE +#endif + +// libc++ uses a non-standard messages_base +#define BOOST_NO_STD_MESSAGES + +// --- end --- diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index 75bfc4aa..c048b896 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -9,6 +9,8 @@ // config for libstdc++ v3 // not much to go in here: +#define BOOST_GNU_STDLIB 1 + #ifdef __GLIBCXX__ #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__) #else diff --git a/include/boost/config/stdlib/roguewave.hpp b/include/boost/config/stdlib/roguewave.hpp index dcd0af84..b43623b5 100644 --- a/include/boost/config/stdlib/roguewave.hpp +++ b/include/boost/config/stdlib/roguewave.hpp @@ -10,6 +10,8 @@ // Rogue Wave std lib: +#define BOOST_RW_STDLIB 1 + #if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) # include # if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) @@ -154,7 +156,10 @@ // C++0x headers not yet implemented // +#if _RWSTD_VER < 0x05000000 # define BOOST_NO_0X_HDR_ARRAY +# define BOOST_NO_0X_HDR_TYPE_TRAITS +#endif # define BOOST_NO_0X_HDR_CHRONO # define BOOST_NO_0X_HDR_CODECVT # define BOOST_NO_0X_HDR_CONCEPTS @@ -172,7 +177,6 @@ # define BOOST_NO_0X_HDR_SYSTEM_ERROR # define BOOST_NO_0X_HDR_THREAD # define BOOST_NO_0X_HDR_TUPLE -# define BOOST_NO_0X_HDR_TYPE_TRAITS # define BOOST_NO_0X_HDR_TYPEINDEX # define BOOST_NO_STD_UNORDERED // deprecated; see following # define BOOST_NO_0X_HDR_UNORDERED_MAP diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index 4e608d24..9cce6fd7 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -600,7 +600,7 @@ namespace boost{ // the global definition into std namespace: #ifdef BOOST_NO_STD_TYPEINFO #include -namespace std{ using ::typeinfo; } +namespace std{ using ::type_info; } #endif // ---------------------------------------------------------------------------// @@ -639,10 +639,6 @@ namespace std{ using ::typeinfo; } # if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \ || defined(_POSIX_SOURCE) # define BOOST_PLATFORM "Generic Unix" -# define BOOST_NIX 1 -//# define BOOST_GENETIC_NIX 1 -//# define BOOST_TRADEMARK_NIX 1 -# define BOOST_FUNCTIONAL_NIX 1 # else # define BOOST_PLATFORM "Unknown" # endif diff --git a/test/math_info.cpp b/test/math_info.cpp index e06c7454..47fe9ffe 100644 --- a/test/math_info.cpp +++ b/test/math_info.cpp @@ -181,7 +181,8 @@ bool is_same_type(T, U) // the floating point types or not: // namespace std{ -#if !BOOST_WORKAROUND(BOOST_MSVC, == 1300) +#if !BOOST_WORKAROUND(BOOST_MSVC, == 1300) && \ + !defined(_LIBCPP_VERSION) template char abs(T) {