From 155d20ab3c967aea5aeb7f6cbc2dc244ef7a705f Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 10 Jun 2017 18:27:31 -0700 Subject: [PATCH] Update to boost v1.64.0 --- Readme.md | 2 +- boost/config/auto_link.hpp | 11 +- boost/config/compiler/borland.hpp | 1 + boost/config/compiler/clang.hpp | 6 +- boost/config/compiler/codegear.hpp | 1 + boost/config/compiler/common_edg.hpp | 1 + boost/config/compiler/cray.hpp | 1 + boost/config/compiler/digitalmars.hpp | 1 + boost/config/compiler/gcc.hpp | 1 + boost/config/compiler/gcc_xml.hpp | 1 + boost/config/compiler/hp_acc.hpp | 1 + boost/config/compiler/intel.hpp | 25 +- boost/config/compiler/metrowerks.hpp | 1 + boost/config/compiler/mpw.hpp | 1 + boost/config/compiler/pathscale.hpp | 1 + boost/config/compiler/pgi.hpp | 1 + boost/config/compiler/sunpro_cc.hpp | 1 + boost/config/compiler/vacpp.hpp | 1 + boost/config/compiler/visualc.hpp | 29 +- boost/config/platform/cygwin.hpp | 3 +- boost/config/stdlib/dinkumware.hpp | 30 ++ boost/config/stdlib/libstdcpp3.hpp | 8 +- boost/config/suffix.hpp | 21 +- boost/container/allocator_traits.hpp | 54 +-- .../container/detail/advanced_insert_int.hpp | 4 +- boost/container/detail/workaround.hpp | 4 + boost/container/new_allocator.hpp | 6 +- boost/container/node_handle.hpp | 5 +- boost/container/vector.hpp | 10 +- boost/core/addressof.hpp | 345 ++++++++++++------ boost/core/demangle.hpp | 13 +- boost/detail/workaround.hpp | 5 + boost/intrusive/bstree.hpp | 2 +- boost/intrusive/bstree_algorithms.hpp | 3 + boost/intrusive/detail/key_nodeptr_comp.hpp | 14 +- boost/intrusive/slist.hpp | 2 +- boost/move/default_delete.hpp | 18 +- boost/move/detail/unique_ptr_meta_utils.hpp | 2 +- boost/preprocessor/cat.hpp | 2 +- boost/preprocessor/config/config.hpp | 10 +- boost/smart_ptr/detail/sp_noexcept.hpp | 30 ++ boost/smart_ptr/intrusive_ptr.hpp | 7 +- boost/type_index/stl_type_index.hpp | 4 +- boost/type_traits.hpp | 1 + .../detail/common_arithmetic_type.hpp | 6 +- boost/type_traits/is_rvalue_reference.hpp | 2 +- boost/type_traits/make_void.hpp | 52 +++ boost/utility.hpp | 4 +- boost/variant/polymorphic_get.hpp | 14 +- boost/variant/recursive_wrapper_fwd.hpp | 6 +- boost/variant/variant.hpp | 36 +- boost/variant/variant_fwd.hpp | 2 +- boost/version.hpp | 4 +- 53 files changed, 573 insertions(+), 243 deletions(-) create mode 100644 boost/smart_ptr/detail/sp_noexcept.hpp create mode 100644 boost/type_traits/make_void.hpp diff --git a/Readme.md b/Readme.md index 1f27bc1..10f2f6a 100644 --- a/Readme.md +++ b/Readme.md @@ -1,7 +1,7 @@ Boost libraries - trimmed down for Citra ======================================== -This is a subset of Boost v1.63.0 generated using the bcp tool. To get a list of boost modules guaranteed to exist, check the build script. +This is a subset of Boost v1.64.0 generated using the bcp tool. To get a list of boost modules guaranteed to exist, check the build script. Updating this repo (on Windows) =============================== diff --git a/boost/config/auto_link.hpp b/boost/config/auto_link.hpp index 56a16b0..c71e803 100644 --- a/boost/config/auto_link.hpp +++ b/boost/config/auto_link.hpp @@ -161,10 +161,15 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. // vc12: # define BOOST_LIB_TOOLSET "vc120" -# elif defined(BOOST_MSVC) +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1910) - // vc14: -# define BOOST_LIB_TOOLSET "vc140" + // vc14: +# define BOOST_LIB_TOOLSET "vc140" + +# elif defined(BOOST_MSVC) + + // vc14.1: +# define BOOST_LIB_TOOLSET "vc141" # elif defined(__BORLANDC__) diff --git a/boost/config/compiler/borland.hpp b/boost/config/compiler/borland.hpp index ccd930e..b749496 100644 --- a/boost/config/compiler/borland.hpp +++ b/boost/config/compiler/borland.hpp @@ -185,6 +185,7 @@ #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported #define BOOST_NO_CXX11_VARIADIC_TEMPLATES diff --git a/boost/config/compiler/clang.hpp b/boost/config/compiler/clang.hpp index 150e3c0..175229c 100644 --- a/boost/config/compiler/clang.hpp +++ b/boost/config/compiler/clang.hpp @@ -57,7 +57,7 @@ #define BOOST_HAS_NRVO // Branch prediction hints -#if defined(__has_builtin) +#if !defined (__c2__) && defined(__has_builtin) #if __has_builtin(__builtin_expect) #define BOOST_LIKELY(x) __builtin_expect(x, 1) #define BOOST_UNLIKELY(x) __builtin_expect(x, 0) @@ -282,6 +282,10 @@ # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif +#if __cplusplus < 201103L +#define BOOST_NO_CXX11_SFINAE_EXPR +#endif + #if __cplusplus < 201400 // All versions with __cplusplus above this value seem to support this: # define BOOST_NO_CXX14_DIGIT_SEPARATORS diff --git a/boost/config/compiler/codegear.hpp b/boost/config/compiler/codegear.hpp index e2f6061..3c5262f 100644 --- a/boost/config/compiler/codegear.hpp +++ b/boost/config/compiler/codegear.hpp @@ -112,6 +112,7 @@ #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES diff --git a/boost/config/compiler/common_edg.hpp b/boost/config/compiler/common_edg.hpp index c09faeb..eab9378 100644 --- a/boost/config/compiler/common_edg.hpp +++ b/boost/config/compiler/common_edg.hpp @@ -95,6 +95,7 @@ #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS diff --git a/boost/config/compiler/cray.hpp b/boost/config/compiler/cray.hpp index 837f815..eab5287 100644 --- a/boost/config/compiler/cray.hpp +++ b/boost/config/compiler/cray.hpp @@ -39,6 +39,7 @@ #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_RANGE_BASED_FOR diff --git a/boost/config/compiler/digitalmars.hpp b/boost/config/compiler/digitalmars.hpp index c344aae..e371a68 100644 --- a/boost/config/compiler/digitalmars.hpp +++ b/boost/config/compiler/digitalmars.hpp @@ -71,6 +71,7 @@ #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS diff --git a/boost/config/compiler/gcc.hpp b/boost/config/compiler/gcc.hpp index e319d04..c82cbc7 100644 --- a/boost/config/compiler/gcc.hpp +++ b/boost/config/compiler/gcc.hpp @@ -253,6 +253,7 @@ #if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11) # define BOOST_NO_CXX11_ALIGNAS # define BOOST_NO_CXX11_THREAD_LOCAL +# define BOOST_NO_CXX11_SFINAE_EXPR #endif // C++0x features in 4.8.1 and later diff --git a/boost/config/compiler/gcc_xml.hpp b/boost/config/compiler/gcc_xml.hpp index b56c786..63b08ac 100644 --- a/boost/config/compiler/gcc_xml.hpp +++ b/boost/config/compiler/gcc_xml.hpp @@ -46,6 +46,7 @@ # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_SCOPED_ENUMS # define BOOST_NO_SFINAE_EXPR +# define BOOST_NO_CXX11_SFINAE_EXPR # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_LAMBDAS # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS diff --git a/boost/config/compiler/hp_acc.hpp b/boost/config/compiler/hp_acc.hpp index a773b8c..9df18ea 100644 --- a/boost/config/compiler/hp_acc.hpp +++ b/boost/config/compiler/hp_acc.hpp @@ -114,6 +114,7 @@ #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS diff --git a/boost/config/compiler/intel.hpp b/boost/config/compiler/intel.hpp index 1885ea2..f55189a 100644 --- a/boost/config/compiler/intel.hpp +++ b/boost/config/compiler/intel.hpp @@ -39,15 +39,20 @@ # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif -#else +#else // defined(_MSC_VER) #include #undef BOOST_GCC_VERSION #undef BOOST_GCC_CXX11 +// Broken in all versions up to 17 (newer versions not tested) +#if (__INTEL_COMPILER <= 1700) && !defined(BOOST_NO_CXX14_CONSTEXPR) +# define BOOST_NO_CXX14_CONSTEXPR #endif +#endif // defined(_MSC_VER) + #undef BOOST_COMPILER #if defined(__INTEL_COMPILER) @@ -92,7 +97,7 @@ # define BOOST_INTEL_LINUX BOOST_INTEL #endif -#else +#else // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__)) #include @@ -410,6 +415,11 @@ template<> struct assert_intrinsic_wchar_t {}; # undef BOOST_NO_SFINAE_EXPR #endif +// BOOST_NO_CXX11_SFINAE_EXPR +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && !defined(_MSC_VER) +# undef BOOST_NO_CXX11_SFINAE_EXPR +#endif + // BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) // This is available in earlier Intel releases, but breaks Multiprecision: @@ -483,7 +493,7 @@ template<> struct assert_intrinsic_wchar_t {}; # undef BOOST_NO_CXX11_FINAL #endif -#endif +#endif // defined(BOOST_INTEL_STDCXX0X) // // Broken in all versions up to 15: @@ -500,11 +510,6 @@ template<> struct assert_intrinsic_wchar_t {}; # define BOOST_NO_CXX11_HDR_TUPLE #endif -// Broken in all versions up to 17: -#if !defined(BOOST_NO_CXX14_CONSTEXPR) -#define BOOST_NO_CXX14_CONSTEXPR -#endif - #if (BOOST_INTEL_CXX_VERSION < 1200) // // fenv.h appears not to work with Intel prior to 12.0: @@ -535,10 +540,10 @@ template<> struct assert_intrinsic_wchar_t {}; # define BOOST_HAS_INT128 #endif -#endif +#endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__)) // // last known and checked version: -#if (BOOST_INTEL_CXX_VERSION > 1500) +#if (BOOST_INTEL_CXX_VERSION > 1700) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # elif defined(_MSC_VER) diff --git a/boost/config/compiler/metrowerks.hpp b/boost/config/compiler/metrowerks.hpp index 3c5e228..8d42563 100644 --- a/boost/config/compiler/metrowerks.hpp +++ b/boost/config/compiler/metrowerks.hpp @@ -113,6 +113,7 @@ #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS diff --git a/boost/config/compiler/mpw.hpp b/boost/config/compiler/mpw.hpp index 084f9e1..1b8d39e 100644 --- a/boost/config/compiler/mpw.hpp +++ b/boost/config/compiler/mpw.hpp @@ -62,6 +62,7 @@ #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS diff --git a/boost/config/compiler/pathscale.hpp b/boost/config/compiler/pathscale.hpp index a5e65af..016ad5a 100644 --- a/boost/config/compiler/pathscale.hpp +++ b/boost/config/compiler/pathscale.hpp @@ -37,6 +37,7 @@ # define BOOST_NO_CXX11_TEMPLATE_ALIASES # define BOOST_NO_CXX11_STATIC_ASSERT # define BOOST_NO_SFINAE_EXPR +# define BOOST_NO_CXX11_SFINAE_EXPR # define BOOST_NO_CXX11_SCOPED_ENUMS # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_RANGE_BASED_FOR diff --git a/boost/config/compiler/pgi.hpp b/boost/config/compiler/pgi.hpp index fa2d5e4..af70051 100644 --- a/boost/config/compiler/pgi.hpp +++ b/boost/config/compiler/pgi.hpp @@ -88,6 +88,7 @@ #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_SWPRINTF #define BOOST_NO_CXX11_TEMPLATE_ALIASES diff --git a/boost/config/compiler/sunpro_cc.hpp b/boost/config/compiler/sunpro_cc.hpp index ac259fc..cdd30b1 100644 --- a/boost/config/compiler/sunpro_cc.hpp +++ b/boost/config/compiler/sunpro_cc.hpp @@ -141,6 +141,7 @@ // # define BOOST_HAS_LONG_LONG +#define BOOST_NO_CXX11_SFINAE_EXPR // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) diff --git a/boost/config/compiler/vacpp.hpp b/boost/config/compiler/vacpp.hpp index 3fbed9f..b75a1bd 100644 --- a/boost/config/compiler/vacpp.hpp +++ b/boost/config/compiler/vacpp.hpp @@ -114,6 +114,7 @@ # define BOOST_NO_CXX11_SCOPED_ENUMS #endif #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #if ! __IBMCPP_STATIC_ASSERT # define BOOST_NO_CXX11_STATIC_ASSERT diff --git a/boost/config/compiler/visualc.hpp b/boost/config/compiler/visualc.hpp index cdbc9b6..760e283 100644 --- a/boost/config/compiler/visualc.hpp +++ b/boost/config/compiler/visualc.hpp @@ -190,7 +190,7 @@ # define BOOST_NO_CXX11_CONSTEXPR #endif -// C++14 features supported by VC++ 15 Preview 5 +// C++14 features supported by VC++ 14.1 (Visual Studio 2017) // #if (_MSC_VER < 1910) # define BOOST_NO_CXX14_AGGREGATE_NSDMI @@ -217,6 +217,27 @@ // C++ 11: // #define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#define BOOST_NO_CXX11_SFINAE_EXPR + +// +// Things that don't work in clr mode: +// +#ifdef _M_CEE +#ifndef BOOST_NO_CXX11_THREAD_LOCAL +# define BOOST_NO_CXX11_THREAD_LOCAL +#endif +#ifndef BOOST_NO_SFINAE_EXPR +# define BOOST_NO_SFINAE_EXPR +#endif +#ifndef BOOST_NO_CXX11_REF_QUALIFIERS +# define BOOST_NO_CXX11_REF_QUALIFIERS +#endif +#endif +#ifdef _M_CEE_PURE +#ifndef BOOST_NO_CXX11_CONSTEXPR +# define BOOST_NO_CXX11_CONSTEXPR +#endif +#endif // // prefix and suffix headers: @@ -282,8 +303,10 @@ # define BOOST_COMPILER_VERSION 11.0 # elif _MSC_VER < 1900 # define BOOST_COMPILER_VERSION 12.0 -# elif _MSC_VER < 2000 +# elif _MSC_VER < 1910 # define BOOST_COMPILER_VERSION 14.0 +# elif _MSC_VER < 1920 +# define BOOST_COMPILER_VERSION 14.1 # else # define BOOST_COMPILER_VERSION _MSC_VER # endif @@ -293,7 +316,7 @@ #endif // -// last known and checked version is 19.10.24629 (VC++ 2017 RC): +// last known and checked version is 19.10.25017 (VC++ 2017): #if (_MSC_VER > 1910) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" diff --git a/boost/config/platform/cygwin.hpp b/boost/config/platform/cygwin.hpp index b7ef572..53e23f7 100644 --- a/boost/config/platform/cygwin.hpp +++ b/boost/config/platform/cygwin.hpp @@ -23,7 +23,7 @@ # define BOOST_HAS_SCHED_YIELD # define BOOST_HAS_GETTIMEOFDAY # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# define BOOST_HAS_SIGACTION +//# define BOOST_HAS_SIGACTION #else # if !defined(BOOST_HAS_WINTHREADS) # define BOOST_HAS_WINTHREADS @@ -51,7 +51,6 @@ #ifdef BOOST_HAS_NL_TYPES_H # undef BOOST_HAS_NL_TYPES_H #endif - diff --git a/boost/config/stdlib/dinkumware.hpp b/boost/config/stdlib/dinkumware.hpp index 8cf5d4d..3b95dcf 100644 --- a/boost/config/stdlib/dinkumware.hpp +++ b/boost/config/stdlib/dinkumware.hpp @@ -196,6 +196,36 @@ # endif #endif + +// +// Things not supported by the CLR: +#ifdef _M_CEE +#ifndef BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_MUTEX +#endif +#ifndef BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_HDR_ATOMIC +#endif +#ifndef BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_FUTURE +#endif +#ifndef BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +#endif +#ifndef BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_THREAD +#endif +#ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#ifndef BOOST_NO_CXX14_STD_EXCHANGE +# define BOOST_NO_CXX14_STD_EXCHANGE +#endif +#ifndef BOOST_NO_FENV_H +# define BOOST_NO_FENV_H +#endif +#endif + #ifdef _CPPLIB_VER # define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER #else diff --git a/boost/config/stdlib/libstdcpp3.hpp b/boost/config/stdlib/libstdcpp3.hpp index 557767b..205489a 100644 --- a/boost/config/stdlib/libstdcpp3.hpp +++ b/boost/config/stdlib/libstdcpp3.hpp @@ -101,8 +101,8 @@ // // Decide which version of libstdc++ we have, normally -// stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly -// __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++ +// libstdc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly +// __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the libstdc++ // developers. He also commented: // // "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in @@ -110,7 +110,7 @@ // Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support // than any release in the 4.2 series." // -// Another resource for understanding stdlibc++ features is: +// Another resource for understanding libstdc++ features is: // http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x // // However, using the GCC version number fails when the compiler is clang since this @@ -222,7 +222,7 @@ // #if (BOOST_LIBSTDCXX_VERSION < 40700) || !defined(BOOST_LIBSTDCXX11) // Note that although existed prior to 4.7, "steady_clock" is spelled "monotonic_clock" -// so 4.7.0 is the first truely conforming one. +// so 4.7.0 is the first truly conforming one. # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_ALLOCATOR #endif diff --git a/boost/config/suffix.hpp b/boost/config/suffix.hpp index eeaec2b..6df9223 100644 --- a/boost/config/suffix.hpp +++ b/boost/config/suffix.hpp @@ -583,6 +583,25 @@ namespace std{ using ::type_info; } # define BOOST_GPU_ENABLED # endif +// BOOST_RESTRICT ---------------------------------------------// +// Macro to use in place of 'restrict' keyword variants +#if !defined(BOOST_RESTRICT) +# if defined(_MSC_VER) +# define BOOST_RESTRICT __restrict +# if !defined(BOOST_NO_RESTRICT_REFERENCES) && (_MSC_FULL_VER < 190023026) +# define BOOST_NO_RESTRICT_REFERENCES +# endif +# elif defined(__GNUC__) && __GNUC__ > 3 + // Clang also defines __GNUC__ (as 4) +# define BOOST_RESTRICT __restrict__ +# else +# define BOOST_RESTRICT +# if !defined(BOOST_NO_RESTRICT_REFERENCES) +# define BOOST_NO_RESTRICT_REFERENCES +# endif +# endif +#endif + // BOOST_FORCEINLINE ---------------------------------------------// // Macro to use in place of 'inline' to force a function to be inline #if !defined(BOOST_FORCEINLINE) @@ -604,7 +623,7 @@ namespace std{ using ::type_info; } # elif defined(__GNUC__) && __GNUC__ > 3 // Clang also defines __GNUC__ (as 4) # if defined(__CUDACC__) - // nvcc doesn't always parse __noinline__, + // nvcc doesn't always parse __noinline__, // see: https://svn.boost.org/trac/boost/ticket/9392 # define BOOST_NOINLINE __attribute__ ((noinline)) # else diff --git a/boost/container/allocator_traits.hpp b/boost/container/allocator_traits.hpp index e6a882e..d6621f6 100644 --- a/boost/container/allocator_traits.hpp +++ b/boost/container/allocator_traits.hpp @@ -289,18 +289,18 @@ struct allocator_traits //! Returns: a.allocate(n) //! - static pointer allocate(Allocator &a, size_type n) + BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n) { return a.allocate(n); } //! Returns: a.deallocate(p, n) //! //! Throws: Nothing - static void deallocate(Allocator &a, pointer p, size_type n) + BOOST_CONTAINER_FORCEINLINE static void deallocate(Allocator &a, pointer p, size_type n) { a.deallocate(p, n); } //! Effects: calls a.allocate(n, p) if that call is well-formed; //! otherwise, invokes a.allocate(n) - static pointer allocate(Allocator &a, size_type n, const_void_pointer p) + BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n, const_void_pointer p) { const bool value = boost::container::container_detail:: has_member_function_callable_with_allocate @@ -312,7 +312,7 @@ struct allocator_traits //! Effects: calls a.destroy(p) if that call is well-formed; //! otherwise, invokes p->~T(). template - static void destroy(Allocator &a, T*p) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static void destroy(Allocator &a, T*p) BOOST_NOEXCEPT_OR_NOTHROW { typedef T* destroy_pointer; const bool value = boost::container::container_detail:: @@ -324,7 +324,7 @@ struct allocator_traits //! Returns: a.max_size() if that expression is well-formed; otherwise, //! numeric_limits::max(). - static size_type max_size(const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static size_type max_size(const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW { const bool value = allocator_traits_detail::has_max_size::value; container_detail::bool_ flag; @@ -333,7 +333,7 @@ struct allocator_traits //! Returns: a.select_on_container_copy_construction() if that expression is well-formed; //! otherwise, a. - static BOOST_CONTAINER_DOC1ST(Allocator, + BOOST_CONTAINER_FORCEINLINE static BOOST_CONTAINER_DOC1ST(Allocator, typename container_detail::if_c < allocator_traits_detail::has_select_on_container_copy_construction::value BOOST_MOVE_I Allocator BOOST_MOVE_I const Allocator & >::type) @@ -349,7 +349,7 @@ struct allocator_traits //! Effects: calls a.construct(p, std::forward(args)...) if that call is well-formed; //! otherwise, invokes ::new (static_cast(p)) T(std::forward(args)...) template - static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args) + BOOST_CONTAINER_FORCEINLINE static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args) { static const bool value = ::boost::move_detail::and_ < container_detail::is_not_std_allocator @@ -363,7 +363,7 @@ struct allocator_traits //! Returns: a.storage_is_unpropagable(p) if is_partially_propagable::value is true; otherwise, //! false. - static bool storage_is_unpropagable(const Allocator &a, pointer p) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static bool storage_is_unpropagable(const Allocator &a, pointer p) BOOST_NOEXCEPT_OR_NOTHROW { container_detail::bool_ flag; return allocator_traits::priv_storage_is_unpropagable(flag, a, p); @@ -371,7 +371,7 @@ struct allocator_traits //! Returns: true if is_always_equal::value == true, otherwise, //! a == b. - static bool equal(const Allocator &a, const Allocator &b) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static bool equal(const Allocator &a, const Allocator &b) BOOST_NOEXCEPT_OR_NOTHROW { container_detail::bool_ flag; return allocator_traits::priv_equal(flag, a, b); @@ -379,46 +379,46 @@ struct allocator_traits #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) private: - static pointer priv_allocate(container_detail::true_type, Allocator &a, size_type n, const_void_pointer p) + BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(container_detail::true_type, Allocator &a, size_type n, const_void_pointer p) { return a.allocate(n, p); } - static pointer priv_allocate(container_detail::false_type, Allocator &a, size_type n, const_void_pointer) + BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(container_detail::false_type, Allocator &a, size_type n, const_void_pointer) { return a.allocate(n); } template - static void priv_destroy(container_detail::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static void priv_destroy(container_detail::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW { a.destroy(p); } template - static void priv_destroy(container_detail::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static void priv_destroy(container_detail::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW { p->~T(); (void)p; } - static size_type priv_max_size(container_detail::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(container_detail::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW { return a.max_size(); } - static size_type priv_max_size(container_detail::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(container_detail::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW { return size_type(-1)/sizeof(value_type); } - static Allocator priv_select_on_container_copy_construction(container_detail::true_type, const Allocator &a) + BOOST_CONTAINER_FORCEINLINE static Allocator priv_select_on_container_copy_construction(container_detail::true_type, const Allocator &a) { return a.select_on_container_copy_construction(); } - static const Allocator &priv_select_on_container_copy_construction(container_detail::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static const Allocator &priv_select_on_container_copy_construction(container_detail::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW { return a; } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template - static void priv_construct(container_detail::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args) + BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args) { a.construct( p, ::boost::forward(args)...); } template - static void priv_construct(container_detail::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args) + BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args) { ::new((void*)p, boost_container_new_t()) T(::boost::forward(args)...); } #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) public: #define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL(N) \ template\ - static void construct(Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + BOOST_CONTAINER_FORCEINLINE static void construct(Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ {\ static const bool value = ::boost::move_detail::and_ \ < container_detail::is_not_std_allocator \ @@ -438,11 +438,11 @@ struct allocator_traits ///////////////////////////////// #define BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL(N) \ template\ - static void priv_construct(container_detail::true_type, Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::true_type, Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { a.construct( p BOOST_MOVE_I##N BOOST_MOVE_FWD##N ); }\ \ template\ - static void priv_construct(container_detail::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { ::new((void*)p, boost_container_new_t()) T(BOOST_MOVE_FWD##N); }\ // BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL) @@ -451,19 +451,19 @@ struct allocator_traits #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template - static void priv_construct(container_detail::false_type, Allocator &, T *p, const ::boost::container::default_init_t&) + BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::false_type, Allocator &, T *p, const ::boost::container::default_init_t&) { ::new((void*)p, boost_container_new_t()) T; } - static bool priv_storage_is_unpropagable(container_detail::true_type, const Allocator &a, pointer p) + BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(container_detail::true_type, const Allocator &a, pointer p) { return a.storage_is_unpropagable(p); } - static bool priv_storage_is_unpropagable(container_detail::false_type, const Allocator &, pointer) + BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(container_detail::false_type, const Allocator &, pointer) { return false; } - static bool priv_equal(container_detail::true_type, const Allocator &, const Allocator &) + BOOST_CONTAINER_FORCEINLINE static bool priv_equal(container_detail::true_type, const Allocator &, const Allocator &) { return true; } - static bool priv_equal(container_detail::false_type, const Allocator &a, const Allocator &b) + BOOST_CONTAINER_FORCEINLINE static bool priv_equal(container_detail::false_type, const Allocator &a, const Allocator &b) { return a == b; } #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) diff --git a/boost/container/detail/advanced_insert_int.hpp b/boost/container/detail/advanced_insert_int.hpp index 278cd1b..1050857 100644 --- a/boost/container/detail/advanced_insert_int.hpp +++ b/boost/container/detail/advanced_insert_int.hpp @@ -107,8 +107,8 @@ struct insert_n_copies_proxy void copy_n_and_update(Allocator &, Iterator p, size_type n) const { - for (; 0 < n; --n, ++p){ - *p = v_; + for (; 0 < n; --n, ++p){ + *p = v_; } } diff --git a/boost/container/detail/workaround.hpp b/boost/container/detail/workaround.hpp index ed57718..816d3cc 100644 --- a/boost/container/detail/workaround.hpp +++ b/boost/container/detail/workaround.hpp @@ -49,6 +49,10 @@ #define BOOST_CONTAINER_FALLTHOUGH BOOST_FALLTHOUGH; #endif +#if defined(BOOST_MSVC) && (_MSC_VER < 1400) + #define BOOST_CONTAINER_TEMPLATED_CONVERSION_OPERATOR_BROKEN +#endif + #if !defined(BOOST_NO_CXX11_HDR_TUPLE) || (defined(BOOST_MSVC) && (BOOST_MSVC == 1700 || BOOST_MSVC == 1600)) #define BOOST_CONTAINER_PAIR_TEST_HAS_HEADER_TUPLE #endif diff --git a/boost/container/new_allocator.hpp b/boost/container/new_allocator.hpp index 9304a9c..51065ef 100644 --- a/boost/container/new_allocator.hpp +++ b/boost/container/new_allocator.hpp @@ -140,9 +140,9 @@ class new_allocator //!Throws std::bad_alloc if there is no enough memory pointer allocate(size_type count) { - if(BOOST_UNLIKELY(count > this->max_size())) - throw_bad_alloc(); - return static_cast(::operator new(count*sizeof(T))); + if(BOOST_UNLIKELY(count > this->max_size())) + throw_bad_alloc(); + return static_cast(::operator new(count*sizeof(T))); } //!Deallocates previously allocated memory. diff --git a/boost/container/node_handle.hpp b/boost/container/node_handle.hpp index 300b471..c46313c 100644 --- a/boost/container/node_handle.hpp +++ b/boost/container/node_handle.hpp @@ -131,6 +131,9 @@ class node_handle nallocator_type &node_alloc() { return *static_cast(m_nalloc_storage.address()); } + const nallocator_type &node_alloc() const + { return *static_cast(m_nalloc_storage.address()); } + node_pointer release() { node_pointer p(m_ptr); @@ -323,7 +326,7 @@ class node_handle if(was_nh_non_null){ if(was_this_non_null){ - if(ator_traits::propagate_on_container_swap){ + if(ator_traits::propagate_on_container_swap::value){ ::boost::adl_move_swap(this->node_alloc(), nh.node_alloc()); } } diff --git a/boost/container/vector.hpp b/boost/container/vector.hpp index 5d7d765..336d616 100644 --- a/boost/container/vector.hpp +++ b/boost/container/vector.hpp @@ -1735,9 +1735,10 @@ class vector { if (BOOST_LIKELY(this->room_enough())){ //There is more memory, just construct a new object at the end - allocator_traits_type::construct(this->m_holder.alloc(), this->priv_raw_end(), ::boost::forward(args)...); + T* const p = this->priv_raw_end(); + allocator_traits_type::construct(this->m_holder.alloc(), p, ::boost::forward(args)...); ++this->m_holder.m_size; - return *this->priv_raw_end(); + return *p; } else{ typedef container_detail::insert_emplace_proxy type; @@ -1793,10 +1794,11 @@ class vector BOOST_CONTAINER_FORCEINLINE reference emplace_back(BOOST_MOVE_UREF##N)\ {\ if (BOOST_LIKELY(this->room_enough())){\ + T* const p = this->priv_raw_end();\ allocator_traits_type::construct (this->m_holder.alloc()\ , this->priv_raw_end() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ ++this->m_holder.m_size;\ - return *this->priv_raw_end();\ + return *p;\ }\ else{\ typedef container_detail::insert_emplace_proxy_arg##N type;\ @@ -2255,7 +2257,7 @@ class vector boost::uintptr_t const capaddr = boost::uintptr_t(this->priv_raw_begin() + c); boost::uintptr_t const aligned_addr = (addr + szt_align_mask) & ~szt_align_mask; indexes = reinterpret_cast(aligned_addr); - std::size_t index_capacity = (aligned_addr >= capaddr) ? 0u : (capaddr - addr)/sizeof(size_type); + std::size_t index_capacity = (aligned_addr >= capaddr) ? 0u : (capaddr - aligned_addr)/sizeof(size_type); //Capacity is constant, we're not going to change it if(index_capacity < PosCount){ diff --git a/boost/core/addressof.hpp b/boost/core/addressof.hpp index 889b582..0a2b46b 100644 --- a/boost/core/addressof.hpp +++ b/boost/core/addressof.hpp @@ -1,162 +1,265 @@ -// Copyright (C) 2002 Brad King (brad.king@kitware.com) -// Douglas Gregor (gregod@cs.rpi.edu) -// -// Copyright (C) 2002, 2008, 2013 Peter Dimov -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +/* +Copyright (C) 2002 Brad King (brad.king@kitware.com) + Douglas Gregor (gregod@cs.rpi.edu) -// For more information, see http://www.boost.org +Copyright (C) 2002, 2008, 2013 Peter Dimov + +Copyright (C) 2017 Glen Joseph Fernandes (glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ #ifndef BOOST_CORE_ADDRESSOF_HPP #define BOOST_CORE_ADDRESSOF_HPP -# include -# include -# include +#include -namespace boost +#if defined(BOOST_MSVC_FULL_VER) && BOOST_MSVC_FULL_VER >= 190024215 +#define BOOST_CORE_HAS_BUILTIN_ADDRESSOF +#elif defined(BOOST_GCC) && BOOST_GCC >= 70000 +#define BOOST_CORE_HAS_BUILTIN_ADDRESSOF +#elif defined(__has_builtin) +#if __has_builtin(__builtin_addressof) +#define BOOST_CORE_HAS_BUILTIN_ADDRESSOF +#endif +#endif + +#if defined(BOOST_CORE_HAS_BUILTIN_ADDRESSOF) +#if defined(BOOST_NO_CXX11_CONSTEXPR) +#define BOOST_CORE_NO_CONSTEXPR_ADDRESSOF +#endif + +namespace boost { + +template +BOOST_CONSTEXPR inline T* +addressof(T& o) BOOST_NOEXCEPT { + return __builtin_addressof(o); +} -namespace detail -{ - -template struct addr_impl_ref -{ - T & v_; - - BOOST_FORCEINLINE addr_impl_ref( T & v ): v_( v ) {} - BOOST_FORCEINLINE operator T& () const { return v_; } - -private: - addr_impl_ref & operator=(const addr_impl_ref &); -}; - -template struct addressof_impl -{ - static BOOST_FORCEINLINE T * f( T & v, long ) - { - return reinterpret_cast( - &const_cast(reinterpret_cast(v))); - } - - static BOOST_FORCEINLINE T * f( T * v, int ) - { - return v; - } -}; - -#if !defined( BOOST_NO_CXX11_NULLPTR ) - -#if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) ) - - typedef decltype(nullptr) addr_nullptr_t; - +} /* boost */ #else +#include +#include - typedef std::nullptr_t addr_nullptr_t; +namespace boost { +namespace detail { +template +class addressof_ref { +public: + BOOST_FORCEINLINE addressof_ref(T& o) BOOST_NOEXCEPT + : o_(o) { } + BOOST_FORCEINLINE operator T&() const BOOST_NOEXCEPT { + return o_; + } +private: + addressof_ref& operator=(const addressof_ref&); + T& o_; +}; + +template +struct address_of { + static BOOST_FORCEINLINE T* get(T& o, long) BOOST_NOEXCEPT { + return reinterpret_cast(& + const_cast(reinterpret_cast(o))); + } + static BOOST_FORCEINLINE T* get(T* p, int) BOOST_NOEXCEPT { + return p; + } +}; + +#if !defined(BOOST_NO_CXX11_NULLPTR) +#if !defined(BOOST_NO_CXX11_DECLTYPE) && \ + (defined(__INTEL_COMPILER) || \ + (defined(__clang__) && !defined(_LIBCPP_VERSION))) +typedef decltype(nullptr) addressof_null_t; +#else +typedef std::nullptr_t addressof_null_t; #endif -template<> struct addressof_impl< addr_nullptr_t > -{ - typedef addr_nullptr_t T; - - static BOOST_FORCEINLINE T * f( T & v, int ) - { - return &v; +template<> +struct address_of { + typedef addressof_null_t type; + static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT { + return &o; } }; -template<> struct addressof_impl< addr_nullptr_t const > -{ - typedef addr_nullptr_t const T; - - static BOOST_FORCEINLINE T * f( T & v, int ) - { - return &v; +template<> +struct address_of { + typedef const addressof_null_t type; + static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT { + return &o; } }; -template<> struct addressof_impl< addr_nullptr_t volatile > -{ - typedef addr_nullptr_t volatile T; - - static BOOST_FORCEINLINE T * f( T & v, int ) - { - return &v; +template<> +struct address_of { + typedef volatile addressof_null_t type; + static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT { + return &o; } }; -template<> struct addressof_impl< addr_nullptr_t const volatile > -{ - typedef addr_nullptr_t const volatile T; - - static BOOST_FORCEINLINE T * f( T & v, int ) - { - return &v; +template<> +struct address_of { + typedef const volatile addressof_null_t type; + static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT { + return &o; } }; - #endif -} // namespace detail +} /* detail */ + +#if defined(BOOST_NO_CXX11_SFINAE_EXPR) || \ + defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ + defined(BOOST_NO_CXX11_CONSTEXPR) || \ + defined(BOOST_NO_CXX11_DECLTYPE) +#define BOOST_CORE_NO_CONSTEXPR_ADDRESSOF + +template +BOOST_FORCEINLINE T* +addressof(T& o) BOOST_NOEXCEPT +{ +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) || \ + BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5120) + return detail::address_of::get(o, 0); +#else + return detail::address_of::get(detail::addressof_ref(o), 0); +#endif +} + +#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) +namespace detail { + +template +struct addressof_result { + typedef T* type; +}; + +} /* detail */ + +template +BOOST_FORCEINLINE typename detail::addressof_result::type +addressof(T (&o)[N]) BOOST_NOEXCEPT +{ + return &o; +} +#endif + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +template +BOOST_FORCEINLINE +T (*addressof(T (&o)[N]) BOOST_NOEXCEPT)[N] +{ + return reinterpret_cast(&o); +} + +template +BOOST_FORCEINLINE +const T (*addressof(const T (&o)[N]) BOOST_NOEXCEPT)[N] +{ + return reinterpret_cast(&o); +} +#endif +#else +namespace detail { + +template +T&& addressof_declval() BOOST_NOEXCEPT; + +template +struct addressof_void { + typedef void type; +}; + +template +struct addressof_member_operator { + static constexpr bool value = false; +}; + +template +struct addressof_member_operator().operator&())>::type> { + static constexpr bool value = true; +}; + +#if BOOST_WORKAROUND(BOOST_INTEL, < 1600) +struct addressof_addressable { }; + +addressof_addressable* +operator&(addressof_addressable&) BOOST_NOEXCEPT; +#endif + +template +struct addressof_non_member_operator { + static constexpr bool value = false; +}; + +template +struct addressof_non_member_operator()))>::type> { + static constexpr bool value = true; +}; + +template +struct addressof_expression { + static constexpr bool value = false; +}; + +template +struct addressof_expression())>::type> { + static constexpr bool value = true; +}; + +template +struct addressof_is_constexpr { + static constexpr bool value = addressof_expression::value && + !addressof_member_operator::value && + !addressof_non_member_operator::value; +}; + +template +struct addressof_if { }; + +template +struct addressof_if { + typedef T* type; +}; template BOOST_FORCEINLINE -T * addressof( T & v ) +typename addressof_if::value, T>::type +addressof(T& o) BOOST_NOEXCEPT { -#if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5120)) - - return boost::detail::addressof_impl::f( v, 0 ); - -#else - - return boost::detail::addressof_impl::f( boost::detail::addr_impl_ref( v ), 0 ); - -#endif + return address_of::get(addressof_ref(o), 0); } -#if defined( __SUNPRO_CC ) && BOOST_WORKAROUND( __SUNPRO_CC, BOOST_TESTED_AT( 0x590 ) ) - -namespace detail +template +constexpr BOOST_FORCEINLINE +typename addressof_if::value, T>::type +addressof(T& o) BOOST_NOEXCEPT { - -template struct addressof_addp -{ - typedef T * type; -}; - -} // namespace detail - -template< class T, std::size_t N > -BOOST_FORCEINLINE -typename detail::addressof_addp< T[N] >::type addressof( T (&t)[N] ) -{ - return &t; + return &o; } -#endif +} /* detail */ -// Borland doesn't like casting an array reference to a char reference -// but these overloads work around the problem. -#if defined( __BORLANDC__ ) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -template -BOOST_FORCEINLINE -T (*addressof(T (&t)[N]))[N] +template +constexpr BOOST_FORCEINLINE T* +addressof(T& o) BOOST_NOEXCEPT { - return reinterpret_cast(&t); -} - -template -BOOST_FORCEINLINE -const T (*addressof(const T (&t)[N]))[N] -{ - return reinterpret_cast(&t); + return detail::addressof(o); } #endif -} // namespace boost +} /* boost */ +#endif -#endif // BOOST_CORE_ADDRESSOF_HPP +#endif diff --git a/boost/core/demangle.hpp b/boost/core/demangle.hpp index f13c26a..dc714d8 100644 --- a/boost/core/demangle.hpp +++ b/boost/core/demangle.hpp @@ -93,15 +93,10 @@ inline void demangle_free( char const * name ) BOOST_NOEXCEPT inline std::string demangle( char const * name ) { scoped_demangled_name demangled_name( name ); - char const * const p = demangled_name.get(); - if( p ) - { - return p; - } - else - { - return name; - } + char const * p = demangled_name.get(); + if( !p ) + p = name; + return p; } #else diff --git a/boost/detail/workaround.hpp b/boost/detail/workaround.hpp index 40b3423..7727aaf 100644 --- a/boost/detail/workaround.hpp +++ b/boost/detail/workaround.hpp @@ -85,6 +85,11 @@ #else #define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0 #endif +#ifndef BOOST_GCC +#define BOOST_GCC_WORKAROUND_GUARD 1 +#else +#define BOOST_GCC_WORKAROUND_GUARD 0 +#endif #ifndef __IBMCPP__ #define __IBMCPP___WORKAROUND_GUARD 1 #else diff --git a/boost/intrusive/bstree.hpp b/boost/intrusive/bstree.hpp index f2cdb42..1eeab55 100644 --- a/boost/intrusive/bstree.hpp +++ b/boost/intrusive/bstree.hpp @@ -967,7 +967,7 @@ class bstree_impl void swap(bstree_impl& other) { //This can throw - ::boost::adl_move_swap(this->comp(), this->comp()); + ::boost::adl_move_swap(this->comp(), other.comp()); //These can't throw node_algorithms::swap_tree(this->header_ptr(), node_ptr(other.header_ptr())); this->sz_traits().swap(other.sz_traits()); diff --git a/boost/intrusive/bstree_algorithms.hpp b/boost/intrusive/bstree_algorithms.hpp index e8caee0..e449eba 100644 --- a/boost/intrusive/bstree_algorithms.hpp +++ b/boost/intrusive/bstree_algorithms.hpp @@ -37,6 +37,9 @@ namespace intrusive { template struct insert_commit_data_t { + BOOST_INTRUSIVE_FORCEINLINE insert_commit_data_t() + : link_left(false), node() + {} bool link_left; NodePtr node; }; diff --git a/boost/intrusive/detail/key_nodeptr_comp.hpp b/boost/intrusive/detail/key_nodeptr_comp.hpp index 9d64f09..bdc025e 100644 --- a/boost/intrusive/detail/key_nodeptr_comp.hpp +++ b/boost/intrusive/detail/key_nodeptr_comp.hpp @@ -59,6 +59,10 @@ struct key_nodeptr_comp //Use public inheritance to avoid MSVC bugs with closures : public key_nodeptr_comp_types::base_t { +private: + struct sfinae_type; + +public: typedef key_nodeptr_comp_types types_t; typedef typename types_t::value_traits value_traits; typedef typename types_t::value_type value_type; @@ -83,32 +87,32 @@ struct key_nodeptr_comp //pred(pnode) template - BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T1 &t1, typename enable_if_c< is_same_or_nodeptr_convertible::value >::type* =0) const + BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T1 &t1, typename enable_if_c< is_same_or_nodeptr_convertible::value, sfinae_type* >::type = 0) const { return base().get()(key_of_value()(*traits_->to_value_ptr(t1))); } //operator() 2 arg //pred(pnode, pnode) template BOOST_INTRUSIVE_FORCEINLINE bool operator() - (const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible::value && is_same_or_nodeptr_convertible::value >::type* =0) const + (const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible::value && is_same_or_nodeptr_convertible::value, sfinae_type* >::type = 0) const { return base()(*traits_->to_value_ptr(t1), *traits_->to_value_ptr(t2)); } //pred(pnode, key) template BOOST_INTRUSIVE_FORCEINLINE bool operator() - (const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible::value && !is_same_or_nodeptr_convertible::value >::type* =0) const + (const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible::value && !is_same_or_nodeptr_convertible::value, sfinae_type* >::type = 0) const { return base()(*traits_->to_value_ptr(t1), t2); } //pred(key, pnode) template BOOST_INTRUSIVE_FORCEINLINE bool operator() - (const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible::value && is_same_or_nodeptr_convertible::value >::type* =0) const + (const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible::value && is_same_or_nodeptr_convertible::value, sfinae_type* >::type = 0) const { return base()(t1, *traits_->to_value_ptr(t2)); } //pred(key, key) template BOOST_INTRUSIVE_FORCEINLINE bool operator() - (const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible::value && !is_same_or_nodeptr_convertible::value >::type* =0) const + (const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible::value && !is_same_or_nodeptr_convertible::value, sfinae_type* >::type = 0) const { return base()(t1, t2); } const ValueTraits *const traits_; diff --git a/boost/intrusive/slist.hpp b/boost/intrusive/slist.hpp index 0020699..f34350d 100644 --- a/boost/intrusive/slist.hpp +++ b/boost/intrusive/slist.hpp @@ -1115,7 +1115,7 @@ class slist_impl //! //! Throws: Nothing. //! - //! Complexity: Lineal to the elements (l - before_f + 1). + //! Complexity: Linear to the elements (l - before_f + 1). //! //! Note: Invalidates the iterators to the erased element. template diff --git a/boost/move/default_delete.hpp b/boost/move/default_delete.hpp index 1c26ed9..31ae67a 100644 --- a/boost/move/default_delete.hpp +++ b/boost/move/default_delete.hpp @@ -96,6 +96,22 @@ typedef int bool_conversion::* explicit_bool_arg; typedef int (bool_conversion::*nullptr_type)(); #endif +template +struct is_array_del +{}; + +template +void call_delete(T *p, is_array_del) +{ + delete [] p; +} + +template +void call_delete(T *p, is_array_del) +{ + delete p; +} + } //namespace move_upd { // @endcond @@ -184,7 +200,7 @@ struct default_delete //and T has no virtual destructor, then you have a problem BOOST_STATIC_ASSERT(( !::boost::move_upmu::missing_virtual_destructor::value )); element_type * const p = static_cast(ptr); - bmupmu::is_array::value ? delete [] p : delete p; + move_upd::call_delete(p, move_upd::is_array_del::value>()); } //! Effects: Same as (*this)(static_cast(nullptr)). diff --git a/boost/move/detail/unique_ptr_meta_utils.hpp b/boost/move/detail/unique_ptr_meta_utils.hpp index 3372068..ac270a8 100644 --- a/boost/move/detail/unique_ptr_meta_utils.hpp +++ b/boost/move/detail/unique_ptr_meta_utils.hpp @@ -397,7 +397,7 @@ struct pointer_type_imp template struct pointer_type_imp { - typedef typename remove_extent::type* type; + typedef T* type; }; template diff --git a/boost/preprocessor/cat.hpp b/boost/preprocessor/cat.hpp index 5e52850..52a3892 100644 --- a/boost/preprocessor/cat.hpp +++ b/boost/preprocessor/cat.hpp @@ -25,7 +25,7 @@ # define BOOST_PP_CAT_OO(par) BOOST_PP_CAT_I ## par # endif # -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# if (~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) # define BOOST_PP_CAT_I(a, b) a ## b # else # define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b) diff --git a/boost/preprocessor/config/config.hpp b/boost/preprocessor/config/config.hpp index 8be0e47..4801903 100644 --- a/boost/preprocessor/config/config.hpp +++ b/boost/preprocessor/config/config.hpp @@ -32,7 +32,7 @@ # elif defined(__MWERKS__) && __MWERKS__ >= 0x3200 # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) # elif defined(__EDG__) || defined(__EDG_VERSION__) -# if defined(_MSC_VER) && (defined(__INTELLISENSE__) || __EDG_VERSION__ >= 308) +# if defined(_MSC_VER) && (defined(__clang__) || defined(__INTELLISENSE__) || __EDG_VERSION__ >= 308) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC()) # else # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT()) @@ -45,7 +45,7 @@ # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) # elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__SUNPRO_CC) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_BCC()) -# elif defined(_MSC_VER) && !defined(__clang__) +# elif defined(_MSC_VER) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC()) # else # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) @@ -75,8 +75,8 @@ # /* variadic support explicitly disabled for all untested compilers */ # if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI # define BOOST_PP_VARIADICS 0 -# /* VC++ (C/C++) */ -# elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__)) && !defined __clang__ +# /* VC++ (C/C++) and Intel C++ Compiler >= 17.0 with MSVC */ +# elif defined _MSC_VER && _MSC_VER >= 1400 && (defined(__clang__) || !defined __EDG__ || defined(__INTELLISENSE__) || defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) # define BOOST_PP_VARIADICS 1 # undef BOOST_PP_VARIADICS_MSVC # define BOOST_PP_VARIADICS_MSVC 1 @@ -92,7 +92,7 @@ # elif !BOOST_PP_VARIADICS + 1 < 2 # undef BOOST_PP_VARIADICS # define BOOST_PP_VARIADICS 1 -# if defined _MSC_VER && _MSC_VER >= 1400 && (defined(__INTELLISENSE__) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) +# if defined _MSC_VER && _MSC_VER >= 1400 && (defined(__clang__) || defined(__INTELLISENSE__) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) # undef BOOST_PP_VARIADICS_MSVC # define BOOST_PP_VARIADICS_MSVC 1 # endif diff --git a/boost/smart_ptr/detail/sp_noexcept.hpp b/boost/smart_ptr/detail/sp_noexcept.hpp new file mode 100644 index 0000000..6818dce --- /dev/null +++ b/boost/smart_ptr/detail/sp_noexcept.hpp @@ -0,0 +1,30 @@ +#ifndef BOOST_SMART_PTR_DETAIL_SP_NOEXCEPT_HPP_INCLUDED +#define BOOST_SMART_PTR_DETAIL_SP_NOEXCEPT_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// detail/sp_noexcept.hpp +// +// Copyright 2016 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +#include + +#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1700 && BOOST_MSVC < 1900 + +#define BOOST_SP_NOEXCEPT BOOST_NOEXCEPT_OR_NOTHROW + +#else + +#define BOOST_SP_NOEXCEPT BOOST_NOEXCEPT + +#endif + +#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_NOEXCEPT_HPP_INCLUDED diff --git a/boost/smart_ptr/intrusive_ptr.hpp b/boost/smart_ptr/intrusive_ptr.hpp index 1e93397..0e46212 100644 --- a/boost/smart_ptr/intrusive_ptr.hpp +++ b/boost/smart_ptr/intrusive_ptr.hpp @@ -19,6 +19,7 @@ #include #include #include +#include #include // for std::less @@ -59,7 +60,7 @@ public: typedef T element_type; - BOOST_CONSTEXPR intrusive_ptr() BOOST_NOEXCEPT : px( 0 ) + BOOST_CONSTEXPR intrusive_ptr() BOOST_SP_NOEXCEPT : px( 0 ) { } @@ -111,12 +112,12 @@ public: #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) - intrusive_ptr(intrusive_ptr && rhs) BOOST_NOEXCEPT : px( rhs.px ) + intrusive_ptr(intrusive_ptr && rhs) BOOST_SP_NOEXCEPT : px( rhs.px ) { rhs.px = 0; } - intrusive_ptr & operator=(intrusive_ptr && rhs) BOOST_NOEXCEPT + intrusive_ptr & operator=(intrusive_ptr && rhs) BOOST_SP_NOEXCEPT { this_type( static_cast< intrusive_ptr && >( rhs ) ).swap(*this); return *this; diff --git a/boost/type_index/stl_type_index.hpp b/boost/type_index/stl_type_index.hpp index a5add88..be28889 100644 --- a/boost/type_index/stl_type_index.hpp +++ b/boost/type_index/stl_type_index.hpp @@ -1,5 +1,5 @@ // -// Copyright (c) Antony Polukhin, 2013-2015. +// Copyright (c) Antony Polukhin, 2013-2017. // // // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -174,7 +174,7 @@ inline std::string stl_type_index::pretty_name() const { inline std::size_t stl_type_index::hash_code() const BOOST_NOEXCEPT { -#if _MSC_VER > 1600 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5 && defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if (defined(_MSC_VER) && _MSC_VER > 1600) || (__GNUC__ == 4 && __GNUC_MINOR__ > 5 && defined(__GXX_EXPERIMENTAL_CXX0X__)) return data_->hash_code(); #else return boost::hash_range(raw_name(), raw_name() + std::strlen(raw_name())); diff --git a/boost/type_traits.hpp b/boost/type_traits.hpp index 7d651ce..93a992d 100644 --- a/boost/type_traits.hpp +++ b/boost/type_traits.hpp @@ -130,6 +130,7 @@ #include #include #include +#include #include #include #include diff --git a/boost/type_traits/detail/common_arithmetic_type.hpp b/boost/type_traits/detail/common_arithmetic_type.hpp index 8c09158..a7aff03 100644 --- a/boost/type_traits/detail/common_arithmetic_type.hpp +++ b/boost/type_traits/detail/common_arithmetic_type.hpp @@ -46,7 +46,7 @@ template<> struct arithmetic_type<3> #endif // There are five standard signed integer types: -// “signed char”, “short int”, “int”, “long int”, and “long long int”. +// "signed char", "short int", "int", "long int", and "long long int". template<> struct arithmetic_type<4> { @@ -79,8 +79,8 @@ template<> struct arithmetic_type<8> }; // For each of the standard signed integer types, there exists a corresponding -// (but different) standard unsigned integer type: “unsigned char”, “unsigned short int”, -// “unsigned int”, “unsigned long int”, and “unsigned long long int” +// (but different) standard unsigned integer type: "unsigned char", "unsigned short int", +// "unsigned int", "unsigned long int", and "unsigned long long int" template<> struct arithmetic_type<9> { diff --git a/boost/type_traits/is_rvalue_reference.hpp b/boost/type_traits/is_rvalue_reference.hpp index 50e88ed..a48edb5 100644 --- a/boost/type_traits/is_rvalue_reference.hpp +++ b/boost/type_traits/is_rvalue_reference.hpp @@ -1,5 +1,5 @@ -// (C) John Maddock 2010. +// (C) Copyright John Maddock 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). diff --git a/boost/type_traits/make_void.hpp b/boost/type_traits/make_void.hpp new file mode 100644 index 0000000..f48823b --- /dev/null +++ b/boost/type_traits/make_void.hpp @@ -0,0 +1,52 @@ +/* +Copyright 2017 Glen Joseph Fernandes + + +Distributed under the Boost Software License, +Version 1.0. (See accompanying file LICENSE_1_0.txt +or copy at http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_TT_MAKE_VOID_HPP_INCLUDED +#define BOOST_TT_MAKE_VOID_HPP_INCLUDED + +#include + +namespace boost { + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +template +struct make_void { + typedef void type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +template +using void_t = typename make_void::type; +#endif + +#else /* BOOST_NO_CXX11_VARIADIC_TEMPLATES */ + +template +struct make_void { + typedef void type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +template +using void_t = typename make_void::type; +#endif + +#endif + +} /* boost */ + +#endif diff --git a/boost/utility.hpp b/boost/utility.hpp index 82177c8..0aacb8b 100644 --- a/boost/utility.hpp +++ b/boost/utility.hpp @@ -14,8 +14,8 @@ #include #include #include -#include +#include +#include #include -#include #endif // BOOST_UTILITY_HPP diff --git a/boost/variant/polymorphic_get.hpp b/boost/variant/polymorphic_get.hpp index 89fca36..1a98382 100644 --- a/boost/variant/polymorphic_get.hpp +++ b/boost/variant/polymorphic_get.hpp @@ -3,7 +3,7 @@ // See http://www.boost.org for updates, documentation, and revision history. //----------------------------------------------------------------------------- // -// Copyright (c) 2013-2015 Antony Polukhin +// Copyright (c) 2013-2017 Antony Polukhin // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at @@ -113,13 +113,15 @@ public: // visitor interfaces template pointer operator()(U& operand) const BOOST_NOEXCEPT { + typedef typename boost::remove_reference::type base_t; typedef boost::integral_constant< bool, - boost::mpl::or_< - boost::is_base_of, - boost::is_same, - boost::is_same::type, U > - >::value + ( + boost::is_base_of::value && + (boost::is_const::value || !boost::is_const::value) + ) + || boost::is_same::value + || boost::is_same::type, U >::value > tag_t; return this_type::get(operand, tag_t()); diff --git a/boost/variant/recursive_wrapper_fwd.hpp b/boost/variant/recursive_wrapper_fwd.hpp index 2fc4341..c40399f 100644 --- a/boost/variant/recursive_wrapper_fwd.hpp +++ b/boost/variant/recursive_wrapper_fwd.hpp @@ -4,7 +4,7 @@ //----------------------------------------------------------------------------- // // Copyright (c) 2002 Eric Friedman, Itay Maman -// Copyright (c) 2016 Antony Polukhin +// Copyright (c) 2016-2017 Antony Polukhin // // Portions Copyright (C) 2002 David Abrahams // @@ -20,6 +20,7 @@ #include #include #include +#include namespace boost { @@ -65,6 +66,9 @@ template struct is_constructible, const template struct is_constructible, recursive_wrapper& > : boost::false_type{}; template struct is_constructible, const recursive_wrapper& > : boost::false_type{}; +// recursive_wrapper is not nothrow move constructible, because it's constructor does dynamic memory allocation. +// This specialisation is required to workaround GCC6 issue: https://svn.boost.org/trac/boost/ticket/12680 +template struct is_nothrow_move_constructible > : boost::false_type{}; /////////////////////////////////////////////////////////////////////////////// // metafunction is_recursive_wrapper (modeled on code by David Abrahams) diff --git a/boost/variant/variant.hpp b/boost/variant/variant.hpp index 6296238..1c64447 100644 --- a/boost/variant/variant.hpp +++ b/boost/variant/variant.hpp @@ -1756,10 +1756,12 @@ public: // structors, cont. template variant(const T& operand, - typename boost::enable_if >, - boost::detail::variant::is_variant_constructible_from - > >::type* = 0) + typename boost::enable_if >, + boost::detail::variant::is_variant_constructible_from + >, + boost::is_same > >::type* = 0) { convert_construct(operand, 1L); } @@ -1767,11 +1769,13 @@ public: // structors, cont. template variant( T& operand - , typename boost::enable_if >, - mpl::not_< boost::is_same >, - boost::detail::variant::is_variant_constructible_from - > >::type* = 0 + , typename boost::enable_if >, + mpl::not_< boost::is_same >, + boost::detail::variant::is_variant_constructible_from + >, + boost::is_same > >::type* = 0 ) { convert_construct(operand, 1L); @@ -1780,12 +1784,14 @@ public: // structors, cont. #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template variant(T&& operand, - typename boost::enable_if, - mpl::not_< boost::is_const >, - mpl::not_< boost::is_same >, - boost::detail::variant::is_variant_constructible_from - > >::type* = 0) + typename boost::enable_if, + mpl::not_< boost::is_const >, + mpl::not_< boost::is_same >, + boost::detail::variant::is_variant_constructible_from + >, + boost::is_same > >::type* = 0) { convert_construct( detail::variant::move(operand), 1L); } diff --git a/boost/variant/variant_fwd.hpp b/boost/variant/variant_fwd.hpp index 769ecc4..b533f76 100644 --- a/boost/variant/variant_fwd.hpp +++ b/boost/variant/variant_fwd.hpp @@ -59,7 +59,7 @@ GCC before 4.0 had no variadic tempaltes; GCC 4.6 has incomplete implementation of variadic templates. - MSVC2013 has variadic templates, but they have issues. + MSVC2015 Update 1 has variadic templates, but they have issues. NOTE: Clang compiler defines __GNUC__ */ diff --git a/boost/version.hpp b/boost/version.hpp index 94c16c3..03b33f9 100644 --- a/boost/version.hpp +++ b/boost/version.hpp @@ -19,7 +19,7 @@ // BOOST_VERSION / 100 % 1000 is the minor version // BOOST_VERSION / 100000 is the major version -#define BOOST_VERSION 106300 +#define BOOST_VERSION 106400 // // BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION @@ -27,6 +27,6 @@ // number, y is the minor version number, and z is the patch level if not 0. // This is used by to select which library version to link to. -#define BOOST_LIB_VERSION "1_63" +#define BOOST_LIB_VERSION "1_64" #endif