diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 95ddcbef..47ea65b0 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -189,7 +189,7 @@ # define BOOST_NO_CXX11_USER_DEFINED_LITERALS #endif -#if !(__has_feature(cxx_alignas) || __has_extension(cxx_alignas)) +#if !__has_feature(cxx_alignas) # define BOOST_NO_CXX11_ALIGNAS #endif @@ -205,23 +205,23 @@ # define BOOST_NO_CXX11_FINAL #endif -#if !(__has_feature(cxx_binary_literals) || __has_extension(cxx_binary_literals)) +#if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__)) # define BOOST_NO_CXX14_BINARY_LITERALS #endif -#if !(__has_feature(cxx_decltype_auto) || __has_extension(cxx_decltype_auto)) +#if !__has_feature(__cxx_decltype_auto__) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif -#if !(__has_feature(cxx_aggregate_nsdmi) || __has_extension(cxx_aggregate_nsdmi)) +#if !__has_feature(__cxx_aggregate_nsdmi__) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif -#if !(__has_feature(cxx_init_captures) || __has_extension(cxx_init_captures)) +#if !__has_feature(__cxx_init_captures__) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #endif -#if !(__has_feature(cxx_generic_lambdas) || __has_extension(cxx_generic_lambdas)) +#if !__has_feature(__cxx_generic_lambdas__) # define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif @@ -239,16 +239,15 @@ // so instead verify that we have a feature that was introduced at the same time as working C++14 // constexpr (generic lambda's in this case): // -#if !__has_feature(cxx_generic_lambdas) \ - || !(__has_feature(cxx_relaxed_constexpr) || __has_extension(cxx_relaxed_constexpr)) +#if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__) # define BOOST_NO_CXX14_CONSTEXPR #endif -#if !(__has_feature(cxx_return_type_deduction) || __has_extension(cxx_return_type_deduction)) +#if !__has_feature(__cxx_return_type_deduction__) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION #endif -#if !(__has_feature(cxx_variable_templates) || __has_extension(cxx_variable_templates)) +#if !__has_feature(__cxx_variable_templates__) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 57b617d1..ce6bbeec 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -104,7 +104,7 @@ #if (_MSC_VER >= 1400) && !defined(_DEBUG) # define BOOST_HAS_NRVO #endif -#if _MSC_VER >= 1500 // 150X == VC++ 9.0 +#if _MSC_VER >= 1600 // 160X == VC++ 10.0 # define BOOST_HAS_PRAGMA_DETECT_MISMATCH #endif // @@ -172,26 +172,26 @@ # define BOOST_NO_CXX11_DECLTYPE_N3276 #endif -// C++11 features supported by VC++ 14 (aka 2014) CTP1 -// Because the CTP is unsupported, unrelease, and only alpha quality, -// it is only supported if BOOST_MSVC_ENABLE_2014_JUN_CTP is defined. +// C++11 features supported by VC++ 14 (aka 2015) Preview // -#if (_MSC_FULL_VER < 190021730) || !defined(BOOST_MSVC_ENABLE_2014_JUN_CTP) +#if (_MSC_FULL_VER < 190022310) # define BOOST_NO_CXX11_NOEXCEPT # define BOOST_NO_CXX11_REF_QUALIFIERS # define BOOST_NO_CXX11_USER_DEFINED_LITERALS # define BOOST_NO_CXX11_ALIGNAS # define BOOST_NO_CXX11_INLINE_NAMESPACES +# define BOOST_NO_CXX11_CHAR16_T +# define BOOST_NO_CXX11_CHAR32_T +# define BOOST_NO_CXX11_UNICODE_LITERALS # define BOOST_NO_CXX14_DECLTYPE_AUTO # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +# define BOOST_NO_CXX14_BINARY_LITERALS +# define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif // C++11 features not supported by any versions -#define BOOST_NO_CXX11_CHAR16_T -#define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_TWO_PHASE_NAME_LOOKUP @@ -199,18 +199,12 @@ #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif -#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif #if (__cplusplus < 201304) // There's no SD6 check for this.... # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif -#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif @@ -290,8 +284,8 @@ #endif // -// last known and checked version is 19.00.22129 (VC14 CTP4): -#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190022129) +// last known and checked version is 19.00.22129 (VC14 Preview): +#if (_MSC_VER > 1800 && _MSC_FULL_VER > 190022310) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # else diff --git a/include/boost/config/platform/haiku.hpp b/include/boost/config/platform/haiku.hpp new file mode 100644 index 00000000..e3910d84 --- /dev/null +++ b/include/boost/config/platform/haiku.hpp @@ -0,0 +1,33 @@ +// (C) Copyright Jessica Hamilton 2014. +// 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. + +// Haiku specific config options: + +#define BOOST_PLATFORM "Haiku" + +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_STDINT_H +#define BOOST_HASH_NO_EXTENSIONS + +#ifndef BOOST_DISABLE_THREADS +# define BOOST_HAS_THREADS +#endif + +#define BOOST_NO_CXX11_HDR_TYPE_TRAITS +#define BOOST_NO_CXX11_ATOMIC_SMART_PTR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_VARIADIC_MACROS + +// +// thread API's not auto detected: +// +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_PTHREAD_YIELD +#define BOOST_HAS_GETTIMEOFDAY + +// boilerplate code: +#include diff --git a/include/boost/config/select_platform_config.hpp b/include/boost/config/select_platform_config.hpp index 2dddc6a2..acd1409e 100644 --- a/include/boost/config/select_platform_config.hpp +++ b/include/boost/config/select_platform_config.hpp @@ -41,6 +41,10 @@ // win32: # define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp" +#elif defined(__HAIKU__) +// Haiku +# define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp" + #elif defined(__BEOS__) // BeOS # define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp" diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index b26d1ff9..24c768cb 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -36,7 +36,8 @@ || defined(_GLIBCXX__PTHREADS) \ || defined(_GLIBCXX_HAS_GTHREADS) \ || defined(_WIN32) \ - || defined(_AIX) + || defined(_AIX) \ + || defined(__HAIKU__) // // If the std lib has thread support turned on, then turn it on in Boost // as well. We do this because some gcc-3.4 std lib headers define _REENTANT diff --git a/include/boost/cxx11_char_types.hpp b/include/boost/cxx11_char_types.hpp new file mode 100644 index 00000000..eab46a46 --- /dev/null +++ b/include/boost/cxx11_char_types.hpp @@ -0,0 +1,70 @@ +// boost cxx11_char_types.hpp --------------------------------------------------------// + +// Copyright Beman Dawes 2011 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +//--------------------------------------------------------------------------------------// +// // +// The purpose of this header is to emulate the C++11 char16_t and char32_t // +// character and string types so that they can be used in both C++11 and C++03 // +// programs. // +// // +// The emulation names use char16/char32 rather than char16_t/char32_t to avoid use // +// of names that are keywords in C++11. // +// // +// The emulation names are placed in namespace boost, as is usual for Boost C++11 // +// emulation names such as those in header . // +// // +// An alternative would would have been to place the C++11 emulation names at global // +// scope, and put the C++11 string types in namespace std. That is the approach taken // +// by Microsoft Visual Studio 2010, but is controversion with some Boost users and // +// developers, and runs counter to usual Boost practice. // +// // +// Thanks to Mathias Gaunard and others for discussions leading to the final form // +// of these typedefs. // +// // +// Boost C++11 C++03 // +// ---------------- -------------- -------------------------------- // +// boost::char16 char16_t uint16_t // +// boost::char32 char32_t uint32_t // +// boost::u16string std::u16string std::basic_string // +// boost::u32string std::u32string std::basic_string // +// // +// Uses the typedefs provided by Microsoft Visual C++ 2010 if present // +// // +// Thanks to Mathias Gaunard and others for discussions leading to the final form // +// of these typedefs. // +// // +//--------------------------------------------------------------------------------------// + +#if !defined(BOOST_CXX11_CHAR_TYPES_HPP) +# define BOOST_CXX11_CHAR_TYPES_HPP + +# include +# include +# include + +namespace boost +{ + +# if defined(BOOST_NO_CHAR16_T) && (!defined(_MSC_VER) || _MSC_VER < 1600) // 1600 == VC++10 + typedef boost::uint_least16_t char16; + typedef std::basic_string u16string; +# else + typedef char16_t char16; + typedef std::u16string u16string; +# endif + +# if defined(BOOST_NO_CHAR32_T) && (!defined(_MSC_VER) || _MSC_VER < 1600) // 1600 == VC++10 + typedef boost::uint_least32_t char32; + typedef std::basic_string u32string; +# else + typedef char32_t char32; + typedef std::u32string u32string; +# endif + +} // namespace boost + +#endif // !defined(BOOST_CXX11_CHAR_TYPES_HPP)