mirror of
https://github.com/yuzu-emu/ext-boost.git
synced 2024-12-22 18:55:42 +00:00
Update to boost v1.64.0
This commit is contained in:
parent
46a3f6dccf
commit
155d20ab3c
|
@ -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)
|
||||
===============================
|
||||
|
|
|
@ -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__)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -39,15 +39,20 @@
|
|||
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
|
||||
#endif
|
||||
|
||||
#else
|
||||
#else // defined(_MSC_VER)
|
||||
|
||||
#include <boost/config/compiler/gcc.hpp>
|
||||
|
||||
#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 <boost/config/compiler/common_edg.hpp>
|
||||
|
||||
|
@ -410,6 +415,11 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
|
|||
# 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<unsigned short> {};
|
|||
# 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<unsigned short> {};
|
|||
# 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<unsigned short> {};
|
|||
# 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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
@ -55,4 +55,3 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <chrono> 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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -289,18 +289,18 @@ struct allocator_traits
|
|||
|
||||
//! <b>Returns</b>: <code>a.allocate(n)</code>
|
||||
//!
|
||||
static pointer allocate(Allocator &a, size_type n)
|
||||
BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n)
|
||||
{ return a.allocate(n); }
|
||||
|
||||
//! <b>Returns</b>: <code>a.deallocate(p, n)</code>
|
||||
//!
|
||||
//! <b>Throws</b>: 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); }
|
||||
|
||||
//! <b>Effects</b>: calls <code>a.allocate(n, p)</code> if that call is well-formed;
|
||||
//! otherwise, invokes <code>a.allocate(n)</code>
|
||||
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
|
|||
//! <b>Effects</b>: calls <code>a.destroy(p)</code> if that call is well-formed;
|
||||
//! otherwise, invokes <code>p->~T()</code>.
|
||||
template<class T>
|
||||
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
|
|||
|
||||
//! <b>Returns</b>: <code>a.max_size()</code> if that expression is well-formed; otherwise,
|
||||
//! <code>numeric_limits<size_type>::max()</code>.
|
||||
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<Allocator, size_type (Allocator::*)() const>::value;
|
||||
container_detail::bool_<value> flag;
|
||||
|
@ -333,7 +333,7 @@ struct allocator_traits
|
|||
|
||||
//! <b>Returns</b>: <code>a.select_on_container_copy_construction()</code> 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<Allocator BOOST_MOVE_I Allocator (Allocator::*)() const>::value
|
||||
BOOST_MOVE_I Allocator BOOST_MOVE_I const Allocator & >::type)
|
||||
|
@ -349,7 +349,7 @@ struct allocator_traits
|
|||
//! <b>Effects</b>: calls <code>a.construct(p, std::forward<Args>(args)...)</code> if that call is well-formed;
|
||||
//! otherwise, invokes <code>::new (static_cast<void*>(p)) T(std::forward<Args>(args)...)</code>
|
||||
template <class T, class ...Args>
|
||||
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<Allocator>
|
||||
|
@ -363,7 +363,7 @@ struct allocator_traits
|
|||
|
||||
//! <b>Returns</b>: <code>a.storage_is_unpropagable(p)</code> if is_partially_propagable::value is true; otherwise,
|
||||
//! <code>false</code>.
|
||||
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_<is_partially_propagable::value> flag;
|
||||
return allocator_traits::priv_storage_is_unpropagable(flag, a, p);
|
||||
|
@ -371,7 +371,7 @@ struct allocator_traits
|
|||
|
||||
//! <b>Returns</b>: <code>true</code> if <code>is_always_equal::value == true</code>, otherwise,
|
||||
//! <code>a == b</code>.
|
||||
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_<is_always_equal::value> 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<class T>
|
||||
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<class T>
|
||||
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<class T, class ...Args>
|
||||
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>(args)...); }
|
||||
|
||||
template<class T, class ...Args>
|
||||
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>(args)...); }
|
||||
#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
public:
|
||||
|
||||
#define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL(N) \
|
||||
template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
|
||||
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<Allocator> \
|
||||
|
@ -438,11 +438,11 @@ struct allocator_traits
|
|||
/////////////////////////////////
|
||||
#define BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL(N) \
|
||||
template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
|
||||
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<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
|
||||
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<class T>
|
||||
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)
|
||||
|
|
|
@ -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_;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<T*>(::operator new(count*sizeof(T)));
|
||||
if(BOOST_UNLIKELY(count > this->max_size()))
|
||||
throw_bad_alloc();
|
||||
return static_cast<T*>(::operator new(count*sizeof(T)));
|
||||
}
|
||||
|
||||
//!Deallocates previously allocated memory.
|
||||
|
|
|
@ -131,6 +131,9 @@ class node_handle
|
|||
nallocator_type &node_alloc()
|
||||
{ return *static_cast<nallocator_type*>(m_nalloc_storage.address()); }
|
||||
|
||||
const nallocator_type &node_alloc() const
|
||||
{ return *static_cast<const nallocator_type*>(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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>(args)...);
|
||||
T* const p = this->priv_raw_end();
|
||||
allocator_traits_type::construct(this->m_holder.alloc(), p, ::boost::forward<Args>(args)...);
|
||||
++this->m_holder.m_size;
|
||||
return *this->priv_raw_end();
|
||||
return *p;
|
||||
}
|
||||
else{
|
||||
typedef container_detail::insert_emplace_proxy<Allocator, T*, Args...> 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<Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_TARG##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<size_type *>(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){
|
||||
|
|
|
@ -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 <boost/config.hpp>
|
||||
# include <boost/detail/workaround.hpp>
|
||||
# include <cstddef>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
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<class T>
|
||||
BOOST_CONSTEXPR inline T*
|
||||
addressof(T& o) BOOST_NOEXCEPT
|
||||
{
|
||||
return __builtin_addressof(o);
|
||||
}
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template<class T> 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<class T> struct addressof_impl
|
||||
{
|
||||
static BOOST_FORCEINLINE T * f( T & v, long )
|
||||
{
|
||||
return reinterpret_cast<T*>(
|
||||
&const_cast<char&>(reinterpret_cast<const volatile char &>(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 <boost/detail/workaround.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
typedef std::nullptr_t addr_nullptr_t;
|
||||
namespace boost {
|
||||
namespace detail {
|
||||
|
||||
template<class T>
|
||||
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<class T>
|
||||
struct address_of {
|
||||
static BOOST_FORCEINLINE T* get(T& o, long) BOOST_NOEXCEPT {
|
||||
return reinterpret_cast<T*>(&
|
||||
const_cast<char&>(reinterpret_cast<const volatile char&>(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<addressof_null_t> {
|
||||
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<const addressof_null_t> {
|
||||
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<volatile addressof_null_t> {
|
||||
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<const volatile addressof_null_t> {
|
||||
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<class T>
|
||||
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<T>::get(o, 0);
|
||||
#else
|
||||
return detail::address_of<T>::get(detail::addressof_ref<T>(o), 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
|
||||
namespace detail {
|
||||
|
||||
template<class T>
|
||||
struct addressof_result {
|
||||
typedef T* type;
|
||||
};
|
||||
|
||||
} /* detail */
|
||||
|
||||
template<class T, std::size_t N>
|
||||
BOOST_FORCEINLINE typename detail::addressof_result<T[N]>::type
|
||||
addressof(T (&o)[N]) BOOST_NOEXCEPT
|
||||
{
|
||||
return &o;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
template<class T, std::size_t N>
|
||||
BOOST_FORCEINLINE
|
||||
T (*addressof(T (&o)[N]) BOOST_NOEXCEPT)[N]
|
||||
{
|
||||
return reinterpret_cast<T(*)[N]>(&o);
|
||||
}
|
||||
|
||||
template<class T, std::size_t N>
|
||||
BOOST_FORCEINLINE
|
||||
const T (*addressof(const T (&o)[N]) BOOST_NOEXCEPT)[N]
|
||||
{
|
||||
return reinterpret_cast<const T(*)[N]>(&o);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
namespace detail {
|
||||
|
||||
template<class T>
|
||||
T&& addressof_declval() BOOST_NOEXCEPT;
|
||||
|
||||
template<class>
|
||||
struct addressof_void {
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template<class T, class E = void>
|
||||
struct addressof_member_operator {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct addressof_member_operator<T, typename
|
||||
addressof_void<decltype(addressof_declval<T&>().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<class T, class E = void>
|
||||
struct addressof_non_member_operator {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct addressof_non_member_operator<T, typename
|
||||
addressof_void<decltype(operator&(addressof_declval<T&>()))>::type> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
template<class T, class E = void>
|
||||
struct addressof_expression {
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct addressof_expression<T,
|
||||
typename addressof_void<decltype(&addressof_declval<T&>())>::type> {
|
||||
static constexpr bool value = true;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct addressof_is_constexpr {
|
||||
static constexpr bool value = addressof_expression<T>::value &&
|
||||
!addressof_member_operator<T>::value &&
|
||||
!addressof_non_member_operator<T>::value;
|
||||
};
|
||||
|
||||
template<bool E, class T>
|
||||
struct addressof_if { };
|
||||
|
||||
template<class T>
|
||||
struct addressof_if<true, T> {
|
||||
typedef T* type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
BOOST_FORCEINLINE
|
||||
T * addressof( T & v )
|
||||
typename addressof_if<!addressof_is_constexpr<T>::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<T>::f( v, 0 );
|
||||
|
||||
#else
|
||||
|
||||
return boost::detail::addressof_impl<T>::f( boost::detail::addr_impl_ref<T>( v ), 0 );
|
||||
|
||||
#endif
|
||||
return address_of<T>::get(addressof_ref<T>(o), 0);
|
||||
}
|
||||
|
||||
#if defined( __SUNPRO_CC ) && BOOST_WORKAROUND( __SUNPRO_CC, BOOST_TESTED_AT( 0x590 ) )
|
||||
|
||||
namespace detail
|
||||
template<class T>
|
||||
constexpr BOOST_FORCEINLINE
|
||||
typename addressof_if<addressof_is_constexpr<T>::value, T>::type
|
||||
addressof(T& o) BOOST_NOEXCEPT
|
||||
{
|
||||
|
||||
template<class T> 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<typename T,std::size_t N>
|
||||
BOOST_FORCEINLINE
|
||||
T (*addressof(T (&t)[N]))[N]
|
||||
template<class T>
|
||||
constexpr BOOST_FORCEINLINE T*
|
||||
addressof(T& o) BOOST_NOEXCEPT
|
||||
{
|
||||
return reinterpret_cast<T(*)[N]>(&t);
|
||||
}
|
||||
|
||||
template<typename T,std::size_t N>
|
||||
BOOST_FORCEINLINE
|
||||
const T (*addressof(const T (&t)[N]))[N]
|
||||
{
|
||||
return reinterpret_cast<const T(*)[N]>(&t);
|
||||
return detail::addressof(o);
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
} /* boost */
|
||||
#endif
|
||||
|
||||
#endif // BOOST_CORE_ADDRESSOF_HPP
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -37,6 +37,9 @@ namespace intrusive {
|
|||
template <class NodePtr>
|
||||
struct insert_commit_data_t
|
||||
{
|
||||
BOOST_INTRUSIVE_FORCEINLINE insert_commit_data_t()
|
||||
: link_left(false), node()
|
||||
{}
|
||||
bool link_left;
|
||||
NodePtr node;
|
||||
};
|
||||
|
|
|
@ -59,6 +59,10 @@ struct key_nodeptr_comp
|
|||
//Use public inheritance to avoid MSVC bugs with closures
|
||||
: public key_nodeptr_comp_types<KeyTypeKeyCompare, ValueTraits, KeyOfValue>::base_t
|
||||
{
|
||||
private:
|
||||
struct sfinae_type;
|
||||
|
||||
public:
|
||||
typedef key_nodeptr_comp_types<KeyTypeKeyCompare, ValueTraits, KeyOfValue> 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<class T1>
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T1 &t1, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value >::type* =0) const
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T1 &t1, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value, sfinae_type* >::type = 0) const
|
||||
{ return base().get()(key_of_value()(*traits_->to_value_ptr(t1))); }
|
||||
|
||||
//operator() 2 arg
|
||||
//pred(pnode, pnode)
|
||||
template<class T1, class T2>
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()
|
||||
(const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value && is_same_or_nodeptr_convertible<T2>::value >::type* =0) const
|
||||
(const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value && is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
|
||||
{ return base()(*traits_->to_value_ptr(t1), *traits_->to_value_ptr(t2)); }
|
||||
|
||||
//pred(pnode, key)
|
||||
template<class T1, class T2>
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()
|
||||
(const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value && !is_same_or_nodeptr_convertible<T2>::value >::type* =0) const
|
||||
(const T1 &t1, const T2 &t2, typename enable_if_c< is_same_or_nodeptr_convertible<T1>::value && !is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
|
||||
{ return base()(*traits_->to_value_ptr(t1), t2); }
|
||||
|
||||
//pred(key, pnode)
|
||||
template<class T1, class T2>
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()
|
||||
(const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible<T1>::value && is_same_or_nodeptr_convertible<T2>::value >::type* =0) const
|
||||
(const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible<T1>::value && is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
|
||||
{ return base()(t1, *traits_->to_value_ptr(t2)); }
|
||||
|
||||
//pred(key, key)
|
||||
template<class T1, class T2>
|
||||
BOOST_INTRUSIVE_FORCEINLINE bool operator()
|
||||
(const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible<T1>::value && !is_same_or_nodeptr_convertible<T2>::value >::type* =0) const
|
||||
(const T1 &t1, const T2 &t2, typename enable_if_c< !is_same_or_nodeptr_convertible<T1>::value && !is_same_or_nodeptr_convertible<T2>::value, sfinae_type* >::type = 0) const
|
||||
{ return base()(t1, t2); }
|
||||
|
||||
const ValueTraits *const traits_;
|
||||
|
|
|
@ -1115,7 +1115,7 @@ class slist_impl
|
|||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Complexity</b>: Lineal to the elements (l - before_f + 1).
|
||||
//! <b>Complexity</b>: Linear to the elements (l - before_f + 1).
|
||||
//!
|
||||
//! <b>Note</b>: Invalidates the iterators to the erased element.
|
||||
template<class Disposer>
|
||||
|
|
|
@ -96,6 +96,22 @@ typedef int bool_conversion::* explicit_bool_arg;
|
|||
typedef int (bool_conversion::*nullptr_type)();
|
||||
#endif
|
||||
|
||||
template<bool B>
|
||||
struct is_array_del
|
||||
{};
|
||||
|
||||
template<class T>
|
||||
void call_delete(T *p, is_array_del<true>)
|
||||
{
|
||||
delete [] p;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void call_delete(T *p, is_array_del<false>)
|
||||
{
|
||||
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<default_delete, U>::value ));
|
||||
element_type * const p = static_cast<element_type*>(ptr);
|
||||
bmupmu::is_array<T>::value ? delete [] p : delete p;
|
||||
move_upd::call_delete(p, move_upd::is_array_del<bmupmu::is_array<T>::value>());
|
||||
}
|
||||
|
||||
//! <b>Effects</b>: Same as <tt>(*this)(static_cast<element_type*>(nullptr))</tt>.
|
||||
|
|
|
@ -397,7 +397,7 @@ struct pointer_type_imp
|
|||
template <class T, class D>
|
||||
struct pointer_type_imp<T, D, false>
|
||||
{
|
||||
typedef typename remove_extent<T>::type* type;
|
||||
typedef T* type;
|
||||
};
|
||||
|
||||
template <class T, class D>
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
30
boost/smart_ptr/detail/sp_noexcept.hpp
Normal file
30
boost/smart_ptr/detail/sp_noexcept.hpp
Normal file
|
@ -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 <boost/config.hpp>
|
||||
|
||||
#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
|
|
@ -19,6 +19,7 @@
|
|||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_convertible.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
|
||||
|
||||
#include <boost/config/no_tr1/functional.hpp> // 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;
|
||||
|
|
|
@ -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()));
|
||||
|
|
|
@ -130,6 +130,7 @@
|
|||
#include <boost/type_traits/is_volatile.hpp>
|
||||
#include <boost/type_traits/make_signed.hpp>
|
||||
#include <boost/type_traits/make_unsigned.hpp>
|
||||
#include <boost/type_traits/make_void.hpp>
|
||||
#include <boost/type_traits/rank.hpp>
|
||||
#include <boost/type_traits/remove_all_extents.hpp>
|
||||
#include <boost/type_traits/remove_bounds.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>
|
||||
{
|
||||
|
|
|
@ -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).
|
||||
|
|
52
boost/type_traits/make_void.hpp
Normal file
52
boost/type_traits/make_void.hpp
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
Copyright 2017 Glen Joseph Fernandes
|
||||
<glenjofe -at- 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_TT_MAKE_VOID_HPP_INCLUDED
|
||||
#define BOOST_TT_MAKE_VOID_HPP_INCLUDED
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
template<class...>
|
||||
struct make_void {
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
template<class... Ts>
|
||||
using void_t = typename make_void<Ts...>::type;
|
||||
#endif
|
||||
|
||||
#else /* BOOST_NO_CXX11_VARIADIC_TEMPLATES */
|
||||
|
||||
template<class = void,
|
||||
class = void,
|
||||
class = void,
|
||||
class = void,
|
||||
class = void>
|
||||
struct make_void {
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
|
||||
template<class A = void,
|
||||
class B = void,
|
||||
class C = void,
|
||||
class D = void,
|
||||
class E = void>
|
||||
using void_t = typename make_void<A, B, C, D, E>::type;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
} /* boost */
|
||||
|
||||
#endif
|
|
@ -14,8 +14,8 @@
|
|||
#include <boost/utility/binary.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/utility/identity_type.hpp>
|
||||
#include <boost/checked_delete.hpp>
|
||||
#include <boost/core/checked_delete.hpp>
|
||||
#include <boost/core/noncopyable.hpp>
|
||||
#include <boost/next_prior.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
#endif // BOOST_UTILITY_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 <typename U>
|
||||
pointer operator()(U& operand) const BOOST_NOEXCEPT
|
||||
{
|
||||
typedef typename boost::remove_reference<Base>::type base_t;
|
||||
typedef boost::integral_constant<
|
||||
bool,
|
||||
boost::mpl::or_<
|
||||
boost::is_base_of<Base, U>,
|
||||
boost::is_same<Base, U>,
|
||||
boost::is_same<typename boost::remove_cv<Base>::type, U >
|
||||
>::value
|
||||
(
|
||||
boost::is_base_of<base_t, U>::value &&
|
||||
(boost::is_const<base_t>::value || !boost::is_const<U>::value)
|
||||
)
|
||||
|| boost::is_same<base_t, U>::value
|
||||
|| boost::is_same<typename boost::remove_cv<base_t>::type, U >::value
|
||||
> tag_t;
|
||||
|
||||
return this_type::get(operand, tag_t());
|
||||
|
|
|
@ -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 <boost/mpl/aux_/lambda_support.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_constructible.hpp>
|
||||
#include <boost/type_traits/is_nothrow_move_constructible.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
|
@ -65,6 +66,9 @@ template <class T, class U> struct is_constructible<recursive_wrapper<T>, const
|
|||
template <class T, class U> struct is_constructible<recursive_wrapper<T>, recursive_wrapper<U>& > : boost::false_type{};
|
||||
template <class T, class U> struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<U>& > : 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 <class T> struct is_nothrow_move_constructible<recursive_wrapper<T> > : boost::false_type{};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// metafunction is_recursive_wrapper (modeled on code by David Abrahams)
|
||||
|
|
|
@ -1756,10 +1756,12 @@ public: // structors, cont.
|
|||
|
||||
template <typename T>
|
||||
variant(const T& operand,
|
||||
typename boost::enable_if<mpl::and_<
|
||||
mpl::not_< boost::is_same<T, variant> >,
|
||||
boost::detail::variant::is_variant_constructible_from<const T&, internal_types>
|
||||
> >::type* = 0)
|
||||
typename boost::enable_if<mpl::or_<
|
||||
mpl::and_<
|
||||
mpl::not_< boost::is_same<T, variant> >,
|
||||
boost::detail::variant::is_variant_constructible_from<const T&, internal_types>
|
||||
>,
|
||||
boost::is_same<T, boost::recursive_variant_> > >::type* = 0)
|
||||
{
|
||||
convert_construct(operand, 1L);
|
||||
}
|
||||
|
@ -1767,11 +1769,13 @@ public: // structors, cont.
|
|||
template <typename T>
|
||||
variant(
|
||||
T& operand
|
||||
, typename boost::enable_if<mpl::and_<
|
||||
mpl::not_< is_const<T> >,
|
||||
mpl::not_< boost::is_same<T, variant> >,
|
||||
boost::detail::variant::is_variant_constructible_from<T&, internal_types>
|
||||
> >::type* = 0
|
||||
, typename boost::enable_if<mpl::or_<
|
||||
mpl::and_<
|
||||
mpl::not_< is_const<T> >,
|
||||
mpl::not_< boost::is_same<T, variant> >,
|
||||
boost::detail::variant::is_variant_constructible_from<T&, internal_types>
|
||||
>,
|
||||
boost::is_same<T, boost::recursive_variant_> > >::type* = 0
|
||||
)
|
||||
{
|
||||
convert_construct(operand, 1L);
|
||||
|
@ -1780,12 +1784,14 @@ public: // structors, cont.
|
|||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <class T>
|
||||
variant(T&& operand,
|
||||
typename boost::enable_if<mpl::and_<
|
||||
boost::is_rvalue_reference<T&&>,
|
||||
mpl::not_< boost::is_const<T> >,
|
||||
mpl::not_< boost::is_same<T, variant> >,
|
||||
boost::detail::variant::is_variant_constructible_from<T&&, internal_types>
|
||||
> >::type* = 0)
|
||||
typename boost::enable_if<mpl::or_<
|
||||
mpl::and_<
|
||||
boost::is_rvalue_reference<T&&>,
|
||||
mpl::not_< boost::is_const<T> >,
|
||||
mpl::not_< boost::is_same<T, variant> >,
|
||||
boost::detail::variant::is_variant_constructible_from<T&&, internal_types>
|
||||
>,
|
||||
boost::is_same<T, boost::recursive_variant_> > >::type* = 0)
|
||||
{
|
||||
convert_construct( detail::variant::move(operand), 1L);
|
||||
}
|
||||
|
|
|
@ -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__
|
||||
*/
|
||||
|
|
|
@ -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 <config/auto_link.hpp> to select which library version to link to.
|
||||
|
||||
#define BOOST_LIB_VERSION "1_63"
|
||||
#define BOOST_LIB_VERSION "1_64"
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue