libs/regex/src/instances.cpp \
libs/regex/src/cpp_regex_traits.cpp \
libs/regex/src/c_regex_traits.cpp \
- libs/regex/src/wc_regex_traits.cpp
+ libs/regex/src/wc_regex_traits.cpp
else
#include <algorithm>
-#include "boost/config.hpp"
+#include <boost/config.hpp>
#include <boost/type_index.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/decay.hpp>
#include <boost/throw_exception.hpp>
#include <boost/static_assert.hpp>
#include <boost/utility/enable_if.hpp>
+#include <boost/core/addressof.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/mpl/if.hpp>
ValueType * any_cast(any * operand) BOOST_NOEXCEPT
{
return operand && operand->type() == boost::typeindex::type_id<ValueType>()
- ? &static_cast<any::holder<BOOST_DEDUCED_TYPENAME remove_cv<ValueType>::type> *>(operand->content)->held
+ ? boost::addressof(
+ static_cast<any::holder<BOOST_DEDUCED_TYPENAME remove_cv<ValueType>::type> *>(operand->content)->held
+ )
: 0;
}
typedef BOOST_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref;
- nonref * result = any_cast<nonref>(&operand);
+ nonref * result = any_cast<nonref>(boost::addressof(operand));
if(!result)
boost::throw_exception(bad_any_cast());
BOOST_DEDUCED_TYPENAME boost::add_reference<ValueType>::type
>::type ref_type;
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4172) // "returning address of local variable or temporary" but *result is not local!
+#endif
return static_cast<ref_type>(*result);
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
}
template<typename ValueType>
template<typename ValueType>
inline ValueType * unsafe_any_cast(any * operand) BOOST_NOEXCEPT
{
- return &static_cast<any::holder<ValueType> *>(operand->content)->held;
+ return boost::addressof(
+ static_cast<any::holder<ValueType> *>(operand->content)->held
+ );
}
template<typename ValueType>
* accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
+ * 9 Jan 2013 - (mtc) Added constexpr
* 14 Apr 2012 - (mtc) Added support for boost::hash
* 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility.
* 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group.
#include <cstddef>
#include <stdexcept>
#include <boost/assert.hpp>
+#include <boost/static_assert.hpp>
#include <boost/swap.hpp>
// Handles broken standard libraries better than <iterator>
#include <boost/detail/iterator.hpp>
#include <boost/throw_exception.hpp>
-#include <boost/functional/hash_fwd.hpp>
#include <algorithm>
// FIXES for broken compilers
const_iterator cend() const { return elems+N; }
// reverse iterator support
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
+#if !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310)
- // workaround for broken reverse_iterator in VC7
- typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
- reference, iterator, reference> > reverse_iterator;
- typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
- const_reference, iterator, reference> > const_reverse_iterator;
#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
value_type, reference, iterator, difference_type> reverse_iterator;
// operator[]
reference operator[](size_type i)
{
- BOOST_ASSERT_MSG( i < N, "out of range" );
- return elems[i];
+ return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i];
}
- const_reference operator[](size_type i) const
+ /*BOOST_CONSTEXPR*/ const_reference operator[](size_type i) const
{
- BOOST_ASSERT_MSG( i < N, "out of range" );
- return elems[i];
+ return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i];
}
// at() with range check
- reference at(size_type i) { rangecheck(i); return elems[i]; }
- const_reference at(size_type i) const { rangecheck(i); return elems[i]; }
+ reference at(size_type i) { return rangecheck(i), elems[i]; }
+ /*BOOST_CONSTEXPR*/ const_reference at(size_type i) const { return rangecheck(i), elems[i]; }
// front() and back()
reference front()
return elems[0];
}
- const_reference front() const
+ BOOST_CONSTEXPR const_reference front() const
{
return elems[0];
}
return elems[N-1];
}
- const_reference back() const
+ BOOST_CONSTEXPR const_reference back() const
{
return elems[N-1];
}
// size is constant
- static size_type size() { return N; }
- static bool empty() { return false; }
- static size_type max_size() { return N; }
+ static BOOST_CONSTEXPR size_type size() { return N; }
+ static BOOST_CONSTEXPR bool empty() { return false; }
+ static BOOST_CONSTEXPR size_type max_size() { return N; }
enum { static_size = N };
// swap (note: linear complexity)
}
// check range (may be private because it is static)
- static void rangecheck (size_type i) {
- if (i >= size()) {
- std::out_of_range e("array<>: index out of range");
- boost::throw_exception(e);
- }
+ static BOOST_CONSTEXPR bool rangecheck (size_type i) {
+ return i > size() ? boost::throw_exception(std::out_of_range ("array<>: index out of range")), true : true;
}
};
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template< class T >
class array< T, 0 > {
const_iterator cend() const { return cbegin(); }
// reverse iterator support
-#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
+#if !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310)
- // workaround for broken reverse_iterator in VC7
- typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
- reference, iterator, reference> > reverse_iterator;
- typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
- const_reference, iterator, reference> > const_reverse_iterator;
#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
value_type, reference, iterator, difference_type> reverse_iterator;
return failed_rangecheck();
}
- const_reference operator[](size_type /*i*/) const
+ /*BOOST_CONSTEXPR*/ const_reference operator[](size_type /*i*/) const
{
return failed_rangecheck();
}
// at() with range check
reference at(size_type /*i*/) { return failed_rangecheck(); }
- const_reference at(size_type /*i*/) const { return failed_rangecheck(); }
+ /*BOOST_CONSTEXPR*/ const_reference at(size_type /*i*/) const { return failed_rangecheck(); }
// front() and back()
reference front()
return failed_rangecheck();
}
- const_reference front() const
+ BOOST_CONSTEXPR const_reference front() const
{
return failed_rangecheck();
}
return failed_rangecheck();
}
- const_reference back() const
+ BOOST_CONSTEXPR const_reference back() const
{
return failed_rangecheck();
}
// size is constant
- static size_type size() { return 0; }
- static bool empty() { return true; }
- static size_type max_size() { return 0; }
+ static BOOST_CONSTEXPR size_type size() { return 0; }
+ static BOOST_CONSTEXPR bool empty() { return true; }
+ static BOOST_CONSTEXPR size_type max_size() { return 0; }
enum { static_size = 0 };
void swap (array<T,0>& /*y*/) {
#endif
}
};
-#endif
// comparisons
template<class T, std::size_t N>
// Specific for boost::array: simply returns its elems data member.
template <typename T, std::size_t N>
- typename const detail::c_array<T,N>::type& get_c_array(const boost::array<T,N>& arg)
+ typename detail::c_array<T,N>::type const& get_c_array(const boost::array<T,N>& arg)
{
return arg.elems;
}
}
#endif
+ template <class It> std::size_t hash_range(It, It);
template<class T, std::size_t N>
std::size_t hash_value(const array<T,N>& arr)
return boost::hash_range(arr.begin(), arr.end());
}
+ template <size_t Idx, typename T, size_t N>
+ T &get(boost::array<T,N> &arr) BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(boost::array &) index out of range" );
+ return arr[Idx];
+ }
+
+ template <size_t Idx, typename T, size_t N>
+ const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(const boost::array &) index out of range" );
+ return arr[Idx];
+ }
+
} /* namespace boost */
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+// If we don't have std::array, I'm assuming that we don't have std::get
+namespace std {
+ template <size_t Idx, typename T, size_t N>
+ T &get(boost::array<T,N> &arr) BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG ( Idx < N, "std::get<>(boost::array &) index out of range" );
+ return arr[Idx];
+ }
+
+ template <size_t Idx, typename T, size_t N>
+ const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG ( Idx < N, "std::get<>(const boost::array &) index out of range" );
+ return arr[Idx];
+ }
+}
+#endif
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
# pragma warning(pop)
#include <boost/config.hpp>
#include <boost/is_placeholder.hpp>
-#include <boost/static_assert.hpp>
namespace boost
{
+template<bool Eq> struct _arg_eq
+{
+};
+
+template<> struct _arg_eq<true>
+{
+ typedef void type;
+};
+
template< int I > struct arg
{
BOOST_CONSTEXPR arg()
{
}
- template< class T > BOOST_CONSTEXPR arg( T const & /* t */ )
+ template< class T > BOOST_CONSTEXPR arg( T const & /* t */, typename _arg_eq< I == is_placeholder<T>::value >::type * = 0 )
{
- BOOST_STATIC_ASSERT( I == is_placeholder<T>::value );
}
};
// if we don't have a compiler config set, try and find one:
#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG)
-# include <boost/config/select_compiler_config.hpp>
+# include <boost/config/detail/select_compiler_config.hpp>
#endif
// if we have a compiler config, include it now:
#ifdef BOOST_COMPILER_CONFIG
// if we don't have a std library config set, try and find one:
#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) && defined(__cplusplus)
-# include <boost/config/select_stdlib_config.hpp>
+# include <boost/config/detail/select_stdlib_config.hpp>
#endif
// if we have a std library config, include it now:
#ifdef BOOST_STDLIB_CONFIG
// if we don't have a platform config set, try and find one:
#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG)
-# include <boost/config/select_platform_config.hpp>
+# include <boost/config/detail/select_platform_config.hpp>
#endif
// if we have a platform config, include it now:
#ifdef BOOST_PLATFORM_CONFIG
#endif
// get config suffix code:
-#include <boost/config/suffix.hpp>
+#include <boost/config/detail/suffix.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
// 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__)
#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
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
#if __BORLANDC__ >= 0x590
# define BOOST_HAS_TR1_HASH
#define __has_attribute(x) 0
#endif
+#ifndef __has_cpp_attribute
+#define __has_cpp_attribute(x) 0
+#endif
+
#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
#endif
#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)
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+
+// Clang 3.9+ in c++1z
+#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#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
#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable();
#endif
+#if (__clang_major__ == 3) && (__clang_minor__ == 0)
+// Apparently a clang bug:
+# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
+#endif
+
// Clang has supported the 'unused' attribute since the first release.
#define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__))
#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
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
//
// TR1 macros:
//
#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
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
#ifdef c_plusplus
// EDG has "long long" in non-strict mode
// However, some libraries have insufficient "long long" support
#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
--- /dev/null
+// (C) Copyright Brian Kuhl 2016.
+// 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)
+
+// Check this is a recent EDG based compiler, otherwise we don't support it here:
+
+
+#ifndef __EDG_VERSION__
+# error "Unknown Diab compiler version - please run the configure tests and report the results"
+#endif
+
+#include "boost/config/compiler/common_edg.hpp"
+
+#define BOOST_HAS_LONG_LONG
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_HDR_CODECVT
+#define BOOST_COMPILER "Wind River Diab " BOOST_STRINGIZE(__VERSION_NUMBER__)
#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
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
#if (__DMC__ <= 0x840)
#error "Compiler not supported or configured - please reconfigure"
#endif
#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
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
+#if __GNUC__ >= 7
+# define BOOST_FALLTHROUGH __attribute__((fallthrough))
+#endif
+
+#ifdef __MINGW32__
+// Currently (June 2017) thread_local is broken on mingw for all current compiler releases, see
+// https://sourceforge.net/p/mingw-w64/bugs/527/
+// Not setting this causes program termination on thread exit.
+#define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+
//
// Unused attribute:
#if __GNUC__ >= 4
# 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
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__
#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
#endif
-#else
+#if (__INTEL_COMPILER <= 1600) && !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES)
+# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+#endif
+
+#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)
# 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>
# 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:
# undef BOOST_NO_CXX11_FINAL
#endif
-#endif
+#endif // defined(BOOST_INTEL_STDCXX0X)
//
// Broken in all versions up to 15:
# 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)
#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
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
//
#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
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
//
// versions check:
// we don't support MPW prior to version 8.9:
# define BOOST_COMPILER "NVIDIA CUDA C++ Compiler"
#endif
+#if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__)
+# define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__
+#else
+// We don't really know what the CUDA version is, but it's definitely before 7.5:
+# define BOOST_CUDA_VERSION 7000000
+#endif
+
// NVIDIA Specific support
// BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device
#define BOOST_GPU_ENABLED __host__ __device__
// https://svn.boost.org/trac/boost/ticket/11897
// This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance
// check is enough to detect versions < 7.5
-#if !defined(__CUDACC_VER__) || (__CUDACC_VER__ < 70500)
+#if BOOST_CUDA_VERSION < 7050000
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#endif
+// The same bug is back again in 8.0:
+#if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000)
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#endif
+// Most recent CUDA (8.0) has no constexpr support in msvc mode:
+#if defined(_MSC_VER)
+# define BOOST_NO_CXX11_CONSTEXPR
+#endif
+
+#ifdef __CUDACC__
+//
+// When compiing .cu files, there's a bunch of stuff that doesn't work with msvc:
+//
+#if defined(_MSC_VER)
+# define BOOST_NO_CXX14_DIGIT_SEPARATORS
+# define BOOST_NO_CXX11_UNICODE_LITERALS
+#endif
+//
+// And this one effects the NVCC front end,
+// See https://svn.boost.org/trac/boost/ticket/13049
+//
+#if (BOOST_CUDA_VERSION >= 8000000) && (BOOST_CUDA_VERSION < 8010000)
+# define BOOST_NO_CXX11_NOEXCEPT
+#endif
+
+#endif
+
# define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__
#endif
-#if __PATHCC__ >= 4
+#if __PATHCC__ >= 6
+// PathCC is based on clang, and supports the __has_*() builtins used
+// to detect features in clang.hpp. Since the clang toolset is much
+// better maintained, it is more convenient to reuse its definitions.
+# include "boost/config/compiler/clang.hpp"
+#elif __PATHCC__ >= 4
# define BOOST_MSVC6_MEMBER_TEMPLATES
# define BOOST_HAS_UNISTD_H
# define BOOST_HAS_STDINT_H
# 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
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
#endif
#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
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
//
// version check:
// probably nothing to do here?
//
# define BOOST_HAS_LONG_LONG
+#define BOOST_NO_CXX11_SFINAE_EXPR
// C++ 14:
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
# define BOOST_NO_CXX14_CONSTEXPR
#endif
-#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
+#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) || (__cplusplus < 201402L)
# define BOOST_NO_CXX14_DECLTYPE_AUTO
#endif
#if (__cplusplus < 201304) // There's no SD6 check for this....
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
// Turn on threading support for Solaris 12.
// Ticket #11972
#if (__SUNPRO_CC >= 0x5140) && defined(__SunOS_5_12) && !defined(BOOST_HAS_THREADS)
# 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
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
//
// TR1 features:
//
-#if _MSC_VER >= 1700
+#if (_MSC_VER >= 1700) && defined(_HAS_CXX17) && (_HAS_CXX17 > 0)
// # define BOOST_HAS_TR1_HASH // don't know if this is true yet.
// # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet.
# define BOOST_HAS_TR1_UNORDERED_MAP
# define BOOST_NO_CXX11_CONSTEXPR
#endif
+// C++14 features supported by VC++ 14.1 (Visual Studio 2017)
+//
+#if (_MSC_VER < 1910)
+# define BOOST_NO_CXX14_AGGREGATE_NSDMI
+#endif
+
+// C++17 features supported by VC++ 14.1 (Visual Studio 2017) Update 3
+//
+#if (_MSC_VER < 1911) || (_MSVC_LANG < 201703)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+
// MSVC including version 14 has not yet completely
// implemented value-initialization, as is reported:
// "VC++ does not value-initialize members of derived classes without
// C++ 11:
//
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-//
+#define BOOST_NO_CXX11_SFINAE_EXPR
// C++ 14:
-#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
-# define BOOST_NO_CXX14_AGGREGATE_NSDMI
-#endif
-#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
# define BOOST_NO_CXX14_CONSTEXPR
+// C++ 17:
+#define BOOST_NO_CXX17_INLINE_VARIABLES
+#define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+
+//
+// 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
//
# 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
#endif
//
-// last known and checked version is 19.00.23026 (VC++ 2015 RTM):
-#if (_MSC_VER > 1900)
+// last known and checked version is 19.11.25506 (VC++ 2017.3):
+#if (_MSC_VER > 1911)
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests and report the results"
# else
#define __has_extension __has_feature
#endif
+#ifndef __has_cpp_attribute
+#define __has_cpp_attribute(x) 0
+#endif
+
#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_NO_EXCEPTIONS
#endif
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
#endif
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+
+// Clang 3.9+ in c++1z
+#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
#if !__has_feature(cxx_thread_local)
# define BOOST_NO_CXX11_THREAD_LOCAL
#endif
--- /dev/null
+// Copyright (c) 2017 Dynatrace
+//
+// 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
+
+// See http://www.boost.org for most recent version.
+
+// Compiler setup for IBM z/OS XL C/C++ compiler.
+
+// Oldest compiler version currently supported is 2.1 (V2R1)
+#if !defined(__IBMCPP__) || !defined(__COMPILER_VER__) || __COMPILER_VER__ < 0x42010000
+# error "Compiler not supported or configured - please reconfigure"
+#endif
+
+#if __COMPILER_VER__ > 0x42010000
+# if defined(BOOST_ASSERT_CONFIG)
+# error "Unknown compiler version - please run the configure tests and report the results"
+# endif
+#endif
+
+#define BOOST_COMPILER "IBM z/OS XL C/C++ version " BOOST_STRINGIZE(__COMPILER_VER__)
+#define BOOST_XLCPP_ZOS __COMPILER_VER__
+
+// -------------------------------------
+
+#include <features.h> // For __UU, __C99, __TR1, ...
+
+#if !defined(__IBMCPP_DEFAULTED_AND_DELETED_FUNCTIONS)
+# define BOOST_NO_CXX11_DELETED_FUNCTIONS
+# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
+#endif
+
+// -------------------------------------
+
+#if defined(__UU) || defined(__C99) || defined(__TR1)
+# define BOOST_HAS_LOG1P
+# define BOOST_HAS_EXPM1
+#endif
+
+#if defined(__C99) || defined(__TR1)
+# define BOOST_HAS_STDINT_H
+#else
+# define BOOST_NO_FENV_H
+#endif
+
+// -------------------------------------
+
+#define BOOST_HAS_NRVO
+
+#if !defined(__RTTI_ALL__)
+# define BOOST_NO_RTTI
+#endif
+
+#if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS)
+# define BOOST_NO_EXCEPTIONS
+#endif
+
+#if defined(_LONG_LONG) || defined(__IBMCPP_C99_LONG_LONG) || defined(__LL)
+# define BOOST_HAS_LONG_LONG
+#else
+# define BOOST_NO_LONG_LONG
+#endif
+
+#if defined(_LONG_LONG) || defined(__IBMCPP_C99_LONG_LONG) || defined(__LL) || defined(_LP64)
+# define BOOST_HAS_MS_INT64
+#endif
+
+#define BOOST_NO_SFINAE_EXPR
+#define BOOST_NO_CXX11_SFINAE_EXPR
+
+#if defined(__IBMCPP_VARIADIC_TEMPLATES)
+# define BOOST_HAS_VARIADIC_TMPL
+#else
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#endif
+
+#if defined(__IBMCPP_STATIC_ASSERT)
+# define BOOST_HAS_STATIC_ASSERT
+#else
+# define BOOST_NO_CXX11_STATIC_ASSERT
+#endif
+
+#if defined(__IBMCPP_RVALUE_REFERENCES)
+# define BOOST_HAS_RVALUE_REFS
+#else
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
+#endif
+
+#if !defined(__IBMCPP_SCOPED_ENUM)
+# define BOOST_NO_CXX11_SCOPED_ENUMS
+#endif
+
+#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+
+#if !defined(__IBMCPP_EXPLICIT_CONVERSION_OPERATORS)
+# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#endif
+
+#if !defined(__IBMCPP_DECLTYPE)
+# define BOOST_NO_CXX11_DECLTYPE
+#else
+# define BOOST_HAS_DECLTYPE
+#endif
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+
+#if !defined(__IBMCPP_INLINE_NAMESPACE)
+# define BOOST_NO_CXX11_INLINE_NAMESPACES
+#endif
+
+#if !defined(__IBMCPP_AUTO_TYPEDEDUCTION)
+# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+# define BOOST_NO_CXX11_AUTO_DECLARATIONS
+# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
+#endif
+
+#if !defined(__IBM_CHAR32_T__)
+# define BOOST_NO_CXX11_CHAR32_T
+#endif
+#if !defined(__IBM_CHAR16_T__)
+# define BOOST_NO_CXX11_CHAR16_T
+#endif
+
+#if !defined(__IBMCPP_CONSTEXPR)
+# define BOOST_NO_CXX11_CONSTEXPR
+#endif
+
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+#define BOOST_NO_CXX11_THREAD_LOCAL
+#define BOOST_NO_CXX11_REF_QUALIFIERS
+#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_ALIGNAS
+#define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+#define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
+#define BOOST_NO_CXX14_AGGREGATE_NSDMI
+#define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
+#define BOOST_NO_CXX14_GENERIC_LAMBDAS
+#define BOOST_NO_CXX14_DIGIT_SEPARATORS
+#define BOOST_NO_CXX14_DECLTYPE_AUTO
+#define BOOST_NO_CXX14_CONSTEXPR
+#define BOOST_NO_CXX14_BINARY_LITERALS
+#define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#define BOOST_NO_CXX17_INLINE_VARIABLES
+#define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+
+// -------------------------------------
+
+#if defined(__IBM_ATTRIBUTES)
+# define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__))
+# define BOOST_NOINLINE __attribute__ ((__noinline__))
+// No BOOST_ALIGNMENT - explicit alignment support is broken (V2R1).
+#endif
+
+extern "builtin" long __builtin_expect(long, long);
+
+#define BOOST_LIKELY(x) __builtin_expect((x) && true, 1)
+#define BOOST_UNLIKELY(x) __builtin_expect((x) && true, 0)
--- /dev/null
+// (C) Copyright John Maddock 2001 - 2003.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+
+// See http://www.boost.org for most recent version.
+
+// All POSIX feature tests go in this file,
+// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well
+// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's
+// may be present but none-functional unless _POSIX_C_SOURCE and
+// _XOPEN_SOURCE have been defined to the right value (it's up
+// to the user to do this *before* including any header, although
+// in most cases the compiler will do this for you).
+
+# if defined(BOOST_HAS_UNISTD_H)
+# include <unistd.h>
+
+ // XOpen has <nl_types.h>, but is this the correct version check?
+# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3)
+# define BOOST_HAS_NL_TYPES_H
+# endif
+
+ // POSIX version 6 requires <stdint.h>
+# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100)
+# define BOOST_HAS_STDINT_H
+# endif
+
+ // POSIX version 2 requires <dirent.h>
+# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L)
+# define BOOST_HAS_DIRENT_H
+# endif
+
+ // POSIX version 3 requires <signal.h> to have sigaction:
+# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L)
+# define BOOST_HAS_SIGACTION
+# endif
+ // POSIX defines _POSIX_THREADS > 0 for pthread support,
+ // however some platforms define _POSIX_THREADS without
+ // a value, hence the (_POSIX_THREADS+0 >= 0) check.
+ // Strictly speaking this may catch platforms with a
+ // non-functioning stub <pthreads.h>, but such occurrences should
+ // occur very rarely if at all.
+# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS)
+# define BOOST_HAS_PTHREADS
+# endif
+
+ // BOOST_HAS_NANOSLEEP:
+ // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME:
+# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \
+ || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
+# define BOOST_HAS_NANOSLEEP
+# endif
+
+ // BOOST_HAS_CLOCK_GETTIME:
+ // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME
+ // but at least one platform - linux - defines that flag without
+ // defining clock_gettime):
+# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0))
+# define BOOST_HAS_CLOCK_GETTIME
+# endif
+
+ // BOOST_HAS_SCHED_YIELD:
+ // This is predicated on _POSIX_PRIORITY_SCHEDULING or
+ // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME.
+# if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\
+ || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\
+ || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
+# define BOOST_HAS_SCHED_YIELD
+# endif
+
+ // BOOST_HAS_GETTIMEOFDAY:
+ // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE:
+ // These are predicated on _XOPEN_VERSION, and appears to be first released
+ // in issue 4, version 2 (_XOPEN_VERSION > 500).
+ // Likewise for the functions log1p and expm1.
+# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500)
+# define BOOST_HAS_GETTIMEOFDAY
+# if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500)
+# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+# endif
+# ifndef BOOST_HAS_LOG1P
+# define BOOST_HAS_LOG1P
+# endif
+# ifndef BOOST_HAS_EXPM1
+# define BOOST_HAS_EXPM1
+# endif
+# endif
+
+# endif
+
+
+
+
--- /dev/null
+// Boost compiler configuration selection header file
+
+// (C) Copyright John Maddock 2001 - 2003.
+// (C) Copyright Martin Wille 2003.
+// (C) Copyright Guillaume Melquiond 2003.
+//
+// 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)
+
+// See http://www.boost.org/ for most recent version.
+
+// locate which compiler we are using and define
+// BOOST_COMPILER_CONFIG as needed:
+
+#if defined __CUDACC__
+// NVIDIA CUDA C++ compiler for GPU
+# include "boost/config/compiler/nvcc.hpp"
+
+#endif
+
+#if defined(__GCCXML__)
+// GCC-XML emulates other compilers, it has to appear first here!
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
+
+#elif defined(_CRAYC)
+// EDG based Cray compiler:
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp"
+
+#elif defined __COMO__
+// Comeau C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
+
+#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4)
+// PathScale EKOPath compiler (has to come before clang and gcc)
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp"
+
+#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
+// Intel
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp"
+
+#elif defined __clang__ && !defined(__CUDACC__) && !defined(__ibmxl__)
+// when using clang and cuda at same time, you want to appear as gcc
+// Clang C++ emulates GCC, so it has to appear early.
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp"
+
+#elif defined __DMC__
+// Digital Mars C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp"
+
+#elif defined __DCC__
+// Wind River Diab C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/diab.hpp"
+
+# elif defined(__GNUC__) && !defined(__ibmxl__)
+// GNU C++:
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp"
+
+#elif defined __KCC
+// Kai C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp"
+
+#elif defined __sgi
+// SGI MIPSpro C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp"
+
+#elif defined __DECCXX
+// Compaq Tru64 Unix cxx
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp"
+
+#elif defined __ghs
+// Greenhills C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp"
+
+#elif defined __CODEGEARC__
+// CodeGear - must be checked for before Borland
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp"
+
+#elif defined __BORLANDC__
+// Borland
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp"
+
+#elif defined __MWERKS__
+// Metrowerks CodeWarrior
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp"
+
+#elif defined __SUNPRO_CC
+// Sun Workshop Compiler C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp"
+
+#elif defined __HP_aCC
+// HP aCC
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp"
+
+#elif defined(__MRC__) || defined(__SC__)
+// MPW MrCpp or SCpp
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp"
+
+#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__)
+// IBM z/OS XL C/C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp_zos.hpp"
+
+#elif defined(__ibmxl__)
+// IBM XL C/C++ for Linux (Little Endian)
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp.hpp"
+
+#elif defined(__IBMCPP__)
+// IBM Visual Age or IBM XL C/C++ for Linux (Big Endian)
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp"
+
+#elif defined(__PGI)
+// Portland Group Inc.
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp"
+
+#elif defined _MSC_VER
+// Microsoft Visual C++
+//
+// Must remain the last #elif since some other vendors (Metrowerks, for
+// example) also #define _MSC_VER
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp"
+
+#elif defined (BOOST_ASSERT_CONFIG)
+// this must come last - generate an error if we don't
+// recognise the compiler:
+# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)"
+
+#endif
+
+#if 0
+//
+// This section allows dependency scanners to find all the headers we *might* include:
+//
+#include <boost/config/compiler/gcc_xml.hpp>
+#include <boost/config/compiler/cray.hpp>
+#include <boost/config/compiler/comeau.hpp>
+#include <boost/config/compiler/pathscale.hpp>
+#include <boost/config/compiler/intel.hpp>
+#include <boost/config/compiler/clang.hpp>
+#include <boost/config/compiler/digitalmars.hpp>
+#include <boost/config/compiler/gcc.hpp>
+#include <boost/config/compiler/kai.hpp>
+#include <boost/config/compiler/sgi_mipspro.hpp>
+#include <boost/config/compiler/compaq_cxx.hpp>
+#include <boost/config/compiler/greenhills.hpp>
+#include <boost/config/compiler/codegear.hpp>
+#include <boost/config/compiler/borland.hpp>
+#include <boost/config/compiler/metrowerks.hpp>
+#include <boost/config/compiler/sunpro_cc.hpp>
+#include <boost/config/compiler/hp_acc.hpp>
+#include <boost/config/compiler/mpw.hpp>
+#include <boost/config/compiler/xlcpp_zos.hpp>
+#include <boost/config/compiler/xlcpp.hpp>
+#include <boost/config/compiler/vacpp.hpp>
+#include <boost/config/compiler/pgi.hpp>
+#include <boost/config/compiler/visualc.hpp>
+
+#endif
+
--- /dev/null
+// Boost compiler configuration selection header file
+
+// (C) Copyright John Maddock 2001 - 2002.
+// (C) Copyright Jens Maurer 2001.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed.
+// Note that we define the headers to include using "header_name" not
+// <header_name> in order to prevent macro expansion within the header
+// name (for example "linux" is a macro on linux systems).
+
+#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC)
+// linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though?
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp"
+
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+// BSD:
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp"
+
+#elif defined(sun) || defined(__sun)
+// solaris:
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp"
+
+#elif defined(__sgi)
+// SGI Irix:
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp"
+
+#elif defined(__hpux)
+// hp unix:
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp"
+
+#elif defined(__CYGWIN__)
+// cygwin is not win32:
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp"
+
+#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+// win32:
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp"
+
+#elif defined(__HAIKU__)
+// Haiku
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp"
+
+#elif defined(__BEOS__)
+// BeOS
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"
+
+#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
+// MacOS
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp"
+
+#elif defined(__TOS_MVS__)
+// IBM z/OS
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/zos.hpp"
+
+#elif defined(__IBMCPP__) || defined(_AIX)
+// IBM AIX
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp"
+
+#elif defined(__amigaos__)
+// AmigaOS
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp"
+
+#elif defined(__QNXNTO__)
+// QNX:
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp"
+
+#elif defined(__VXWORKS__)
+// vxWorks:
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp"
+
+#elif defined(__SYMBIAN32__)
+// Symbian:
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp"
+
+#elif defined(_CRAYC)
+// Cray:
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp"
+
+#elif defined(__VMS)
+// VMS:
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp"
+
+#elif defined(__CloudABI__)
+// Nuxi CloudABI:
+# define BOOST_PLATFORM_CONFIG "boost/config/platform/cloudabi.hpp"
+#else
+
+# if defined(unix) \
+ || defined(__unix) \
+ || defined(_XOPEN_SOURCE) \
+ || defined(_POSIX_SOURCE)
+
+ // generic unix platform:
+
+# ifndef BOOST_HAS_UNISTD_H
+# define BOOST_HAS_UNISTD_H
+# endif
+
+# include <boost/config/detail/posix_features.hpp>
+
+# endif
+
+# if defined (BOOST_ASSERT_CONFIG)
+ // this must come last - generate an error if we don't
+ // recognise the platform:
+# error "Unknown platform - please configure and report the results to boost.org"
+# endif
+
+#endif
+
+#if 0
+//
+// This section allows dependency scanners to find all the files we *might* include:
+//
+# include "boost/config/platform/linux.hpp"
+# include "boost/config/platform/bsd.hpp"
+# include "boost/config/platform/solaris.hpp"
+# include "boost/config/platform/irix.hpp"
+# include "boost/config/platform/hpux.hpp"
+# include "boost/config/platform/cygwin.hpp"
+# include "boost/config/platform/win32.hpp"
+# include "boost/config/platform/beos.hpp"
+# include "boost/config/platform/macos.hpp"
+# include "boost/config/platform/zos.hpp"
+# include "boost/config/platform/aix.hpp"
+# include "boost/config/platform/amigaos.hpp"
+# include "boost/config/platform/qnxnto.hpp"
+# include "boost/config/platform/vxworks.hpp"
+# include "boost/config/platform/symbian.hpp"
+# include "boost/config/platform/cray.hpp"
+# include "boost/config/platform/vms.hpp"
+# include <boost/config/detail/posix_features.hpp>
+
+
+
+#endif
+
--- /dev/null
+// Boost compiler configuration selection header file
+
+// (C) Copyright John Maddock 2001 - 2003.
+// (C) Copyright Jens Maurer 2001 - 2002.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+
+// See http://www.boost.org for most recent version.
+
+// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed:
+
+// First include <cstddef> to determine if some version of STLport is in use as the std lib
+// (do not rely on this header being included since users can short-circuit this header
+// if they know whose std lib they are using.)
+#ifdef __cplusplus
+# include <cstddef>
+#else
+# include <stddef.h>
+#endif
+
+#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
+// STLPort library; this _must_ come first, otherwise since
+// STLport typically sits on top of some other library, we
+// can end up detecting that first rather than STLport:
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp"
+
+#else
+
+// If our std lib was not some version of STLport, and has not otherwise
+// been detected, then include <utility> as it is about
+// the smallest of the std lib headers that includes real C++ stuff.
+// Some std libs do not include their C++-related macros in <cstddef>
+// so this additional include makes sure we get those definitions.
+// Note: do not rely on this header being included since users can short-circuit this
+// #include if they know whose std lib they are using.
+#if !defined(__LIBCOMO__) && !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)\
+ && !defined(_LIBCPP_VERSION) && !defined(__GLIBCPP__) && !defined(__GLIBCXX__)\
+ && !defined(__STL_CONFIG_H) && !defined(__MSL_CPP__) && !defined(__IBMCPP__)\
+ && !defined(MSIPL_COMPILE_H) && !defined(_YVALS) && !defined(_CPPLIB_VER)
+#include <utility>
+#endif
+
+#if defined(__LIBCOMO__)
+// Comeau STL:
+#define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp"
+
+#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
+// Rogue Wave library:
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp"
+
+#elif defined(_LIBCPP_VERSION)
+// libc++
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp"
+
+#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
+// GNU libstdc++ 3
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp"
+
+#elif defined(__STL_CONFIG_H)
+// generic SGI STL
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp"
+
+#elif defined(__MSL_CPP__)
+// MSL standard lib:
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp"
+
+#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__)
+// IBM z/OS XL C/C++
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/xlcpp_zos.hpp"
+
+#elif defined(__IBMCPP__)
+// take the default VACPP std lib
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp"
+
+#elif defined(MSIPL_COMPILE_H)
+// Modena C++ standard library
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp"
+
+#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
+// Dinkumware Library (this has to appear after any possible replacement libraries):
+# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp"
+
+#elif defined (BOOST_ASSERT_CONFIG)
+// this must come last - generate an error if we don't
+// recognise the library:
+# error "Unknown standard library - please configure and report the results to boost.org"
+
+#endif
+
+#endif
+
+#if 0
+//
+// This section allows dependency scanners to find all the files we *might* include:
+//
+# include "boost/config/stdlib/stlport.hpp"
+# include "boost/config/stdlib/libcomo.hpp"
+# include "boost/config/stdlib/roguewave.hpp"
+# include "boost/config/stdlib/libcpp.hpp"
+# include "boost/config/stdlib/libstdcpp3.hpp"
+# include "boost/config/stdlib/sgi.hpp"
+# include "boost/config/stdlib/msl.hpp"
+# include "boost/config/stdlib/xlcpp_zos.hpp"
+# include "boost/config/stdlib/vacpp.hpp"
+# include "boost/config/stdlib/modena.hpp"
+# include "boost/config/stdlib/dinkumware.hpp"
+#endif
+
--- /dev/null
+// Boost config.hpp configuration header file ------------------------------//
+// boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file
+
+// Copyright (c) 2001-2003 John Maddock
+// Copyright (c) 2001 Darin Adler
+// Copyright (c) 2001 Peter Dimov
+// Copyright (c) 2002 Bill Kempf
+// Copyright (c) 2002 Jens Maurer
+// Copyright (c) 2002-2003 David Abrahams
+// Copyright (c) 2003 Gennaro Prota
+// Copyright (c) 2003 Eric Friedman
+// Copyright (c) 2010 Eric Jourdanneau, Joel Falcou
+// 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)
+
+// See http://www.boost.org/ for most recent version.
+
+// Boost config.hpp policy and rationale documentation has been moved to
+// http://www.boost.org/libs/config/
+//
+// This file is intended to be stable, and relatively unchanging.
+// It should contain boilerplate code only - no compiler specific
+// code unless it is unavoidable - no changes unless unavoidable.
+
+#ifndef BOOST_CONFIG_SUFFIX_HPP
+#define BOOST_CONFIG_SUFFIX_HPP
+
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+//
+// Some GCC-4.x versions issue warnings even when __extension__ is used,
+// so use this as a workaround:
+//
+#pragma GCC system_header
+#endif
+
+//
+// ensure that visibility macros are always defined, thus symplifying use
+//
+#ifndef BOOST_SYMBOL_EXPORT
+# define BOOST_SYMBOL_EXPORT
+#endif
+#ifndef BOOST_SYMBOL_IMPORT
+# define BOOST_SYMBOL_IMPORT
+#endif
+#ifndef BOOST_SYMBOL_VISIBLE
+# define BOOST_SYMBOL_VISIBLE
+#endif
+
+//
+// look for long long by looking for the appropriate macros in <limits.h>.
+// Note that we use limits.h rather than climits for maximal portability,
+// remember that since these just declare a bunch of macros, there should be
+// no namespace issues from this.
+//
+#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \
+ && !defined(BOOST_MSVC) && !defined(__BORLANDC__)
+# include <limits.h>
+# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
+# define BOOST_HAS_LONG_LONG
+# else
+# define BOOST_NO_LONG_LONG
+# endif
+#endif
+
+// GCC 3.x will clean up all of those nasty macro definitions that
+// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine
+// it under GCC 3.x.
+#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS)
+# undef BOOST_NO_CTYPE_FUNCTIONS
+#endif
+
+//
+// Assume any extensions are in namespace std:: unless stated otherwise:
+//
+# ifndef BOOST_STD_EXTENSION_NAMESPACE
+# define BOOST_STD_EXTENSION_NAMESPACE std
+# endif
+
+//
+// If cv-qualified specializations are not allowed, then neither are cv-void ones:
+//
+# if defined(BOOST_NO_CV_SPECIALIZATIONS) \
+ && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
+# define BOOST_NO_CV_VOID_SPECIALIZATIONS
+# endif
+
+//
+// If there is no numeric_limits template, then it can't have any compile time
+// constants either!
+//
+# if defined(BOOST_NO_LIMITS) \
+ && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
+# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
+# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
+# endif
+
+//
+// if there is no long long then there is no specialisation
+// for numeric_limits<long long> either:
+//
+#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)
+# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
+#endif
+
+//
+// if there is no __int64 then there is no specialisation
+// for numeric_limits<__int64> either:
+//
+#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)
+# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
+#endif
+
+//
+// if member templates are supported then so is the
+// VC6 subset of member templates:
+//
+# if !defined(BOOST_NO_MEMBER_TEMPLATES) \
+ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
+# define BOOST_MSVC6_MEMBER_TEMPLATES
+# endif
+
+//
+// Without partial specialization, can't test for partial specialisation bugs:
+//
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)
+# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
+# endif
+
+//
+// Without partial specialization, we can't have array-type partial specialisations:
+//
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
+# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
+# endif
+
+//
+// Without partial specialization, std::iterator_traits can't work:
+//
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
+# define BOOST_NO_STD_ITERATOR_TRAITS
+# endif
+
+//
+// Without partial specialization, partial
+// specialization with default args won't work either:
+//
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+# define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
+# endif
+
+//
+// Without member template support, we can't have template constructors
+// in the standard library either:
+//
+# if defined(BOOST_NO_MEMBER_TEMPLATES) \
+ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
+ && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
+# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
+# endif
+
+//
+// Without member template support, we can't have a conforming
+// std::allocator template either:
+//
+# if defined(BOOST_NO_MEMBER_TEMPLATES) \
+ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
+ && !defined(BOOST_NO_STD_ALLOCATOR)
+# define BOOST_NO_STD_ALLOCATOR
+# endif
+
+//
+// without ADL support then using declarations will break ADL as well:
+//
+#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
+# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
+#endif
+
+//
+// Without typeid support we have no dynamic RTTI either:
+//
+#if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
+# define BOOST_NO_RTTI
+#endif
+
+//
+// If we have a standard allocator, then we have a partial one as well:
+//
+#if !defined(BOOST_NO_STD_ALLOCATOR)
+# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
+#endif
+
+//
+// We can't have a working std::use_facet if there is no std::locale:
+//
+# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)
+# define BOOST_NO_STD_USE_FACET
+# endif
+
+//
+// We can't have a std::messages facet if there is no std::locale:
+//
+# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)
+# define BOOST_NO_STD_MESSAGES
+# endif
+
+//
+// We can't have a working std::wstreambuf if there is no std::locale:
+//
+# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
+# define BOOST_NO_STD_WSTREAMBUF
+# endif
+
+//
+// We can't have a <cwctype> if there is no <cwchar>:
+//
+# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE)
+# define BOOST_NO_CWCTYPE
+# endif
+
+//
+// We can't have a swprintf if there is no <cwchar>:
+//
+# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF)
+# define BOOST_NO_SWPRINTF
+# endif
+
+//
+// If Win32 support is turned off, then we must turn off
+// threading support also, unless there is some other
+// thread API enabled:
+//
+#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \
+ && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS)
+# define BOOST_DISABLE_THREADS
+#endif
+
+//
+// Turn on threading support if the compiler thinks that it's in
+// multithreaded mode. We put this here because there are only a
+// limited number of macros that identify this (if there's any missing
+// from here then add to the appropriate compiler section):
+//
+#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
+ || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \
+ && !defined(BOOST_HAS_THREADS)
+# define BOOST_HAS_THREADS
+#endif
+
+//
+// Turn threading support off if BOOST_DISABLE_THREADS is defined:
+//
+#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS)
+# undef BOOST_HAS_THREADS
+#endif
+
+//
+// Turn threading support off if we don't recognise the threading API:
+//
+#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\
+ && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\
+ && !defined(BOOST_HAS_MPTASKS)
+# undef BOOST_HAS_THREADS
+#endif
+
+//
+// Turn threading detail macros off if we don't (want to) use threading
+//
+#ifndef BOOST_HAS_THREADS
+# undef BOOST_HAS_PTHREADS
+# undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+# undef BOOST_HAS_PTHREAD_YIELD
+# undef BOOST_HAS_PTHREAD_DELAY_NP
+# undef BOOST_HAS_WINTHREADS
+# undef BOOST_HAS_BETHREADS
+# undef BOOST_HAS_MPTASKS
+#endif
+
+//
+// If the compiler claims to be C99 conformant, then it had better
+// have a <stdint.h>:
+//
+# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
+# define BOOST_HAS_STDINT_H
+# ifndef BOOST_HAS_LOG1P
+# define BOOST_HAS_LOG1P
+# endif
+# ifndef BOOST_HAS_EXPM1
+# define BOOST_HAS_EXPM1
+# endif
+# endif
+
+//
+// Define BOOST_NO_SLIST and BOOST_NO_HASH if required.
+// Note that this is for backwards compatibility only.
+//
+# if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST)
+# define BOOST_NO_SLIST
+# endif
+
+# if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH)
+# define BOOST_NO_HASH
+# endif
+
+//
+// Set BOOST_SLIST_HEADER if not set already:
+//
+#if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER)
+# define BOOST_SLIST_HEADER <slist>
+#endif
+
+//
+// Set BOOST_HASH_SET_HEADER if not set already:
+//
+#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER)
+# define BOOST_HASH_SET_HEADER <hash_set>
+#endif
+
+//
+// Set BOOST_HASH_MAP_HEADER if not set already:
+//
+#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER)
+# define BOOST_HASH_MAP_HEADER <hash_map>
+#endif
+
+// BOOST_HAS_ABI_HEADERS
+// This macro gets set if we have headers that fix the ABI,
+// and prevent ODR violations when linking to external libraries:
+#if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS)
+# define BOOST_HAS_ABI_HEADERS
+#endif
+
+#if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS)
+# undef BOOST_HAS_ABI_HEADERS
+#endif
+
+// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------//
+// Because std::size_t usage is so common, even in boost headers which do not
+// otherwise use the C library, the <cstddef> workaround is included here so
+// that ugly workaround code need not appear in many other boost headers.
+// NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>
+// must still be #included in the usual places so that <cstddef> inclusion
+// works as expected with standard conforming compilers. The resulting
+// double inclusion of <cstddef> is harmless.
+
+# if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus)
+# include <cstddef>
+ namespace std { using ::ptrdiff_t; using ::size_t; }
+# endif
+
+// Workaround for the unfortunate min/max macros defined by some platform headers
+
+#define BOOST_PREVENT_MACRO_SUBSTITUTION
+
+#ifndef BOOST_USING_STD_MIN
+# define BOOST_USING_STD_MIN() using std::min
+#endif
+
+#ifndef BOOST_USING_STD_MAX
+# define BOOST_USING_STD_MAX() using std::max
+#endif
+
+// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------//
+
+# if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus)
+
+namespace std {
+ template <class _Tp>
+ inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
+ return __b < __a ? __b : __a;
+ }
+ template <class _Tp>
+ inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
+ return __a < __b ? __b : __a;
+ }
+}
+
+# endif
+
+// BOOST_STATIC_CONSTANT workaround --------------------------------------- //
+// On compilers which don't allow in-class initialization of static integral
+// constant members, we must use enums as a workaround if we want the constants
+// to be available at compile-time. This macro gives us a convenient way to
+// declare such constants.
+
+# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }
+# else
+# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
+# endif
+
+// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------//
+// When the standard library does not have a conforming std::use_facet there
+// are various workarounds available, but they differ from library to library.
+// The same problem occurs with has_facet.
+// These macros provide a consistent way to access a locale's facets.
+// Usage:
+// replace
+// std::use_facet<Type>(loc);
+// with
+// BOOST_USE_FACET(Type, loc);
+// Note do not add a std:: prefix to the front of BOOST_USE_FACET!
+// Use for BOOST_HAS_FACET is analogous.
+
+#if defined(BOOST_NO_STD_USE_FACET)
+# ifdef BOOST_HAS_TWO_ARG_USE_FACET
+# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))
+# define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast<Type*>(0))
+# elif defined(BOOST_HAS_MACRO_USE_FACET)
+# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)
+# define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type)
+# elif defined(BOOST_HAS_STLP_USE_FACET)
+# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type >(loc))
+# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
+# endif
+#else
+# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc)
+# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
+#endif
+
+// BOOST_NESTED_TEMPLATE workaround ------------------------------------------//
+// Member templates are supported by some compilers even though they can't use
+// the A::template member<U> syntax, as a workaround replace:
+//
+// typedef typename A::template rebind<U> binder;
+//
+// with:
+//
+// typedef typename A::BOOST_NESTED_TEMPLATE rebind<U> binder;
+
+#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
+# define BOOST_NESTED_TEMPLATE template
+#else
+# define BOOST_NESTED_TEMPLATE
+#endif
+
+// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------//
+// Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION
+// is defined, in which case it evaluates to return x; Use when you have a return
+// statement that can never be reached.
+
+#ifndef BOOST_UNREACHABLE_RETURN
+# ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
+# define BOOST_UNREACHABLE_RETURN(x) return x;
+# else
+# define BOOST_UNREACHABLE_RETURN(x)
+# endif
+#endif
+
+// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------//
+//
+// Some compilers don't support the use of `typename' for dependent
+// types in deduced contexts, e.g.
+//
+// template <class T> void f(T, typename T::type);
+// ^^^^^^^^
+// Replace these declarations with:
+//
+// template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);
+
+#ifndef BOOST_NO_DEDUCED_TYPENAME
+# define BOOST_DEDUCED_TYPENAME typename
+#else
+# define BOOST_DEDUCED_TYPENAME
+#endif
+
+#ifndef BOOST_NO_TYPENAME_WITH_CTOR
+# define BOOST_CTOR_TYPENAME typename
+#else
+# define BOOST_CTOR_TYPENAME
+#endif
+
+// long long workaround ------------------------------------------//
+// On gcc (and maybe other compilers?) long long is alway supported
+// but it's use may generate either warnings (with -ansi), or errors
+// (with -pedantic -ansi) unless it's use is prefixed by __extension__
+//
+#if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus)
+namespace boost{
+# ifdef __GNUC__
+ __extension__ typedef long long long_long_type;
+ __extension__ typedef unsigned long long ulong_long_type;
+# else
+ typedef long long long_long_type;
+ typedef unsigned long long ulong_long_type;
+# endif
+}
+#endif
+// same again for __int128:
+#if defined(BOOST_HAS_INT128) && defined(__cplusplus)
+namespace boost{
+# ifdef __GNUC__
+ __extension__ typedef __int128 int128_type;
+ __extension__ typedef unsigned __int128 uint128_type;
+# else
+ typedef __int128 int128_type;
+ typedef unsigned __int128 uint128_type;
+# endif
+}
+#endif
+// same again for __float128:
+#if defined(BOOST_HAS_FLOAT128) && defined(__cplusplus)
+namespace boost {
+# ifdef __GNUC__
+ __extension__ typedef __float128 float128_type;
+# else
+ typedef __float128 float128_type;
+# endif
+}
+#endif
+
+// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//
+
+// These macros are obsolete. Port away and remove.
+
+# define BOOST_EXPLICIT_TEMPLATE_TYPE(t)
+# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+// When BOOST_NO_STD_TYPEINFO is defined, we can just import
+// the global definition into std namespace:
+#if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus)
+#include <typeinfo>
+namespace std{ using ::type_info; }
+#endif
+
+// ---------------------------------------------------------------------------//
+
+//
+// Helper macro BOOST_STRINGIZE:
+// Converts the parameter X to a string after macro replacement
+// on X has been performed.
+//
+#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
+#define BOOST_DO_STRINGIZE(X) #X
+
+//
+// Helper macro BOOST_JOIN:
+// The following piece of macro magic joins the two
+// arguments together, even when one of the arguments is
+// itself a macro (see 16.3.1 in C++ standard). The key
+// is that macro expansion of macro arguments does not
+// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
+//
+#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
+#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
+#define BOOST_DO_JOIN2( X, Y ) X##Y
+
+//
+// Set some default values for compiler/library/platform names.
+// These are for debugging config setup only:
+//
+# ifndef BOOST_COMPILER
+# define BOOST_COMPILER "Unknown ISO C++ Compiler"
+# endif
+# ifndef BOOST_STDLIB
+# define BOOST_STDLIB "Unknown ISO standard library"
+# endif
+# ifndef BOOST_PLATFORM
+# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
+ || defined(_POSIX_SOURCE)
+# define BOOST_PLATFORM "Generic Unix"
+# else
+# define BOOST_PLATFORM "Unknown"
+# endif
+# endif
+
+//
+// Set some default values GPU support
+//
+# ifndef BOOST_GPU_ENABLED
+# 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)
+# if defined(_MSC_VER)
+# define BOOST_FORCEINLINE __forceinline
+# elif defined(__GNUC__) && __GNUC__ > 3
+ // Clang also defines __GNUC__ (as 4)
+# define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__))
+# else
+# define BOOST_FORCEINLINE inline
+# endif
+#endif
+
+// BOOST_NOINLINE ---------------------------------------------//
+// Macro to use in place of 'inline' to prevent a function to be inlined
+#if !defined(BOOST_NOINLINE)
+# if defined(_MSC_VER)
+# define BOOST_NOINLINE __declspec(noinline)
+# elif defined(__GNUC__) && __GNUC__ > 3
+ // Clang also defines __GNUC__ (as 4)
+# if defined(__CUDACC__)
+ // nvcc doesn't always parse __noinline__,
+ // see: https://svn.boost.org/trac/boost/ticket/9392
+# define BOOST_NOINLINE __attribute__ ((noinline))
+# else
+# define BOOST_NOINLINE __attribute__ ((__noinline__))
+# endif
+# else
+# define BOOST_NOINLINE
+# endif
+#endif
+
+// BOOST_NORETURN ---------------------------------------------//
+// Macro to use before a function declaration/definition to designate
+// the function as not returning normally (i.e. with a return statement
+// or by leaving the function scope, if the function return type is void).
+#if !defined(BOOST_NORETURN)
+# if defined(_MSC_VER)
+# define BOOST_NORETURN __declspec(noreturn)
+# elif defined(__GNUC__)
+# define BOOST_NORETURN __attribute__ ((__noreturn__))
+# elif defined(__has_attribute) && defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x5130)
+# if __has_attribute(noreturn)
+# define BOOST_NORETURN [[noreturn]]
+# endif
+# elif defined(__has_cpp_attribute)
+# if __has_cpp_attribute(noreturn)
+# define BOOST_NORETURN [[noreturn]]
+# endif
+# endif
+#endif
+
+#if !defined(BOOST_NORETURN)
+# define BOOST_NO_NORETURN
+# define BOOST_NORETURN
+#endif
+
+// Branch prediction hints
+// These macros are intended to wrap conditional expressions that yield true or false
+//
+// if (BOOST_LIKELY(var == 10))
+// {
+// // the most probable code here
+// }
+//
+#if !defined(BOOST_LIKELY)
+# define BOOST_LIKELY(x) x
+#endif
+#if !defined(BOOST_UNLIKELY)
+# define BOOST_UNLIKELY(x) x
+#endif
+
+// Type and data alignment specification
+//
+#if !defined(BOOST_ALIGNMENT)
+# if !defined(BOOST_NO_CXX11_ALIGNAS)
+# define BOOST_ALIGNMENT(x) alignas(x)
+# elif defined(_MSC_VER)
+# define BOOST_ALIGNMENT(x) __declspec(align(x))
+# elif defined(__GNUC__)
+# define BOOST_ALIGNMENT(x) __attribute__ ((__aligned__(x)))
+# else
+# define BOOST_NO_ALIGNMENT
+# define BOOST_ALIGNMENT(x)
+# endif
+#endif
+
+// Lack of non-public defaulted functions is implied by the lack of any defaulted functions
+#if !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) && defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
+# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
+#endif
+
+// Defaulted and deleted function declaration helpers
+// These macros are intended to be inside a class definition.
+// BOOST_DEFAULTED_FUNCTION accepts the function declaration and its
+// body, which will be used if the compiler doesn't support defaulted functions.
+// BOOST_DELETED_FUNCTION only accepts the function declaration. It
+// will expand to a private function declaration, if the compiler doesn't support
+// deleted functions. Because of this it is recommended to use BOOST_DELETED_FUNCTION
+// in the end of the class definition.
+//
+// class my_class
+// {
+// public:
+// // Default-constructible
+// BOOST_DEFAULTED_FUNCTION(my_class(), {})
+// // Copying prohibited
+// BOOST_DELETED_FUNCTION(my_class(my_class const&))
+// BOOST_DELETED_FUNCTION(my_class& operator= (my_class const&))
+// };
+//
+#if !(defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS))
+# define BOOST_DEFAULTED_FUNCTION(fun, body) fun = default;
+#else
+# define BOOST_DEFAULTED_FUNCTION(fun, body) fun body
+#endif
+
+#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
+# define BOOST_DELETED_FUNCTION(fun) fun = delete;
+#else
+# define BOOST_DELETED_FUNCTION(fun) private: fun;
+#endif
+
+//
+// Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined
+//
+#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
+#define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE
+#endif
+
+// -------------------- Deprecated macros for 1.50 ---------------------------
+// These will go away in a future release
+
+// Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP
+// instead of BOOST_NO_STD_UNORDERED
+#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET)
+# ifndef BOOST_NO_CXX11_STD_UNORDERED
+# define BOOST_NO_CXX11_STD_UNORDERED
+# endif
+#endif
+
+// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS
+#if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
+# define BOOST_NO_INITIALIZER_LISTS
+#endif
+
+// Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY
+#if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_0X_HDR_ARRAY)
+# define BOOST_NO_0X_HDR_ARRAY
+#endif
+// Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO
+#if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO)
+# define BOOST_NO_0X_HDR_CHRONO
+#endif
+// Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT
+#if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT)
+# define BOOST_NO_0X_HDR_CODECVT
+#endif
+// Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE
+#if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE)
+# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
+#endif
+// Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST
+#if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST)
+# define BOOST_NO_0X_HDR_FORWARD_LIST
+#endif
+// Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE
+#if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE)
+# define BOOST_NO_0X_HDR_FUTURE
+#endif
+
+// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+// instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST
+# define BOOST_NO_0X_HDR_INITIALIZER_LIST
+# endif
+# ifndef BOOST_NO_INITIALIZER_LISTS
+# define BOOST_NO_INITIALIZER_LISTS
+# endif
+#endif
+
+// Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX
+#if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX)
+# define BOOST_NO_0X_HDR_MUTEX
+#endif
+// Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM
+#if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM)
+# define BOOST_NO_0X_HDR_RANDOM
+#endif
+// Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO
+#if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO)
+# define BOOST_NO_0X_HDR_RATIO
+#endif
+// Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX
+#if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX)
+# define BOOST_NO_0X_HDR_REGEX
+#endif
+// Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR
+#if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR)
+# define BOOST_NO_0X_HDR_SYSTEM_ERROR
+#endif
+// Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD
+#if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD)
+# define BOOST_NO_0X_HDR_THREAD
+#endif
+// Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE
+#if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE)
+# define BOOST_NO_0X_HDR_TUPLE
+#endif
+// Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS
+#if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS)
+# define BOOST_NO_0X_HDR_TYPE_TRAITS
+#endif
+// Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX
+#if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX)
+# define BOOST_NO_0X_HDR_TYPEINDEX
+#endif
+// Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP
+#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP)
+# define BOOST_NO_0X_HDR_UNORDERED_MAP
+#endif
+// Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET
+#if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET)
+# define BOOST_NO_0X_HDR_UNORDERED_SET
+#endif
+
+// ------------------ End of deprecated macros for 1.50 ---------------------------
+
+// -------------------- Deprecated macros for 1.51 ---------------------------
+// These will go away in a future release
+
+// Use BOOST_NO_CXX11_AUTO_DECLARATIONS instead of BOOST_NO_AUTO_DECLARATIONS
+#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS)
+# define BOOST_NO_AUTO_DECLARATIONS
+#endif
+// Use BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of BOOST_NO_AUTO_MULTIDECLARATIONS
+#if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS)
+# define BOOST_NO_AUTO_MULTIDECLARATIONS
+#endif
+// Use BOOST_NO_CXX11_CHAR16_T instead of BOOST_NO_CHAR16_T
+#if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T)
+# define BOOST_NO_CHAR16_T
+#endif
+// Use BOOST_NO_CXX11_CHAR32_T instead of BOOST_NO_CHAR32_T
+#if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T)
+# define BOOST_NO_CHAR32_T
+#endif
+// Use BOOST_NO_CXX11_TEMPLATE_ALIASES instead of BOOST_NO_TEMPLATE_ALIASES
+#if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES)
+# define BOOST_NO_TEMPLATE_ALIASES
+#endif
+// Use BOOST_NO_CXX11_CONSTEXPR instead of BOOST_NO_CONSTEXPR
+#if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR)
+# define BOOST_NO_CONSTEXPR
+#endif
+// Use BOOST_NO_CXX11_DECLTYPE_N3276 instead of BOOST_NO_DECLTYPE_N3276
+#if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276)
+# define BOOST_NO_DECLTYPE_N3276
+#endif
+// Use BOOST_NO_CXX11_DECLTYPE instead of BOOST_NO_DECLTYPE
+#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE)
+# define BOOST_NO_DECLTYPE
+#endif
+// Use BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of BOOST_NO_DEFAULTED_FUNCTIONS
+#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS)
+# define BOOST_NO_DEFAULTED_FUNCTIONS
+#endif
+// Use BOOST_NO_CXX11_DELETED_FUNCTIONS instead of BOOST_NO_DELETED_FUNCTIONS
+#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS)
+# define BOOST_NO_DELETED_FUNCTIONS
+#endif
+// Use BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)
+# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#endif
+// Use BOOST_NO_CXX11_EXTERN_TEMPLATE instead of BOOST_NO_EXTERN_TEMPLATE
+#if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE)
+# define BOOST_NO_EXTERN_TEMPLATE
+#endif
+// Use BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
+# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#endif
+// Use BOOST_NO_CXX11_LAMBDAS instead of BOOST_NO_LAMBDAS
+#if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS)
+# define BOOST_NO_LAMBDAS
+#endif
+// Use BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS)
+# define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#endif
+// Use BOOST_NO_CXX11_NOEXCEPT instead of BOOST_NO_NOEXCEPT
+#if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT)
+# define BOOST_NO_NOEXCEPT
+#endif
+// Use BOOST_NO_CXX11_NULLPTR instead of BOOST_NO_NULLPTR
+#if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR)
+# define BOOST_NO_NULLPTR
+#endif
+// Use BOOST_NO_CXX11_RAW_LITERALS instead of BOOST_NO_RAW_LITERALS
+#if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS)
+# define BOOST_NO_RAW_LITERALS
+#endif
+// Use BOOST_NO_CXX11_RVALUE_REFERENCES instead of BOOST_NO_RVALUE_REFERENCES
+#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES)
+# define BOOST_NO_RVALUE_REFERENCES
+#endif
+// Use BOOST_NO_CXX11_SCOPED_ENUMS instead of BOOST_NO_SCOPED_ENUMS
+#if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS)
+# define BOOST_NO_SCOPED_ENUMS
+#endif
+// Use BOOST_NO_CXX11_STATIC_ASSERT instead of BOOST_NO_STATIC_ASSERT
+#if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT)
+# define BOOST_NO_STATIC_ASSERT
+#endif
+// Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED
+#if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED)
+# define BOOST_NO_STD_UNORDERED
+#endif
+// Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS
+#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS)
+# define BOOST_NO_UNICODE_LITERALS
+#endif
+// Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX)
+# define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#endif
+// Use BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of BOOST_NO_VARIADIC_TEMPLATES
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+# define BOOST_NO_VARIADIC_TEMPLATES
+#endif
+// Use BOOST_NO_CXX11_VARIADIC_MACROS instead of BOOST_NO_VARIADIC_MACROS
+#if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS)
+# define BOOST_NO_VARIADIC_MACROS
+#endif
+// Use BOOST_NO_CXX11_NUMERIC_LIMITS instead of BOOST_NO_NUMERIC_LIMITS_LOWEST
+#if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST)
+# define BOOST_NO_NUMERIC_LIMITS_LOWEST
+#endif
+// ------------------ End of deprecated macros for 1.51 ---------------------------
+
+
+
+//
+// Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR
+// These aid the transition to C++11 while still supporting C++03 compilers
+//
+#ifdef BOOST_NO_CXX11_NOEXCEPT
+# define BOOST_NOEXCEPT
+# define BOOST_NOEXCEPT_OR_NOTHROW throw()
+# define BOOST_NOEXCEPT_IF(Predicate)
+# define BOOST_NOEXCEPT_EXPR(Expression) false
+#else
+# define BOOST_NOEXCEPT noexcept
+# define BOOST_NOEXCEPT_OR_NOTHROW noexcept
+# define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
+# define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
+#endif
+//
+// Helper macro BOOST_FALLTHROUGH
+// Fallback definition of BOOST_FALLTHROUGH macro used to mark intended
+// fall-through between case labels in a switch statement. We use a definition
+// that requires a semicolon after it to avoid at least one type of misuse even
+// on unsupported compilers.
+//
+#ifndef BOOST_FALLTHROUGH
+# define BOOST_FALLTHROUGH ((void)0)
+#endif
+
+//
+// constexpr workarounds
+//
+#if defined(BOOST_NO_CXX11_CONSTEXPR)
+#define BOOST_CONSTEXPR
+#define BOOST_CONSTEXPR_OR_CONST const
+#else
+#define BOOST_CONSTEXPR constexpr
+#define BOOST_CONSTEXPR_OR_CONST constexpr
+#endif
+#if defined(BOOST_NO_CXX14_CONSTEXPR)
+#define BOOST_CXX14_CONSTEXPR
+#else
+#define BOOST_CXX14_CONSTEXPR constexpr
+#endif
+
+//
+// Unused variable/typedef workarounds:
+//
+#ifndef BOOST_ATTRIBUTE_UNUSED
+# define BOOST_ATTRIBUTE_UNUSED
+#endif
+
+#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST
+
+//
+// Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined
+//
+#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)
+# define BOOST_HAS_STATIC_ASSERT
+#endif
+
+//
+// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined
+//
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
+#define BOOST_HAS_RVALUE_REFS
+#endif
+
+//
+// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined
+//
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL)
+#define BOOST_HAS_VARIADIC_TMPL
+#endif
+//
+// Set BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS when
+// BOOST_NO_CXX11_VARIADIC_TEMPLATES is set:
+//
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS)
+# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
+#endif
+
+//
+// Finish off with checks for macros that are depricated / no longer supported,
+// if any of these are set then it's very likely that much of Boost will no
+// longer work. So stop with a #error for now, but give the user a chance
+// to continue at their own risk if they really want to:
+//
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_CONFIG_ALLOW_DEPRECATED)
+# error "You are using a compiler which lacks features which are now a minimum requirement in order to use Boost, define BOOST_CONFIG_ALLOW_DEPRECATED if you want to continue at your own risk!!!"
+#endif
+
+#endif
//#define BOOST_HAS_PTHREAD_YIELD
// boilerplate code:
-#include <boost/config/posix_features.hpp>
+#include <boost/config/detail/posix_features.hpp>
#endif
// boilerplate code:
-#include <boost/config/posix_features.hpp>
+#include <boost/config/detail/posix_features.hpp>
// boilerplate code:
#define BOOST_HAS_UNISTD_H
-#include <boost/config/posix_features.hpp>
+#include <boost/config/detail/posix_features.hpp>
// boilerplate code:
#define BOOST_HAS_UNISTD_H
-#include <boost/config/posix_features.hpp>
+#include <boost/config/detail/posix_features.hpp>
# 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
#define BOOST_NO_FENV_H
// boilerplate code:
-#include <boost/config/posix_features.hpp>
+#include <boost/config/detail/posix_features.hpp>
//
// Cygwin lies about XSI conformance, there is no nl_types.h:
#ifdef BOOST_HAS_NL_TYPES_H
# undef BOOST_HAS_NL_TYPES_H
#endif
-
#define BOOST_HAS_GETTIMEOFDAY
// boilerplate code:
-#include <boost/config/posix_features.hpp>
+#include <boost/config/detail/posix_features.hpp>
// boilerplate code:
#define BOOST_HAS_UNISTD_H
-#include <boost/config/posix_features.hpp>
+#include <boost/config/detail/posix_features.hpp>
// the following are always available:
#ifndef BOOST_HAS_GETTIMEOFDAY
// boilerplate code:
#define BOOST_HAS_UNISTD_H
-#include <boost/config/posix_features.hpp>
+#include <boost/config/detail/posix_features.hpp>
#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1)))
// <stdint.h> defines int64_t unconditionally, but <sys/types.h> defines
// int64_t only if __GNUC__. Thus, assume a fully usable <stdint.h>
- // only when using GCC.
-# if defined __GNUC__
+ // only when using GCC. Update 2017: this appears not to be the case for
+ // recent glibc releases, see bug report: https://svn.boost.org/trac/boost/ticket/13045
+# if defined(__GNUC__) || ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 5)))
# define BOOST_HAS_STDINT_H
# endif
#endif
// boilerplate code:
#define BOOST_HAS_UNISTD_H
-#include <boost/config/posix_features.hpp>
+#include <boost/config/detail/posix_features.hpp>
#if defined(__USE_GNU) && !defined(__ANDROID__) && !defined(ANDROID)
#define BOOST_HAS_PTHREAD_YIELD
#endif
// to replace the platform-native BSD one. G++ users
// should also always be able to do this on MaxOS X.
//
-# include <boost/config/posix_features.hpp>
+# include <boost/config/detail/posix_features.hpp>
# ifndef BOOST_HAS_STDINT_H
# define BOOST_HAS_STDINT_H
# endif
#define BOOST_PLATFORM "QNX"
#define BOOST_HAS_UNISTD_H
-#include <boost/config/posix_features.hpp>
+#include <boost/config/detail/posix_features.hpp>
// QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h
// or log1p and expm1:
// boilerplate code:
#define BOOST_HAS_UNISTD_H
-#include <boost/config/posix_features.hpp>
+#include <boost/config/detail/posix_features.hpp>
//
// pthreads don't actually work with gcc unless _PTHREADS is defined:
#include <stdlib.h>
#endif// boilerplate code:
# define BOOST_HAS_UNISTD_H
-# include <boost/config/posix_features.hpp>
+# include <boost/config/detail/posix_features.hpp>
// S60 SDK defines _POSIX_VERSION as POSIX.1
# ifndef BOOST_HAS_STDINT_H
# define BOOST_HAS_STDINT_H
// Luckily, at the moment there seems to be none!
#endif
-// These #defines allow posix_features to work, since vxWorks doesn't
+// These #defines allow detail/posix_features to work, since vxWorks doesn't
// #define them itself for DKMs (for RTPs on the contrary it does):
#ifdef _WRS_KERNEL
# ifndef _POSIX_TIMERS
return -1;
}
-// vxWorks claims to implement gettimeofday in sys/time.h
-// but nevertheless does not provide it! See
-// https://support.windriver.com/olsPortal/faces/maintenance/techtipDetail_noHeader.jspx?docId=16442&contentId=WR_TECHTIP_006256
-// We implement a surrogate version here via clock_gettime:
+#if (_WRS_VXWORKS_MAJOR < 7)
+
inline int gettimeofday(struct timeval *tv, void * /*tzv*/) {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
tv->tv_usec = ts.tv_nsec / 1000;
return 0;
}
+#endif
+
// vxWorks does provide neither struct tms nor function times()!
// We implement an empty dummy-function, simply setting the user
return ticks;
}
+extern void bzero (void *, size_t); // FD_ZERO uses bzero() but doesn't include strings.h
} // extern "C"
// Put the selfmade functions into the std-namespace, just in case
// Include signal.h which might contain a typo to be corrected here
#include <signal.h>
-#define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway!
+inline int getpagesize() { return sysconf(_SC_PAGESIZE); } // getpagesize is deprecated anyway!
#ifndef S_ISSOCK
# define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket?
#endif
-#define lstat(p, b) stat(p, b) // lstat() == stat(), as vxWorks has no symlinks!
+inline int lstat(p, b) { return stat(p, b); } // lstat() == stat(), as vxWorks has no symlinks!
#ifndef FPE_FLTINV
# define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy
#endif
#if !defined(BUS_ADRALN) && defined(BUS_ADRALNR)
# define BUS_ADRALN BUS_ADRALNR // Correct a supposed typo in vxWorks' <signal.h>
#endif
-//typedef int locale_t; // locale_t is a POSIX-extension, currently unpresent in vxWorks!
+typedef int locale_t; // locale_t is a POSIX-extension, currently not present in vxWorks!
// #include boilerplate code:
-#include <boost/config/posix_features.hpp>
+#include <boost/config/detail/posix_features.hpp>
// vxWorks lies about XSI conformance, there is no nl_types.h:
#undef BOOST_HAS_NL_TYPES_H
+
+// vxWorks 7 adds C++11 support
+// however it is optional, and does not match exactly the support determined
+// by examining Dinkum STL version and GCC version (or ICC and DCC)
+
+#ifndef _WRS_CONFIG_LANG_LIB_CPLUS_CPLUS_USER_2011
+# define BOOST_NO_CXX11_HDR_ARRAY
+# define BOOST_NO_CXX11_HDR_TYPEINDEX
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_TUPLE
+# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_SMART_PTR
+# define BOOST_NO_CXX11_STD_ALIGN
+# define BOOST_NO_CXX11_HDR_UNORDERED_SET
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+# define BOOST_NO_CXX11_HDR_FUNCTIONAL
+# define BOOST_NO_CXX11_HDR_ATOMIC
+#else
+# define BOOST_NO_CXX11_NULLPTR
+#endif
+
--- /dev/null
+// Copyright (c) 2017 Dynatrace
+//
+// 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
+
+// See http://www.boost.org for most recent version.
+
+// Platform setup for IBM z/OS.
+
+#define BOOST_PLATFORM "IBM z/OS"
+
+#include <features.h> // For __UU, __C99, __TR1, ...
+
+#if defined(__UU)
+# define BOOST_HAS_GETTIMEOFDAY
+#endif
+
+#if defined(_OPEN_THREADS) || defined(__SUSV3_THR)
+# define BOOST_HAS_PTHREADS
+# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+# define BOOST_HAS_THREADS
+#endif
+
+#if defined(__SUSV3) || defined(__SUSV3_THR)
+# define BOOST_HAS_SCHED_YIELD
+#endif
+
+#define BOOST_HAS_SIGACTION
+#define BOOST_HAS_UNISTD_H
+#define BOOST_HAS_DIRENT_H
+#define BOOST_HAS_NL_TYPES_H
+++ /dev/null
-// (C) Copyright John Maddock 2001 - 2003.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-
-// See http://www.boost.org for most recent version.
-
-// All POSIX feature tests go in this file,
-// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well
-// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's
-// may be present but none-functional unless _POSIX_C_SOURCE and
-// _XOPEN_SOURCE have been defined to the right value (it's up
-// to the user to do this *before* including any header, although
-// in most cases the compiler will do this for you).
-
-# if defined(BOOST_HAS_UNISTD_H)
-# include <unistd.h>
-
- // XOpen has <nl_types.h>, but is this the correct version check?
-# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3)
-# define BOOST_HAS_NL_TYPES_H
-# endif
-
- // POSIX version 6 requires <stdint.h>
-# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100)
-# define BOOST_HAS_STDINT_H
-# endif
-
- // POSIX version 2 requires <dirent.h>
-# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L)
-# define BOOST_HAS_DIRENT_H
-# endif
-
- // POSIX version 3 requires <signal.h> to have sigaction:
-# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L)
-# define BOOST_HAS_SIGACTION
-# endif
- // POSIX defines _POSIX_THREADS > 0 for pthread support,
- // however some platforms define _POSIX_THREADS without
- // a value, hence the (_POSIX_THREADS+0 >= 0) check.
- // Strictly speaking this may catch platforms with a
- // non-functioning stub <pthreads.h>, but such occurrences should
- // occur very rarely if at all.
-# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS)
-# define BOOST_HAS_PTHREADS
-# endif
-
- // BOOST_HAS_NANOSLEEP:
- // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME:
-# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \
- || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
-# define BOOST_HAS_NANOSLEEP
-# endif
-
- // BOOST_HAS_CLOCK_GETTIME:
- // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME
- // but at least one platform - linux - defines that flag without
- // defining clock_gettime):
-# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0))
-# define BOOST_HAS_CLOCK_GETTIME
-# endif
-
- // BOOST_HAS_SCHED_YIELD:
- // This is predicated on _POSIX_PRIORITY_SCHEDULING or
- // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME.
-# if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\
- || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\
- || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
-# define BOOST_HAS_SCHED_YIELD
-# endif
-
- // BOOST_HAS_GETTIMEOFDAY:
- // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE:
- // These are predicated on _XOPEN_VERSION, and appears to be first released
- // in issue 4, version 2 (_XOPEN_VERSION > 500).
- // Likewise for the functions log1p and expm1.
-# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500)
-# define BOOST_HAS_GETTIMEOFDAY
-# if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500)
-# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
-# endif
-# ifndef BOOST_HAS_LOG1P
-# define BOOST_HAS_LOG1P
-# endif
-# ifndef BOOST_HAS_EXPM1
-# define BOOST_HAS_EXPM1
-# endif
-# endif
-
-# endif
-
-
-
-
+++ /dev/null
-// Boost compiler configuration selection header file
-
-// (C) Copyright John Maddock 2001 - 2003.
-// (C) Copyright Martin Wille 2003.
-// (C) Copyright Guillaume Melquiond 2003.
-//
-// 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)
-
-// See http://www.boost.org/ for most recent version.
-
-// locate which compiler we are using and define
-// BOOST_COMPILER_CONFIG as needed:
-
-#if defined __CUDACC__
-// NVIDIA CUDA C++ compiler for GPU
-# include "boost/config/compiler/nvcc.hpp"
-
-#endif
-
-#if defined(__GCCXML__)
-// GCC-XML emulates other compilers, it has to appear first here!
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
-
-#elif defined(_CRAYC)
-// EDG based Cray compiler:
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp"
-
-#elif defined __COMO__
-// Comeau C++
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
-
-#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4)
-// PathScale EKOPath compiler (has to come before clang and gcc)
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp"
-
-#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
-// Intel
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp"
-
-#elif defined __clang__ && !defined(__CUDACC__) && !defined(__ibmxl__)
-// when using clang and cuda at same time, you want to appear as gcc
-// Clang C++ emulates GCC, so it has to appear early.
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp"
-
-#elif defined __DMC__
-// Digital Mars C++
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp"
-
-# elif defined(__GNUC__) && !defined(__ibmxl__)
-// GNU C++:
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp"
-
-#elif defined __KCC
-// Kai C++
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp"
-
-#elif defined __sgi
-// SGI MIPSpro C++
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp"
-
-#elif defined __DECCXX
-// Compaq Tru64 Unix cxx
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp"
-
-#elif defined __ghs
-// Greenhills C++
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp"
-
-#elif defined __CODEGEARC__
-// CodeGear - must be checked for before Borland
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp"
-
-#elif defined __BORLANDC__
-// Borland
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp"
-
-#elif defined __MWERKS__
-// Metrowerks CodeWarrior
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp"
-
-#elif defined __SUNPRO_CC
-// Sun Workshop Compiler C++
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp"
-
-#elif defined __HP_aCC
-// HP aCC
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp"
-
-#elif defined(__MRC__) || defined(__SC__)
-// MPW MrCpp or SCpp
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp"
-
-#elif defined(__ibmxl__)
-// IBM XL C/C++ for Linux (Little Endian)
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp.hpp"
-
-#elif defined(__IBMCPP__)
-// IBM Visual Age or IBM XL C/C++ for Linux (Big Endian)
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp"
-
-#elif defined(__PGI)
-// Portland Group Inc.
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp"
-
-#elif defined _MSC_VER
-// Microsoft Visual C++
-//
-// Must remain the last #elif since some other vendors (Metrowerks, for
-// example) also #define _MSC_VER
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp"
-
-#elif defined (BOOST_ASSERT_CONFIG)
-// this must come last - generate an error if we don't
-// recognise the compiler:
-# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)"
-
-#endif
-
-#if 0
-//
-// This section allows dependency scanners to find all the headers we *might* include:
-//
-#include <boost/config/compiler/gcc_xml.hpp>
-#include <boost/config/compiler/cray.hpp>
-#include <boost/config/compiler/comeau.hpp>
-#include <boost/config/compiler/pathscale.hpp>
-#include <boost/config/compiler/intel.hpp>
-#include <boost/config/compiler/clang.hpp>
-#include <boost/config/compiler/digitalmars.hpp>
-#include <boost/config/compiler/gcc.hpp>
-#include <boost/config/compiler/kai.hpp>
-#include <boost/config/compiler/sgi_mipspro.hpp>
-#include <boost/config/compiler/compaq_cxx.hpp>
-#include <boost/config/compiler/greenhills.hpp>
-#include <boost/config/compiler/codegear.hpp>
-#include <boost/config/compiler/borland.hpp>
-#include <boost/config/compiler/metrowerks.hpp>
-#include <boost/config/compiler/sunpro_cc.hpp>
-#include <boost/config/compiler/hp_acc.hpp>
-#include <boost/config/compiler/mpw.hpp>
-#include <boost/config/compiler/vacpp.hpp>
-#include <boost/config/compiler/pgi.hpp>
-#include <boost/config/compiler/visualc.hpp>
-
-#endif
-
+++ /dev/null
-// Boost compiler configuration selection header file
-
-// (C) Copyright John Maddock 2001 - 2002.
-// (C) Copyright Jens Maurer 2001.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed.
-// Note that we define the headers to include using "header_name" not
-// <header_name> in order to prevent macro expansion within the header
-// name (for example "linux" is a macro on linux systems).
-
-#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC)
-// linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though?
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp"
-
-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
-// BSD:
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp"
-
-#elif defined(sun) || defined(__sun)
-// solaris:
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp"
-
-#elif defined(__sgi)
-// SGI Irix:
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp"
-
-#elif defined(__hpux)
-// hp unix:
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp"
-
-#elif defined(__CYGWIN__)
-// cygwin is not win32:
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp"
-
-#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
-// win32:
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp"
-
-#elif defined(__HAIKU__)
-// Haiku
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp"
-
-#elif defined(__BEOS__)
-// BeOS
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"
-
-#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
-// MacOS
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp"
-
-#elif defined(__IBMCPP__) || defined(_AIX)
-// IBM
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp"
-
-#elif defined(__amigaos__)
-// AmigaOS
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp"
-
-#elif defined(__QNXNTO__)
-// QNX:
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp"
-
-#elif defined(__VXWORKS__)
-// vxWorks:
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp"
-
-#elif defined(__SYMBIAN32__)
-// Symbian:
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp"
-
-#elif defined(_CRAYC)
-// Cray:
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp"
-
-#elif defined(__VMS)
-// VMS:
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp"
-
-#elif defined(__CloudABI__)
-// Nuxi CloudABI:
-# define BOOST_PLATFORM_CONFIG "boost/config/platform/cloudabi.hpp"
-#else
-
-# if defined(unix) \
- || defined(__unix) \
- || defined(_XOPEN_SOURCE) \
- || defined(_POSIX_SOURCE)
-
- // generic unix platform:
-
-# ifndef BOOST_HAS_UNISTD_H
-# define BOOST_HAS_UNISTD_H
-# endif
-
-# include <boost/config/posix_features.hpp>
-
-# endif
-
-# if defined (BOOST_ASSERT_CONFIG)
- // this must come last - generate an error if we don't
- // recognise the platform:
-# error "Unknown platform - please configure and report the results to boost.org"
-# endif
-
-#endif
-
-#if 0
-//
-// This section allows dependency scanners to find all the files we *might* include:
-//
-# include "boost/config/platform/linux.hpp"
-# include "boost/config/platform/bsd.hpp"
-# include "boost/config/platform/solaris.hpp"
-# include "boost/config/platform/irix.hpp"
-# include "boost/config/platform/hpux.hpp"
-# include "boost/config/platform/cygwin.hpp"
-# include "boost/config/platform/win32.hpp"
-# include "boost/config/platform/beos.hpp"
-# include "boost/config/platform/macos.hpp"
-# include "boost/config/platform/aix.hpp"
-# include "boost/config/platform/amigaos.hpp"
-# include "boost/config/platform/qnxnto.hpp"
-# include "boost/config/platform/vxworks.hpp"
-# include "boost/config/platform/symbian.hpp"
-# include "boost/config/platform/cray.hpp"
-# include "boost/config/platform/vms.hpp"
-# include <boost/config/posix_features.hpp>
-
-
-
-#endif
-
+++ /dev/null
-// Boost compiler configuration selection header file
-
-// (C) Copyright John Maddock 2001 - 2003.
-// (C) Copyright Jens Maurer 2001 - 2002.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-
-// See http://www.boost.org for most recent version.
-
-// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed:
-
-// First include <cstddef> to determine if some version of STLport is in use as the std lib
-// (do not rely on this header being included since users can short-circuit this header
-// if they know whose std lib they are using.)
-#ifdef __cplusplus
-# include <cstddef>
-#else
-# include <stddef.h>
-#endif
-
-#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
-// STLPort library; this _must_ come first, otherwise since
-// STLport typically sits on top of some other library, we
-// can end up detecting that first rather than STLport:
-# define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp"
-
-#else
-
-// If our std lib was not some version of STLport, and has not otherwise
-// been detected, then include <utility> as it is about
-// the smallest of the std lib headers that includes real C++ stuff.
-// Some std libs do not include their C++-related macros in <cstddef>
-// so this additional include makes sure we get those definitions.
-// Note: do not rely on this header being included since users can short-circuit this
-// #include if they know whose std lib they are using.
-#if !defined(__LIBCOMO__) && !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)\
- && !defined(_LIBCPP_VERSION) && !defined(__GLIBCPP__) && !defined(__GLIBCXX__)\
- && !defined(__STL_CONFIG_H) && !defined(__MSL_CPP__) && !defined(__IBMCPP__)\
- && !defined(MSIPL_COMPILE_H) && !defined(_YVALS) && !defined(_CPPLIB_VER)
-#include <utility>
-#endif
-
-#if defined(__LIBCOMO__)
-// Comeau STL:
-#define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp"
-
-#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
-// Rogue Wave library:
-# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp"
-
-#elif defined(_LIBCPP_VERSION)
-// libc++
-# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp"
-
-#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
-// GNU libstdc++ 3
-# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp"
-
-#elif defined(__STL_CONFIG_H)
-// generic SGI STL
-# define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp"
-
-#elif defined(__MSL_CPP__)
-// MSL standard lib:
-# define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp"
-
-#elif defined(__IBMCPP__)
-// take the default VACPP std lib
-# define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp"
-
-#elif defined(MSIPL_COMPILE_H)
-// Modena C++ standard library
-# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp"
-
-#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
-// Dinkumware Library (this has to appear after any possible replacement libraries):
-# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp"
-
-#elif defined (BOOST_ASSERT_CONFIG)
-// this must come last - generate an error if we don't
-// recognise the library:
-# error "Unknown standard library - please configure and report the results to boost.org"
-
-#endif
-
-#endif
-
-#if 0
-//
-// This section allows dependency scanners to find all the files we *might* include:
-//
-# include "boost/config/stdlib/stlport.hpp"
-# include "boost/config/stdlib/libcomo.hpp"
-# include "boost/config/stdlib/roguewave.hpp"
-# include "boost/config/stdlib/libcpp.hpp"
-# include "boost/config/stdlib/libstdcpp3.hpp"
-# include "boost/config/stdlib/sgi.hpp"
-# include "boost/config/stdlib/msl.hpp"
-# include "boost/config/stdlib/vacpp.hpp"
-# include "boost/config/stdlib/modena.hpp"
-# include "boost/config/stdlib/dinkumware.hpp"
-#endif
-
# define BOOST_NO_CXX11_STD_ALIGN
#endif
+// Before 650 std::pointer_traits has a broken rebind template
+#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 650
+# define BOOST_NO_CXX11_POINTER_TRAITS
+#elif defined(BOOST_MSVC) && BOOST_MSVC < 1910
+# define BOOST_NO_CXX11_POINTER_TRAITS
+#endif
+
#if defined(__has_include)
#if !__has_include(<shared_mutex>)
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
-#elif __cplusplus < 201402
+#elif (__cplusplus < 201402) && !defined(_MSC_VER)
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
#elif !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650)
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
+// C++14 features
+#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650)
+# define BOOST_NO_CXX14_STD_EXCHANGE
+#endif
+
+// C++17 features
+#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(BOOST_MSVC) || (BOOST_MSVC < 1910) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0)
+# define BOOST_NO_CXX17_STD_APPLY
+#endif
+#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650)
+# define BOOST_NO_CXX17_STD_INVOKE
+#endif
+
#if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400)
// Intel's compiler can't handle this header yet:
# define BOOST_NO_CXX11_HDR_ATOMIC
#endif
#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 650)
-// If _HAS_AUTO_PTR_ETC is defined to 0, std::auto_ptr is not available.
+// If _HAS_AUTO_PTR_ETC is defined to 0, std::auto_ptr and std::random_shuffle are not available.
// See https://www.visualstudio.com/en-us/news/vs2015-vs.aspx#C++
// and http://blogs.msdn.com/b/vcblog/archive/2015/06/19/c-11-14-17-features-in-vs-2015-rtm.aspx
# if defined(_HAS_AUTO_PTR_ETC) && (_HAS_AUTO_PTR_ETC == 0)
# define BOOST_NO_AUTO_PTR
+# define BOOST_NO_CXX98_RANDOM_SHUFFLE
+# define BOOST_NO_CXX98_FUNCTION_BASE
+# define BOOST_NO_CXX98_BINDERS
# 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
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
+// C++14 features
+# define BOOST_NO_CXX14_STD_EXCHANGE
+
+// C++17 features
+# define BOOST_NO_CXX17_STD_APPLY
+# define BOOST_NO_CXX17_STD_INVOKE
+
//
// Intrinsic type_traits support.
// The SGI STL has it's own __type_traits class, which
// aliases since members rebind_alloc and rebind_traits require it.
#if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES)
# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_POINTER_TRAITS
#endif
#if __cplusplus < 201103
-# define BOOST_NO_CXX11_HDR_ARRAY
+//
+// These two appear to be somewhat useable in C++03 mode, there may be others...
+//
+//# define BOOST_NO_CXX11_HDR_ARRAY
+//# define BOOST_NO_CXX11_HDR_FORWARD_LIST
+
# define BOOST_NO_CXX11_HDR_CODECVT
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
-# define BOOST_NO_CXX11_HDR_FORWARD_LIST
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
# define BOOST_NO_CXX11_HDR_MUTEX
# define BOOST_NO_CXX11_HDR_RANDOM
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
# define BOOST_NO_CXX11_STD_ALIGN
#define BOOST_NO_STD_MESSAGES
#endif
+// C++14 features
+#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L)
+# define BOOST_NO_CXX14_STD_EXCHANGE
+#endif
+
+// C++17 features
+#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L)
+# define BOOST_NO_CXX17_STD_INVOKE
+#endif
+#if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L)
+# define BOOST_NO_CXX17_STD_APPLY
+#endif
+#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
+# define BOOST_NO_AUTO_PTR
+#endif
+#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE)
+# define BOOST_NO_CXX98_RANDOM_SHUFFLE
+#endif
+#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
+# define BOOST_NO_CXX98_BINDERS
+#endif
+
#if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
// This is a bit of a sledgehammer, because really it's just libc++abi that has no
// support for thread_local, leading to linker errors such as
#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103)
# define BOOST_LIBSTDCXX11
#endif
+
//
// 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
// 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
//
#ifdef __clang__
-#if __has_include(<experimental/any>)
+#if __has_include(<experimental/memory_resource>)
+# define BOOST_LIBSTDCXX_VERSION 60100
+#elif __has_include(<experimental/any>)
# define BOOST_LIBSTDCXX_VERSION 50100
#elif __has_include(<shared_mutex>)
# define BOOST_LIBSTDCXX_VERSION 40900
#elif __has_include(<array>)
# define BOOST_LIBSTDCXX_VERSION 40300
#endif
+
+#if (BOOST_LIBSTDCXX_VERSION < 50100)
+// libstdc++ does not define this function as it's deprecated in C++11, but clang still looks for it,
+// defining it here is a terrible cludge, but should get things working:
+extern "C" char *gets (char *__s);
+#endif
+//
+// clang is unable to parse some GCC headers, add those workarounds here:
+//
+#if BOOST_LIBSTDCXX_VERSION < 50000
+# define BOOST_NO_CXX11_HDR_REGEX
+#endif
+//
+// GCC 4.7.x has no __cxa_thread_atexit which
+// thread_local objects require for cleanup:
+//
+#if BOOST_LIBSTDCXX_VERSION < 40800
+# define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+//
+// Early clang versions can handle <chrono>, not exactly sure which versions
+// but certainly up to clang-3.8 and gcc-4.6:
+//
+#if (__clang_major__ < 5)
+# if BOOST_LIBSTDCXX_VERSION < 40800
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_CHRONO
+# endif
+#endif
+
//
// GCC 4.8 and 9 add working versions of <atomic> and <regex> respectively.
// However, we have no test for these as the headers were present but broken
//
#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
+# define BOOST_NO_CXX11_POINTER_TRAITS
#endif
// C++0x features in GCC 4.8.0 and later
//
// even for the simplest patterns such as "\d" or "[0-9]". This is the case at least in gcc up to 4.8, inclusively.
# define BOOST_NO_CXX11_HDR_REGEX
#endif
+#if (BOOST_LIBSTDCXX_VERSION < 40900) || (__cplusplus <= 201103)
+# define BOOST_NO_CXX14_STD_EXCHANGE
+#endif
#if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7)))
// As of clang-3.6, libstdc++ header <atomic> throws up errors with clang:
# define BOOST_NO_CXX11_STD_ALIGN
#endif
+//
+// C++17 features in GCC 6.1 and later
+//
+#if (BOOST_LIBSTDCXX_VERSION < 60100) || (__cplusplus <= 201402L)
+# define BOOST_NO_CXX17_STD_INVOKE
+#endif
+#if (BOOST_LIBSTDCXX_VERSION < 70100) || (__cplusplus <= 201402L)
+# define BOOST_NO_CXX17_STD_APPLY
+#endif
+
#if defined(__has_include)
#if !__has_include(<shared_mutex>)
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
+// C++14 features
+# define BOOST_NO_CXX14_STD_EXCHANGE
+
+// C++17 features
+# define BOOST_NO_CXX17_STD_APPLY
+# define BOOST_NO_CXX17_STD_INVOKE
+
#define BOOST_STDLIB "Modena C++ standard library"
# define BOOST_HAS_UNISTD_H
# endif
// boilerplate code:
-# include <boost/config/posix_features.hpp>
+# include <boost/config/detail/posix_features.hpp>
#endif
#if defined(_MWMT) || _MSL_THREADSAFE
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
+// C++14 features
+# define BOOST_NO_CXX14_STD_EXCHANGE
+
+// C++17 features
+# define BOOST_NO_CXX17_STD_APPLY
+# define BOOST_NO_CXX17_STD_INVOKE
+
#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__)
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
#else
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
+
+// C++14 features
+# define BOOST_NO_CXX14_STD_EXCHANGE
+
+// C++17 features
+# define BOOST_NO_CXX17_STD_APPLY
+# define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
-#define BOOST_STDLIB "SGI standard library"
\ No newline at end of file
+// C++14 features
+# define BOOST_NO_CXX14_STD_EXCHANGE
+
+// C++17 features
+# define BOOST_NO_CXX17_STD_APPLY
+# define BOOST_NO_CXX17_STD_INVOKE
+
+#define BOOST_STDLIB "SGI standard library"
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
+// C++14 features
+# define BOOST_NO_CXX14_STD_EXCHANGE
+
+// C++17 features
+# define BOOST_NO_CXX17_STD_APPLY
+# define BOOST_NO_CXX17_STD_INVOKE
+
#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_POINTER_TRAITS
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
+// C++14 features
+# define BOOST_NO_CXX14_STD_EXCHANGE
+
+// C++17 features
+# define BOOST_NO_CXX17_STD_APPLY
+# define BOOST_NO_CXX17_STD_INVOKE
+
#define BOOST_STDLIB "Visual Age default standard library"
--- /dev/null
+// Copyright (c) 2017 Dynatrace
+//
+// 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
+
+// See http://www.boost.org for most recent version.
+
+// Standard library setup for IBM z/OS XL C/C++ compiler.
+
+// Oldest library version currently supported is 2.1 (V2R1)
+#if __TARGET_LIB__ < 0x42010000
+# error "Library version not supported or configured - please reconfigure"
+#endif
+
+#if __TARGET_LIB__ > 0x42010000
+# if defined(BOOST_ASSERT_CONFIG)
+# error "Unknown library version - please run the configure tests and report the results"
+# endif
+#endif
+
+#define BOOST_STDLIB "IBM z/OS XL C/C++ standard library"
+
+#define BOOST_HAS_MACRO_USE_FACET
+
+#define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+
+#define BOOST_NO_CXX11_ADDRESSOF
+#define BOOST_NO_CXX11_SMART_PTR
+#define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+#define BOOST_NO_CXX11_NUMERIC_LIMITS
+#define BOOST_NO_CXX11_ALLOCATOR
+#define BOOST_NO_CXX11_POINTER_TRAITS
+#define BOOST_NO_CXX11_HDR_FUNCTIONAL
+#define BOOST_NO_CXX11_HDR_UNORDERED_SET
+#define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+#define BOOST_NO_CXX11_HDR_TYPEINDEX
+#define BOOST_NO_CXX11_HDR_TUPLE
+#define BOOST_NO_CXX11_HDR_THREAD
+#define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+#define BOOST_NO_CXX11_HDR_REGEX
+#define BOOST_NO_CXX11_HDR_RATIO
+#define BOOST_NO_CXX11_HDR_RANDOM
+#define BOOST_NO_CXX11_HDR_MUTEX
+#define BOOST_NO_CXX11_HDR_FUTURE
+#define BOOST_NO_CXX11_HDR_FORWARD_LIST
+#define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+#define BOOST_NO_CXX11_HDR_CODECVT
+#define BOOST_NO_CXX11_HDR_CHRONO
+#define BOOST_NO_CXX11_HDR_ATOMIC
+#define BOOST_NO_CXX11_HDR_ARRAY
+#define BOOST_NO_CXX11_STD_ALIGN
+
+#define BOOST_NO_CXX14_STD_EXCHANGE
+#define BOOST_NO_CXX14_HDR_SHARED_MUTEX
+
+#define BOOST_NO_CXX17_STD_INVOKE
+#define BOOST_NO_CXX17_STD_APPLY
+++ /dev/null
-// Boost config.hpp configuration header file ------------------------------//
-// boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file
-
-// Copyright (c) 2001-2003 John Maddock
-// Copyright (c) 2001 Darin Adler
-// Copyright (c) 2001 Peter Dimov
-// Copyright (c) 2002 Bill Kempf
-// Copyright (c) 2002 Jens Maurer
-// Copyright (c) 2002-2003 David Abrahams
-// Copyright (c) 2003 Gennaro Prota
-// Copyright (c) 2003 Eric Friedman
-// Copyright (c) 2010 Eric Jourdanneau, Joel Falcou
-// 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)
-
-// See http://www.boost.org/ for most recent version.
-
-// Boost config.hpp policy and rationale documentation has been moved to
-// http://www.boost.org/libs/config/
-//
-// This file is intended to be stable, and relatively unchanging.
-// It should contain boilerplate code only - no compiler specific
-// code unless it is unavoidable - no changes unless unavoidable.
-
-#ifndef BOOST_CONFIG_SUFFIX_HPP
-#define BOOST_CONFIG_SUFFIX_HPP
-
-#if defined(__GNUC__) && (__GNUC__ >= 4)
-//
-// Some GCC-4.x versions issue warnings even when __extension__ is used,
-// so use this as a workaround:
-//
-#pragma GCC system_header
-#endif
-
-//
-// ensure that visibility macros are always defined, thus symplifying use
-//
-#ifndef BOOST_SYMBOL_EXPORT
-# define BOOST_SYMBOL_EXPORT
-#endif
-#ifndef BOOST_SYMBOL_IMPORT
-# define BOOST_SYMBOL_IMPORT
-#endif
-#ifndef BOOST_SYMBOL_VISIBLE
-# define BOOST_SYMBOL_VISIBLE
-#endif
-
-//
-// look for long long by looking for the appropriate macros in <limits.h>.
-// Note that we use limits.h rather than climits for maximal portability,
-// remember that since these just declare a bunch of macros, there should be
-// no namespace issues from this.
-//
-#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \
- && !defined(BOOST_MSVC) && !defined(__BORLANDC__)
-# include <limits.h>
-# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
-# define BOOST_HAS_LONG_LONG
-# else
-# define BOOST_NO_LONG_LONG
-# endif
-#endif
-
-// GCC 3.x will clean up all of those nasty macro definitions that
-// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine
-// it under GCC 3.x.
-#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS)
-# undef BOOST_NO_CTYPE_FUNCTIONS
-#endif
-
-//
-// Assume any extensions are in namespace std:: unless stated otherwise:
-//
-# ifndef BOOST_STD_EXTENSION_NAMESPACE
-# define BOOST_STD_EXTENSION_NAMESPACE std
-# endif
-
-//
-// If cv-qualified specializations are not allowed, then neither are cv-void ones:
-//
-# if defined(BOOST_NO_CV_SPECIALIZATIONS) \
- && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
-# define BOOST_NO_CV_VOID_SPECIALIZATIONS
-# endif
-
-//
-// If there is no numeric_limits template, then it can't have any compile time
-// constants either!
-//
-# if defined(BOOST_NO_LIMITS) \
- && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
-# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
-# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
-# endif
-
-//
-// if there is no long long then there is no specialisation
-// for numeric_limits<long long> either:
-//
-#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)
-# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
-#endif
-
-//
-// if there is no __int64 then there is no specialisation
-// for numeric_limits<__int64> either:
-//
-#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)
-# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
-#endif
-
-//
-// if member templates are supported then so is the
-// VC6 subset of member templates:
-//
-# if !defined(BOOST_NO_MEMBER_TEMPLATES) \
- && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
-# define BOOST_MSVC6_MEMBER_TEMPLATES
-# endif
-
-//
-// Without partial specialization, can't test for partial specialisation bugs:
-//
-# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
- && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)
-# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
-# endif
-
-//
-// Without partial specialization, we can't have array-type partial specialisations:
-//
-# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
- && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
-# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
-# endif
-
-//
-// Without partial specialization, std::iterator_traits can't work:
-//
-# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
- && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
-# define BOOST_NO_STD_ITERATOR_TRAITS
-# endif
-
-//
-// Without partial specialization, partial
-// specialization with default args won't work either:
-//
-# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
- && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
-# define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
-# endif
-
-//
-// Without member template support, we can't have template constructors
-// in the standard library either:
-//
-# if defined(BOOST_NO_MEMBER_TEMPLATES) \
- && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
- && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
-# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
-# endif
-
-//
-// Without member template support, we can't have a conforming
-// std::allocator template either:
-//
-# if defined(BOOST_NO_MEMBER_TEMPLATES) \
- && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
- && !defined(BOOST_NO_STD_ALLOCATOR)
-# define BOOST_NO_STD_ALLOCATOR
-# endif
-
-//
-// without ADL support then using declarations will break ADL as well:
-//
-#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
-# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
-#endif
-
-//
-// Without typeid support we have no dynamic RTTI either:
-//
-#if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
-# define BOOST_NO_RTTI
-#endif
-
-//
-// If we have a standard allocator, then we have a partial one as well:
-//
-#if !defined(BOOST_NO_STD_ALLOCATOR)
-# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
-#endif
-
-//
-// We can't have a working std::use_facet if there is no std::locale:
-//
-# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)
-# define BOOST_NO_STD_USE_FACET
-# endif
-
-//
-// We can't have a std::messages facet if there is no std::locale:
-//
-# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)
-# define BOOST_NO_STD_MESSAGES
-# endif
-
-//
-// We can't have a working std::wstreambuf if there is no std::locale:
-//
-# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
-# define BOOST_NO_STD_WSTREAMBUF
-# endif
-
-//
-// We can't have a <cwctype> if there is no <cwchar>:
-//
-# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE)
-# define BOOST_NO_CWCTYPE
-# endif
-
-//
-// We can't have a swprintf if there is no <cwchar>:
-//
-# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF)
-# define BOOST_NO_SWPRINTF
-# endif
-
-//
-// If Win32 support is turned off, then we must turn off
-// threading support also, unless there is some other
-// thread API enabled:
-//
-#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \
- && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS)
-# define BOOST_DISABLE_THREADS
-#endif
-
-//
-// Turn on threading support if the compiler thinks that it's in
-// multithreaded mode. We put this here because there are only a
-// limited number of macros that identify this (if there's any missing
-// from here then add to the appropriate compiler section):
-//
-#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
- || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \
- && !defined(BOOST_HAS_THREADS)
-# define BOOST_HAS_THREADS
-#endif
-
-//
-// Turn threading support off if BOOST_DISABLE_THREADS is defined:
-//
-#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS)
-# undef BOOST_HAS_THREADS
-#endif
-
-//
-// Turn threading support off if we don't recognise the threading API:
-//
-#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\
- && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\
- && !defined(BOOST_HAS_MPTASKS)
-# undef BOOST_HAS_THREADS
-#endif
-
-//
-// Turn threading detail macros off if we don't (want to) use threading
-//
-#ifndef BOOST_HAS_THREADS
-# undef BOOST_HAS_PTHREADS
-# undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
-# undef BOOST_HAS_PTHREAD_YIELD
-# undef BOOST_HAS_PTHREAD_DELAY_NP
-# undef BOOST_HAS_WINTHREADS
-# undef BOOST_HAS_BETHREADS
-# undef BOOST_HAS_MPTASKS
-#endif
-
-//
-// If the compiler claims to be C99 conformant, then it had better
-// have a <stdint.h>:
-//
-# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
-# define BOOST_HAS_STDINT_H
-# ifndef BOOST_HAS_LOG1P
-# define BOOST_HAS_LOG1P
-# endif
-# ifndef BOOST_HAS_EXPM1
-# define BOOST_HAS_EXPM1
-# endif
-# endif
-
-//
-// Define BOOST_NO_SLIST and BOOST_NO_HASH if required.
-// Note that this is for backwards compatibility only.
-//
-# if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST)
-# define BOOST_NO_SLIST
-# endif
-
-# if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH)
-# define BOOST_NO_HASH
-# endif
-
-//
-// Set BOOST_SLIST_HEADER if not set already:
-//
-#if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER)
-# define BOOST_SLIST_HEADER <slist>
-#endif
-
-//
-// Set BOOST_HASH_SET_HEADER if not set already:
-//
-#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER)
-# define BOOST_HASH_SET_HEADER <hash_set>
-#endif
-
-//
-// Set BOOST_HASH_MAP_HEADER if not set already:
-//
-#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER)
-# define BOOST_HASH_MAP_HEADER <hash_map>
-#endif
-
-// BOOST_HAS_ABI_HEADERS
-// This macro gets set if we have headers that fix the ABI,
-// and prevent ODR violations when linking to external libraries:
-#if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS)
-# define BOOST_HAS_ABI_HEADERS
-#endif
-
-#if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS)
-# undef BOOST_HAS_ABI_HEADERS
-#endif
-
-// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------//
-// Because std::size_t usage is so common, even in boost headers which do not
-// otherwise use the C library, the <cstddef> workaround is included here so
-// that ugly workaround code need not appear in many other boost headers.
-// NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>
-// must still be #included in the usual places so that <cstddef> inclusion
-// works as expected with standard conforming compilers. The resulting
-// double inclusion of <cstddef> is harmless.
-
-# if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus)
-# include <cstddef>
- namespace std { using ::ptrdiff_t; using ::size_t; }
-# endif
-
-// Workaround for the unfortunate min/max macros defined by some platform headers
-
-#define BOOST_PREVENT_MACRO_SUBSTITUTION
-
-#ifndef BOOST_USING_STD_MIN
-# define BOOST_USING_STD_MIN() using std::min
-#endif
-
-#ifndef BOOST_USING_STD_MAX
-# define BOOST_USING_STD_MAX() using std::max
-#endif
-
-// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------//
-
-# if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus)
-
-namespace std {
- template <class _Tp>
- inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
- return __b < __a ? __b : __a;
- }
- template <class _Tp>
- inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
- return __a < __b ? __b : __a;
- }
-}
-
-# endif
-
-// BOOST_STATIC_CONSTANT workaround --------------------------------------- //
-// On compilers which don't allow in-class initialization of static integral
-// constant members, we must use enums as a workaround if we want the constants
-// to be available at compile-time. This macro gives us a convenient way to
-// declare such constants.
-
-# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }
-# else
-# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
-# endif
-
-// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------//
-// When the standard library does not have a conforming std::use_facet there
-// are various workarounds available, but they differ from library to library.
-// The same problem occurs with has_facet.
-// These macros provide a consistent way to access a locale's facets.
-// Usage:
-// replace
-// std::use_facet<Type>(loc);
-// with
-// BOOST_USE_FACET(Type, loc);
-// Note do not add a std:: prefix to the front of BOOST_USE_FACET!
-// Use for BOOST_HAS_FACET is analogous.
-
-#if defined(BOOST_NO_STD_USE_FACET)
-# ifdef BOOST_HAS_TWO_ARG_USE_FACET
-# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))
-# define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast<Type*>(0))
-# elif defined(BOOST_HAS_MACRO_USE_FACET)
-# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)
-# define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type)
-# elif defined(BOOST_HAS_STLP_USE_FACET)
-# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type >(loc))
-# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
-# endif
-#else
-# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc)
-# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
-#endif
-
-// BOOST_NESTED_TEMPLATE workaround ------------------------------------------//
-// Member templates are supported by some compilers even though they can't use
-// the A::template member<U> syntax, as a workaround replace:
-//
-// typedef typename A::template rebind<U> binder;
-//
-// with:
-//
-// typedef typename A::BOOST_NESTED_TEMPLATE rebind<U> binder;
-
-#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
-# define BOOST_NESTED_TEMPLATE template
-#else
-# define BOOST_NESTED_TEMPLATE
-#endif
-
-// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------//
-// Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION
-// is defined, in which case it evaluates to return x; Use when you have a return
-// statement that can never be reached.
-
-#ifndef BOOST_UNREACHABLE_RETURN
-# ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
-# define BOOST_UNREACHABLE_RETURN(x) return x;
-# else
-# define BOOST_UNREACHABLE_RETURN(x)
-# endif
-#endif
-
-// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------//
-//
-// Some compilers don't support the use of `typename' for dependent
-// types in deduced contexts, e.g.
-//
-// template <class T> void f(T, typename T::type);
-// ^^^^^^^^
-// Replace these declarations with:
-//
-// template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);
-
-#ifndef BOOST_NO_DEDUCED_TYPENAME
-# define BOOST_DEDUCED_TYPENAME typename
-#else
-# define BOOST_DEDUCED_TYPENAME
-#endif
-
-#ifndef BOOST_NO_TYPENAME_WITH_CTOR
-# define BOOST_CTOR_TYPENAME typename
-#else
-# define BOOST_CTOR_TYPENAME
-#endif
-
-// long long workaround ------------------------------------------//
-// On gcc (and maybe other compilers?) long long is alway supported
-// but it's use may generate either warnings (with -ansi), or errors
-// (with -pedantic -ansi) unless it's use is prefixed by __extension__
-//
-#if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus)
-namespace boost{
-# ifdef __GNUC__
- __extension__ typedef long long long_long_type;
- __extension__ typedef unsigned long long ulong_long_type;
-# else
- typedef long long long_long_type;
- typedef unsigned long long ulong_long_type;
-# endif
-}
-#endif
-// same again for __int128:
-#if defined(BOOST_HAS_INT128) && defined(__cplusplus)
-namespace boost{
-# ifdef __GNUC__
- __extension__ typedef __int128 int128_type;
- __extension__ typedef unsigned __int128 uint128_type;
-# else
- typedef __int128 int128_type;
- typedef unsigned __int128 uint128_type;
-# endif
-}
-#endif
-// same again for __float128:
-#if defined(BOOST_HAS_FLOAT128) && defined(__cplusplus)
-namespace boost {
-# ifdef __GNUC__
- __extension__ typedef __float128 float128_type;
-# else
- typedef __float128 float128_type;
-# endif
-}
-#endif
-
-// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//
-
-// These macros are obsolete. Port away and remove.
-
-# define BOOST_EXPLICIT_TEMPLATE_TYPE(t)
-# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
-# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
-# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
-
-# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
-# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
-# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
-# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
-
-// When BOOST_NO_STD_TYPEINFO is defined, we can just import
-// the global definition into std namespace:
-#if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus)
-#include <typeinfo>
-namespace std{ using ::type_info; }
-#endif
-
-// ---------------------------------------------------------------------------//
-
-//
-// Helper macro BOOST_STRINGIZE:
-// Converts the parameter X to a string after macro replacement
-// on X has been performed.
-//
-#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
-#define BOOST_DO_STRINGIZE(X) #X
-
-//
-// Helper macro BOOST_JOIN:
-// The following piece of macro magic joins the two
-// arguments together, even when one of the arguments is
-// itself a macro (see 16.3.1 in C++ standard). The key
-// is that macro expansion of macro arguments does not
-// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
-//
-#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
-#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
-#define BOOST_DO_JOIN2( X, Y ) X##Y
-
-//
-// Set some default values for compiler/library/platform names.
-// These are for debugging config setup only:
-//
-# ifndef BOOST_COMPILER
-# define BOOST_COMPILER "Unknown ISO C++ Compiler"
-# endif
-# ifndef BOOST_STDLIB
-# define BOOST_STDLIB "Unknown ISO standard library"
-# endif
-# ifndef BOOST_PLATFORM
-# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
- || defined(_POSIX_SOURCE)
-# define BOOST_PLATFORM "Generic Unix"
-# else
-# define BOOST_PLATFORM "Unknown"
-# endif
-# endif
-
-//
-// Set some default values GPU support
-//
-# ifndef BOOST_GPU_ENABLED
-# define BOOST_GPU_ENABLED
-# endif
-
-// BOOST_FORCEINLINE ---------------------------------------------//
-// Macro to use in place of 'inline' to force a function to be inline
-#if !defined(BOOST_FORCEINLINE)
-# if defined(_MSC_VER)
-# define BOOST_FORCEINLINE __forceinline
-# elif defined(__GNUC__) && __GNUC__ > 3
- // Clang also defines __GNUC__ (as 4)
-# define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__))
-# else
-# define BOOST_FORCEINLINE inline
-# endif
-#endif
-
-// BOOST_NOINLINE ---------------------------------------------//
-// Macro to use in place of 'inline' to prevent a function to be inlined
-#if !defined(BOOST_NOINLINE)
-# if defined(_MSC_VER)
-# define BOOST_NOINLINE __declspec(noinline)
-# elif defined(__GNUC__) && __GNUC__ > 3
- // Clang also defines __GNUC__ (as 4)
-# if defined(__CUDACC__)
- // nvcc doesn't always parse __noinline__,
- // see: https://svn.boost.org/trac/boost/ticket/9392
-# define BOOST_NOINLINE __attribute__ ((noinline))
-# else
-# define BOOST_NOINLINE __attribute__ ((__noinline__))
-# endif
-# else
-# define BOOST_NOINLINE
-# endif
-#endif
-
-// BOOST_NORETURN ---------------------------------------------//
-// Macro to use before a function declaration/definition to designate
-// the function as not returning normally (i.e. with a return statement
-// or by leaving the function scope, if the function return type is void).
-#if !defined(BOOST_NORETURN)
-# if defined(_MSC_VER)
-# define BOOST_NORETURN __declspec(noreturn)
-# elif defined(__GNUC__)
-# define BOOST_NORETURN __attribute__ ((__noreturn__))
-# elif defined(__has_attribute) && defined(__SUNPRO_CC)
-# if __has_attribute(noreturn)
-# define BOOST_NORETURN [[noreturn]]
-# endif
-# elif defined(__has_cpp_attribute)
-# if __has_cpp_attribute(noreturn)
-# define BOOST_NORETURN [[noreturn]]
-# endif
-# endif
-#endif
-
-#if !defined(BOOST_NORETURN)
-# define BOOST_NO_NORETURN
-# define BOOST_NORETURN
-#endif
-
-// Branch prediction hints
-// These macros are intended to wrap conditional expressions that yield true or false
-//
-// if (BOOST_LIKELY(var == 10))
-// {
-// // the most probable code here
-// }
-//
-#if !defined(BOOST_LIKELY)
-# define BOOST_LIKELY(x) x
-#endif
-#if !defined(BOOST_UNLIKELY)
-# define BOOST_UNLIKELY(x) x
-#endif
-
-// Type and data alignment specification
-//
-#if !defined(BOOST_NO_CXX11_ALIGNAS)
-# define BOOST_ALIGNMENT(x) alignas(x)
-#elif defined(_MSC_VER)
-# define BOOST_ALIGNMENT(x) __declspec(align(x))
-#elif defined(__GNUC__)
-# define BOOST_ALIGNMENT(x) __attribute__ ((__aligned__(x)))
-#else
-# define BOOST_NO_ALIGNMENT
-# define BOOST_ALIGNMENT(x)
-#endif
-
-// Lack of non-public defaulted functions is implied by the lack of any defaulted functions
-#if !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) && defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
-# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
-#endif
-
-// Defaulted and deleted function declaration helpers
-// These macros are intended to be inside a class definition.
-// BOOST_DEFAULTED_FUNCTION accepts the function declaration and its
-// body, which will be used if the compiler doesn't support defaulted functions.
-// BOOST_DELETED_FUNCTION only accepts the function declaration. It
-// will expand to a private function declaration, if the compiler doesn't support
-// deleted functions. Because of this it is recommended to use BOOST_DELETED_FUNCTION
-// in the end of the class definition.
-//
-// class my_class
-// {
-// public:
-// // Default-constructible
-// BOOST_DEFAULTED_FUNCTION(my_class(), {})
-// // Copying prohibited
-// BOOST_DELETED_FUNCTION(my_class(my_class const&))
-// BOOST_DELETED_FUNCTION(my_class& operator= (my_class const&))
-// };
-//
-#if !(defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS))
-# define BOOST_DEFAULTED_FUNCTION(fun, body) fun = default;
-#else
-# define BOOST_DEFAULTED_FUNCTION(fun, body) fun body
-#endif
-
-#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
-# define BOOST_DELETED_FUNCTION(fun) fun = delete;
-#else
-# define BOOST_DELETED_FUNCTION(fun) private: fun;
-#endif
-
-//
-// Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined
-//
-#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
-#define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE
-#endif
-
-// -------------------- Deprecated macros for 1.50 ---------------------------
-// These will go away in a future release
-
-// Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP
-// instead of BOOST_NO_STD_UNORDERED
-#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET)
-# ifndef BOOST_NO_CXX11_STD_UNORDERED
-# define BOOST_NO_CXX11_STD_UNORDERED
-# endif
-#endif
-
-// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS
-#if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
-# define BOOST_NO_INITIALIZER_LISTS
-#endif
-
-// Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY
-#if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_0X_HDR_ARRAY)
-# define BOOST_NO_0X_HDR_ARRAY
-#endif
-// Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO
-#if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO)
-# define BOOST_NO_0X_HDR_CHRONO
-#endif
-// Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT
-#if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT)
-# define BOOST_NO_0X_HDR_CODECVT
-#endif
-// Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE
-#if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE)
-# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-#endif
-// Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST
-#if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST)
-# define BOOST_NO_0X_HDR_FORWARD_LIST
-#endif
-// Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE
-#if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE)
-# define BOOST_NO_0X_HDR_FUTURE
-#endif
-
-// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-// instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS
-#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-# ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST
-# define BOOST_NO_0X_HDR_INITIALIZER_LIST
-# endif
-# ifndef BOOST_NO_INITIALIZER_LISTS
-# define BOOST_NO_INITIALIZER_LISTS
-# endif
-#endif
-
-// Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX
-#if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX)
-# define BOOST_NO_0X_HDR_MUTEX
-#endif
-// Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM
-#if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM)
-# define BOOST_NO_0X_HDR_RANDOM
-#endif
-// Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO
-#if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO)
-# define BOOST_NO_0X_HDR_RATIO
-#endif
-// Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX
-#if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX)
-# define BOOST_NO_0X_HDR_REGEX
-#endif
-// Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR
-#if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR)
-# define BOOST_NO_0X_HDR_SYSTEM_ERROR
-#endif
-// Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD
-#if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD)
-# define BOOST_NO_0X_HDR_THREAD
-#endif
-// Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE
-#if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE)
-# define BOOST_NO_0X_HDR_TUPLE
-#endif
-// Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS
-#if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS)
-# define BOOST_NO_0X_HDR_TYPE_TRAITS
-#endif
-// Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX
-#if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX)
-# define BOOST_NO_0X_HDR_TYPEINDEX
-#endif
-// Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP
-#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP)
-# define BOOST_NO_0X_HDR_UNORDERED_MAP
-#endif
-// Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET
-#if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET)
-# define BOOST_NO_0X_HDR_UNORDERED_SET
-#endif
-
-// ------------------ End of deprecated macros for 1.50 ---------------------------
-
-// -------------------- Deprecated macros for 1.51 ---------------------------
-// These will go away in a future release
-
-// Use BOOST_NO_CXX11_AUTO_DECLARATIONS instead of BOOST_NO_AUTO_DECLARATIONS
-#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS)
-# define BOOST_NO_AUTO_DECLARATIONS
-#endif
-// Use BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of BOOST_NO_AUTO_MULTIDECLARATIONS
-#if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS)
-# define BOOST_NO_AUTO_MULTIDECLARATIONS
-#endif
-// Use BOOST_NO_CXX11_CHAR16_T instead of BOOST_NO_CHAR16_T
-#if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T)
-# define BOOST_NO_CHAR16_T
-#endif
-// Use BOOST_NO_CXX11_CHAR32_T instead of BOOST_NO_CHAR32_T
-#if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T)
-# define BOOST_NO_CHAR32_T
-#endif
-// Use BOOST_NO_CXX11_TEMPLATE_ALIASES instead of BOOST_NO_TEMPLATE_ALIASES
-#if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES)
-# define BOOST_NO_TEMPLATE_ALIASES
-#endif
-// Use BOOST_NO_CXX11_CONSTEXPR instead of BOOST_NO_CONSTEXPR
-#if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR)
-# define BOOST_NO_CONSTEXPR
-#endif
-// Use BOOST_NO_CXX11_DECLTYPE_N3276 instead of BOOST_NO_DECLTYPE_N3276
-#if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276)
-# define BOOST_NO_DECLTYPE_N3276
-#endif
-// Use BOOST_NO_CXX11_DECLTYPE instead of BOOST_NO_DECLTYPE
-#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE)
-# define BOOST_NO_DECLTYPE
-#endif
-// Use BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of BOOST_NO_DEFAULTED_FUNCTIONS
-#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS)
-# define BOOST_NO_DEFAULTED_FUNCTIONS
-#endif
-// Use BOOST_NO_CXX11_DELETED_FUNCTIONS instead of BOOST_NO_DELETED_FUNCTIONS
-#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS)
-# define BOOST_NO_DELETED_FUNCTIONS
-#endif
-// Use BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)
-# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#endif
-// Use BOOST_NO_CXX11_EXTERN_TEMPLATE instead of BOOST_NO_EXTERN_TEMPLATE
-#if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE)
-# define BOOST_NO_EXTERN_TEMPLATE
-#endif
-// Use BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
-# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#endif
-// Use BOOST_NO_CXX11_LAMBDAS instead of BOOST_NO_LAMBDAS
-#if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS)
-# define BOOST_NO_LAMBDAS
-#endif
-// Use BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS)
-# define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#endif
-// Use BOOST_NO_CXX11_NOEXCEPT instead of BOOST_NO_NOEXCEPT
-#if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT)
-# define BOOST_NO_NOEXCEPT
-#endif
-// Use BOOST_NO_CXX11_NULLPTR instead of BOOST_NO_NULLPTR
-#if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR)
-# define BOOST_NO_NULLPTR
-#endif
-// Use BOOST_NO_CXX11_RAW_LITERALS instead of BOOST_NO_RAW_LITERALS
-#if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS)
-# define BOOST_NO_RAW_LITERALS
-#endif
-// Use BOOST_NO_CXX11_RVALUE_REFERENCES instead of BOOST_NO_RVALUE_REFERENCES
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES)
-# define BOOST_NO_RVALUE_REFERENCES
-#endif
-// Use BOOST_NO_CXX11_SCOPED_ENUMS instead of BOOST_NO_SCOPED_ENUMS
-#if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS)
-# define BOOST_NO_SCOPED_ENUMS
-#endif
-// Use BOOST_NO_CXX11_STATIC_ASSERT instead of BOOST_NO_STATIC_ASSERT
-#if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT)
-# define BOOST_NO_STATIC_ASSERT
-#endif
-// Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED
-#if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED)
-# define BOOST_NO_STD_UNORDERED
-#endif
-// Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS
-#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS)
-# define BOOST_NO_UNICODE_LITERALS
-#endif
-// Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
-#if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX)
-# define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
-#endif
-// Use BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of BOOST_NO_VARIADIC_TEMPLATES
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
-# define BOOST_NO_VARIADIC_TEMPLATES
-#endif
-// Use BOOST_NO_CXX11_VARIADIC_MACROS instead of BOOST_NO_VARIADIC_MACROS
-#if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS)
-# define BOOST_NO_VARIADIC_MACROS
-#endif
-// Use BOOST_NO_CXX11_NUMERIC_LIMITS instead of BOOST_NO_NUMERIC_LIMITS_LOWEST
-#if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST)
-# define BOOST_NO_NUMERIC_LIMITS_LOWEST
-#endif
-// ------------------ End of deprecated macros for 1.51 ---------------------------
-
-
-
-//
-// Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR
-// These aid the transition to C++11 while still supporting C++03 compilers
-//
-#ifdef BOOST_NO_CXX11_NOEXCEPT
-# define BOOST_NOEXCEPT
-# define BOOST_NOEXCEPT_OR_NOTHROW throw()
-# define BOOST_NOEXCEPT_IF(Predicate)
-# define BOOST_NOEXCEPT_EXPR(Expression) false
-#else
-# define BOOST_NOEXCEPT noexcept
-# define BOOST_NOEXCEPT_OR_NOTHROW noexcept
-# define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
-# define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
-#endif
-//
-// Helper macro BOOST_FALLTHROUGH
-// Fallback definition of BOOST_FALLTHROUGH macro used to mark intended
-// fall-through between case labels in a switch statement. We use a definition
-// that requires a semicolon after it to avoid at least one type of misuse even
-// on unsupported compilers.
-//
-#ifndef BOOST_FALLTHROUGH
-# define BOOST_FALLTHROUGH ((void)0)
-#endif
-
-//
-// constexpr workarounds
-//
-#if defined(BOOST_NO_CXX11_CONSTEXPR)
-#define BOOST_CONSTEXPR
-#define BOOST_CONSTEXPR_OR_CONST const
-#else
-#define BOOST_CONSTEXPR constexpr
-#define BOOST_CONSTEXPR_OR_CONST constexpr
-#endif
-#if defined(BOOST_NO_CXX14_CONSTEXPR)
-#define BOOST_CXX14_CONSTEXPR
-#else
-#define BOOST_CXX14_CONSTEXPR constexpr
-#endif
-
-//
-// Unused variable/typedef workarounds:
-//
-#ifndef BOOST_ATTRIBUTE_UNUSED
-# define BOOST_ATTRIBUTE_UNUSED
-#endif
-
-#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST
-
-//
-// Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined
-//
-#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)
-# define BOOST_HAS_STATIC_ASSERT
-#endif
-
-//
-// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined
-//
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
-#define BOOST_HAS_RVALUE_REFS
-#endif
-
-//
-// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined
-//
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL)
-#define BOOST_HAS_VARIADIC_TMPL
-#endif
-//
-// Set BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS when
-// BOOST_NO_CXX11_VARIADIC_TEMPLATES is set:
-//
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS)
-# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
-#endif
-
-//
-// Finish off with checks for macros that are depricated / no longer supported,
-// if any of these are set then it's very likely that much of Boost will no
-// longer work. So stop with a #error for now, but give the user a chance
-// to continue at their own risk if they really want to:
-//
-#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_CONFIG_ALLOW_DEPRECATED)
-# error "You are using a compiler which lacks features which are now a minimum requirement in order to use Boost, define BOOST_CONFIG_ALLOW_DEPRECATED if you want to continue at your own risk!!!"
-#endif
-
-#endif
--- /dev/null
+// Copyright David Abrahams 2002.
+// 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_CONFIG_WORKAROUND_HPP
+#define BOOST_CONFIG_WORKAROUND_HPP
+
+// Compiler/library version workaround macro
+//
+// Usage:
+//
+// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+// // workaround for eVC4 and VC6
+// ... // workaround code here
+// #endif
+//
+// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the
+// first argument must be undefined or expand to a numeric
+// value. The above expands to:
+//
+// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300
+//
+// When used for workarounds that apply to the latest known version
+// and all earlier versions of a compiler, the following convention
+// should be observed:
+//
+// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301))
+//
+// The version number in this case corresponds to the last version in
+// which the workaround was known to have been required. When
+// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro
+// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates
+// the workaround for any version of the compiler. When
+// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or
+// error will be issued if the compiler version exceeds the argument
+// to BOOST_TESTED_AT(). This can be used to locate workarounds which
+// may be obsoleted by newer versions.
+
+#ifndef BOOST_STRICT_CONFIG
+
+#include <boost/config.hpp>
+
+#ifndef __BORLANDC__
+#define __BORLANDC___WORKAROUND_GUARD 1
+#else
+#define __BORLANDC___WORKAROUND_GUARD 0
+#endif
+#ifndef __CODEGEARC__
+#define __CODEGEARC___WORKAROUND_GUARD 1
+#else
+#define __CODEGEARC___WORKAROUND_GUARD 0
+#endif
+#ifndef _MSC_VER
+#define _MSC_VER_WORKAROUND_GUARD 1
+#else
+#define _MSC_VER_WORKAROUND_GUARD 0
+#endif
+#ifndef _MSC_FULL_VER
+#define _MSC_FULL_VER_WORKAROUND_GUARD 1
+#else
+#define _MSC_FULL_VER_WORKAROUND_GUARD 0
+#endif
+#ifndef BOOST_MSVC
+#define BOOST_MSVC_WORKAROUND_GUARD 1
+#else
+#define BOOST_MSVC_WORKAROUND_GUARD 0
+#endif
+#ifndef BOOST_MSVC_FULL_VER
+#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1
+#else
+#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0
+#endif
+#ifndef __GNUC__
+#define __GNUC___WORKAROUND_GUARD 1
+#else
+#define __GNUC___WORKAROUND_GUARD 0
+#endif
+#ifndef __GNUC_MINOR__
+#define __GNUC_MINOR___WORKAROUND_GUARD 1
+#else
+#define __GNUC_MINOR___WORKAROUND_GUARD 0
+#endif
+#ifndef __GNUC_PATCHLEVEL__
+#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1
+#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 BOOST_XLCPP_ZOS
+#define BOOST_XLCPP_ZOS_WORKAROUND_GUARD 1
+#else
+#define BOOST_XLCPP_ZOS_WORKAROUND_GUARD 0
+#endif
+#ifndef __IBMCPP__
+#define __IBMCPP___WORKAROUND_GUARD 1
+#else
+#define __IBMCPP___WORKAROUND_GUARD 0
+#endif
+#ifndef __SUNPRO_CC
+#define __SUNPRO_CC_WORKAROUND_GUARD 1
+#else
+#define __SUNPRO_CC_WORKAROUND_GUARD 0
+#endif
+#ifndef __DECCXX_VER
+#define __DECCXX_VER_WORKAROUND_GUARD 1
+#else
+#define __DECCXX_VER_WORKAROUND_GUARD 0
+#endif
+#ifndef __MWERKS__
+#define __MWERKS___WORKAROUND_GUARD 1
+#else
+#define __MWERKS___WORKAROUND_GUARD 0
+#endif
+#ifndef __EDG__
+#define __EDG___WORKAROUND_GUARD 1
+#else
+#define __EDG___WORKAROUND_GUARD 0
+#endif
+#ifndef __EDG_VERSION__
+#define __EDG_VERSION___WORKAROUND_GUARD 1
+#else
+#define __EDG_VERSION___WORKAROUND_GUARD 0
+#endif
+#ifndef __HP_aCC
+#define __HP_aCC_WORKAROUND_GUARD 1
+#else
+#define __HP_aCC_WORKAROUND_GUARD 0
+#endif
+#ifndef __hpxstd98
+#define __hpxstd98_WORKAROUND_GUARD 1
+#else
+#define __hpxstd98_WORKAROUND_GUARD 0
+#endif
+#ifndef _CRAYC
+#define _CRAYC_WORKAROUND_GUARD 1
+#else
+#define _CRAYC_WORKAROUND_GUARD 0
+#endif
+#ifndef __DMC__
+#define __DMC___WORKAROUND_GUARD 1
+#else
+#define __DMC___WORKAROUND_GUARD 0
+#endif
+#ifndef MPW_CPLUS
+#define MPW_CPLUS_WORKAROUND_GUARD 1
+#else
+#define MPW_CPLUS_WORKAROUND_GUARD 0
+#endif
+#ifndef __COMO__
+#define __COMO___WORKAROUND_GUARD 1
+#else
+#define __COMO___WORKAROUND_GUARD 0
+#endif
+#ifndef __COMO_VERSION__
+#define __COMO_VERSION___WORKAROUND_GUARD 1
+#else
+#define __COMO_VERSION___WORKAROUND_GUARD 0
+#endif
+#ifndef __INTEL_COMPILER
+#define __INTEL_COMPILER_WORKAROUND_GUARD 1
+#else
+#define __INTEL_COMPILER_WORKAROUND_GUARD 0
+#endif
+#ifndef __ICL
+#define __ICL_WORKAROUND_GUARD 1
+#else
+#define __ICL_WORKAROUND_GUARD 0
+#endif
+#ifndef _COMPILER_VERSION
+#define _COMPILER_VERSION_WORKAROUND_GUARD 1
+#else
+#define _COMPILER_VERSION_WORKAROUND_GUARD 0
+#endif
+
+#ifndef _RWSTD_VER
+#define _RWSTD_VER_WORKAROUND_GUARD 1
+#else
+#define _RWSTD_VER_WORKAROUND_GUARD 0
+#endif
+#ifndef BOOST_RWSTD_VER
+#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1
+#else
+#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0
+#endif
+#ifndef __GLIBCPP__
+#define __GLIBCPP___WORKAROUND_GUARD 1
+#else
+#define __GLIBCPP___WORKAROUND_GUARD 0
+#endif
+#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
+#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1
+#else
+#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0
+#endif
+#ifndef __SGI_STL_PORT
+#define __SGI_STL_PORT_WORKAROUND_GUARD 1
+#else
+#define __SGI_STL_PORT_WORKAROUND_GUARD 0
+#endif
+#ifndef _STLPORT_VERSION
+#define _STLPORT_VERSION_WORKAROUND_GUARD 1
+#else
+#define _STLPORT_VERSION_WORKAROUND_GUARD 0
+#endif
+#ifndef __LIBCOMO_VERSION__
+#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1
+#else
+#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0
+#endif
+#ifndef _CPPLIB_VER
+#define _CPPLIB_VER_WORKAROUND_GUARD 1
+#else
+#define _CPPLIB_VER_WORKAROUND_GUARD 0
+#endif
+
+#ifndef BOOST_INTEL_CXX_VERSION
+#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1
+#else
+#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0
+#endif
+#ifndef BOOST_INTEL_WIN
+#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1
+#else
+#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0
+#endif
+#ifndef BOOST_DINKUMWARE_STDLIB
+#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1
+#else
+#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0
+#endif
+#ifndef BOOST_INTEL
+#define BOOST_INTEL_WORKAROUND_GUARD 1
+#else
+#define BOOST_INTEL_WORKAROUND_GUARD 0
+#endif
+// Always define to zero, if it's used it'll be defined my MPL:
+#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0
+
+#define BOOST_WORKAROUND(symbol, test) \
+ ((symbol ## _WORKAROUND_GUARD + 0 == 0) && \
+ (symbol != 0) && (1 % (( (symbol test) ) + 1)))
+// ^ ^ ^ ^
+// The extra level of parenthesis nesting above, along with the
+// BOOST_OPEN_PAREN indirection below, is required to satisfy the
+// broken preprocessor in MWCW 8.3 and earlier.
+//
+// The basic mechanism works as follows:
+// (symbol test) + 1 => if (symbol test) then 2 else 1
+// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0
+//
+// The complication with % is for cooperation with BOOST_TESTED_AT().
+// When "test" is BOOST_TESTED_AT(x) and
+// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined,
+//
+// symbol test => if (symbol <= x) then 1 else -1
+// (symbol test) + 1 => if (symbol <= x) then 2 else 0
+// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero
+//
+
+#ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS
+# define BOOST_OPEN_PAREN (
+# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1
+#else
+# define BOOST_TESTED_AT(value) != ((value)-(value))
+#endif
+
+#else
+
+#define BOOST_WORKAROUND(symbol, test) 0
+
+#endif
+
+#endif // BOOST_CONFIG_WORKAROUND_HPP
-// 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
-namespace detail
-{
+#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> struct addr_impl_ref
+template<class T>
+BOOST_CONSTEXPR inline T*
+addressof(T& o) BOOST_NOEXCEPT
{
- T & v_;
+ return __builtin_addressof(o);
+}
+
+} /* boost */
+#else
+#include <boost/config/workaround.hpp>
+#include <cstddef>
- BOOST_FORCEINLINE addr_impl_ref( T & v ): v_( v ) {}
- BOOST_FORCEINLINE operator T& () const { return v_; }
+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:
- addr_impl_ref & operator=(const addr_impl_ref &);
+ addressof_ref& operator=(const addressof_ref&);
+ T& o_;
};
-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)));
+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 * f( T * v, int )
- {
- return v;
+ 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( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) )
-
- typedef decltype(nullptr) addr_nullptr_t;
-
+#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 addr_nullptr_t;
-
+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;
+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;
+ }
+};
- 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
+
+} /* detail */
-template<> struct addressof_impl< addr_nullptr_t const volatile >
+#if defined(BOOST_NO_CXX11_SFINAE_EXPR) || \
+ 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
{
- typedef addr_nullptr_t const volatile T;
+#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
+}
- static BOOST_FORCEINLINE T * f( T & v, int )
- {
- return &v;
- }
+#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
-} // namespace detail
+#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>
+template<class T, std::size_t N>
BOOST_FORCEINLINE
-T * addressof( T & v )
+const T (*addressof(const T (&o)[N]) BOOST_NOEXCEPT)[N]
{
-#if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5120))
+ return reinterpret_cast<const T(*)[N]>(&o);
+}
+#endif
+#else
+namespace detail {
- return boost::detail::addressof_impl<T>::f( v, 0 );
+template<class T>
+T addressof_declval() BOOST_NOEXCEPT;
-#else
+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;
+};
- return boost::detail::addressof_impl<T>::f( boost::detail::addr_impl_ref<T>( v ), 0 );
+#if BOOST_WORKAROUND(BOOST_INTEL, < 1600)
+struct addressof_addressable { };
+addressof_addressable*
+operator&(addressof_addressable&) BOOST_NOEXCEPT;
#endif
-}
-#if defined( __SUNPRO_CC ) && BOOST_WORKAROUND( __SUNPRO_CC, BOOST_TESTED_AT( 0x590 ) )
+template<class T, class E = void>
+struct addressof_non_member_operator {
+ static constexpr bool value = false;
+};
-namespace detail
-{
+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> struct addressof_addp
-{
- typedef T * type;
+template<class T, class E = void>
+struct addressof_expression {
+ static constexpr bool value = false;
};
-} // namespace detail
+template<class T>
+struct addressof_expression<T,
+ typename addressof_void<decltype(&addressof_declval<T&>())>::type> {
+ static constexpr bool value = true;
+};
-template< class T, std::size_t N >
+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
-typename detail::addressof_addp< T[N] >::type addressof( T (&t)[N] )
+typename addressof_if<!addressof_is_constexpr<T>::value, T>::type
+addressof(T& o) BOOST_NOEXCEPT
{
- return &t;
+ return address_of<T>::get(addressof_ref<T>(o), 0);
}
-#endif
-
-// 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
+typename addressof_if<addressof_is_constexpr<T>::value, T>::type
+addressof(T& o) BOOST_NOEXCEPT
{
- return reinterpret_cast<T(*)[N]>(&t);
+ return &o;
}
-template<typename T,std::size_t N>
-BOOST_FORCEINLINE
-const T (*addressof(const T (&t)[N]))[N]
+} /* detail */
+
+template<class T>
+constexpr BOOST_FORCEINLINE T*
+addressof(T& o) BOOST_NOEXCEPT
{
- return reinterpret_cast<const T(*)[N]>(&t);
+ return detail::addressof(o);
}
#endif
-} // namespace boost
+} /* boost */
+#endif
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
+ !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
+namespace boost {
-#endif // BOOST_CORE_ADDRESSOF_HPP
+template<class T>
+const T* addressof(const T&&) = delete;
+
+} /* boost */
+#endif
+
+#endif
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
//----------------------------------------------------------------------
#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
+#include <boost/config/workaround.hpp>
#if !(defined BOOST_NO_EXCEPTIONS)
# define BOOST_TRY { try
#endif
#include <boost/config.hpp>
-#include <boost/utility/addressof.hpp>
-#include <boost/detail/workaround.hpp>
+#include <boost/config/workaround.hpp>
+#include <boost/core/addressof.hpp>
//
// ref.hpp - ref/cref, useful helper functions
|| (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \
|| defined(__CYGWIN__) \
|| defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \
- || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(sun)
+ || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || (defined(sun) && !defined(BOOST_HAS_STDINT_H)) || defined(INTPTR_MAX)
namespace boost {
using ::intptr_t;
#if defined(__GNUC__) && (__GNUC__ >= 4)
#pragma GCC system_header
#endif
+//
+// Undef the macros as a precaution, since we may get here if <stdint.h> has failed
+// to define them all, see https://svn.boost.org/trac/boost/ticket/12786
+//
+#undef INT8_C
+#undef INT16_C
+#undef INT32_C
+#undef INT64_C
+#undef INTMAX_C
+#undef UINT8_C
+#undef UINT16_C
+#undef UINT32_C
+#undef UINT64_C
+#undef UINTMAX_C
#include <limits.h>
# define BOOST__STDC_CONSTANT_MACROS_DEFINED
inline void current_function_helper()
{
-#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__)
+#if defined( BOOST_DISABLE_CURRENT_FUNCTION )
+
+# define BOOST_CURRENT_FUNCTION "(unknown)"
+
+#elif defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__)
# define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__
limits::radix == 10 && limits::digits10 > 0;
std::streamsize const streamsize_max =
(boost::integer_traits<std::streamsize>::max)();
+ (void)streamsize_max;
if(is_specialized_bin)
{ // Floating-point types with
+++ /dev/null
-#ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
-#define BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// boost/detail/lightweight_mutex.hpp - lightweight mutex
-//
-// Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd.
-//
-// 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/smart_ptr/detail/lightweight_mutex.hpp>
-
-#endif // #ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef WORKAROUND_DWA2002126_HPP
-# define WORKAROUND_DWA2002126_HPP
+#define WORKAROUND_DWA2002126_HPP
-// Compiler/library version workaround macro
-//
-// Usage:
-//
-// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-// // workaround for eVC4 and VC6
-// ... // workaround code here
-// #endif
-//
-// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the
-// first argument must be undefined or expand to a numeric
-// value. The above expands to:
-//
-// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300
-//
-// When used for workarounds that apply to the latest known version
-// and all earlier versions of a compiler, the following convention
-// should be observed:
-//
-// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301))
-//
-// The version number in this case corresponds to the last version in
-// which the workaround was known to have been required. When
-// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro
-// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates
-// the workaround for any version of the compiler. When
-// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or
-// error will be issued if the compiler version exceeds the argument
-// to BOOST_TESTED_AT(). This can be used to locate workarounds which
-// may be obsoleted by newer versions.
-
-# ifndef BOOST_STRICT_CONFIG
-
-#include <boost/config.hpp>
-
-#ifndef __BORLANDC__
-#define __BORLANDC___WORKAROUND_GUARD 1
-#else
-#define __BORLANDC___WORKAROUND_GUARD 0
-#endif
-#ifndef __CODEGEARC__
-#define __CODEGEARC___WORKAROUND_GUARD 1
-#else
-#define __CODEGEARC___WORKAROUND_GUARD 0
-#endif
-#ifndef _MSC_VER
-#define _MSC_VER_WORKAROUND_GUARD 1
-#else
-#define _MSC_VER_WORKAROUND_GUARD 0
-#endif
-#ifndef _MSC_FULL_VER
-#define _MSC_FULL_VER_WORKAROUND_GUARD 1
-#else
-#define _MSC_FULL_VER_WORKAROUND_GUARD 0
-#endif
-#ifndef BOOST_MSVC
-#define BOOST_MSVC_WORKAROUND_GUARD 1
-#else
-#define BOOST_MSVC_WORKAROUND_GUARD 0
-#endif
-#ifndef BOOST_MSVC_FULL_VER
-#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1
-#else
-#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0
-#endif
-#ifndef __GNUC__
-#define __GNUC___WORKAROUND_GUARD 1
-#else
-#define __GNUC___WORKAROUND_GUARD 0
-#endif
-#ifndef __GNUC_MINOR__
-#define __GNUC_MINOR___WORKAROUND_GUARD 1
-#else
-#define __GNUC_MINOR___WORKAROUND_GUARD 0
-#endif
-#ifndef __GNUC_PATCHLEVEL__
-#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1
-#else
-#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0
-#endif
-#ifndef __IBMCPP__
-#define __IBMCPP___WORKAROUND_GUARD 1
-#else
-#define __IBMCPP___WORKAROUND_GUARD 0
-#endif
-#ifndef __SUNPRO_CC
-#define __SUNPRO_CC_WORKAROUND_GUARD 1
-#else
-#define __SUNPRO_CC_WORKAROUND_GUARD 0
-#endif
-#ifndef __DECCXX_VER
-#define __DECCXX_VER_WORKAROUND_GUARD 1
-#else
-#define __DECCXX_VER_WORKAROUND_GUARD 0
-#endif
-#ifndef __MWERKS__
-#define __MWERKS___WORKAROUND_GUARD 1
-#else
-#define __MWERKS___WORKAROUND_GUARD 0
-#endif
-#ifndef __EDG__
-#define __EDG___WORKAROUND_GUARD 1
-#else
-#define __EDG___WORKAROUND_GUARD 0
-#endif
-#ifndef __EDG_VERSION__
-#define __EDG_VERSION___WORKAROUND_GUARD 1
-#else
-#define __EDG_VERSION___WORKAROUND_GUARD 0
-#endif
-#ifndef __HP_aCC
-#define __HP_aCC_WORKAROUND_GUARD 1
-#else
-#define __HP_aCC_WORKAROUND_GUARD 0
-#endif
-#ifndef __hpxstd98
-#define __hpxstd98_WORKAROUND_GUARD 1
-#else
-#define __hpxstd98_WORKAROUND_GUARD 0
-#endif
-#ifndef _CRAYC
-#define _CRAYC_WORKAROUND_GUARD 1
-#else
-#define _CRAYC_WORKAROUND_GUARD 0
-#endif
-#ifndef __DMC__
-#define __DMC___WORKAROUND_GUARD 1
-#else
-#define __DMC___WORKAROUND_GUARD 0
-#endif
-#ifndef MPW_CPLUS
-#define MPW_CPLUS_WORKAROUND_GUARD 1
-#else
-#define MPW_CPLUS_WORKAROUND_GUARD 0
-#endif
-#ifndef __COMO__
-#define __COMO___WORKAROUND_GUARD 1
-#else
-#define __COMO___WORKAROUND_GUARD 0
-#endif
-#ifndef __COMO_VERSION__
-#define __COMO_VERSION___WORKAROUND_GUARD 1
-#else
-#define __COMO_VERSION___WORKAROUND_GUARD 0
-#endif
-#ifndef __INTEL_COMPILER
-#define __INTEL_COMPILER_WORKAROUND_GUARD 1
-#else
-#define __INTEL_COMPILER_WORKAROUND_GUARD 0
-#endif
-#ifndef __ICL
-#define __ICL_WORKAROUND_GUARD 1
-#else
-#define __ICL_WORKAROUND_GUARD 0
-#endif
-#ifndef _COMPILER_VERSION
-#define _COMPILER_VERSION_WORKAROUND_GUARD 1
-#else
-#define _COMPILER_VERSION_WORKAROUND_GUARD 0
-#endif
-
-#ifndef _RWSTD_VER
-#define _RWSTD_VER_WORKAROUND_GUARD 1
-#else
-#define _RWSTD_VER_WORKAROUND_GUARD 0
-#endif
-#ifndef BOOST_RWSTD_VER
-#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1
-#else
-#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0
-#endif
-#ifndef __GLIBCPP__
-#define __GLIBCPP___WORKAROUND_GUARD 1
-#else
-#define __GLIBCPP___WORKAROUND_GUARD 0
-#endif
-#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
-#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1
-#else
-#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0
-#endif
-#ifndef __SGI_STL_PORT
-#define __SGI_STL_PORT_WORKAROUND_GUARD 1
-#else
-#define __SGI_STL_PORT_WORKAROUND_GUARD 0
-#endif
-#ifndef _STLPORT_VERSION
-#define _STLPORT_VERSION_WORKAROUND_GUARD 1
-#else
-#define _STLPORT_VERSION_WORKAROUND_GUARD 0
-#endif
-#ifndef __LIBCOMO_VERSION__
-#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1
-#else
-#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0
-#endif
-#ifndef _CPPLIB_VER
-#define _CPPLIB_VER_WORKAROUND_GUARD 1
-#else
-#define _CPPLIB_VER_WORKAROUND_GUARD 0
-#endif
-
-#ifndef BOOST_INTEL_CXX_VERSION
-#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1
-#else
-#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0
-#endif
-#ifndef BOOST_INTEL_WIN
-#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1
-#else
-#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0
-#endif
-#ifndef BOOST_DINKUMWARE_STDLIB
-#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1
-#else
-#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0
-#endif
-#ifndef BOOST_INTEL
-#define BOOST_INTEL_WORKAROUND_GUARD 1
-#else
-#define BOOST_INTEL_WORKAROUND_GUARD 0
-#endif
-// Always define to zero, if it's used it'll be defined my MPL:
-#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0
-
-# define BOOST_WORKAROUND(symbol, test) \
- ((symbol ## _WORKAROUND_GUARD + 0 == 0) && \
- (symbol != 0) && (1 % (( (symbol test) ) + 1)))
-// ^ ^ ^ ^
-// The extra level of parenthesis nesting above, along with the
-// BOOST_OPEN_PAREN indirection below, is required to satisfy the
-// broken preprocessor in MWCW 8.3 and earlier.
-//
-// The basic mechanism works as follows:
-// (symbol test) + 1 => if (symbol test) then 2 else 1
-// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0
-//
-// The complication with % is for cooperation with BOOST_TESTED_AT().
-// When "test" is BOOST_TESTED_AT(x) and
-// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined,
-//
-// symbol test => if (symbol <= x) then 1 else -1
-// (symbol test) + 1 => if (symbol <= x) then 2 else 0
-// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero
-//
-
-# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS
-# define BOOST_OPEN_PAREN (
-# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1
-# else
-# define BOOST_TESTED_AT(value) != ((value)-(value))
-# endif
-
-# else
-
-# define BOOST_WORKAROUND(symbol, test) 0
-
-# endif
+#include <boost/config/workaround.hpp>
#endif // WORKAROUND_DWA2002126_HPP
#pragma warning(push,1)
#endif
+#ifdef BOOST_EXCEPTION_MINI_BOOST
+#include <memory>
+namespace boost { namespace exception_detail { using std::shared_ptr; } }
+#else
+namespace boost { template <class T> class shared_ptr; };
+namespace boost { namespace exception_detail { using boost::shared_ptr; } }
+#endif
+
namespace
boost
{
# endif
#endif
- template <class T>
- class shared_ptr;
-
namespace
exception_detail
{
#!/usr/bin/perl -w
-# -*- mode: perl; -*-
#
# Boost.Function library
#
BOOST_FUNCTION_TEMPLATE_PARMS
>
class BOOST_FUNCTION_FUNCTION : public function_base
-
-#if BOOST_FUNCTION_NUM_ARGS == 1
-
- , public std::unary_function<T0,R>
-
-#elif BOOST_FUNCTION_NUM_ARGS == 2
-
- , public std::binary_function<T0,T1,R>
-
-#endif
-
{
public:
#ifndef BOOST_NO_VOID_RETURNS
hash_float_combine(seed, part);
}
- hash_float_combine(seed, exp);
+ hash_float_combine(seed, static_cast<std::size_t>(exp));
return seed;
}
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
template <class T> struct hash
- : std::unary_function<T, std::size_t>
+ : boost::hash_detail::hash_base<T>
{
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
std::size_t operator()(T const& val) const
#if BOOST_WORKAROUND(__DMC__, <= 0x848)
template <class T, unsigned int n> struct hash<T[n]>
- : std::unary_function<T[n], std::size_t>
+ : boost::hash_detail::hash_base<T[n]>
{
std::size_t operator()(const T* val) const
{
{
template <class T>
struct inner
- : std::unary_function<T, std::size_t>
+ : boost::hash_detail::hash_base<T>
{
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
std::size_t operator()(T const& val) const
{
namespace hash_detail
{
+#if defined(_HAS_AUTO_PTR_ETC) && !_HAS_AUTO_PTR_ETC
+ template <typename T>
+ struct hash_base
+ {
+ typedef T argument_type;
+ typedef std::size_t result_type;
+ };
+#else
+ template <typename T>
+ struct hash_base : std::unary_function<T, std::size_t> {};
+#endif
+
struct enable_hash_value { typedef std::size_t type; };
template <typename T> struct basic_numbers {};
boost::hash_detail::enable_hash_value {};
#endif
+#if !defined(BOOST_NO_CXX11_CHAR16_T)
+ template <> struct basic_numbers<char16_t> :
+ boost::hash_detail::enable_hash_value {};
+#endif
+
+#if !defined(BOOST_NO_CXX11_CHAR32_T)
+ template <> struct basic_numbers<char32_t> :
+ boost::hash_detail::enable_hash_value {};
+#endif
+
// long_numbers is defined like this to allow for separate
// specialization for long_long and int128_type, in case
// they conflict.
template <class T>
inline std::size_t hash_value_signed(T val)
{
- const int size_t_bits = std::numeric_limits<std::size_t>::digits;
+ const unsigned int size_t_bits = std::numeric_limits<std::size_t>::digits;
// ceiling(std::numeric_limits<T>::digits / size_t_bits) - 1
const int length = (std::numeric_limits<T>::digits - 1)
- / size_t_bits;
+ / static_cast<int>(size_t_bits);
std::size_t seed = 0;
T positive = val < 0 ? -1 - val : val;
template <class T>
inline std::size_t hash_value_unsigned(T val)
{
- const int size_t_bits = std::numeric_limits<std::size_t>::digits;
+ const unsigned int size_t_bits = std::numeric_limits<std::size_t>::digits;
// ceiling(std::numeric_limits<T>::digits / size_t_bits) - 1
const int length = (std::numeric_limits<T>::digits - 1)
- / size_t_bits;
+ / static_cast<int>(size_t_bits);
std::size_t seed = 0;
inline void hash_combine_impl(boost::uint64_t& h,
boost::uint64_t k)
{
- const uint64_t m = UINT64_C(0xc6a4a7935bd1e995);
+ const boost::uint64_t m = UINT64_C(0xc6a4a7935bd1e995);
const int r = 47;
k *= m;
#define BOOST_HASH_SPECIALIZE(type) \
template <> struct hash<type> \
- : public std::unary_function<type, std::size_t> \
+ : public boost::hash_detail::hash_base<type> \
{ \
std::size_t operator()(type v) const \
{ \
#define BOOST_HASH_SPECIALIZE_REF(type) \
template <> struct hash<type> \
- : public std::unary_function<type, std::size_t> \
+ : public boost::hash_detail::hash_base<type> \
{ \
std::size_t operator()(type const& v) const \
{ \
BOOST_HASH_SPECIALIZE(unsigned char)
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
BOOST_HASH_SPECIALIZE(wchar_t)
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR16_T)
+ BOOST_HASH_SPECIALIZE(char16_t)
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR32_T)
+ BOOST_HASH_SPECIALIZE(char32_t)
#endif
BOOST_HASH_SPECIALIZE(short)
BOOST_HASH_SPECIALIZE(unsigned short)
BOOST_HASH_SPECIALIZE(long double)
BOOST_HASH_SPECIALIZE_REF(std::string)
-#if !defined(BOOST_NO_STD_WSTRING)
+#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
BOOST_HASH_SPECIALIZE_REF(std::wstring)
#endif
+#if !defined(BOOST_NO_CXX11_CHAR16_T)
+ BOOST_HASH_SPECIALIZE_REF(std::basic_string<char16_t>)
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR32_T)
+ BOOST_HASH_SPECIALIZE_REF(std::basic_string<char32_t>)
+#endif
#if !defined(BOOST_NO_LONG_LONG)
BOOST_HASH_SPECIALIZE(boost::long_long_type)
template <class T>
struct hash<T*>
- : public std::unary_function<T*, std::size_t>
+ : public boost::hash_detail::hash_base<T*>
{
std::size_t operator()(T* v) const
{
{
template <class T>
struct inner
- : public std::unary_function<T, std::size_t>
+ : public boost::hash_detail::hash_base<T>
{
std::size_t operator()(T val) const
{
--- /dev/null
+// Boost common_factor_ct.hpp header file ----------------------------------//
+
+// (C) Copyright Daryle Walker and Stephen Cleary 2001-2002.
+// 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)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#ifndef BOOST_INTEGER_COMMON_FACTOR_CT_HPP
+#define BOOST_INTEGER_COMMON_FACTOR_CT_HPP
+
+#include <boost/integer_fwd.hpp> // self include
+#include <boost/config.hpp> // for BOOST_STATIC_CONSTANT, etc.
+
+namespace boost
+{
+namespace integer
+{
+
+// Implementation details --------------------------------------------------//
+
+namespace detail
+{
+ // Build GCD with Euclid's recursive algorithm
+ template < static_gcd_type Value1, static_gcd_type Value2 >
+ struct static_gcd_helper_t
+ {
+ private:
+ BOOST_STATIC_CONSTANT( static_gcd_type, new_value1 = Value2 );
+ BOOST_STATIC_CONSTANT( static_gcd_type, new_value2 = Value1 % Value2 );
+
+ #ifndef __BORLANDC__
+ #define BOOST_DETAIL_GCD_HELPER_VAL(Value) static_cast<static_gcd_type>(Value)
+ #else
+ typedef static_gcd_helper_t self_type;
+ #define BOOST_DETAIL_GCD_HELPER_VAL(Value) (self_type:: Value )
+ #endif
+
+ typedef static_gcd_helper_t< BOOST_DETAIL_GCD_HELPER_VAL(new_value1),
+ BOOST_DETAIL_GCD_HELPER_VAL(new_value2) > next_step_type;
+
+ #undef BOOST_DETAIL_GCD_HELPER_VAL
+
+ public:
+ BOOST_STATIC_CONSTANT( static_gcd_type, value = next_step_type::value );
+ };
+
+ // Non-recursive case
+ template < static_gcd_type Value1 >
+ struct static_gcd_helper_t< Value1, 0UL >
+ {
+ BOOST_STATIC_CONSTANT( static_gcd_type, value = Value1 );
+ };
+
+ // Build the LCM from the GCD
+ template < static_gcd_type Value1, static_gcd_type Value2 >
+ struct static_lcm_helper_t
+ {
+ typedef static_gcd_helper_t<Value1, Value2> gcd_type;
+
+ BOOST_STATIC_CONSTANT( static_gcd_type, value = Value1 / gcd_type::value
+ * Value2 );
+ };
+
+ // Special case for zero-GCD values
+ template < >
+ struct static_lcm_helper_t< 0UL, 0UL >
+ {
+ BOOST_STATIC_CONSTANT( static_gcd_type, value = 0UL );
+ };
+
+} // namespace detail
+
+
+// Compile-time greatest common divisor evaluator class declaration --------//
+
+template < static_gcd_type Value1, static_gcd_type Value2 > struct static_gcd
+{
+ BOOST_STATIC_CONSTANT( static_gcd_type, value = (detail::static_gcd_helper_t<Value1, Value2>::value) );
+}; // boost::integer::static_gcd
+
+#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
+template< static_gcd_type Value1, static_gcd_type Value2 > static_gcd_type const static_gcd< Value1, Value2 >::value;
+#endif
+
+// Compile-time least common multiple evaluator class declaration ----------//
+
+template < static_gcd_type Value1, static_gcd_type Value2 > struct static_lcm
+{
+ BOOST_STATIC_CONSTANT( static_gcd_type, value = (detail::static_lcm_helper_t<Value1, Value2>::value) );
+}; // boost::integer::static_lcm
+
+#if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
+template< static_gcd_type Value1, static_gcd_type Value2 > static_gcd_type const static_lcm< Value1, Value2 >::value;
+#endif
+
+} // namespace integer
+} // namespace boost
+
+
+#endif // BOOST_INTEGER_COMMON_FACTOR_CT_HPP
struct static_unsigned_max;
+namespace integer
+{
// From <boost/integer/common_factor_ct.hpp>
#ifdef BOOST_NO_INTEGRAL_INT64_T
template < typename IntegerType >
class lcm_evaluator;
+} // namespace integer
} // namespace boost
--- /dev/null
+// Copyright (C) 2017 Michel Morin.
+//
+// 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_ITERATOR_ADVANCE_HPP
+#define BOOST_ITERATOR_ADVANCE_HPP
+
+#include <boost/config.hpp>
+#include <boost/iterator/iterator_categories.hpp>
+
+namespace boost {
+namespace iterators {
+
+ namespace detail {
+ template <typename InputIterator, typename Distance>
+ inline BOOST_CXX14_CONSTEXPR void
+ advance_impl(
+ InputIterator& it
+ , Distance n
+ , incrementable_traversal_tag
+ )
+ {
+ while (n > 0) {
+ ++it;
+ --n;
+ }
+ }
+
+ template <typename BidirectionalIterator, typename Distance>
+ inline BOOST_CXX14_CONSTEXPR void
+ advance_impl(
+ BidirectionalIterator& it
+ , Distance n
+ , bidirectional_traversal_tag
+ )
+ {
+ if (n >= 0) {
+ while (n > 0) {
+ ++it;
+ --n;
+ }
+ }
+ else {
+ while (n < 0) {
+ --it;
+ ++n;
+ }
+ }
+ }
+
+ template <typename RandomAccessIterator, typename Distance>
+ inline BOOST_CXX14_CONSTEXPR void
+ advance_impl(
+ RandomAccessIterator& it
+ , Distance n
+ , random_access_traversal_tag
+ )
+ {
+ it += n;
+ }
+ }
+
+ namespace advance_adl_barrier {
+ template <typename InputIterator, typename Distance>
+ inline BOOST_CXX14_CONSTEXPR void
+ advance(InputIterator& it, Distance n)
+ {
+ detail::advance_impl(
+ it, n, typename iterator_traversal<InputIterator>::type()
+ );
+ }
+ }
+
+ using namespace advance_adl_barrier;
+
+} // namespace iterators
+
+using iterators::advance;
+
+} // namespace boost
+
+#endif
#ifndef BOOST_REVERSE_ITERATOR_23022003THW_HPP
#define BOOST_REVERSE_ITERATOR_23022003THW_HPP
-#include <boost/next_prior.hpp>
#include <boost/iterator.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
{}
private:
- typename super_t::reference dereference() const { return *boost::prior(this->base()); }
+ typename super_t::reference dereference() const
+ {
+ Iterator it = this->base_reference();
+ --it;
+ return *it;
+ }
void increment() { --this->base_reference(); }
void decrement() { ++this->base_reference(); }
void advance(typename super_t::difference_type n)
{
- this->base_reference() += -n;
+ this->base_reference() -= n;
}
template <class OtherIterator>
// Copyright Kevlin Henney, 2000-2005.
// Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2014.
+// Copyright Antony Polukhin, 2011-2016.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
-// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
+// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014, Nowember 2016
#ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_STREAMS_HPP
#define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_STREAMS_HPP
namespace detail
{
- struct do_not_construct_out_stream_t{};
-
+ struct do_not_construct_out_buffer_t{};
+ struct do_not_construct_out_stream_t{
+ do_not_construct_out_stream_t(do_not_construct_out_buffer_t*){}
+ };
+
template <class CharT, class Traits>
struct out_stream_helper_trait {
#if defined(BOOST_NO_STRINGSTREAM)
- typedef std::ostrstream out_stream_t;
- typedef void buffer_t;
+ typedef std::ostream out_stream_t;
+ typedef basic_unlockedbuf<std::strstreambuf, char> stringbuffer_t;
#elif defined(BOOST_NO_STD_LOCALE)
- typedef std::ostringstream out_stream_t;
- typedef basic_unlockedbuf<std::streambuf, char> buffer_t;
+ typedef std::ostream out_stream_t;
+ typedef basic_unlockedbuf<std::stringbuf, char> stringbuffer_t;
+ typedef basic_unlockedbuf<std::streambuf, char> buffer_t;
#else
- typedef std::basic_ostringstream<CharT, Traits>
- out_stream_t;
- typedef basic_unlockedbuf<std::basic_streambuf<CharT, Traits>, CharT>
- buffer_t;
+ typedef std::basic_ostream<CharT, Traits> out_stream_t;
+ typedef basic_unlockedbuf<std::basic_stringbuf<CharT, Traits>, CharT> stringbuffer_t;
+ typedef basic_unlockedbuf<std::basic_streambuf<CharT, Traits>, CharT> buffer_t;
#endif
- };
+ };
}
namespace detail // optimized stream wrappers
, std::size_t CharacterBufferSize
>
class lexical_istream_limited_src: boost::noncopyable {
- typedef BOOST_DEDUCED_TYPENAME out_stream_helper_trait<CharT, Traits>::buffer_t
- buffer_t;
-
- typedef BOOST_DEDUCED_TYPENAME out_stream_helper_trait<CharT, Traits>::out_stream_t
- out_stream_t;
-
typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
RequiresStringbuffer,
- out_stream_t,
+ BOOST_DEDUCED_TYPENAME out_stream_helper_trait<CharT, Traits>::out_stream_t,
do_not_construct_out_stream_t
>::type deduced_out_stream_t;
- // A string representation of Source is written to `buffer`.
+ typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
+ RequiresStringbuffer,
+ BOOST_DEDUCED_TYPENAME out_stream_helper_trait<CharT, Traits>::stringbuffer_t,
+ do_not_construct_out_buffer_t
+ >::type deduced_out_buffer_t;
+
+ deduced_out_buffer_t out_buffer;
deduced_out_stream_t out_stream;
CharT buffer[CharacterBufferSize];
public:
lexical_istream_limited_src() BOOST_NOEXCEPT
- : start(buffer)
+ : out_buffer()
+ , out_stream(&out_buffer)
+ , start(buffer)
, finish(buffer + CharacterBufferSize)
{}
}
private:
- // Undefined:
- lexical_istream_limited_src(lexical_istream_limited_src const&);
- void operator=(lexical_istream_limited_src const&);
-
/************************************ HELPER FUNCTIONS FOR OPERATORS << ( ... ) ********************************/
bool shl_char(CharT ch) BOOST_NOEXCEPT {
Traits::assign(buffer[0], ch);
"Use boost::locale instead" );
return shl_input_streamable(str);
}
-
+
bool shl_char_array_limited(CharT const* str, std::size_t max_size) BOOST_NOEXCEPT {
start = str;
finish = std::find(start, start + max_size, Traits::to_char_type(0));
try {
#endif
bool const result = !(out_stream << input).fail();
- const buffer_t* const p = static_cast<buffer_t*>(
- static_cast<std::basic_streambuf<CharT, Traits>*>(out_stream.rdbuf())
+ const deduced_out_buffer_t* const p = static_cast<deduced_out_buffer_t*>(
+ out_stream.rdbuf()
);
start = p->pbase();
finish = p->pptr();
"support such conversions. Try updating it."
);
#endif
- typedef BOOST_DEDUCED_TYPENAME out_stream_helper_trait<CharT, Traits>::buffer_t
- buffer_t;
#if defined(BOOST_NO_STRINGSTREAM)
- std::istrstream stream(start, finish - start);
+ std::istrstream stream(start, static_cast<std::istrstream::streamsize>(finish - start));
#else
-
+ typedef BOOST_DEDUCED_TYPENAME out_stream_helper_trait<CharT, Traits>::buffer_t buffer_t;
buffer_t buf;
// Usually `istream` and `basic_istream` do not modify
// content of buffer; `buffer_t` assures that this is true
- buf.setbuf(const_cast<CharT*>(start), finish - start);
+ buf.setbuf(const_cast<CharT*>(start), static_cast<typename buffer_t::streamsize>(finish - start));
#if defined(BOOST_NO_STD_LOCALE)
std::istream stream(&buf);
#else
// Copyright Kevlin Henney, 2000-2005.
// Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2014.
+// Copyright Antony Polukhin, 2011-2016.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
-// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
+// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2016
#ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_NUMERIC_HPP
#define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_NUMERIC_HPP
{
static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT {
typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
- boost::is_unsigned<Target>::value &&
- (boost::is_signed<Source>::value || boost::is_float<Source>::value) &&
- !(boost::is_same<Source, bool>::value) &&
- !(boost::is_same<Target, bool>::value),
+ boost::is_unsigned<Target>::value &&
+ (boost::is_signed<Source>::value || boost::is_float<Source>::value) &&
+ !(boost::is_same<Source, bool>::value) &&
+ !(boost::is_same<Target, bool>::value),
lexical_cast_dynamic_num_ignoring_minus<Target, Source>,
lexical_cast_dynamic_num_not_ignoring_minus<Target, Source>
>::type caster_type;
-
-#if 0
-
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
- BOOST_DEDUCED_TYPENAME boost::mpl::and_<
- boost::is_unsigned<Target>,
- boost::mpl::or_<
- boost::is_signed<Source>,
- boost::is_float<Source>
- >,
- boost::mpl::not_<
- boost::is_same<Source, bool>
- >,
- boost::mpl::not_<
- boost::is_same<Target, bool>
- >
- >::type,
- lexical_cast_dynamic_num_ignoring_minus<Target, Source>,
- lexical_cast_dynamic_num_not_ignoring_minus<Target, Source>
- >::type caster_type;
-
-#endif
return caster_type::try_convert(arg, result);
}
// Boost common_factor_ct.hpp header file ----------------------------------//
-// (C) Copyright Daryle Walker and Stephen Cleary 2001-2002.
+// (C) Copyright John Maddock 2017.
// 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_MATH_COMMON_FACTOR_CT_HPP
#define BOOST_MATH_COMMON_FACTOR_CT_HPP
-#include <boost/math_fwd.hpp> // self include
-#include <boost/config.hpp> // for BOOST_STATIC_CONSTANT, etc.
-#include <boost/mpl/integral_c.hpp>
+#include <boost/integer/common_factor_ct.hpp>
namespace boost
{
namespace math
{
-// Implementation details --------------------------------------------------//
-
-namespace detail
-{
- // Build GCD with Euclid's recursive algorithm
- template < static_gcd_type Value1, static_gcd_type Value2 >
- struct static_gcd_helper_t
- {
- private:
- BOOST_STATIC_CONSTANT( static_gcd_type, new_value1 = Value2 );
- BOOST_STATIC_CONSTANT( static_gcd_type, new_value2 = Value1 % Value2 );
-
- #ifndef __BORLANDC__
- #define BOOST_DETAIL_GCD_HELPER_VAL(Value) static_cast<static_gcd_type>(Value)
- #else
- typedef static_gcd_helper_t self_type;
- #define BOOST_DETAIL_GCD_HELPER_VAL(Value) (self_type:: Value )
- #endif
-
- typedef static_gcd_helper_t< BOOST_DETAIL_GCD_HELPER_VAL(new_value1),
- BOOST_DETAIL_GCD_HELPER_VAL(new_value2) > next_step_type;
-
- #undef BOOST_DETAIL_GCD_HELPER_VAL
-
- public:
- BOOST_STATIC_CONSTANT( static_gcd_type, value = next_step_type::value );
- };
-
- // Non-recursive case
- template < static_gcd_type Value1 >
- struct static_gcd_helper_t< Value1, 0UL >
- {
- BOOST_STATIC_CONSTANT( static_gcd_type, value = Value1 );
- };
-
- // Build the LCM from the GCD
- template < static_gcd_type Value1, static_gcd_type Value2 >
- struct static_lcm_helper_t
- {
- typedef static_gcd_helper_t<Value1, Value2> gcd_type;
-
- BOOST_STATIC_CONSTANT( static_gcd_type, value = Value1 / gcd_type::value
- * Value2 );
- };
-
- // Special case for zero-GCD values
- template < >
- struct static_lcm_helper_t< 0UL, 0UL >
- {
- BOOST_STATIC_CONSTANT( static_gcd_type, value = 0UL );
- };
-
-} // namespace detail
-
-
-// Compile-time greatest common divisor evaluator class declaration --------//
-
-template < static_gcd_type Value1, static_gcd_type Value2 >
-struct static_gcd : public mpl::integral_c<static_gcd_type, (detail::static_gcd_helper_t<Value1, Value2>::value) >
-{
-}; // boost::math::static_gcd
-
-
-// Compile-time least common multiple evaluator class declaration ----------//
-
-template < static_gcd_type Value1, static_gcd_type Value2 >
-struct static_lcm : public mpl::integral_c<static_gcd_type, (detail::static_lcm_helper_t<Value1, Value2>::value) >
-{
-}; // boost::math::static_lcm
-
+ using boost::integer::static_gcd;
+ using boost::integer::static_lcm;
+ using boost::integer::static_gcd_type;
} // namespace math
} // namespace boost
#pragma once
#endif
+#include <vector>
#include <boost/math/special_functions/detail/round_fwd.hpp>
#include <boost/math/tools/promotion.hpp> // for argument promotion.
#include <boost/math/policies/policy.hpp>
template <class T>
typename tools::promote_args<T>::type
legendre_p(int l, T x);
+ template <class T>
+ typename tools::promote_args<T>::type
+ legendre_p_prime(int l, T x);
+
+
+ template <class T, class Policy>
+ inline std::vector<T> legendre_p_zeros(int l, const Policy& pol);
+
+ template <class T>
+ inline std::vector<T> legendre_p_zeros(int l);
+
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
template <class T, class Policy>
typename boost::enable_if_c<policies::is_policy<Policy>::value, typename tools::promote_args<T>::type>::type
legendre_p(int l, T x, const Policy& pol);
+ template <class T, class Policy>
+ inline typename boost::enable_if_c<policies::is_policy<Policy>::value, typename tools::promote_args<T>::type>::type
+ legendre_p_prime(int l, T x, const Policy& pol);
#endif
template <class T>
typename tools::promote_args<T>::type
bessel_maybe_int_tag
>::type
>::type optimisation_tag;
+ typedef typename mpl::if_<
+ mpl::or_<
+ mpl::less_equal<precision_type, mpl::int_<0> >,
+ mpl::greater<precision_type, mpl::int_<113> > >,
+ bessel_no_int_tag,
+ typename mpl::if_<
+ is_integral<T1>,
+ bessel_int_tag,
+ bessel_maybe_int_tag
+ >::type
+ >::type optimisation_tag128;
};
} // detail
template <class T>\
inline typename boost::math::tools::promote_args<T>::type \
legendre_p(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type \
+ legendre_p_prime(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\
\
template <class T>\
inline typename boost::math::tools::promote_args<T>::type \
#endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP
-
-
template<class T>
inline int signbit_impl(T x, native_tag const&)
{
- return (std::signbit)(x);
+ return (std::signbit)(x) ? 1 : 0;
}
#endif
#if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \
|| (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \
&& !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)
-# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+//# define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
#endif
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
//
+++ /dev/null
-// Boost math_fwd.hpp header file ------------------------------------------//
-
-// (C) Copyright Hubert Holin and Daryle Walker 2001-2002. 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)
-
-// See http://www.boost.org/libs/math for documentation.
-
-#ifndef BOOST_MATH_FWD_HPP
-#define BOOST_MATH_FWD_HPP
-
-#include <boost/cstdint.hpp>
-
-namespace boost
-{
-namespace math
-{
-
-
-// From <boost/math/quaternion.hpp> ----------------------------------------//
-
-template < typename T >
- class quaternion;
-
-template < >
- class quaternion< float >;
-template < >
- class quaternion< double >;
-template < >
- class quaternion< long double >;
-
-// Also has many function templates (including operators)
-
-
-// From <boost/math/octonion.hpp> ------------------------------------------//
-
-template < typename T >
- class octonion;
-
-template < >
- class octonion< float >;
-template < >
- class octonion< double >;
-template < >
- class octonion< long double >;
-
-// Also has many function templates (including operators)
-
-
-// From <boost/math/special_functions/acosh.hpp> ---------------------------//
-
-// Only has function template
-
-
-// From <boost/math/special_functions/asinh.hpp> ---------------------------//
-
-// Only has function template
-
-
-// From <boost/math/special_functions/atanh.hpp> ---------------------------//
-
-// Only has function template
-
-
-// From <boost/math/special_functions/sinc.hpp> ----------------------------//
-
-// Only has function templates
-
-
-// From <boost/math/special_functions/sinhc.hpp> ---------------------------//
-
-// Only has function templates
-
-
-// From <boost/math/common_factor.hpp> -------------------------------------//
-
-// Only #includes other headers
-
-
-// From <boost/math/common_factor_ct.hpp> ----------------------------------//
-
-#ifdef BOOST_NO_INTEGRAL_INT64_T
- typedef unsigned long static_gcd_type;
-#else
- typedef boost::uintmax_t static_gcd_type;
-#endif
-
-template < static_gcd_type Value1, static_gcd_type Value2 >
- struct static_gcd;
-template < static_gcd_type Value1, static_gcd_type Value2 >
- struct static_lcm;
-
-} // namespace math
-} // namespace boost
-
-
-#endif // BOOST_MATH_FWD_HPP
#include <boost/move/utility_core.hpp>
#include <boost/move/detail/iterator_traits.hpp>
+#include <boost/move/detail/iterator_to_raw_pointer.hpp>
#include <boost/detail/no_exceptions_support.hpp>
namespace boost {
}
BOOST_CATCH(...){
for (; back != r; ++back){
- back->~input_value_type();
+ boost::movelib::iterator_to_raw_pointer(back)->~input_value_type();
}
BOOST_RETHROW;
}
--- /dev/null
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2014-2015. 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)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_MOVE_DETAIL_ITERATOR_TO_RAW_POINTER_HPP
+#define BOOST_MOVE_DETAIL_ITERATOR_TO_RAW_POINTER_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/move/detail/iterator_traits.hpp>
+#include <boost/move/detail/to_raw_pointer.hpp>
+#include <boost/move/detail/pointer_element.hpp>
+
+namespace boost {
+namespace movelib {
+namespace detail {
+
+template <class T>
+inline T* iterator_to_pointer(T* i)
+{ return i; }
+
+template <class Iterator>
+inline typename boost::movelib::iterator_traits<Iterator>::pointer
+ iterator_to_pointer(const Iterator &i)
+{ return i.operator->(); }
+
+template <class Iterator>
+struct iterator_to_element_ptr
+{
+ typedef typename boost::movelib::iterator_traits<Iterator>::pointer pointer;
+ typedef typename boost::movelib::pointer_element<pointer>::type element_type;
+ typedef element_type* type;
+};
+
+} //namespace detail {
+
+template <class Iterator>
+inline typename boost::movelib::detail::iterator_to_element_ptr<Iterator>::type
+ iterator_to_raw_pointer(const Iterator &i)
+{
+ return ::boost::movelib::to_raw_pointer
+ ( ::boost::movelib::detail::iterator_to_pointer(i) );
+}
+
+} //namespace movelib {
+} //namespace boost {
+
+#endif //#ifndef BOOST_MOVE_DETAIL_ITERATOR_TO_RAW_POINTER_HPP
--- /dev/null
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2014-2017. 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_MOVE_DETAIL_POINTER_ELEMENT_HPP
+#define BOOST_MOVE_DETAIL_POINTER_ELEMENT_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP
+#include <boost/move/detail/workaround.hpp>
+#endif //BOOST_MOVE_DETAIL_WORKAROUND_HPP
+
+namespace boost {
+namespace movelib {
+namespace detail{
+
+//////////////////////
+//struct first_param
+//////////////////////
+
+template <typename T> struct first_param
+{ typedef void type; };
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ template <template <typename, typename...> class TemplateClass, typename T, typename... Args>
+ struct first_param< TemplateClass<T, Args...> >
+ {
+ typedef T type;
+ };
+
+#else //C++03 compilers
+
+ template < template //0arg
+ <class
+ > class TemplateClass, class T
+ >
+ struct first_param
+ < TemplateClass<T> >
+ { typedef T type; };
+
+ template < template //1arg
+ <class,class
+ > class TemplateClass, class T
+ , class P0>
+ struct first_param
+ < TemplateClass<T, P0> >
+ { typedef T type; };
+
+ template < template //2arg
+ <class,class,class
+ > class TemplateClass, class T
+ , class P0, class P1>
+ struct first_param
+ < TemplateClass<T, P0, P1> >
+ { typedef T type; };
+
+ template < template //3arg
+ <class,class,class,class
+ > class TemplateClass, class T
+ , class P0, class P1, class P2>
+ struct first_param
+ < TemplateClass<T, P0, P1, P2> >
+ { typedef T type; };
+
+ template < template //4arg
+ <class,class,class,class,class
+ > class TemplateClass, class T
+ , class P0, class P1, class P2, class P3>
+ struct first_param
+ < TemplateClass<T, P0, P1, P2, P3> >
+ { typedef T type; };
+
+ template < template //5arg
+ <class,class,class,class,class,class
+ > class TemplateClass, class T
+ , class P0, class P1, class P2, class P3, class P4>
+ struct first_param
+ < TemplateClass<T, P0, P1, P2, P3, P4> >
+ { typedef T type; };
+
+ template < template //6arg
+ <class,class,class,class,class,class,class
+ > class TemplateClass, class T
+ , class P0, class P1, class P2, class P3, class P4, class P5>
+ struct first_param
+ < TemplateClass<T, P0, P1, P2, P3, P4, P5> >
+ { typedef T type; };
+
+ template < template //7arg
+ <class,class,class,class,class,class,class,class
+ > class TemplateClass, class T
+ , class P0, class P1, class P2, class P3, class P4, class P5, class P6>
+ struct first_param
+ < TemplateClass<T, P0, P1, P2, P3, P4, P5, P6> >
+ { typedef T type; };
+
+ template < template //8arg
+ <class,class,class,class,class,class,class,class,class
+ > class TemplateClass, class T
+ , class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7>
+ struct first_param
+ < TemplateClass<T, P0, P1, P2, P3, P4, P5, P6, P7> >
+ { typedef T type; };
+
+ template < template //9arg
+ <class,class,class,class,class,class,class,class,class,class
+ > class TemplateClass, class T
+ , class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8>
+ struct first_param
+ < TemplateClass<T, P0, P1, P2, P3, P4, P5, P6, P7, P8> >
+ { typedef T type; };
+
+#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+template <typename T>
+struct has_internal_pointer_element
+{
+ template <typename X>
+ static char test(int, typename X::element_type*);
+
+ template <typename X>
+ static int test(...);
+
+ static const bool value = (1 == sizeof(test<T>(0, 0)));
+};
+
+template<class Ptr, bool = has_internal_pointer_element<Ptr>::value>
+struct pointer_element_impl
+{
+ typedef typename Ptr::element_type type;
+};
+
+template<class Ptr>
+struct pointer_element_impl<Ptr, false>
+{
+ typedef typename boost::movelib::detail::first_param<Ptr>::type type;
+};
+
+} //namespace detail{
+
+template <typename Ptr>
+struct pointer_element
+{
+ typedef typename ::boost::movelib::detail::pointer_element_impl<Ptr>::type type;
+};
+
+template <typename T>
+struct pointer_element<T*>
+{ typedef T type; };
+
+} //namespace movelib {
+} //namespace boost {
+
+#endif // defined(BOOST_MOVE_DETAIL_POINTER_ELEMENT_HPP)
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2017-2017
+//
+// 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)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_MOVE_DETAIL_TO_RAW_POINTER_HPP
+#define BOOST_MOVE_DETAIL_TO_RAW_POINTER_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/move/detail/config_begin.hpp>
+#include <boost/move/detail/workaround.hpp>
+#include <boost/move/detail/pointer_element.hpp>
+
+namespace boost {
+namespace movelib {
+
+template <class T>
+BOOST_MOVE_FORCEINLINE T* to_raw_pointer(T* p)
+{ return p; }
+
+template <class Pointer>
+BOOST_MOVE_FORCEINLINE typename boost::movelib::pointer_element<Pointer>::type*
+to_raw_pointer(const Pointer &p)
+{ return ::boost::movelib::to_raw_pointer(p.operator->()); }
+
+} //namespace movelib
+} //namespace boost
+
+#include <boost/move/detail/config_end.hpp>
+
+#endif //BOOST_MOVE_DETAIL_TO_RAW_POINTER_HPP
#define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG
#endif
-#define BOOST_MOVE_DISABLE_FORCEINLINE
-
#if defined(BOOST_MOVE_DISABLE_FORCEINLINE)
#define BOOST_MOVE_FORCEINLINE inline
#elif defined(BOOST_MOVE_FORCEINLINE_IS_BOOST_FORCELINE)
#elif defined(BOOST_MSVC) && defined(_DEBUG)
//"__forceinline" and MSVC seems to have some bugs in debug mode
#define BOOST_MOVE_FORCEINLINE inline
+#elif defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ < 5)))
+ //Older GCCs have problems with forceinline
+ #define BOOST_MOVE_FORCEINLINE inline
#else
#define BOOST_MOVE_FORCEINLINE BOOST_FORCEINLINE
#endif
--- /dev/null
+
+#ifndef BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
+#define BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id$
+// $Date$
+// $Revision$
+
+#include <boost/mpl/placeholders.hpp>
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/insert.hpp>
+#include <boost/mpl/clear.hpp>
+#include <boost/mpl/joint_view.hpp>
+#include <boost/mpl/iterator_range.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/iter_push_front.hpp>
+#include <boost/mpl/aux_/traits_lambda_spec.hpp>
+#include <boost/mpl/aux_/config/forwarding.hpp>
+
+#include <boost/type_traits/same_traits.hpp>
+
+namespace boost { namespace mpl {
+
+// default implementation; conrete sequences might override it by
+// specializing either the 'insert_range_impl' or the primary
+// 'insert_range' template
+
+
+template< typename Tag >
+struct insert_range_impl
+{
+ template<
+ typename Sequence
+ , typename Pos
+ , typename Range
+ >
+ struct apply
+#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
+ : reverse_fold<
+ joint_view<
+ iterator_range<typename begin<Sequence>::type,Pos>
+ , joint_view<
+ Range
+ , iterator_range<Pos,typename end<Sequence>::type>
+ >
+ >
+ , typename clear<Sequence>::type
+ , insert<_1, begin<_1>, _2>
+ >
+ {
+#else
+ {
+ typedef typename reverse_fold<
+ joint_view<
+ iterator_range<typename begin<Sequence>::type,Pos>
+ , joint_view<
+ Range
+ , iterator_range<Pos,typename end<Sequence>::type>
+ >
+ >
+ , typename clear<Sequence>::type
+ , insert<_1, begin<_1>, _2>
+ >::type type;
+#endif
+ };
+};
+
+BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_range_impl)
+
+}}
+
+#endif // BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED
--- /dev/null
+
+#ifndef BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED
+#define BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2002-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id$
+// $Date$
+// $Revision$
+
+#include <boost/mpl/push_front.hpp>
+#include <boost/mpl/deref.hpp>
+
+namespace boost { namespace mpl { namespace aux {
+
+template<
+ typename Sequence
+ , typename Iterator
+ >
+struct iter_push_front
+{
+ typedef typename push_front<
+ Sequence
+ , typename deref<Iterator>::type
+ >::type type;
+};
+
+}}}
+
+#endif // BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED
--- /dev/null
+
+#ifndef BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
+#define BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id$
+// $Date$
+// $Revision$
+
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/aux_/lambda_spec.hpp>
+#include <boost/mpl/aux_/config/ctps.hpp>
+
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+# include <boost/type_traits/is_same.hpp>
+#endif
+
+namespace boost { namespace mpl {
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+
+template<
+ typename Iterator1
+ , typename LastIterator1
+ , typename Iterator2
+ >
+struct joint_iter
+{
+ typedef Iterator1 base;
+ typedef forward_iterator_tag category;
+};
+
+template<
+ typename LastIterator1
+ , typename Iterator2
+ >
+struct joint_iter<LastIterator1,LastIterator1,Iterator2>
+{
+ typedef Iterator2 base;
+ typedef forward_iterator_tag category;
+};
+
+
+template< typename I1, typename L1, typename I2 >
+struct deref< joint_iter<I1,L1,I2> >
+{
+ typedef typename joint_iter<I1,L1,I2>::base base_;
+ typedef typename deref<base_>::type type;
+};
+
+template< typename I1, typename L1, typename I2 >
+struct next< joint_iter<I1,L1,I2> >
+{
+ typedef joint_iter< typename mpl::next<I1>::type,L1,I2 > type;
+};
+
+template< typename L1, typename I2 >
+struct next< joint_iter<L1,L1,I2> >
+{
+ typedef joint_iter< L1,L1,typename mpl::next<I2>::type > type;
+};
+
+#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+template<
+ typename Iterator1
+ , typename LastIterator1
+ , typename Iterator2
+ >
+struct joint_iter;
+
+template< bool > struct joint_iter_impl
+{
+ template< typename I1, typename L1, typename I2 > struct result_
+ {
+ typedef I1 base;
+ typedef forward_iterator_tag category;
+ typedef joint_iter< typename mpl::next<I1>::type,L1,I2 > next;
+ typedef typename deref<I1>::type type;
+ };
+};
+
+template<> struct joint_iter_impl<true>
+{
+ template< typename I1, typename L1, typename I2 > struct result_
+ {
+ typedef I2 base;
+ typedef forward_iterator_tag category;
+ typedef joint_iter< L1,L1,typename mpl::next<I2>::type > next;
+ typedef typename deref<I2>::type type;
+ };
+};
+
+template<
+ typename Iterator1
+ , typename LastIterator1
+ , typename Iterator2
+ >
+struct joint_iter
+ : joint_iter_impl< is_same<Iterator1,LastIterator1>::value >
+ ::template result_<Iterator1,LastIterator1,Iterator2>
+{
+};
+
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, joint_iter)
+
+}}
+
+#endif // BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED
--- /dev/null
+
+#ifndef BOOST_MPL_INSERT_RANGE_HPP_INCLUDED
+#define BOOST_MPL_INSERT_RANGE_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id$
+// $Date$
+// $Revision$
+
+#include <boost/mpl/insert_range_fwd.hpp>
+#include <boost/mpl/sequence_tag.hpp>
+#include <boost/mpl/aux_/insert_range_impl.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
+
+namespace boost { namespace mpl {
+
+template<
+ typename BOOST_MPL_AUX_NA_PARAM(Sequence)
+ , typename BOOST_MPL_AUX_NA_PARAM(Pos)
+ , typename BOOST_MPL_AUX_NA_PARAM(Range)
+ >
+struct insert_range
+ : insert_range_impl< typename sequence_tag<Sequence>::type >
+ ::template apply< Sequence,Pos,Range >
+{
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert_range,(Sequence,Pos,Range))
+};
+
+BOOST_MPL_AUX_NA_SPEC(3, insert_range)
+
+}}
+
+#endif // BOOST_MPL_INSERT_RANGE_HPP_INCLUDED
--- /dev/null
+
+#ifndef BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
+#define BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2004
+//
+// 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)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id$
+// $Date$
+// $Revision$
+
+#include <boost/mpl/aux_/joint_iter.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/size_fwd.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/aux_/na_spec.hpp>
+
+namespace boost { namespace mpl {
+
+namespace aux {
+struct joint_view_tag;
+}
+
+template<>
+struct size_impl< aux::joint_view_tag >
+{
+ template < typename JointView > struct apply
+ : plus<
+ size<typename JointView::sequence1_>
+ , size<typename JointView::sequence2_>
+ >
+ {};
+};
+
+template<
+ typename BOOST_MPL_AUX_NA_PARAM(Sequence1_)
+ , typename BOOST_MPL_AUX_NA_PARAM(Sequence2_)
+ >
+struct joint_view
+{
+ typedef typename mpl::begin<Sequence1_>::type first1_;
+ typedef typename mpl::end<Sequence1_>::type last1_;
+ typedef typename mpl::begin<Sequence2_>::type first2_;
+ typedef typename mpl::end<Sequence2_>::type last2_;
+
+ // agurt, 25/may/03: for the 'size_traits' implementation above
+ typedef Sequence1_ sequence1_;
+ typedef Sequence2_ sequence2_;
+
+ typedef joint_view type;
+ typedef aux::joint_view_tag tag;
+ typedef joint_iter<first1_,last1_,first2_> begin;
+ typedef joint_iter<last1_,last1_,last2_> end;
+};
+
+BOOST_MPL_AUX_NA_SPEC(2, joint_view)
+
+}}
+
+#endif // BOOST_MPL_JOINT_VIEW_HPP_INCLUDED
// Boost next_prior.hpp header file ---------------------------------------//
-// (C) Copyright Dave Abrahams and Daniel Walker 1999-2003. 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)
+// (C) Copyright Dave Abrahams and Daniel Walker 1999-2003.
+// Copyright (c) Andrey Semashev 2017
+//
+// 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)
// See http://www.boost.org/libs/utility for documentation.
#define BOOST_NEXT_PRIOR_HPP_INCLUDED
#include <iterator>
-#if defined(_MSC_VER) && _MSC_VER <= 1310
-#include <boost/mpl/and.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#endif
-#include <boost/type_traits/is_unsigned.hpp>
-#include <boost/type_traits/integral_promotion.hpp>
-#include <boost/type_traits/make_signed.hpp>
+#include <boost/config.hpp>
+#include <boost/core/enable_if.hpp>
#include <boost/type_traits/has_plus.hpp>
#include <boost/type_traits/has_plus_assign.hpp>
#include <boost/type_traits/has_minus.hpp>
#include <boost/type_traits/has_minus_assign.hpp>
+#include <boost/iterator/advance.hpp>
+#include <boost/iterator/reverse_iterator.hpp>
namespace boost {
namespace next_prior_detail {
-template< typename T, typename Distance, bool HasPlus = has_plus< T, Distance >::value >
-struct next_impl2
+// The trait attempts to detect if the T type is an iterator. Class-type iterators are assumed
+// to have the nested type iterator_category. Strictly speaking, this is not required to be the
+// case (e.g. a user can specialize iterator_traits for T without defining T::iterator_category).
+// Still, this is a good heuristic in practice, and we can't do anything better anyway.
+// Since C++17 we can test for iterator_traits<T>::iterator_category presence instead as it is
+// required to be only present for iterators.
+template< typename T, typename Void = void >
+struct is_iterator
{
- static T call(T x, Distance n)
- {
- std::advance(x, n);
- return x;
- }
+ static BOOST_CONSTEXPR_OR_CONST bool value = false;
+};
+
+template< typename T >
+struct is_iterator< T, typename enable_if_has_type< typename T::iterator_category >::type >
+{
+ static BOOST_CONSTEXPR_OR_CONST bool value = true;
};
+template< typename T >
+struct is_iterator< T*, void >
+{
+ static BOOST_CONSTEXPR_OR_CONST bool value = true;
+};
+
+
+template< typename T, typename Distance, bool HasPlus = has_plus< T, Distance >::value >
+struct next_plus_impl;
+
template< typename T, typename Distance >
-struct next_impl2< T, Distance, true >
+struct next_plus_impl< T, Distance, true >
{
static T call(T x, Distance n)
{
}
};
-
template< typename T, typename Distance, bool HasPlusAssign = has_plus_assign< T, Distance >::value >
-struct next_impl1 :
- public next_impl2< T, Distance >
+struct next_plus_assign_impl :
+ public next_plus_impl< T, Distance >
{
};
template< typename T, typename Distance >
-struct next_impl1< T, Distance, true >
+struct next_plus_assign_impl< T, Distance, true >
{
static T call(T x, Distance n)
{
}
};
-
-template<
- typename T,
- typename Distance,
- typename PromotedDistance = typename integral_promotion< Distance >::type,
-#if !defined(_MSC_VER) || _MSC_VER > 1310
- bool IsUInt = is_unsigned< PromotedDistance >::value
-#else
- // MSVC 7.1 has problems with applying is_unsigned to non-integral types
- bool IsUInt = mpl::and_< is_integral< PromotedDistance >, is_unsigned< PromotedDistance > >::value
-#endif
->
-struct prior_impl3
+template< typename T, typename Distance, bool IsIterator = is_iterator< T >::value >
+struct next_advance_impl :
+ public next_plus_assign_impl< T, Distance >
{
- static T call(T x, Distance n)
- {
- std::advance(x, -n);
- return x;
- }
};
-template< typename T, typename Distance, typename PromotedDistance >
-struct prior_impl3< T, Distance, PromotedDistance, true >
+template< typename T, typename Distance >
+struct next_advance_impl< T, Distance, true >
{
static T call(T x, Distance n)
{
- typedef typename make_signed< PromotedDistance >::type signed_distance;
- std::advance(x, -static_cast< signed_distance >(static_cast< PromotedDistance >(n)));
+ boost::iterators::advance(x, n);
return x;
}
};
template< typename T, typename Distance, bool HasMinus = has_minus< T, Distance >::value >
-struct prior_impl2 :
- public prior_impl3< T, Distance >
-{
-};
+struct prior_minus_impl;
template< typename T, typename Distance >
-struct prior_impl2< T, Distance, true >
+struct prior_minus_impl< T, Distance, true >
{
static T call(T x, Distance n)
{
}
};
-
template< typename T, typename Distance, bool HasMinusAssign = has_minus_assign< T, Distance >::value >
-struct prior_impl1 :
- public prior_impl2< T, Distance >
+struct prior_minus_assign_impl :
+ public prior_minus_impl< T, Distance >
{
};
template< typename T, typename Distance >
-struct prior_impl1< T, Distance, true >
+struct prior_minus_assign_impl< T, Distance, true >
{
static T call(T x, Distance n)
{
}
};
+template< typename T, typename Distance, bool IsIterator = is_iterator< T >::value >
+struct prior_advance_impl :
+ public prior_minus_assign_impl< T, Distance >
+{
+};
+
+template< typename T, typename Distance >
+struct prior_advance_impl< T, Distance, true >
+{
+ static T call(T x, Distance n)
+ {
+ // Avoid negating n to sidestep possible integer overflow
+ boost::iterators::reverse_iterator< T > rx(x);
+ boost::iterators::advance(rx, n);
+ return rx.base();
+ }
+};
+
} // namespace next_prior_detail
template <class T>
template <class T, class Distance>
inline T next(T x, Distance n)
{
- return next_prior_detail::next_impl1< T, Distance >::call(x, n);
+ return next_prior_detail::next_advance_impl< T, Distance >::call(x, n);
}
template <class T>
template <class T, class Distance>
inline T prior(T x, Distance n)
{
- return next_prior_detail::prior_impl1< T, Distance >::call(x, n);
+ return next_prior_detail::prior_advance_impl< T, Distance >::call(x, n);
}
} // namespace boost
#endif // defined(__GNUC__)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) && !defined(__SUNPRO_CC)
+ // this condition is a copy paste from is_constructible.hpp
+ // I also disable SUNPRO, as it seems not to support type_traits correctly
+#else
+# define BOOST_OPTIONAL_DETAIL_NO_IS_CONSTRUCTIBLE_TRAIT
+#endif
+
+#if defined __SUNPRO_CC
+# define BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
+#elif (defined _MSC_FULL_VER) && (_MSC_FULL_VER < 190023026)
+# define BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
+#elif defined BOOST_GCC && !defined BOOST_GCC_CXX11
+# define BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
+#elif defined BOOST_GCC_VERSION && BOOST_GCC_VERSION < 40800
+# define BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
+#endif
+
#endif // header guard
#endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+template <class T>
+struct is_const_integral
+{
+ static const bool value = boost::is_const<T>::value && boost::is_integral<T>::value;
+};
+
+template <class T>
+struct is_const_integral_bad_for_conversion
+{
+#if (!defined BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES) && (defined BOOST_OPTIONAL_CONFIG_NO_PROPER_CONVERT_FROM_CONST_INT)
+ static const bool value = boost::is_const<T>::value && boost::is_integral<T>::value;
+#else
+ static const bool value = false;
+#endif
+};
+
template <class From>
void prevent_assignment_from_false_const_integral()
{
#ifdef BOOST_OPTIONAL_CONFIG_NO_PROPER_ASSIGN_FROM_CONST_INT
// MSVC compiler without rvalue refernces: we need to disable the asignment from
// const integral lvalue reference, as it may be an invalid temporary
- BOOST_STATIC_ASSERT_MSG(!(boost::is_const<From>::value && boost::is_integral<From>::value),
+ BOOST_STATIC_ASSERT_MSG(!is_const_integral<From>::value,
"binding const lvalue references to integral types is disabled in this compiler");
#endif
#endif
}
+
template <class T>
struct is_optional_
{
static const bool value = !is_optional_<BOOST_DEDUCED_TYPENAME boost::decay<T>::type>::value;
};
+
+template <class T, class U>
+ struct is_same_decayed
+ {
+ static const bool value = ::boost::is_same<T, BOOST_DEDUCED_TYPENAME ::boost::remove_reference<U>::type>::value
+ || ::boost::is_same<T, const BOOST_DEDUCED_TYPENAME ::boost::remove_reference<U>::type>::value;
+ };
+
+template <class T, class U>
+struct no_unboxing_cond
+{
+ static const bool value = is_no_optional<U>::value && !is_same_decayed<T, U>::value;
+};
+
+
} // namespace detail
template <class T>
optional(none_t) BOOST_NOEXCEPT : ptr_() {}
template <class U>
- explicit optional(const optional<U&>& rhs) BOOST_NOEXCEPT : ptr_(rhs.ptr_) {}
- optional(const optional& rhs) BOOST_NOEXCEPT : ptr_(rhs.ptr_) {}
+ explicit optional(const optional<U&>& rhs) BOOST_NOEXCEPT : ptr_(rhs.get_ptr()) {}
+ optional(const optional& rhs) BOOST_NOEXCEPT : ptr_(rhs.get_ptr()) {}
+ // the following two implement a 'conditionally explicit' constructor: condition is a hack for buggy compilers with srewed conversion construction from const int
+ template <class U>
+ explicit optional(U& rhs, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::is_same_decayed<T, U>::value && detail::is_const_integral_bad_for_conversion<U>::value>::type* = 0) BOOST_NOEXCEPT
+ : ptr_(boost::addressof(rhs)) {}
+
+ template <class U>
+ optional(U& rhs, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::is_same_decayed<T, U>::value && !detail::is_const_integral_bad_for_conversion<U>::value>::type* = 0) BOOST_NOEXCEPT
+ : ptr_(boost::addressof(rhs)) {}
- optional& operator=(const optional& rhs) BOOST_NOEXCEPT { ptr_ = rhs.ptr_; return *this; }
+ optional& operator=(const optional& rhs) BOOST_NOEXCEPT { ptr_ = rhs.get_ptr(); return *this; }
template <class U>
- optional& operator=(const optional<U&>& rhs) BOOST_NOEXCEPT { ptr_ = rhs.ptr_; return *this; }
+ optional& operator=(const optional<U&>& rhs) BOOST_NOEXCEPT { ptr_ = rhs.get_ptr(); return *this; }
optional& operator=(none_t) BOOST_NOEXCEPT { ptr_ = 0; return *this; }
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ optional(T&& /* rhs */) BOOST_NOEXCEPT { detail::prevent_binding_rvalue<T&&>(); }
+
template <class R>
- optional(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<R> >::type* = 0) BOOST_NOEXCEPT
+ optional(R&& r, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::no_unboxing_cond<T, R> >::type* = 0) BOOST_NOEXCEPT
: ptr_(boost::addressof(r)) { detail::prevent_binding_rvalue<R>(); }
template <class R>
#else // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+ // the following two implement a 'conditionally explicit' constructor
+ template <class U>
+ explicit optional(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::no_unboxing_cond<T, U>::value && detail::is_const_integral_bad_for_conversion<U>::value >::type* = 0) BOOST_NOEXCEPT
+ : ptr_(boost::addressof(v)) { }
+
template <class U>
- optional(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) BOOST_NOEXCEPT : ptr_(boost::addressof(v)) { }
+ optional(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if_c<detail::no_unboxing_cond<T, U>::value && !detail::is_const_integral_bad_for_conversion<U>::value >::type* = 0) BOOST_NOEXCEPT
+ : ptr_(boost::addressof(v)) { }
template <class U>
- optional(bool cond, U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) BOOST_NOEXCEPT : ptr_(cond ? boost::addressof(v) : 0) {}
+ optional(bool cond, U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) BOOST_NOEXCEPT : ptr_(cond ? boost::addressof(v) : 0) {}
template <class U>
- BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U>, optional<T&>&>::type
- operator=(U& v) BOOST_NOEXCEPT
- {
- detail::prevent_assignment_from_false_const_integral<U>();
- ptr_ = boost::addressof(v); return *this;
- }
+ BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U>, optional<T&>&>::type
+ operator=(U& v) BOOST_NOEXCEPT
+ {
+ detail::prevent_assignment_from_false_const_integral<U>();
+ ptr_ = boost::addressof(v); return *this;
+ }
template <class U>
void emplace(U& v, BOOST_DEDUCED_TYPENAME boost::enable_if<detail::is_no_optional<U> >::type* = 0) BOOST_NOEXCEPT
// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
-// Copyright (C) 2014, 2015 Andrzej Krzemienski.
+// Copyright (C) 2014 - 2016 Andrzej Krzemienski.
//
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
#include <boost/optional/detail/old_optional_implementation.hpp>
#else
namespace boost {
+
+namespace optional_ns {
+
+// a tag for in-place initialization of contained value
+struct in_place_init_t
+{
+ struct init_tag{};
+ explicit in_place_init_t(init_tag){}
+};
+const in_place_init_t in_place_init ((in_place_init_t::init_tag()));
+
+// a tag for conditional in-place initialization of contained value
+struct in_place_init_if_t
+{
+ struct init_tag{};
+ explicit in_place_init_if_t(init_tag){}
+};
+const in_place_init_if_t in_place_init_if ((in_place_init_if_t::init_tag()));
+
+} // namespace optional_ns
+
+using optional_ns::in_place_init_t;
+using optional_ns::in_place_init;
+using optional_ns::in_place_init_if_t;
+using optional_ns::in_place_init_if;
namespace optional_detail {
#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
// Constructs in-place
// upon exception *this is always uninitialized
+ template<class... Args>
+ void construct ( in_place_init_t, Args&&... args )
+ {
+ ::new (m_storage.address()) value_type( boost::forward<Args>(args)... ) ;
+ m_initialized = true ;
+ }
+
template<class... Args>
void emplace_assign ( Args&&... args )
+ {
+ destroy();
+ construct(in_place_init, boost::forward<Args>(args)...);
+ }
+
+ template<class... Args>
+ explicit optional_base ( in_place_init_t, Args&&... args )
+ :
+ m_initialized(false)
+ {
+ construct(in_place_init, boost::forward<Args>(args)...);
+ }
+
+ template<class... Args>
+ explicit optional_base ( in_place_init_if_t, bool cond, Args&&... args )
+ :
+ m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init, boost::forward<Args>(args)...);
+ }
+#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+ template<class Arg>
+ void construct ( in_place_init_t, Arg&& arg )
{
- destroy();
- ::new (m_storage.address()) value_type( boost::forward<Args>(args)... );
+ ::new (m_storage.address()) value_type( boost::forward<Arg>(arg) );
m_initialized = true ;
}
-#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+
+ void construct ( in_place_init_t )
+ {
+ ::new (m_storage.address()) value_type();
+ m_initialized = true ;
+ }
+
template<class Arg>
void emplace_assign ( Arg&& arg )
{
destroy();
- ::new (m_storage.address()) value_type( boost::forward<Arg>(arg) );
- m_initialized = true ;
+ construct(in_place_init, boost::forward<Arg>(arg)) ;
}
void emplace_assign ()
{
destroy();
- ::new (m_storage.address()) value_type();
- m_initialized = true ;
+ construct(in_place_init) ;
}
+
+ template<class Arg>
+ explicit optional_base ( in_place_init_t, Arg&& arg )
+ :
+ m_initialized(false)
+ {
+ construct(in_place_init, boost::forward<Arg>(arg));
+ }
+
+ explicit optional_base ( in_place_init_t )
+ :
+ m_initialized(false)
+ {
+ construct(in_place_init);
+ }
+
+ template<class Arg>
+ explicit optional_base ( in_place_init_if_t, bool cond, Arg&& arg )
+ :
+ m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init, boost::forward<Arg>(arg));
+ }
+
+ explicit optional_base ( in_place_init_if_t, bool cond )
+ :
+ m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init);
+ }
+
#else
+
template<class Arg>
- void emplace_assign ( const Arg& arg )
+ void construct ( in_place_init_t, const Arg& arg )
{
- destroy();
::new (m_storage.address()) value_type( arg );
m_initialized = true ;
}
template<class Arg>
- void emplace_assign ( Arg& arg )
+ void construct ( in_place_init_t, Arg& arg )
{
- destroy();
::new (m_storage.address()) value_type( arg );
m_initialized = true ;
}
- void emplace_assign ()
+ void construct ( in_place_init_t )
{
- destroy();
::new (m_storage.address()) value_type();
m_initialized = true ;
}
+
+ template<class Arg>
+ void emplace_assign ( const Arg& arg )
+ {
+ destroy();
+ construct(in_place_init, arg);
+ }
+
+ template<class Arg>
+ void emplace_assign ( Arg& arg )
+ {
+ destroy();
+ construct(in_place_init, arg);
+ }
+
+ void emplace_assign ()
+ {
+ destroy();
+ construct(in_place_init);
+ }
+
+ template<class Arg>
+ explicit optional_base ( in_place_init_t, const Arg& arg )
+ : m_initialized(false)
+ {
+ construct(in_place_init, arg);
+ }
+
+ template<class Arg>
+ explicit optional_base ( in_place_init_t, Arg& arg )
+ : m_initialized(false)
+ {
+ construct(in_place_init, arg);
+ }
+
+ explicit optional_base ( in_place_init_t )
+ : m_initialized(false)
+ {
+ construct(in_place_init);
+ }
+
+ template<class Arg>
+ explicit optional_base ( in_place_init_if_t, bool cond, const Arg& arg )
+ : m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init, arg);
+ }
+
+ template<class Arg>
+ explicit optional_base ( in_place_init_if_t, bool cond, Arg& arg )
+ : m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init, arg);
+ }
+
+ explicit optional_base ( in_place_init_if_t, bool cond )
+ : m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init);
+ }
#endif
#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
template <typename U>
struct is_optional_related
: boost::conditional< boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
- || boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<U>::type, none_t>::value,
+ || boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<U>::type, none_t>::value
+ || boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<U>::type, in_place_init_t>::value
+ || boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<U>::type, in_place_init_if_t>::value,
boost::true_type, boost::false_type>::type
{};
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) && !defined(__SUNPRO_CC)
- // this condition is a copy paste from is_constructible.hpp
- // I also disable SUNPRO, as it seems not to support type_traits correctly
+#if !defined(BOOST_OPTIONAL_DETAIL_NO_IS_CONSTRUCTIBLE_TRAIT)
template <typename T, typename U>
struct is_convertible_to_T_or_factory
: boost::conditional< boost::is_base_of<boost::in_place_factory_base, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
|| boost::is_base_of<boost::typed_in_place_factory_base, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
- || boost::is_constructible<T, U&&>::value
+ || (boost::is_constructible<T, U&&>::value && !boost::is_same<T, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value)
, boost::true_type, boost::false_type>::type
{};
-#else
+template <typename T, typename U>
+struct is_optional_constructible : boost::is_constructible<T, U>
+{};
-#define BOOST_OPTIONAL_DETAIL_NO_IS_CONSTRUCTIBLE_TRAIT
+#else
template <typename, typename>
struct is_convertible_to_T_or_factory : boost::true_type
{};
+template <typename T, typename U>
+struct is_optional_constructible : boost::true_type
+{};
+
#endif // is_convertible condition
template <typename T, typename U>
// Requires a valid conversion from U to T.
// Can throw if T::T(U const&) does
template<class U>
- explicit optional ( optional<U> const& rhs )
+ explicit optional ( optional<U> const& rhs
+#ifndef BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
+ ,typename boost::enable_if< optional_detail::is_optional_constructible<T, U const&> >::type* = 0
+#endif
+ )
:
base()
{
// Requires a valid conversion from U to T.
// Can throw if T::T(U&&) does
template<class U>
- explicit optional ( optional<U> && rhs )
+ explicit optional ( optional<U> && rhs
+#ifndef BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
+ ,typename boost::enable_if< optional_detail::is_optional_constructible<T, U> >::type* = 0
+#endif
+ )
:
base()
{
}
#endif
+#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+
+ // Assigns from a T (deep-moves/copies the rhs value)
+ template <typename T_>
+ BOOST_DEDUCED_TYPENAME boost::enable_if<boost::is_same<T, BOOST_DEDUCED_TYPENAME boost::decay<T_>::type>, optional&>::type
+ operator= ( T_&& val )
+ {
+ this->assign( boost::forward<T_>(val) ) ;
+ return *this ;
+ }
+
+#else
+
// Assigns from a T (deep-copies the rhs value)
// Basic Guarantee: If T::( T const& ) throws, this is left UNINITIALIZED
optional& operator= ( argument_type val )
this->assign( val ) ;
return *this ;
}
-
+
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
// Assigns from a T (deep-moves the rhs value)
optional& operator= ( rval_reference_type val )
return *this ;
}
#endif
-
+
+#endif // BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+
// Assigns from a "none"
// Which destroys the current value, if any, leaving this UNINITIALIZED
// No-throw (assuming T::~T() doesn't)
// upon exception *this is always uninitialized
template<class... Args>
void emplace ( Args&&... args )
- {
- this->emplace_assign( boost::forward<Args>(args)... );
- }
+ {
+ this->emplace_assign( boost::forward<Args>(args)... );
+ }
+
+ template<class... Args>
+ explicit optional ( in_place_init_t, Args&&... args )
+ : base( in_place_init, boost::forward<Args>(args)... )
+ {}
+
+ template<class... Args>
+ explicit optional ( in_place_init_if_t, bool cond, Args&&... args )
+ : base( in_place_init_if, cond, boost::forward<Args>(args)... )
+ {}
+
#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
template<class Arg>
void emplace ( Arg&& arg )
{
this->emplace_assign();
}
+
+ template<class Args>
+ explicit optional ( in_place_init_t, Args&& args )
+ : base( in_place_init, boost::forward<Args>(args) )
+ {}
+
+ explicit optional ( in_place_init_t )
+ : base( in_place_init )
+ {}
+
+ template<class Args>
+ explicit optional ( in_place_init_if_t, bool cond, Args&& args )
+ : base( in_place_init_if, cond, boost::forward<Args>(args) )
+ {}
+
+ explicit optional ( in_place_init_if_t, bool cond )
+ : base( in_place_init_if, cond )
+ {}
#else
template<class Arg>
void emplace ( const Arg& arg )
{
this->emplace_assign();
}
+
+ template<class Arg>
+ explicit optional ( in_place_init_t, const Arg& arg )
+ : base( in_place_init, arg )
+ {}
+
+ template<class Arg>
+ explicit optional ( in_place_init_t, Arg& arg )
+ : base( in_place_init, arg )
+ {}
+
+ explicit optional ( in_place_init_t )
+ : base( in_place_init )
+ {}
+
+ template<class Arg>
+ explicit optional ( in_place_init_if_t, bool cond, const Arg& arg )
+ : base( in_place_init_if, cond, arg )
+ {}
+
+ template<class Arg>
+ explicit optional ( in_place_init_if_t, bool cond, Arg& arg )
+ : base( in_place_init_if, cond, arg )
+ {}
+
+ explicit optional ( in_place_init_if_t, bool cond )
+ : base( in_place_init_if, cond )
+ {}
#endif
void swap( optional & arg )
template <class Default>
reference operator[](lazy_default<key_type, Default>) const
{
+ BOOST_MPL_ASSERT_NOT((holds_maybe));
return arg.value;
}
[[`__TARGET_ARCH_ARM`] [__predef_detection__]]
[[`__TARGET_ARCH_THUMB`] [__predef_detection__]]
[[`_M_ARM`] [__predef_detection__]]
+ [[`_M_ARM64`] [__predef_detection__]]
[[`__arm64`] [8.0.0]]
[[`__TARGET_ARCH_ARM`] [V.0.0]]
[[`__TARGET_ARCH_THUMB`] [V.0.0]]
[[`_M_ARM`] [V.0.0]]
+ [[`_M_ARM64`] [8.0.0]]
]
*/
#if defined(__arm__) || defined(__arm64) || defined(__thumb__) || \
defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || \
- defined(_M_ARM)
+ defined(_M_ARM) || defined(_M_ARM64)
# undef BOOST_ARCH_ARM
# if !defined(BOOST_ARCH_ARM) && defined(__arm64)
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0)
# if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_THUMB)
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_THUMB,0,0)
# endif
+# if !defined(BOOST_ARCH_ARM) && defined(_M_ARM64)
+# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0)
+# endif
# if !defined(BOOST_ARCH_ARM) && defined(_M_ARM)
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(_M_ARM,0,0)
# endif
/*
-Copyright Rene Rivera 2008-2015
+Copyright Rene Rivera 2008-2017
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)
[[`__ICC`] [__predef_detection__]]
[[`__ECC`] [__predef_detection__]]
- [[`__INTEL_COMPILER`] [V.R.P]]
+ [[`__INTEL_COMPILER`] [V.R]]
+ [[`__INTEL_COMPILER` and `__INTEL_COMPILER_UPDATE`] [V.R.P]]
]
*/
#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || \
defined(__ECC)
+/*`
+[note Because of an Intel mistake in the release version numbering when
+`__INTEL_COMPILER` is `9999` it is detected as version 12.1.0.]
+ */
+# if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 9999)
+# define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER(12,1,0)
+# endif
+# if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE)
+# define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER( \
+ BOOST_VERSION_NUMBER_MAJOR(BOOST_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)), \
+ BOOST_VERSION_NUMBER_MINOR(BOOST_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)), \
+ __INTEL_COMPILER_UPDATE)
+# endif
# if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER)
-# define BOOST_COMP_INTEL_DETECTION BOOST_PREDEF_MAKE_10_VRP(__INTEL_COMPILER)
+# define BOOST_COMP_INTEL_DETECTION BOOST_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)
# endif
# if !defined(BOOST_COMP_INTEL_DETECTION)
# define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
[[`_MSC_FULL_VER`] [V.R.P]]
[[`_MSC_VER`] [V.R.0]]
]
+
+[note Release of Visual Studio after 2015 will no longer be identified
+by Boost Predef as the marketing version number. Instead we use the
+compiler version number directly, i.e. the _MSC_VER number.]
*/
#define BOOST_COMP_MSVC BOOST_VERSION_NUMBER_NOT_AVAILABLE
means that the compiler and VS product versions are no longer
in sync. Hence we need to use different formulas for
mapping from MSC version to VS product version.
+
+ VS2017 is a total nightmare when it comes to version numbers.
+ Hence to avoid arguments relating to that both present and
+ future.. Any version after VS2015 will use solely the compiler
+ version, i.e. cl.exe, as the version number here.
*/
-# if (_MSC_VER >= 1900)
+# if (_MSC_VER > 1900)
+# define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\
+ _MSC_VER/100,\
+ _MSC_VER%100,\
+ BOOST_COMP_MSVC_BUILD)
+# elif (_MSC_VER >= 1900)
# define BOOST_COMP_MSVC_DETECTION BOOST_VERSION_NUMBER(\
_MSC_VER/100-5,\
_MSC_VER%100,\
[[`__ARM_NEON__`] [__predef_detection__]]
[[`__aarch64__`] [__predef_detection__]]
[[`_M_ARM`] [__predef_detection__]]
+ [[`_M_ARM64`] [__predef_detection__]]
]
[table
[[`__ARM_NEON__`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
[[`__aarch64__`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
[[`_M_ARM`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
+ [[`_M_ARM64`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
]
*/
#define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
#undef BOOST_HW_SIMD_ARM
-#if !defined(BOOST_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM))
+#if !defined(BOOST_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM) || defined (_M_ARM64))
# define BOOST_HW_SIMD_ARM BOOST_HW_SIMD_ARM_NEON_VERSION
#endif
#include <boost/predef/platform/windows_store.h>
#include <boost/predef/platform/windows_phone.h>
#include <boost/predef/platform/windows_runtime.h>
+#include <boost/predef/platform/ios.h>
/*#include <boost/predef/platform/.h>*/
#endif
--- /dev/null
+/*
+Copyright Ruslan Baratov 2017
+Copyright Rene Rivera 2017
+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_PREDEF_PLAT_IOS_H
+#define BOOST_PREDEF_PLAT_IOS_H
+
+#include <boost/predef/os/ios.h> // BOOST_OS_IOS
+#include <boost/predef/version_number.h> // BOOST_VERSION_NUMBER_NOT_AVAILABLE
+
+/*`
+[heading `BOOST_PLAT_IOS_DEVICE`]
+[heading `BOOST_PLAT_IOS_SIMULATOR`]
+
+[table
+ [[__predef_symbol__] [__predef_version__]]
+
+ [[`TARGET_IPHONE_SIMULATOR`] [__predef_detection__]]
+ ]
+ */
+
+#define BOOST_PLAT_IOS_DEVICE BOOST_VERSION_NUMBER_NOT_AVAILABLE
+#define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_NOT_AVAILABLE
+
+// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h
+#if BOOST_OS_IOS
+# include <TargetConditionals.h>
+# if TARGET_IPHONE_SIMULATOR == 1
+# undef BOOST_PLAT_IOS_SIMULATOR
+# define BOOST_PLAT_IOS_SIMULATOR BOOST_VERSION_NUMBER_AVAILABLE
+# else
+# undef BOOST_PLAT_IOS_DEVICE
+# define BOOST_PLAT_IOS_DEVICE BOOST_VERSION_NUMBER_AVAILABLE
+# endif
+#endif
+
+#if BOOST_PLAT_IOS_SIMULATOR
+# define BOOST_PLAT_IOS_SIMULATOR_AVAILABLE
+# include <boost/predef/detail/platform_detected.h>
+#endif
+
+#if BOOST_PLAT_IOS_DEVICE
+# define BOOST_PLAT_IOS_DEVICE_AVAILABLE
+# include <boost/predef/detail/platform_detected.h>
+#endif
+
+#define BOOST_PLAT_IOS_SIMULATOR_NAME "iOS Simulator"
+#define BOOST_PLAT_IOS_DEVICE_NAME "iOS Device"
+
+#endif // BOOST_PREDEF_PLAT_IOS_H
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_IOS_SIMULATOR,BOOST_PLAT_IOS_SIMULATOR_NAME)
+BOOST_PREDEF_DECLARE_TEST(BOOST_PLAT_IOS_DEVICE,BOOST_PLAT_IOS_DEVICE_NAME)
http://www.boost.org/LICENSE_1_0.txt)
*/
-#ifndef BOOST_PREDEF_COMPILER_MINGW_H
-#define BOOST_PREDEF_COMPILER_MINGW_H
+#ifndef BOOST_PREDEF_PLAT_MINGW_H
+#define BOOST_PREDEF_PLAT_MINGW_H
#include <boost/predef/version_number.h>
#include <boost/predef/make.h>
#include <boost/predef/version_number.h>
-#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,4,1)
+#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,6,0)
#endif
/*
-Copyright Rene Rivera 2005, 2008-2013
+Copyright Rene Rivera 2005-2016
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)
#define BOOST_VERSION_NUMBER_NOT_AVAILABLE \
BOOST_VERSION_NUMBER_ZERO
+/*`
+``
+BOOST_VERSION_NUMBER_MAJOR(N), BOOST_VERSION_NUMBER_MINOR(N), BOOST_VERSION_NUMBER_PATCH(N)
+``
+
+The macros extract the major, minor, and patch portion from a well formed
+version number resulting in a preprocessor expression in the range of
+\[0,99\] or \[0,99999\] for the major and minor, or patch numbers
+respectively.
+*/
+#define BOOST_VERSION_NUMBER_MAJOR(N) \
+ ( ((N)/10000000)%100 )
+
+#define BOOST_VERSION_NUMBER_MINOR(N) \
+ ( ((N)/100000)%100 )
+
+#define BOOST_VERSION_NUMBER_PATCH(N) \
+ ( (N)%100000 )
+
#endif
# 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)
# define BOOST_PP_CONFIG_DMC() 0x0040
#
# ifndef BOOST_PP_CONFIG_FLAGS
-# if defined(__GCCXML__)
-# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
-# elif defined(__WAVE__)
-# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
-# elif defined(__MWERKS__) && __MWERKS__ >= 0x3200
+# if defined(__GCCXML__) || defined(__WAVE__) || 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())
# endif
+# elif defined(_MSC_VER) && defined(__clang__)
+# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
# elif defined(__MWERKS__)
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MWCC())
# elif defined(__DMC__)
# 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())
# /* 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__
+# elif defined(_MSC_VER) && defined(__clang__)
+# define BOOST_PP_VARIADICS 1
+# /* VC++ (C/C++) and Intel C++ Compiler >= 17.0 with MSVC */
+# elif defined _MSC_VER && _MSC_VER >= 1400 && (!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
# 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
detail::range_size<T>
{ };
- template< class T >
- struct range_size<const T > :
- detail::range_size<T>
- { };
-
} // namespace boost
# if defined(BOOST_REGEX_NO_W32) || BOOST_PLAT_WINDOWS_RUNTIME
# define BOOST_REGEX_NO_FILEITER
# endif
-#else // defined(_WIN32)
+#else /* defined(_WIN32) */
# if !defined(BOOST_HAS_DIRENT_H)
# define BOOST_REGEX_NO_FILEITER
# endif
*
****************************************************************************/
-#if defined(BOOST_MSVC) && defined(_MSC_EXTENSIONS)
+#if defined(_MSC_VER) && defined(_MSC_EXTENSIONS)
#if defined(_DEBUG) || defined(__MSVC_RUNTIME_CHECKS) || defined(_MANAGED) || defined(BOOST_REGEX_NO_FASTCALL)
# define BOOST_REGEX_CALL __cdecl
#else
****************************************************************************/
#if !defined(BOOST_REGEX_RECURSIVE) && !defined(BOOST_REGEX_NON_RECURSIVE)
-# if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && !defined(_STLP_DEBUG) && !defined(__STL_DEBUG) && !(defined(BOOST_MSVC) && (BOOST_MSVC >= 1400))
+# if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && !defined(_STLP_DEBUG) && !defined(__STL_DEBUG) && !(defined(_MSC_VER) && (_MSC_VER >= 1400))
# define BOOST_REGEX_RECURSIVE
# else
# define BOOST_REGEX_NON_RECURSIVE
#pragma warning(push)
#pragma warning(disable:4100)
#endif
+#ifndef BOOST_NO_EXCEPTIONS
+BOOST_NORETURN
+#endif
inline void invalid_utf32_code_point(::boost::uint32_t val)
{
#ifndef BOOST_NO_STD_LOCALE
void add_single(const digraph_type& s)
{
- m_singles.insert(m_singles.end(), s);
+ m_singles.insert(s);
if(s.second)
m_has_digraphs = true;
m_empty = false;
}
void add_range(const digraph_type& first, const digraph_type& end)
{
- m_ranges.insert(m_ranges.end(), first);
- m_ranges.insert(m_ranges.end(), end);
+ m_ranges.push_back(first);
+ m_ranges.push_back(end);
if(first.second)
{
m_has_digraphs = true;
}
void add_equivalent(const digraph_type& s)
{
- m_equivalents.insert(m_equivalents.end(), s);
+ m_equivalents.insert(s);
if(s.second)
{
m_has_digraphs = true;
return m_negate;
}
typedef typename std::vector<digraph_type>::const_iterator list_iterator;
- list_iterator singles_begin()const
+ typedef typename std::set<digraph_type>::const_iterator set_iterator;
+ set_iterator singles_begin()const
{
return m_singles.begin();
}
- list_iterator singles_end()const
+ set_iterator singles_end()const
{
return m_singles.end();
}
{
return m_ranges.end();
}
- list_iterator equivalents_begin()const
+ set_iterator equivalents_begin()const
{
return m_equivalents.begin();
}
- list_iterator equivalents_end()const
+ set_iterator equivalents_end()const
{
return m_equivalents.end();
}
return m_empty;
}
private:
- std::vector<digraph_type> m_singles; // a list of single characters to match
+ std::set<digraph_type> m_singles; // a list of single characters to match
std::vector<digraph_type> m_ranges; // a list of end points of our ranges
bool m_negate; // true if the set is to be negated
bool m_has_digraphs; // true if we have digraphs present
m_type m_classes; // character classes to match
m_type m_negated_classes; // negated character classes to match
bool m_empty; // whether we've added anything yet
- std::vector<digraph_type> m_equivalents; // a list of equivalence classes
+ std::set<digraph_type> m_equivalents; // a list of equivalence classes
};
template <class charT, class traits>
unsigned m_backrefs; // bitmask of permitted backrefs
boost::uintmax_t m_bad_repeats; // bitmask of repeats we can't deduce a startmap for;
bool m_has_recursions; // set when we have recursive expresisons to fixup
- std::vector<bool> m_recursion_checks; // notes which recursions we've followed while analysing this expression
+ std::vector<unsigned char> m_recursion_checks; // notes which recursions we've followed while analysing this expression
typename traits::char_class_type m_word_mask; // mask used to determine if a character is a word character
typename traits::char_class_type m_mask_space; // mask used to determine if a character is a word character
typename traits::char_class_type m_lower_mask; // mask used to determine if a character is a lowercase character
{
typedef typename traits::string_type string_type;
typedef typename basic_char_set<charT, traits>::list_iterator item_iterator;
+ typedef typename basic_char_set<charT, traits>::set_iterator set_iterator;
typedef typename traits::char_class_type m_type;
re_set_long<m_type>* result = static_cast<re_set_long<m_type>*>(append_state(syntax_element_long_set, sizeof(re_set_long<m_type>)));
// now extend with all the singles:
//
item_iterator first, last;
- first = char_set.singles_begin();
- last = char_set.singles_end();
- while(first != last)
+ set_iterator sfirst, slast;
+ sfirst = char_set.singles_begin();
+ slast = char_set.singles_end();
+ while(sfirst != slast)
{
- charT* p = static_cast<charT*>(this->m_pdata->m_data.extend(sizeof(charT) * (first->second ? 3 : 2)));
- p[0] = m_traits.translate(first->first, m_icase);
- if(first->second)
+ charT* p = static_cast<charT*>(this->m_pdata->m_data.extend(sizeof(charT) * (sfirst->first == static_cast<charT>(0) ? 1 : sfirst->second ? 3 : 2)));
+ p[0] = m_traits.translate(sfirst->first, m_icase);
+ if(sfirst->first == static_cast<charT>(0))
+ {
+ p[0] = 0;
+ }
+ else if(sfirst->second)
{
- p[1] = m_traits.translate(first->second, m_icase);
+ p[1] = m_traits.translate(sfirst->second, m_icase);
p[2] = 0;
}
else
p[1] = 0;
- ++first;
+ ++sfirst;
}
//
// now extend with all the ranges:
//
// now process the equivalence classes:
//
- first = char_set.equivalents_begin();
- last = char_set.equivalents_end();
- while(first != last)
+ sfirst = char_set.equivalents_begin();
+ slast = char_set.equivalents_end();
+ while(sfirst != slast)
{
string_type s;
- if(first->second)
+ if(sfirst->second)
{
- charT cs[3] = { first->first, first->second, charT(0), };
+ charT cs[3] = { sfirst->first, sfirst->second, charT(0), };
s = m_traits.transform_primary(cs, cs+2);
}
else
- s = m_traits.transform_primary(&first->first, &first->first+1);
+ s = m_traits.transform_primary(&sfirst->first, &sfirst->first+1);
if(s.empty())
return 0; // invalid or unsupported equivalence class
charT* p = static_cast<charT*>(this->m_pdata->m_data.extend(sizeof(charT) * (s.size()+1) ) );
BOOST_REGEX_DETAIL_NS::copy(s.begin(), s.end(), p);
p[s.size()] = charT(0);
- ++first;
+ ++sfirst;
}
//
// finally reset the address of our last state:
{
typedef typename traits::string_type string_type;
typedef typename basic_char_set<charT, traits>::list_iterator item_iterator;
-
+ typedef typename basic_char_set<charT, traits>::set_iterator set_iterator;
+
re_set* result = static_cast<re_set*>(append_state(syntax_element_set, sizeof(re_set)));
bool negate = char_set.is_negated();
std::memset(result->_map, 0, sizeof(result->_map));
// handle singles first:
//
item_iterator first, last;
- first = char_set.singles_begin();
- last = char_set.singles_end();
- while(first != last)
+ set_iterator sfirst, slast;
+ sfirst = char_set.singles_begin();
+ slast = char_set.singles_end();
+ while(sfirst != slast)
{
for(unsigned int i = 0; i < (1 << CHAR_BIT); ++i)
{
if(this->m_traits.translate(static_cast<charT>(i), this->m_icase)
- == this->m_traits.translate(first->first, this->m_icase))
+ == this->m_traits.translate(sfirst->first, this->m_icase))
result->_map[i] = true;
}
- ++first;
+ ++sfirst;
}
//
// OK now handle ranges:
//
// now process the equivalence classes:
//
- first = char_set.equivalents_begin();
- last = char_set.equivalents_end();
- while(first != last)
+ sfirst = char_set.equivalents_begin();
+ slast = char_set.equivalents_end();
+ while(sfirst != slast)
{
string_type s;
- BOOST_ASSERT(static_cast<charT>(0) == first->second);
- s = m_traits.transform_primary(&first->first, &first->first+1);
+ BOOST_ASSERT(static_cast<charT>(0) == sfirst->second);
+ s = m_traits.transform_primary(&sfirst->first, &sfirst->first+1);
if(s.empty())
return 0; // invalid or unsupported equivalence class
for(unsigned i = 0; i < (1u << CHAR_BIT); ++i)
if(s == s2)
result->_map[i] = true;
}
- ++first;
+ ++sfirst;
}
if(negate)
{
m_bad_repeats = 0;
if(m_has_recursions)
- m_recursion_checks.assign(1 + m_pdata->m_mark_count, false);
+ m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u);
create_startmap(m_pdata->m_first_state, m_pdata->m_startmap, &(m_pdata->m_can_be_null), mask_all);
// get the restart type:
m_pdata->m_restart_type = get_restart_type(m_pdata->m_first_state);
//
idx = m_pdata->get_id(static_cast<int>(idx));
}
- while(p)
+ if(idx < 0)
+ {
+ ok = false;
+ }
+ else
{
- if((p->type == syntax_element_startmark) && (static_cast<re_brace*>(p)->index == idx))
+ while(p)
{
- //
- // We've found the target of the recursion, set the jump target:
- //
- static_cast<re_jump*>(state)->alt.p = p;
- ok = true;
- //
- // Now scan the target for nested repeats:
- //
- p = p->next.p;
- int next_rep_id = 0;
- while(p)
+ if((p->type == syntax_element_startmark) && (static_cast<re_brace*>(p)->index == idx))
{
- switch(p->type)
+ //
+ // We've found the target of the recursion, set the jump target:
+ //
+ static_cast<re_jump*>(state)->alt.p = p;
+ ok = true;
+ //
+ // Now scan the target for nested repeats:
+ //
+ p = p->next.p;
+ int next_rep_id = 0;
+ while(p)
{
- case syntax_element_rep:
- case syntax_element_dot_rep:
- case syntax_element_char_rep:
- case syntax_element_short_set_rep:
- case syntax_element_long_set_rep:
- next_rep_id = static_cast<re_repeat*>(p)->state_id;
- break;
- case syntax_element_endmark:
- if(static_cast<const re_brace*>(p)->index == idx)
- next_rep_id = -1;
- break;
- default:
- break;
+ switch(p->type)
+ {
+ case syntax_element_rep:
+ case syntax_element_dot_rep:
+ case syntax_element_char_rep:
+ case syntax_element_short_set_rep:
+ case syntax_element_long_set_rep:
+ next_rep_id = static_cast<re_repeat*>(p)->state_id;
+ break;
+ case syntax_element_endmark:
+ if(static_cast<const re_brace*>(p)->index == idx)
+ next_rep_id = -1;
+ break;
+ default:
+ break;
+ }
+ if(next_rep_id)
+ break;
+ p = p->next.p;
+ }
+ if(next_rep_id > 0)
+ {
+ static_cast<re_recurse*>(state)->state_id = next_rep_id - 1;
}
- if(next_rep_id)
- break;
- p = p->next.p;
- }
- if(next_rep_id > 0)
- {
- static_cast<re_recurse*>(state)->state_id = next_rep_id - 1;
- }
- break;
+ break;
+ }
+ p = p->next.p;
}
- p = p->next.p;
}
if(!ok)
{
{
// Initialize m_recursion_checks if we need it:
if(m_has_recursions)
- m_recursion_checks.assign(1 + m_pdata->m_mark_count, false);
+ m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u);
const std::pair<bool, re_syntax_base*>& p = v.back();
m_icase = p.first;
m_bad_repeats = 0;
if(m_has_recursions)
- m_recursion_checks.assign(1 + m_pdata->m_mark_count, false);
+ m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u);
create_startmap(static_cast<re_alt*>(state)->alt.p, static_cast<re_alt*>(state)->_map, &static_cast<re_alt*>(state)->can_be_null, mask_skip);
// adjust the type of the state to allow for faster matching:
state->type = this->get_repeat_type(state);
}
case syntax_element_recurse:
{
- if(state->type == syntax_element_startmark)
- recursion_sub = static_cast<re_brace*>(state)->index;
- else
- recursion_sub = 0;
- if(m_recursion_checks[recursion_sub])
+ BOOST_ASSERT(static_cast<const re_jump*>(state)->alt.p->type == syntax_element_startmark);
+ recursion_sub = static_cast<re_brace*>(static_cast<const re_jump*>(state)->alt.p)->index;
+ if(m_recursion_checks[recursion_sub] & 1u)
{
// Infinite recursion!!
if(0 == this->m_pdata->m_status) // update the error code if not already set
recursion_start = state;
recursion_restart = state->next.p;
state = static_cast<re_jump*>(state)->alt.p;
- m_recursion_checks[recursion_sub] = true;
+ m_recursion_checks[recursion_sub] |= 1u;
break;
}
- m_recursion_checks[recursion_sub] = true;
+ m_recursion_checks[recursion_sub] |= 1u;
// can't handle nested recursion here...
BOOST_FALLTHROUGH;
}
}
p = p->next.p;
}
- if(ok)
+ if(ok && ((m_recursion_checks[static_cast<re_brace*>(state)->index] & 2u) == 0))
{
+ m_recursion_checks[static_cast<re_brace*>(state)->index] |= 2u;
create_startmap(p->next.p, l_map, pnull, mask);
}
}
case syntax_element_long_set_rep:
{
unsigned state_id = static_cast<re_repeat*>(pt)->state_id;
- if(state_id > sizeof(m_bad_repeats) * CHAR_BIT)
+ if(state_id >= sizeof(m_bad_repeats) * CHAR_BIT)
return true; // run out of bits, assume we can't traverse this one.
static const boost::uintmax_t one = 1uL;
return m_bad_repeats & (one << state_id);
this->fail(regex_constants::error_paren, ::boost::BOOST_REGEX_DETAIL_NS::distance(m_base, m_end));
return false;
}
- BOOST_ASSERT(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark);
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
+ return false;
#ifndef BOOST_NO_STD_DISTANCE
if(markid && (this->flags() & regbase::save_subexpression_location))
this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position);
}
if(negative)
i = 1 + m_mark_count - i;
- if(((i > 0) && (this->m_backrefs & (1u << (i-1)))) || ((i > 10000) && (this->m_pdata->get_id(i) > 0) && (this->m_backrefs & (1u << (this->m_pdata->get_id(i)-1)))))
+ if(((i > 0) && (i < std::numeric_limits<unsigned>::digits) && (i - 1 < static_cast<boost::intmax_t>(sizeof(unsigned) * CHAR_BIT)) && (this->m_backrefs & (1u << (i-1)))) || ((i > 10000) && (this->m_pdata->get_id(i) > 0) && (this->m_pdata->get_id(i)-1 < static_cast<boost::intmax_t>(sizeof(unsigned) * CHAR_BIT)) && (this->m_backrefs & (1u << (this->m_pdata->get_id(i)-1)))))
{
m_position = pc;
re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_backref, sizeof(re_brace)));
re_alt* alt = static_cast<re_alt*>(this->insert_state(expected_alt_point, syntax_element_alt, sizeof(re_alt)));
alt->alt.i = this->m_pdata->m_data.size() - this->getoffset(alt);
}
- else if(this->getaddress(static_cast<re_alt*>(b)->alt.i, b)->type == syntax_element_alt)
+ else if(((std::ptrdiff_t)this->m_pdata->m_data.size() > (static_cast<re_alt*>(b)->alt.i + this->getoffset(b))) && (static_cast<re_alt*>(b)->alt.i > 0) && this->getaddress(static_cast<re_alt*>(b)->alt.i, b)->type == syntax_element_alt)
{
// Can't have seen more than one alternative:
// Rewind to start of (? sequence:
}
break;
}
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
return false;
}
format_no_copy = format_all << 1, /* don't copy non-matching segments. */
format_first_only = format_no_copy << 1, /* Only replace first occurance. */
format_is_if = format_first_only << 1, /* internal use only. */
- format_literal = format_is_if << 1 /* treat string as a literal */
+ format_literal = format_is_if << 1, /* treat string as a literal */
+
+ match_not_any = match_not_bol | match_not_eol | match_not_bob
+ | match_not_eob | match_not_bow | match_not_eow | match_not_dot_newline
+ | match_not_dot_null | match_prev_avail | match_init | match_not_null
+ | match_continuous | match_partial | match_stop | match_not_initial_null
+ | match_stop | match_all | match_perl | match_posix | match_nosubs
+ | match_extra | match_single_line | match_unused1 | match_unused2
+ | match_unused3 | match_max | format_perl | format_default | format_sed
+ | format_all | format_no_copy | format_first_only | format_is_if
+ | format_literal
+
} match_flags;
if(*p == static_cast<charT>(0))
{
// treat null string as special case:
- if(traits_inst.translate(*ptr, icase) != *p)
+ if(traits_inst.translate(*ptr, icase))
{
- while(*p == static_cast<charT>(0))++p;
+ ++p;
continue;
}
return set_->isnot ? next : (ptr == next) ? ++next : ptr;
const re_syntax_base* preturn_address;
Results results;
repeater_count<iterator>* repeater_stack;
+ iterator location_of_start;
};
#ifdef BOOST_MSVC
match_any_mask = static_cast<unsigned char>((f & match_not_dot_newline) ? BOOST_REGEX_DETAIL_NS::test_not_newline : BOOST_REGEX_DETAIL_NS::test_newline);
// Disable match_any if requested in the state machine:
if(e.get_data().m_disable_match_any)
- m_match_flags &= ~regex_constants::match_any;
+ m_match_flags &= regex_constants::match_not_any;
}
template <class BidiIterator, class Allocator, class traits>
struct saved_recursion : public saved_state
{
saved_recursion(int idx, const re_syntax_base* p, Results* pr)
- : saved_state(14), recursion_id(idx), preturn_address(p), results(*pr)
- {}
+ : saved_state(14), recursion_id(idx), preturn_address(p), results(*pr) {}
int recursion_id;
const re_syntax_base* preturn_address;
Results results;
m_independent = true;
const re_syntax_base* next_pstate = static_cast<const re_jump*>(pstate->next.p)->alt.p->next.p;
pstate = pstate->next.p->next.p;
- bool r = match_all_states();
+ bool r = false;
+#if !defined(BOOST_NO_EXCEPTIONS)
+ try{
+#endif
+ r = match_all_states();
if(!r && !m_independent)
{
// Must be unwinding from a COMMIT/SKIP/PRUNE and the independent
while(unwind(false));
return false;
}
+#if !defined(BOOST_NO_EXCEPTIONS)
+ }
+ catch(...)
+ {
pstate = next_pstate;
- m_independent = old_independent;
+ // unwind all pushed states, apart from anything else this
+ // ensures that all the states are correctly destructed
+ // not just the memory freed.
+ while(unwind(true)) {}
+ throw;
+ }
+#endif
+ pstate = next_pstate;
+ m_independent = old_independent;
#ifdef BOOST_REGEX_MATCH_EXTRA
if(r && (m_match_flags & match_extra))
{
for(i = 0; i < temp_match.size(); ++i)
(*m_presult)[i].get_captures().clear();
// match everything else:
- r = match_all_states();
- // now place the stored captures back:
+#if !defined(BOOST_NO_EXCEPTIONS)
+ try{
+#endif
+ r = match_all_states();
+#if !defined(BOOST_NO_EXCEPTIONS)
+ }
+ catch(...)
+ {
+ pstate = next_pstate;
+ // unwind all pushed states, apart from anything else this
+ // ensures that all the states are correctly destructed
+ // not just the memory freed.
+ while(unwind(true)) {}
+ throw;
+ }
+#endif
+ // now place the stored captures back:
for(i = 0; i < temp_match.size(); ++i)
{
typedef typename sub_match<BidiIterator>::capture_sequence_type seq;
BidiIterator saved_position = position;
const re_syntax_base* next_pstate = static_cast<const re_jump*>(pstate->next.p)->alt.p->next.p;
pstate = pstate->next.p->next.p;
- bool r = match_all_states();
- position = saved_position;
- if(negated)
- r = !r;
- if(r)
+#if !defined(BOOST_NO_EXCEPTIONS)
+ try{
+#endif
+ bool r = match_all_states();
+ position = saved_position;
+ if(negated)
+ r = !r;
+ if(r)
+ pstate = next_pstate;
+ else
+ pstate = alt->alt.p;
+#if !defined(BOOST_NO_EXCEPTIONS)
+ }
+ catch(...)
+ {
pstate = next_pstate;
- else
- pstate = alt->alt.p;
+ // unwind all pushed states, apart from anything else this
+ // ensures that all the states are correctly destructed
+ // not just the memory freed.
+ while(unwind(true)){}
+ throw;
+ }
+#endif
break;
}
}
{
BOOST_ASSERT(pstate->type == syntax_element_recurse);
//
+ // See if we've seen this recursion before at this location, if we have then
+ // we need to prevent infinite recursion:
+ //
+ for(typename std::vector<recursion_info<results_type> >::reverse_iterator i = recursion_stack.rbegin(); i != recursion_stack.rend(); ++i)
+ {
+ if(i->idx == static_cast<const re_brace*>(static_cast<const re_jump*>(pstate)->alt.p)->index)
+ {
+ if(i->location_of_start == position)
+ return false;
+ break;
+ }
+ }
+ //
// Backup call stack:
//
push_recursion_pop();
recursion_stack.back().results = *m_presult;
pstate = static_cast<const re_jump*>(pstate)->alt.p;
recursion_stack.back().idx = static_cast<const re_brace*>(pstate)->index;
+ recursion_stack.back().location_of_start = position;
//if(static_cast<const re_recurse*>(pstate)->state_id > 0)
{
push_repeater_count(-(2 + static_cast<const re_brace*>(pstate)->index), &next_count);
recursion_stack.back().idx = pmp->recursion_id;
recursion_stack.back().preturn_address = pmp->preturn_address;
recursion_stack.back().results = pmp->results;
+ recursion_stack.back().location_of_start = position;
}
boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
m_backup_state = pmp;
{
recursion_stack.reserve(50);
}
+ //
+ // See if we've seen this recursion before at this location, if we have then
+ // we need to prevent infinite recursion:
+ //
+ for(typename std::vector<recursion_info<results_type> >::reverse_iterator i = recursion_stack.rbegin(); i != recursion_stack.rend(); ++i)
+ {
+ if(i->idx == static_cast<const re_brace*>(static_cast<const re_jump*>(pstate)->alt.p)->index)
+ {
+ if(i->location_of_start == position)
+ return false;
+ break;
+ }
+ }
+ //
+ // Now get on with it:
+ //
recursion_stack.push_back(recursion_info<results_type>());
recursion_stack.back().preturn_address = pstate->next.p;
recursion_stack.back().results = *m_presult;
recursion_stack.back().repeater_stack = next_count;
+ recursion_stack.back().location_of_start = position;
pstate = static_cast<const re_jump*>(pstate)->alt.p;
recursion_stack.back().idx = static_cast<const re_brace*>(pstate)->index;
recursion_stack.push_back(recursion_info<results_type>());
recursion_stack.back().preturn_address = saved_state;
recursion_stack.back().results = *m_presult;
+ recursion_stack.back().location_of_start = position;
return false;
}
return true;
#include <algorithm>
#include <iosfwd>
#include <vector>
+#include <set>
#include <map>
#include <boost/limits.hpp>
#include <boost/assert.hpp>
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
-// http://www.boost.org/libs/smart_ptr/scoped_array.htm
-//
+// See http://www.boost.org/libs/smart_ptr/ for documentation.
#include <boost/smart_ptr/scoped_array.hpp>
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
-// http://www.boost.org/libs/smart_ptr/scoped_ptr.htm
-//
+// See http://www.boost.org/libs/smart_ptr/ for documentation.
#include <boost/smart_ptr/scoped_ptr.hpp>
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
-// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation.
+// See http://www.boost.org/libs/smart_ptr/ for documentation.
//
#include <boost/smart_ptr/shared_ptr.hpp>
}
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template<class... Args>
- const shared_ptr<T>& postconstruct(Args && ... args)
+ const shared_ptr<T>& postconstruct(Args && ... args) const
{
if(!_postconstructed)
{
auto_buffer_destroy( where, boost::has_trivial_destructor<T>() );
}
+ void auto_buffer_destroy()
+ {
+ BOOST_ASSERT( is_valid() );
+ if( buffer_ ) // do we need this check? Yes, but only
+ // for N = 0u + local instances in one_sided_swap()
+ auto_buffer_destroy( boost::has_trivial_destructor<T>() );
+ }
+
void destroy_back_n( size_type n, const boost::false_type& )
{
BOOST_ASSERT( n > 0 );
{
pointer new_buffer = move_to_new_buffer( new_capacity,
boost::has_nothrow_copy<T>() );
- (*this).~auto_buffer();
+ auto_buffer_destroy();
buffer_ = new_buffer;
members_.capacity_ = new_capacity;
BOOST_ASSERT( size_ <= members_.capacity_ );
void one_sided_swap( auto_buffer& temp ) // nothrow
{
BOOST_ASSERT( !temp.is_on_stack() );
- this->~auto_buffer();
+ auto_buffer_destroy();
// @remark: must be nothrow
get_allocator() = temp.get_allocator();
members_.capacity_ = temp.members_.capacity_;
{
// @remark: we release memory as early as possible
// since we only give the basic guarantee
- (*this).~auto_buffer();
+ auto_buffer_destroy();
buffer_ = 0;
pointer new_buffer = allocate( r.size() );
boost::multi_index::detail::scope_guard guard =
~auto_buffer()
{
- BOOST_ASSERT( is_valid() );
- if( buffer_ ) // do we need this check? Yes, but only
- // for N = 0u + local instances in one_sided_swap()
- auto_buffer_destroy( boost::has_trivial_destructor<T>() );
+ auto_buffer_destroy();
}
public:
pointer uninitialized_grow( size_type n ) // strong
{
- if( size_ + n <= members_.capacity_ )
+ if( size_ + n > members_.capacity_ )
reserve( size_ + n );
pointer res = end();
pointer new_buffer = static_cast<T*>(other->members_.address());
copy_impl( one_on_stack->begin(), one_on_stack->end(),
new_buffer ); // strong
- one_on_stack->~auto_buffer(); // nothrow
+ one_on_stack->auto_buffer_destroy(); // nothrow
boost::swap( get_allocator(), r.get_allocator() ); // assume nothrow
boost::swap( members_.capacity_, r.members_.capacity_ );
boost::swap( size_, r.size_ );
inline bool operator<=( const auto_buffer<T,SBP,GP,A>& l,
const auto_buffer<T,SBP,GP,A>& r )
{
- return !(r > l);
+ return !(l > r);
}
template< class T, class SBP, class GP, class A >
class BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)
BOOST_SIGNALS2_SIGNAL_TEMPLATE_SPECIALIZATION: public signal_base,
public detail::BOOST_SIGNALS2_STD_FUNCTIONAL_BASE
- (typename detail::result_type_wrapper<typename Combiner::result_type>::type)
{
typedef detail::BOOST_SIGNALS2_SIGNAL_IMPL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)
<BOOST_SIGNALS2_SIGNAL_TEMPLATE_INSTANTIATION> impl_class;
#define BOOST_SIGNALS2_SIGNAL_TEMPLATE_SPECIALIZATION_DECL(arity) BOOST_SIGNALS2_SIGNAL_TEMPLATE_DECL(arity)
#define BOOST_SIGNALS2_SIGNAL_TEMPLATE_SPECIALIZATION
-#define BOOST_SIGNALS2_STD_FUNCTIONAL_BASE(result_type) std_functional_base
+#define BOOST_SIGNALS2_STD_FUNCTIONAL_BASE std_functional_base
#define BOOST_SIGNALS2_PP_COMMA_IF(arity) BOOST_PP_COMMA_IF(arity)
ExtendedSlotFunction, \
Mutex>
-#define BOOST_SIGNALS2_STD_FUNCTIONAL_BASE(result_type) \
- std_functional_base<result_type , Args...>
+#define BOOST_SIGNALS2_STD_FUNCTIONAL_BASE \
+ std_functional_base<Args...>
#define BOOST_SIGNALS2_PP_COMMA_IF(arity) ,
: public boost::iterator_facade<slot_call_iterator_t<Function, Iterator, ConnectionBody>,
typename Function::result_type,
boost::single_pass_traversal_tag,
- typename boost::add_const<typename boost::add_reference<typename Function::result_type>::type>::type >
+ typename boost::add_reference<typename boost::add_const<typename Function::result_type>::type>::type >
{
typedef boost::iterator_facade<slot_call_iterator_t<Function, Iterator, ConnectionBody>,
typename Function::result_type,
boost::single_pass_traversal_tag,
- typename boost::add_const<typename boost::add_reference<typename Function::result_type>::type>::type >
+ typename boost::add_reference<typename boost::add_const<typename Function::result_type>::type>::type >
inherited;
typedef typename Function::result_type result_type;
template<BOOST_SIGNALS2_SLOT_TEMPLATE_SPECIALIZATION_DECL(BOOST_SIGNALS2_NUM_ARGS)>
class BOOST_SIGNALS2_SLOT_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) BOOST_SIGNALS2_SLOT_TEMPLATE_SPECIALIZATION
- : public slot_base, public detail::BOOST_SIGNALS2_STD_FUNCTIONAL_BASE(R)
+ : public slot_base, public detail::BOOST_SIGNALS2_STD_FUNCTIONAL_BASE
{
public:
typedef typename variadic_arg_type<n - 1, Args...>::type type;
};
- template <typename R, typename ... Args>
+ template <typename ... Args>
struct std_functional_base
{};
- template <typename R, typename T1>
- struct std_functional_base<R, T1>: public std::unary_function<T1, R>
- {};
- template <typename R, typename T1, typename T2>
- struct std_functional_base<R, T1, T2>: public std::binary_function<T1, T2, R>
- {};
+ template <typename T1>
+ struct std_functional_base<T1>
+ {
+ typedef T1 argument_type;
+ };
+ template <typename T1, typename T2>
+ struct std_functional_base<T1, T2>
+ {
+ typedef T1 first_argument_type;
+ typedef T2 second_argument_type;
+ };
} // namespace detail
} // namespace signals2
} // namespace boost
typedef std::vector<detail::void_shared_ptr_variant> locked_container_type;
const tracked_container_type& tracked_objects() const {return _tracked_objects;}
- #if(!BOOST_NO_EXCEPTIONS)
+ #ifndef BOOST_NO_EXCEPTIONS
locked_container_type lock() const
{
locked_container_type locked_objects;
// http://www.boost.org/LICENSE_1_0.txt)
//
+#include <boost/config.hpp>
#include <exception>
#ifdef __BORLANDC__
# pragma option push -pc
#endif
+#if defined(BOOST_CLANG)
+// Intel C++ on Mac defines __clang__ but doesn't support the pragma
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wweak-vtables"
+#endif
+
class bad_weak_ptr: public std::exception
{
public:
}
};
+#if defined(BOOST_CLANG)
+# pragma clang diagnostic pop
+#endif
+
#if defined(__BORLANDC__) && __BORLANDC__ <= 0x564
# pragma option pop
#endif
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_LOCAL_COUNTED_BASE_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_LOCAL_COUNTED_BASE_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// detail/local_counted_base.hpp
+//
+// Copyright 2017 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)
+//
+// See http://www.boost.org/libs/smart_ptr/ for documentation.
+
+#include <boost/smart_ptr/detail/shared_count.hpp>
+#include <boost/config.hpp>
+#include <utility>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class local_counted_base
+{
+private:
+
+ local_counted_base & operator= ( local_counted_base const & );
+
+private:
+
+ // not 'int' or 'unsigned' to avoid aliasing and enable optimizations
+ enum count_type { min_ = 0, initial_ = 1, max_ = 2147483647 };
+
+ count_type local_use_count_;
+
+public:
+
+ BOOST_CONSTEXPR local_counted_base() BOOST_SP_NOEXCEPT: local_use_count_( initial_ )
+ {
+ }
+
+ BOOST_CONSTEXPR local_counted_base( local_counted_base const & ) BOOST_SP_NOEXCEPT: local_use_count_( initial_ )
+ {
+ }
+
+ virtual ~local_counted_base() /*BOOST_SP_NOEXCEPT*/
+ {
+ }
+
+ virtual void local_cb_destroy() BOOST_SP_NOEXCEPT = 0;
+
+ virtual boost::detail::shared_count local_cb_get_shared_count() const BOOST_SP_NOEXCEPT = 0;
+
+ void add_ref() BOOST_SP_NOEXCEPT
+ {
+#if !defined(__NVCC__)
+#if defined( __has_builtin )
+# if __has_builtin( __builtin_assume )
+
+ __builtin_assume( local_use_count_ >= 1 );
+
+# endif
+#endif
+#endif
+
+ local_use_count_ = static_cast<count_type>( local_use_count_ + 1 );
+ }
+
+ void release() BOOST_SP_NOEXCEPT
+ {
+ local_use_count_ = static_cast<count_type>( local_use_count_ - 1 );
+
+ if( local_use_count_ == 0 )
+ {
+ local_cb_destroy();
+ }
+ }
+
+ long local_use_count() const BOOST_SP_NOEXCEPT
+ {
+ return local_use_count_;
+ }
+};
+
+class local_counted_impl: public local_counted_base
+{
+private:
+
+ local_counted_impl( local_counted_impl const & );
+
+private:
+
+ shared_count pn_;
+
+public:
+
+ explicit local_counted_impl( shared_count const& pn ): pn_( pn )
+ {
+ }
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ explicit local_counted_impl( shared_count && pn ): pn_( std::move(pn) )
+ {
+ }
+
+#endif
+
+ virtual void local_cb_destroy() BOOST_SP_NOEXCEPT
+ {
+ delete this;
+ }
+
+ virtual boost::detail::shared_count local_cb_get_shared_count() const BOOST_SP_NOEXCEPT
+ {
+ return pn_;
+ }
+};
+
+class local_counted_impl_em: public local_counted_base
+{
+public:
+
+ shared_count pn_;
+
+ virtual void local_cb_destroy() BOOST_SP_NOEXCEPT
+ {
+ shared_count().swap( pn_ );
+ }
+
+ virtual boost::detail::shared_count local_cb_get_shared_count() const BOOST_SP_NOEXCEPT
+ {
+ return pn_;
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_LOCAL_COUNTED_BASE_HPP_INCLUDED
--- /dev/null
+#ifndef BOOST_SMART_PTR_DETAIL_LOCAL_SP_DELETER_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_LOCAL_SP_DELETER_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// detail/local_sp_deleter.hpp
+//
+// Copyright 2017 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)
+//
+// See http://www.boost.org/libs/smart_ptr/ for documentation.
+
+#include <boost/smart_ptr/detail/local_counted_base.hpp>
+#include <boost/config.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+template<class D> class local_sp_deleter: public local_counted_impl_em
+{
+private:
+
+ D d_;
+
+public:
+
+ local_sp_deleter(): d_()
+ {
+ }
+
+ explicit local_sp_deleter( D const& d ) BOOST_SP_NOEXCEPT: d_( d )
+ {
+ }
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ explicit local_sp_deleter( D&& d ) BOOST_SP_NOEXCEPT: d_( std::move(d) )
+ {
+ }
+
+#endif
+
+ D& deleter()
+ {
+ return d_;
+ }
+
+ template<class Y> void operator()( Y* p ) BOOST_SP_NOEXCEPT
+ {
+ d_( p );
+ }
+
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+
+ void operator()( boost::detail::sp_nullptr_t p ) BOOST_SP_NOEXCEPT
+ {
+ d_( p );
+ }
+
+#endif
+};
+
+template<> class local_sp_deleter<void>
+{
+};
+
+template<class D> D * get_local_deleter( local_sp_deleter<D> * p )
+{
+ return &p->deleter();
+}
+
+inline void * get_local_deleter( local_sp_deleter<void> * /*p*/ )
+{
+ return 0;
+}
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_LOCAL_SP_DELETER_HPP_INCLUDED
#include <boost/predef.h>
#ifdef BOOST_USE_WINDOWS_H
-# include <windows.h>
+
+#include <windows.h>
+
+#else
+
+struct _RTL_CRITICAL_SECTION;
+
#endif
namespace boost
};
#if BOOST_PLAT_WINDOWS_RUNTIME
-extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSectionEx(critical_section *, unsigned long, unsigned long);
+extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSectionEx(::_RTL_CRITICAL_SECTION *, unsigned long, unsigned long);
#else
-extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(critical_section *);
+extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(::_RTL_CRITICAL_SECTION *);
#endif
-extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(critical_section *);
-extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(critical_section *);
-extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(critical_section *);
+extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(::_RTL_CRITICAL_SECTION *);
+extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(::_RTL_CRITICAL_SECTION *);
+extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(::_RTL_CRITICAL_SECTION *);
#else
lightweight_mutex()
{
#if BOOST_PLAT_WINDOWS_RUNTIME
- InitializeCriticalSectionEx(&cs_, 4000, 0);
+ boost::detail::InitializeCriticalSectionEx(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&cs_), 4000, 0);
#else
- InitializeCriticalSection(&cs_);
+ boost::detail::InitializeCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&cs_));
#endif
}
~lightweight_mutex()
{
- DeleteCriticalSection(&cs_);
+ boost::detail::DeleteCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&cs_));
}
class scoped_lock;
explicit scoped_lock(lightweight_mutex & m): m_(m)
{
- EnterCriticalSection(&m_.cs_);
+ boost::detail::EnterCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_.cs_));
}
~scoped_lock()
{
- LeaveCriticalSection(&m_.cs_);
+ boost::detail::LeaveCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_.cs_));
}
};
};
#if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR )\
&& !(defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5130))
- explicit operator bool () const BOOST_NOEXCEPT
+ explicit operator bool () const BOOST_SP_NOEXCEPT
{
return px != 0;
}
#elif ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__)
- operator bool () const BOOST_NOEXCEPT
+ operator bool () const BOOST_SP_NOEXCEPT
{
return px != 0;
}
typedef void (*unspecified_bool_type)( this_type*** );
- operator unspecified_bool_type() const BOOST_NOEXCEPT
+ operator unspecified_bool_type() const BOOST_SP_NOEXCEPT
{
return px == 0? 0: unspecified_bool;
}
typedef element_type * (this_type::*unspecified_bool_type)() const;
- operator unspecified_bool_type() const BOOST_NOEXCEPT
+ operator unspecified_bool_type() const BOOST_SP_NOEXCEPT
{
return px == 0? 0: &this_type::get;
}
typedef element_type * this_type::*unspecified_bool_type;
- operator unspecified_bool_type() const BOOST_NOEXCEPT
+ operator unspecified_bool_type() const BOOST_SP_NOEXCEPT
{
return px == 0? 0: &this_type::px;
}
#endif
// operator! is redundant, but some compilers need it
- bool operator! () const BOOST_NOEXCEPT
+ bool operator! () const BOOST_SP_NOEXCEPT
{
return px == 0;
}
namespace movelib
{
- template< class T, class D > class unique_ptr;
+template< class T, class D > class unique_ptr;
} // namespace movelib
public:
- shared_count(): pi_(0) // nothrow
+ BOOST_CONSTEXPR shared_count(): pi_(0) // nothrow
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ , id_(shared_count_id)
+#endif
+ {
+ }
+
+ BOOST_CONSTEXPR explicit shared_count( sp_counted_base * pi ): pi_( pi ) // nothrow
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
, id_(shared_count_id)
#endif
try
{
-#if !defined( BOOST_NO_CXX11_ALLOCATOR )
-
- impl_type * pi = std::allocator_traits<A2>::allocate( a2, 1 );
- pi_ = pi;
- std::allocator_traits<A2>::construct( a2, pi, p, d, a );
-
-#else
-
- pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) );
+ pi_ = a2.allocate( 1 );
::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a );
-
-#endif
}
catch(...)
{
#else
-#if !defined( BOOST_NO_CXX11_ALLOCATOR )
-
- impl_type * pi = std::allocator_traits<A2>::allocate( a2, 1 );
- pi_ = pi;
-
-#else
-
- pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) );
-
-#endif
+ pi_ = a2.allocate( 1 );
if( pi_ != 0 )
{
-#if !defined( BOOST_NO_CXX11_ALLOCATOR )
-
- std::allocator_traits<A2>::construct( a2, pi, p, d, a );
-
-#else
-
::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a );
-
-#endif
}
else
{
try
{
-#if !defined( BOOST_NO_CXX11_ALLOCATOR )
-
- impl_type * pi = std::allocator_traits<A2>::allocate( a2, 1 );
- pi_ = pi;
- std::allocator_traits<A2>::construct( a2, pi, p, a );
-
-#else
-
- pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) );
+ pi_ = a2.allocate( 1 );
::new( static_cast< void* >( pi_ ) ) impl_type( p, a );
-
-#endif
}
catch(...)
{
#else
-#if !defined( BOOST_NO_CXX11_ALLOCATOR )
-
- impl_type * pi = std::allocator_traits<A2>::allocate( a2, 1 );
- pi_ = pi;
-
-#else
-
- pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) );
-
-#endif
+ pi_ = a2.allocate( 1 );
if( pi_ != 0 )
{
-#if !defined( BOOST_NO_CXX11_ALLOCATOR )
-
- std::allocator_traits<A2>::construct( a2, pi, p, a );
-
-#else
-
::new( static_cast< void* >( pi_ ) ) impl_type( p, a );
-
-#endif
}
else
{
return pi_? pi_->get_deleter( ti ): 0;
}
+ void * get_local_deleter( sp_typeinfo const & ti ) const
+ {
+ return pi_? pi_->get_local_deleter( ti ): 0;
+ }
+
void * get_untyped_deleter() const
{
return pi_? pi_->get_untyped_deleter(): 0;
public:
- weak_count(): pi_(0) // nothrow
+ BOOST_CONSTEXPR weak_count(): pi_(0) // nothrow
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
, id_(weak_count_id)
#endif
#include <boost/config.hpp>
#include <boost/smart_ptr/detail/sp_has_sync.hpp>
-#if defined( __clang__ ) && defined( __has_extension )
+#if !defined( __c2__ ) && defined( __clang__ ) && defined( __has_extension )
# if __has_extension( __c_atomic__ )
# define BOOST_SP_HAS_CLANG_C11_ATOMICS
# endif
#elif defined( BOOST_SP_HAS_CLANG_C11_ATOMICS )
# include <boost/smart_ptr/detail/sp_counted_base_clang.hpp>
+#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
+# include <boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp>
+
#elif defined( __SNC__ )
# include <boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp>
#elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) ) && !defined(__PATHSCALE__) && !defined( _AIX )
# include <boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp>
-#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__)
+#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) && !defined( __mips16 )
# include <boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp>
#elif defined( BOOST_SP_HAS_SYNC )
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
}
+#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wweak-vtables"
+#endif
+
class sp_counted_base
{
private:
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
};
+#if defined(__clang__)
+# pragma clang diagnostic pop
+#endif
+
} // namespace detail
} // namespace boost
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
#include <boost/checked_delete.hpp>
#include <boost/smart_ptr/detail/sp_counted_base.hpp>
+#include <boost/core/addressof.hpp>
#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
#include <boost/smart_ptr/detail/quick_allocator.hpp>
namespace detail
{
+// get_local_deleter
+
+template<class D> class local_sp_deleter;
+
+template<class D> D * get_local_deleter( D * /*p*/ )
+{
+ return 0;
+}
+
+template<class D> D * get_local_deleter( local_sp_deleter<D> * p );
+
+//
+
template<class X> class sp_counted_impl_p: public sp_counted_base
{
private:
return 0;
}
+ virtual void * get_local_deleter( sp_typeinfo const & )
+ {
+ return 0;
+ }
+
virtual void * get_untyped_deleter()
{
return 0;
return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast<char&>( del ): 0;
}
+ virtual void * get_local_deleter( sp_typeinfo const & ti )
+ {
+ return ti == BOOST_SP_TYPEID(D)? boost::detail::get_local_deleter( boost::addressof( del ) ): 0;
+ }
+
virtual void * get_untyped_deleter()
{
return &reinterpret_cast<char&>( del );
A2 a2( a_ );
-#if !defined( BOOST_NO_CXX11_ALLOCATOR )
-
- std::allocator_traits<A2>::destroy( a2, this );
-
-#else
-
this->~this_type();
-#endif
-
a2.deallocate( this, 1 );
}
return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast<char&>( d_ ): 0;
}
+ virtual void * get_local_deleter( sp_typeinfo const & ti )
+ {
+ return ti == BOOST_SP_TYPEID(D)? boost::detail::get_local_deleter( boost::addressof( d_ ) ): 0;
+ }
+
virtual void * get_untyped_deleter()
{
return &reinterpret_cast<char&>( d_ );
#ifndef BOOST_SP_NO_SYNC
-#if defined( __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 )
+#if !defined( __c2__ ) && defined( __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 )
# define BOOST_SP_HAS_SYNC
-#elif defined( __IBMCPP__ ) && ( __IBMCPP__ >= 1210 )
+#elif defined( __IBMCPP__ ) && ( __IBMCPP__ >= 1210 ) && !defined( __COMPILER_VER__ )
# define BOOST_SP_HAS_SYNC
-#elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 )
+#elif !defined( __c2__ ) && defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 )
#define BOOST_SP_HAS_SYNC
--- /dev/null
+#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, 2017 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>
+
+// BOOST_SP_NOEXCEPT
+
+#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
+
+// BOOST_SP_NOEXCEPT_WITH_ASSERT
+
+#if defined(BOOST_DISABLE_ASSERTS) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && defined(NDEBUG) )
+
+# define BOOST_SP_NOEXCEPT_WITH_ASSERT BOOST_SP_NOEXCEPT
+
+#elif defined(BOOST_ENABLE_ASSERT_HANDLER) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG) )
+
+# define BOOST_SP_NOEXCEPT_WITH_ASSERT
+
+#else
+
+# define BOOST_SP_NOEXCEPT_WITH_ASSERT BOOST_SP_NOEXCEPT
+
+#endif
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_NOEXCEPT_HPP_INCLUDED
#elif defined( BOOST_SP_USE_PTHREADS )
# include <boost/smart_ptr/detail/spinlock_pt.hpp>
+#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
+# include <boost/smart_ptr/detail/spinlock_std_atomic.hpp>
+
#elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ )
# include <boost/smart_ptr/detail/spinlock_gcc_arm.hpp>
// BOOST_SMT_PAUSE
-#if defined(_MSC_VER) && _MSC_VER >= 1310 && ( defined(_M_IX86) || defined(_M_X64) )
+#if defined(_MSC_VER) && _MSC_VER >= 1310 && ( defined(_M_IX86) || defined(_M_X64) ) && !defined(__c2__)
extern "C" void _mm_pause();
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
-// http://www.boost.org/libs/smart_ptr/scoped_array.htm
-//
+// See http://www.boost.org/libs/smart_ptr/ for documentation.
#include <boost/config.hpp>
#include <boost/assert.hpp>
#include <boost/checked_delete.hpp>
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
+#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#include <boost/detail/workaround.hpp>
typedef T element_type;
- explicit scoped_array( T * p = 0 ) BOOST_NOEXCEPT : px( p )
+ explicit scoped_array( T * p = 0 ) BOOST_SP_NOEXCEPT : px( p )
{
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
boost::sp_array_constructor_hook( px );
#endif
}
- ~scoped_array() // never throws
+ ~scoped_array() BOOST_SP_NOEXCEPT
{
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
boost::sp_array_destructor_hook( px );
boost::checked_array_delete( px );
}
- void reset(T * p = 0) // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
+ void reset(T * p = 0) BOOST_SP_NOEXCEPT_WITH_ASSERT
{
BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
this_type(p).swap(*this);
}
- T & operator[](std::ptrdiff_t i) const // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
+ T & operator[](std::ptrdiff_t i) const BOOST_SP_NOEXCEPT_WITH_ASSERT
{
BOOST_ASSERT( px != 0 );
BOOST_ASSERT( i >= 0 );
return px[i];
}
- T * get() const BOOST_NOEXCEPT
+ T * get() const BOOST_SP_NOEXCEPT
{
return px;
}
// implicit conversion to "bool"
#include <boost/smart_ptr/detail/operator_bool.hpp>
- void swap(scoped_array & b) BOOST_NOEXCEPT
+ void swap(scoped_array & b) BOOST_SP_NOEXCEPT
{
T * tmp = b.px;
b.px = px;
#if !defined( BOOST_NO_CXX11_NULLPTR )
-template<class T> inline bool operator==( scoped_array<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+template<class T> inline bool operator==( scoped_array<T> const & p, boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT
{
return p.get() == 0;
}
-template<class T> inline bool operator==( boost::detail::sp_nullptr_t, scoped_array<T> const & p ) BOOST_NOEXCEPT
+template<class T> inline bool operator==( boost::detail::sp_nullptr_t, scoped_array<T> const & p ) BOOST_SP_NOEXCEPT
{
return p.get() == 0;
}
-template<class T> inline bool operator!=( scoped_array<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+template<class T> inline bool operator!=( scoped_array<T> const & p, boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT
{
return p.get() != 0;
}
-template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, scoped_array<T> const & p ) BOOST_NOEXCEPT
+template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, scoped_array<T> const & p ) BOOST_SP_NOEXCEPT
{
return p.get() != 0;
}
#endif
-template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) BOOST_NOEXCEPT
+template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) BOOST_SP_NOEXCEPT
{
a.swap(b);
}
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
-// http://www.boost.org/libs/smart_ptr/scoped_ptr.htm
-//
+// See http://www.boost.org/libs/smart_ptr/ for documentation.
#include <boost/config.hpp>
#include <boost/assert.hpp>
#include <boost/checked_delete.hpp>
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
#include <boost/smart_ptr/detail/sp_disable_deprecated.hpp>
+#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#include <boost/detail/workaround.hpp>
#ifndef BOOST_NO_AUTO_PTR
typedef T element_type;
- explicit scoped_ptr( T * p = 0 ): px( p ) // never throws
+ explicit scoped_ptr( T * p = 0 ) BOOST_SP_NOEXCEPT : px( p )
{
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
boost::sp_scalar_constructor_hook( px );
#ifndef BOOST_NO_AUTO_PTR
- explicit scoped_ptr( std::auto_ptr<T> p ) BOOST_NOEXCEPT : px( p.release() )
+ explicit scoped_ptr( std::auto_ptr<T> p ) BOOST_SP_NOEXCEPT : px( p.release() )
{
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
boost::sp_scalar_constructor_hook( px );
#endif
- ~scoped_ptr() // never throws
+ ~scoped_ptr() BOOST_SP_NOEXCEPT
{
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
boost::sp_scalar_destructor_hook( px );
boost::checked_delete( px );
}
- void reset(T * p = 0) // never throws
+ void reset(T * p = 0) BOOST_SP_NOEXCEPT_WITH_ASSERT
{
BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
this_type(p).swap(*this);
}
- T & operator*() const // never throws
+ T & operator*() const BOOST_SP_NOEXCEPT_WITH_ASSERT
{
BOOST_ASSERT( px != 0 );
return *px;
}
- T * operator->() const // never throws
+ T * operator->() const BOOST_SP_NOEXCEPT_WITH_ASSERT
{
BOOST_ASSERT( px != 0 );
return px;
}
- T * get() const BOOST_NOEXCEPT
+ T * get() const BOOST_SP_NOEXCEPT
{
return px;
}
// implicit conversion to "bool"
#include <boost/smart_ptr/detail/operator_bool.hpp>
- void swap(scoped_ptr & b) BOOST_NOEXCEPT
+ void swap(scoped_ptr & b) BOOST_SP_NOEXCEPT
{
T * tmp = b.px;
b.px = px;
#if !defined( BOOST_NO_CXX11_NULLPTR )
-template<class T> inline bool operator==( scoped_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+template<class T> inline bool operator==( scoped_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT
{
return p.get() == 0;
}
-template<class T> inline bool operator==( boost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) BOOST_NOEXCEPT
+template<class T> inline bool operator==( boost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) BOOST_SP_NOEXCEPT
{
return p.get() == 0;
}
-template<class T> inline bool operator!=( scoped_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+template<class T> inline bool operator!=( scoped_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT
{
return p.get() != 0;
}
-template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) BOOST_NOEXCEPT
+template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) BOOST_SP_NOEXCEPT
{
return p.get() != 0;
}
#endif
-template<class T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b) BOOST_NOEXCEPT
+template<class T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b) BOOST_SP_NOEXCEPT
{
a.swap(b);
}
// get_pointer(p) is a generic way to say p.get()
-template<class T> inline T * get_pointer(scoped_ptr<T> const & p) BOOST_NOEXCEPT
+template<class T> inline T * get_pointer(scoped_ptr<T> const & p) BOOST_SP_NOEXCEPT
{
return p.get();
}
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
-// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation.
+// See http://www.boost.org/libs/smart_ptr/ for documentation.
//
#include <boost/config.hpp> // for broken compiler workarounds
#include <boost/smart_ptr/detail/sp_convertible.hpp>
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
#include <boost/smart_ptr/detail/sp_disable_deprecated.hpp>
+#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#if !defined(BOOST_SP_NO_ATOMIC_ACCESS)
#include <boost/smart_ptr/detail/spinlock_pool.hpp>
// sp_assert_convertible
-template< class Y, class T > inline void sp_assert_convertible()
+template< class Y, class T > inline void sp_assert_convertible() BOOST_SP_NOEXCEPT
{
#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
+struct sp_internal_constructor_tag
+{
+};
+
} // namespace detail
typedef typename boost::detail::sp_element< T >::type element_type;
- shared_ptr() BOOST_NOEXCEPT : px( 0 ), pn() // never throws in 1.30+
+ BOOST_CONSTEXPR shared_ptr() BOOST_SP_NOEXCEPT : px( 0 ), pn()
{
}
#if !defined( BOOST_NO_CXX11_NULLPTR )
- shared_ptr( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT : px( 0 ), pn() // never throws
+ BOOST_CONSTEXPR shared_ptr( boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT : px( 0 ), pn()
+ {
+ }
+
+#endif
+
+ BOOST_CONSTEXPR shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count const & pn_ ) BOOST_SP_NOEXCEPT : px( px_ ), pn( pn_ )
+ {
+ }
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ BOOST_CONSTEXPR shared_ptr( boost::detail::sp_internal_constructor_tag, element_type * px_, boost::detail::shared_count && pn_ ) BOOST_SP_NOEXCEPT : px( px_ ), pn( std::move( pn_ ) )
{
}
// ... except in C++0x, move disables the implicit copy
- shared_ptr( shared_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
+ shared_ptr( shared_ptr const & r ) BOOST_SP_NOEXCEPT : px( r.px ), pn( r.pn )
{
}
template<class Y>
shared_ptr( weak_ptr<Y> const & r, boost::detail::sp_nothrow_tag )
- BOOST_NOEXCEPT : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() )
+ BOOST_SP_NOEXCEPT : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() )
{
if( !pn.empty() )
{
shared_ptr( shared_ptr<Y> const & r )
#endif
- BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
+ BOOST_SP_NOEXCEPT : px( r.px ), pn( r.pn )
{
boost::detail::sp_assert_convertible< Y, T >();
}
// aliasing
template< class Y >
- shared_ptr( shared_ptr<Y> const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn )
+ shared_ptr( shared_ptr<Y> const & r, element_type * p ) BOOST_SP_NOEXCEPT : px( p ), pn( r.pn )
{
}
boost::detail::sp_assert_convertible< Y, T >();
typename std::unique_ptr< Y, D >::pointer tmp = r.get();
- pn = boost::detail::shared_count( r );
- boost::detail::sp_deleter_construct( this, tmp );
+ if( tmp != 0 )
+ {
+ pn = boost::detail::shared_count( r );
+ boost::detail::sp_deleter_construct( this, tmp );
+ }
}
#endif
boost::detail::sp_assert_convertible< Y, T >();
typename boost::movelib::unique_ptr< Y, D >::pointer tmp = r.get();
- pn = boost::detail::shared_count( r );
- boost::detail::sp_deleter_construct( this, tmp );
+ if( tmp != 0 )
+ {
+ pn = boost::detail::shared_count( r );
+ boost::detail::sp_deleter_construct( this, tmp );
+ }
}
// assignment
- shared_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT
+ shared_ptr & operator=( shared_ptr const & r ) BOOST_SP_NOEXCEPT
{
this_type(r).swap(*this);
return *this;
#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400)
template<class Y>
- shared_ptr & operator=(shared_ptr<Y> const & r) BOOST_NOEXCEPT
+ shared_ptr & operator=(shared_ptr<Y> const & r) BOOST_SP_NOEXCEPT
{
this_type(r).swap(*this);
return *this;
shared_ptr tmp;
- tmp.px = p;
- tmp.pn = boost::detail::shared_count( r );
+ if( p != 0 )
+ {
+ tmp.px = p;
+ tmp.pn = boost::detail::shared_count( r );
- boost::detail::sp_deleter_construct( &tmp, p );
+ boost::detail::sp_deleter_construct( &tmp, p );
+ }
tmp.swap( *this );
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
- shared_ptr( shared_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn()
+ shared_ptr( shared_ptr && r ) BOOST_SP_NOEXCEPT : px( r.px ), pn()
{
pn.swap( r.pn );
r.px = 0;
shared_ptr( shared_ptr<Y> && r )
#endif
- BOOST_NOEXCEPT : px( r.px ), pn()
+ BOOST_SP_NOEXCEPT : px( r.px ), pn()
{
boost::detail::sp_assert_convertible< Y, T >();
r.px = 0;
}
- shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT
+ shared_ptr & operator=( shared_ptr && r ) BOOST_SP_NOEXCEPT
{
this_type( static_cast< shared_ptr && >( r ) ).swap( *this );
return *this;
}
template<class Y>
- shared_ptr & operator=( shared_ptr<Y> && r ) BOOST_NOEXCEPT
+ shared_ptr & operator=( shared_ptr<Y> && r ) BOOST_SP_NOEXCEPT
{
this_type( static_cast< shared_ptr<Y> && >( r ) ).swap( *this );
return *this;
// aliasing move
template<class Y>
- shared_ptr( shared_ptr<Y> && r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn()
+ shared_ptr( shared_ptr<Y> && r, element_type * p ) BOOST_SP_NOEXCEPT : px( p ), pn()
{
pn.swap( r.pn );
r.px = 0;
#if !defined( BOOST_NO_CXX11_NULLPTR )
- shared_ptr & operator=( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT // never throws
+ shared_ptr & operator=( boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT
{
this_type().swap(*this);
return *this;
#endif
- void reset() BOOST_NOEXCEPT // never throws in 1.30+
+ void reset() BOOST_SP_NOEXCEPT
{
this_type().swap(*this);
}
this_type( p, d, a ).swap( *this );
}
- template<class Y> void reset( shared_ptr<Y> const & r, element_type * p )
+ template<class Y> void reset( shared_ptr<Y> const & r, element_type * p ) BOOST_SP_NOEXCEPT
{
this_type( r, p ).swap( *this );
}
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
- template<class Y> void reset( shared_ptr<Y> && r, element_type * p )
+ template<class Y> void reset( shared_ptr<Y> && r, element_type * p ) BOOST_SP_NOEXCEPT
{
this_type( static_cast< shared_ptr<Y> && >( r ), p ).swap( *this );
}
#endif
- // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
- typename boost::detail::sp_dereference< T >::type operator* () const
+ typename boost::detail::sp_dereference< T >::type operator* () const BOOST_SP_NOEXCEPT_WITH_ASSERT
{
BOOST_ASSERT( px != 0 );
return *px;
}
- // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
- typename boost::detail::sp_member_access< T >::type operator-> () const
+ typename boost::detail::sp_member_access< T >::type operator-> () const BOOST_SP_NOEXCEPT_WITH_ASSERT
{
BOOST_ASSERT( px != 0 );
return px;
}
- // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
- typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const
+ typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const BOOST_SP_NOEXCEPT_WITH_ASSERT
{
BOOST_ASSERT( px != 0 );
BOOST_ASSERT( i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 ) );
return static_cast< typename boost::detail::sp_array_access< T >::type >( px[ i ] );
}
- element_type * get() const BOOST_NOEXCEPT
+ element_type * get() const BOOST_SP_NOEXCEPT
{
return px;
}
// implicit conversion to "bool"
#include <boost/smart_ptr/detail/operator_bool.hpp>
- bool unique() const BOOST_NOEXCEPT
+ bool unique() const BOOST_SP_NOEXCEPT
{
return pn.unique();
}
- long use_count() const BOOST_NOEXCEPT
+ long use_count() const BOOST_SP_NOEXCEPT
{
return pn.use_count();
}
- void swap( shared_ptr & other ) BOOST_NOEXCEPT
+ void swap( shared_ptr & other ) BOOST_SP_NOEXCEPT
{
std::swap(px, other.px);
pn.swap(other.pn);
}
- template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const BOOST_NOEXCEPT
+ template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const BOOST_SP_NOEXCEPT
{
return pn < rhs.pn;
}
- template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const BOOST_NOEXCEPT
+ template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const BOOST_SP_NOEXCEPT
{
return pn < rhs.pn;
}
- void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_NOEXCEPT
+ void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_SP_NOEXCEPT
{
return pn.get_deleter( ti );
}
- void * _internal_get_untyped_deleter() const BOOST_NOEXCEPT
+ void * _internal_get_local_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_SP_NOEXCEPT
+ {
+ return pn.get_local_deleter( ti );
+ }
+
+ void * _internal_get_untyped_deleter() const BOOST_SP_NOEXCEPT
{
return pn.get_untyped_deleter();
}
- bool _internal_equiv( shared_ptr const & r ) const BOOST_NOEXCEPT
+ bool _internal_equiv( shared_ptr const & r ) const BOOST_SP_NOEXCEPT
{
return px == r.px && pn == r.pn;
}
+ boost::detail::shared_count _internal_count() const BOOST_NOEXCEPT
+ {
+ return pn;
+ }
+
// Tasteless as this may seem, making all members public allows member templates
// to work in the absence of member template friends. (Matthew Langston)
}; // shared_ptr
-template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_NOEXCEPT
+template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_SP_NOEXCEPT
{
return a.get() == b.get();
}
-template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_NOEXCEPT
+template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_SP_NOEXCEPT
{
return a.get() != b.get();
}
// Resolve the ambiguity between our op!= and the one in rel_ops
-template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T> const & b) BOOST_NOEXCEPT
+template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T> const & b) BOOST_SP_NOEXCEPT
{
return a.get() != b.get();
}
#if !defined( BOOST_NO_CXX11_NULLPTR )
-template<class T> inline bool operator==( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+template<class T> inline bool operator==( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT
{
return p.get() == 0;
}
-template<class T> inline bool operator==( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) BOOST_NOEXCEPT
+template<class T> inline bool operator==( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
{
return p.get() == 0;
}
-template<class T> inline bool operator!=( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
+template<class T> inline bool operator!=( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT
{
return p.get() != 0;
}
-template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) BOOST_NOEXCEPT
+template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
{
return p.get() != 0;
}
#endif
-template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_NOEXCEPT
+template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_SP_NOEXCEPT
{
return a.owner_before( b );
}
-template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b) BOOST_NOEXCEPT
+template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b) BOOST_SP_NOEXCEPT
{
a.swap(b);
}
-template<class T, class U> shared_ptr<T> static_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
+template<class T, class U> shared_ptr<T> static_pointer_cast( shared_ptr<U> const & r ) BOOST_SP_NOEXCEPT
{
(void) static_cast< T* >( static_cast< U* >( 0 ) );
return shared_ptr<T>( r, p );
}
-template<class T, class U> shared_ptr<T> const_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
+template<class T, class U> shared_ptr<T> const_pointer_cast( shared_ptr<U> const & r ) BOOST_SP_NOEXCEPT
{
(void) const_cast< T* >( static_cast< U* >( 0 ) );
return shared_ptr<T>( r, p );
}
-template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
+template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> const & r ) BOOST_SP_NOEXCEPT
{
(void) dynamic_cast< T* >( static_cast< U* >( 0 ) );
return p? shared_ptr<T>( r, p ): shared_ptr<T>();
}
-template<class T, class U> shared_ptr<T> reinterpret_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
+template<class T, class U> shared_ptr<T> reinterpret_pointer_cast( shared_ptr<U> const & r ) BOOST_SP_NOEXCEPT
{
(void) reinterpret_cast< T* >( static_cast< U* >( 0 ) );
return shared_ptr<T>( r, p );
}
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+template<class T, class U> shared_ptr<T> static_pointer_cast( shared_ptr<U> && r ) BOOST_SP_NOEXCEPT
+{
+ (void) static_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = static_cast< E* >( r.get() );
+ return shared_ptr<T>( std::move(r), p );
+}
+
+template<class T, class U> shared_ptr<T> const_pointer_cast( shared_ptr<U> && r ) BOOST_SP_NOEXCEPT
+{
+ (void) const_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = const_cast< E* >( r.get() );
+ return shared_ptr<T>( std::move(r), p );
+}
+
+template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> && r ) BOOST_SP_NOEXCEPT
+{
+ (void) dynamic_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = dynamic_cast< E* >( r.get() );
+ return p? shared_ptr<T>( std::move(r), p ): shared_ptr<T>();
+}
+
+template<class T, class U> shared_ptr<T> reinterpret_pointer_cast( shared_ptr<U> && r ) BOOST_SP_NOEXCEPT
+{
+ (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) );
+
+ typedef typename shared_ptr<T>::element_type E;
+
+ E * p = reinterpret_cast< E* >( r.get() );
+ return shared_ptr<T>( std::move(r), p );
+}
+
+#endif // !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
// get_pointer() enables boost::mem_fn to recognize shared_ptr
-template<class T> inline typename shared_ptr<T>::element_type * get_pointer(shared_ptr<T> const & p) BOOST_NOEXCEPT
+template<class T> inline typename shared_ptr<T>::element_type * get_pointer(shared_ptr<T> const & p) BOOST_SP_NOEXCEPT
{
return p.get();
}
namespace detail
{
-#if ( defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) ) || \
- ( defined(__EDG_VERSION__) && BOOST_WORKAROUND(__EDG_VERSION__, <= 238) ) || \
- ( defined(__HP_aCC) && BOOST_WORKAROUND(__HP_aCC, <= 33500) )
-
-// g++ 2.9x doesn't allow static_cast<X const *>(void *)
-// apparently EDG 2.38 and HP aCC A.03.35 also don't accept it
-
-template<class D, class T> D * basic_get_deleter(shared_ptr<T> const & p)
-{
- void const * q = p._internal_get_deleter(BOOST_SP_TYPEID(D));
- return const_cast<D *>(static_cast<D const *>(q));
-}
-
-#else
-
-template<class D, class T> D * basic_get_deleter( shared_ptr<T> const & p ) BOOST_NOEXCEPT
+template<class D, class T> D * basic_get_deleter( shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
{
return static_cast<D *>( p._internal_get_deleter(BOOST_SP_TYPEID(D)) );
}
-#endif
+template<class D, class T> D * basic_get_local_deleter( D *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT;
+template<class D, class T> D const * basic_get_local_deleter( D const *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT;
class esft2_deleter_wrapper
{
{
}
- template< class T > void set_deleter( shared_ptr<T> const & deleter )
+ template< class T > void set_deleter( shared_ptr<T> const & deleter ) BOOST_SP_NOEXCEPT
{
deleter_ = deleter;
}
- template<typename D> D* get_deleter() const BOOST_NOEXCEPT
+ template<typename D> D* get_deleter() const BOOST_SP_NOEXCEPT
{
return boost::detail::basic_get_deleter<D>( deleter_ );
}
- template< class T> void operator()( T* )
+ template< class T> void operator()( T* ) BOOST_SP_NOEXCEPT_WITH_ASSERT
{
BOOST_ASSERT( deleter_.use_count() <= 1 );
deleter_.reset();
} // namespace detail
-template<class D, class T> D * get_deleter( shared_ptr<T> const & p ) BOOST_NOEXCEPT
+template<class D, class T> D * get_deleter( shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
{
- D *del = boost::detail::basic_get_deleter<D>(p);
+ D * d = boost::detail::basic_get_deleter<D>( p );
+
+ if( d == 0 )
+ {
+ d = boost::detail::basic_get_local_deleter( d, p );
+ }
- if(del == 0)
+ if( d == 0 )
{
boost::detail::esft2_deleter_wrapper *del_wrapper = boost::detail::basic_get_deleter<boost::detail::esft2_deleter_wrapper>(p);
// The following get_deleter method call is fully qualified because
// older versions of gcc (2.95, 3.2.3) fail to compile it when written del_wrapper->get_deleter<D>()
- if(del_wrapper) del = del_wrapper->::boost::detail::esft2_deleter_wrapper::get_deleter<D>();
+ if(del_wrapper) d = del_wrapper->::boost::detail::esft2_deleter_wrapper::get_deleter<D>();
}
- return del;
+ return d;
}
// atomic access
#if !defined(BOOST_SP_NO_ATOMIC_ACCESS)
-template<class T> inline bool atomic_is_lock_free( shared_ptr<T> const * /*p*/ ) BOOST_NOEXCEPT
+template<class T> inline bool atomic_is_lock_free( shared_ptr<T> const * /*p*/ ) BOOST_SP_NOEXCEPT
{
return false;
}
-template<class T> shared_ptr<T> atomic_load( shared_ptr<T> const * p )
+template<class T> shared_ptr<T> atomic_load( shared_ptr<T> const * p ) BOOST_SP_NOEXCEPT
{
boost::detail::spinlock_pool<2>::scoped_lock lock( p );
return *p;
}
-template<class T> inline shared_ptr<T> atomic_load_explicit( shared_ptr<T> const * p, /*memory_order mo*/ int )
+template<class T> inline shared_ptr<T> atomic_load_explicit( shared_ptr<T> const * p, /*memory_order mo*/ int ) BOOST_SP_NOEXCEPT
{
return atomic_load( p );
}
-template<class T> void atomic_store( shared_ptr<T> * p, shared_ptr<T> r )
+template<class T> void atomic_store( shared_ptr<T> * p, shared_ptr<T> r ) BOOST_SP_NOEXCEPT
{
boost::detail::spinlock_pool<2>::scoped_lock lock( p );
p->swap( r );
}
-template<class T> inline void atomic_store_explicit( shared_ptr<T> * p, shared_ptr<T> r, /*memory_order mo*/ int )
+template<class T> inline void atomic_store_explicit( shared_ptr<T> * p, shared_ptr<T> r, /*memory_order mo*/ int ) BOOST_SP_NOEXCEPT
{
atomic_store( p, r ); // std::move( r )
}
-template<class T> shared_ptr<T> atomic_exchange( shared_ptr<T> * p, shared_ptr<T> r )
+template<class T> shared_ptr<T> atomic_exchange( shared_ptr<T> * p, shared_ptr<T> r ) BOOST_SP_NOEXCEPT
{
boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p );
return r; // return std::move( r )
}
-template<class T> shared_ptr<T> atomic_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> r, /*memory_order mo*/ int )
+template<class T> shared_ptr<T> inline atomic_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> r, /*memory_order mo*/ int ) BOOST_SP_NOEXCEPT
{
return atomic_exchange( p, r ); // std::move( r )
}
-template<class T> bool atomic_compare_exchange( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w )
+template<class T> bool atomic_compare_exchange( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w ) BOOST_SP_NOEXCEPT
{
boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p );
}
}
-template<class T> inline bool atomic_compare_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w, /*memory_order success*/ int, /*memory_order failure*/ int )
+template<class T> inline bool atomic_compare_exchange_explicit( shared_ptr<T> * p, shared_ptr<T> * v, shared_ptr<T> w, /*memory_order success*/ int, /*memory_order failure*/ int ) BOOST_SP_NOEXCEPT
{
return atomic_compare_exchange( p, v, w ); // std::move( w )
}
template< class T > struct hash;
-template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p ) BOOST_NOEXCEPT
+template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
{
return boost::hash< typename boost::shared_ptr<T>::element_type* >()( p.get() );
}
} // namespace boost
+#include <boost/smart_ptr/detail/local_sp_deleter.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+template<class D, class T> D * basic_get_local_deleter( D *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
+{
+ return static_cast<D *>( p._internal_get_local_deleter( BOOST_SP_TYPEID(local_sp_deleter<D>) ) );
+}
+
+template<class D, class T> D const * basic_get_local_deleter( D const *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
+{
+ return static_cast<D *>( p._internal_get_local_deleter( BOOST_SP_TYPEID(local_sp_deleter<D>) ) );
+}
+
+} // namespace detail
+
+} // namespace boost
+
#if defined( BOOST_SP_DISABLE_DEPRECATED )
#pragma GCC diagnostic pop
#endif
//
// Copyright (c) 2001, 2002, 2003 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)
+// 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)
//
-// See http://www.boost.org/libs/smart_ptr/weak_ptr.htm for documentation.
+// See http://www.boost.org/libs/smart_ptr/ for documentation.
//
#include <memory> // boost.TR1 include order fix
#include <boost/smart_ptr/detail/shared_count.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
+#include <boost/smart_ptr/detail/sp_noexcept.hpp>
namespace boost
{
typedef typename boost::detail::sp_element< T >::type element_type;
- weak_ptr() BOOST_NOEXCEPT : px(0), pn() // never throws in 1.30+
+ BOOST_CONSTEXPR weak_ptr() BOOST_SP_NOEXCEPT : px(0), pn()
{
}
// ... except in C++0x, move disables the implicit copy
- weak_ptr( weak_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
+ weak_ptr( weak_ptr const & r ) BOOST_SP_NOEXCEPT : px( r.px ), pn( r.pn )
{
}
- weak_ptr & operator=( weak_ptr const & r ) BOOST_NOEXCEPT
+ weak_ptr & operator=( weak_ptr const & r ) BOOST_SP_NOEXCEPT
{
px = r.px;
pn = r.pn;
// The "obvious" converting constructor implementation:
//
// template<class Y>
-// weak_ptr(weak_ptr<Y> const & r): px(r.px), pn(r.pn) // never throws
+// weak_ptr(weak_ptr<Y> const & r): px(r.px), pn(r.pn)
// {
// }
//
weak_ptr( weak_ptr<Y> const & r )
#endif
- BOOST_NOEXCEPT : px(r.lock().get()), pn(r.pn)
+ BOOST_SP_NOEXCEPT : px(r.lock().get()), pn(r.pn)
{
boost::detail::sp_assert_convertible< Y, T >();
}
weak_ptr( weak_ptr<Y> && r )
#endif
- BOOST_NOEXCEPT : px( r.lock().get() ), pn( static_cast< boost::detail::weak_count && >( r.pn ) )
+ BOOST_SP_NOEXCEPT : px( r.lock().get() ), pn( static_cast< boost::detail::weak_count && >( r.pn ) )
{
boost::detail::sp_assert_convertible< Y, T >();
r.px = 0;
// for better efficiency in the T == Y case
weak_ptr( weak_ptr && r )
- BOOST_NOEXCEPT : px( r.px ), pn( static_cast< boost::detail::weak_count && >( r.pn ) )
+ BOOST_SP_NOEXCEPT : px( r.px ), pn( static_cast< boost::detail::weak_count && >( r.pn ) )
{
r.px = 0;
}
// for better efficiency in the T == Y case
- weak_ptr & operator=( weak_ptr && r ) BOOST_NOEXCEPT
+ weak_ptr & operator=( weak_ptr && r ) BOOST_SP_NOEXCEPT
{
this_type( static_cast< weak_ptr && >( r ) ).swap( *this );
return *this;
weak_ptr( shared_ptr<Y> const & r )
#endif
- BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
+ BOOST_SP_NOEXCEPT : px( r.px ), pn( r.pn )
{
boost::detail::sp_assert_convertible< Y, T >();
}
#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1300)
template<class Y>
- weak_ptr & operator=( weak_ptr<Y> const & r ) BOOST_NOEXCEPT
+ weak_ptr & operator=( weak_ptr<Y> const & r ) BOOST_SP_NOEXCEPT
{
boost::detail::sp_assert_convertible< Y, T >();
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
template<class Y>
- weak_ptr & operator=( weak_ptr<Y> && r ) BOOST_NOEXCEPT
+ weak_ptr & operator=( weak_ptr<Y> && r ) BOOST_SP_NOEXCEPT
{
this_type( static_cast< weak_ptr<Y> && >( r ) ).swap( *this );
return *this;
#endif
template<class Y>
- weak_ptr & operator=( shared_ptr<Y> const & r ) BOOST_NOEXCEPT
+ weak_ptr & operator=( shared_ptr<Y> const & r ) BOOST_SP_NOEXCEPT
{
boost::detail::sp_assert_convertible< Y, T >();
#endif
- shared_ptr<T> lock() const BOOST_NOEXCEPT
+ shared_ptr<T> lock() const BOOST_SP_NOEXCEPT
{
return shared_ptr<T>( *this, boost::detail::sp_nothrow_tag() );
}
- long use_count() const BOOST_NOEXCEPT
+ long use_count() const BOOST_SP_NOEXCEPT
{
return pn.use_count();
}
- bool expired() const BOOST_NOEXCEPT
+ bool expired() const BOOST_SP_NOEXCEPT
{
return pn.use_count() == 0;
}
- bool _empty() const // extension, not in std::weak_ptr
+ bool _empty() const BOOST_SP_NOEXCEPT // extension, not in std::weak_ptr
{
return pn.empty();
}
- void reset() BOOST_NOEXCEPT // never throws in 1.30+
+ void reset() BOOST_SP_NOEXCEPT
{
this_type().swap(*this);
}
- void swap(this_type & other) BOOST_NOEXCEPT
+ void swap(this_type & other) BOOST_SP_NOEXCEPT
{
std::swap(px, other.px);
pn.swap(other.pn);
}
template<typename Y>
- void _internal_aliasing_assign(weak_ptr<Y> const & r, element_type * px2)
+ void _internal_aliasing_assign(weak_ptr<Y> const & r, element_type * px2) BOOST_SP_NOEXCEPT
{
px = px2;
pn = r.pn;
}
- template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const BOOST_NOEXCEPT
+ template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const BOOST_SP_NOEXCEPT
{
return pn < rhs.pn;
}
- template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const BOOST_NOEXCEPT
+ template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const BOOST_SP_NOEXCEPT
{
return pn < rhs.pn;
}
}; // weak_ptr
-template<class T, class U> inline bool operator<(weak_ptr<T> const & a, weak_ptr<U> const & b) BOOST_NOEXCEPT
+template<class T, class U> inline bool operator<(weak_ptr<T> const & a, weak_ptr<U> const & b) BOOST_SP_NOEXCEPT
{
return a.owner_before( b );
}
-template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b) BOOST_NOEXCEPT
+template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b) BOOST_SP_NOEXCEPT
{
a.swap(b);
}
#include <boost/type_index/detail/compile_time_type_info.hpp>
#include <cstring>
+#include <boost/functional/hash.hpp>
#include <boost/static_assert.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/type_traits/remove_reference.hpp>
/// \file compile_time_type_info.hpp
/// \brief Contains helper macros and implementation details of boost::typeindex::ctti_type_index.
-/// Not intended for inclusion from user's code.
+/// Not intended for inclusion from user's code.
#include <boost/config.hpp>
#include <boost/static_assert.hpp>
// sizeof("static const char *boost::detail::ctti<") - 1, sizeof("]") - 1, true, "int>::n() [T = int"
// note: checked on 3.1, 3.4
BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 1, true, "T = ")
-#elif defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
- // sizeof("static contexpr char boost::detail::ctti<T>::s() [with long unsigned int I = 0ul; T = ") - 1, sizeof("]") - 1
- BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(87, 1, false, "")
+#elif defined(__GNUC__) && (__GNUC__ < 7) && !defined(BOOST_NO_CXX14_CONSTEXPR)
+ // sizeof("static constexpr char boost::detail::ctti<T>::s() [with unsigned int I = 0u; T = ") - 1, sizeof("]") - 1
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(81, 1, false, "")
+#elif defined(__GNUC__) && (__GNUC__ >= 7) && !defined(BOOST_NO_CXX14_CONSTEXPR)
+ // sizeof("static constexpr char boost::detail::ctti<T>::s() [with unsigned int I = 0; T = ") - 1, sizeof("]") - 1
+ BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(80, 1, false, "")
#elif defined(__GNUC__) && defined(BOOST_NO_CXX14_CONSTEXPR)
// sizeof("static const char* boost::detail::ctti<T>::n() [with T = ") - 1, sizeof("]") - 1
BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(57, 1, false, "")
#undef BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS
-namespace boost { namespace typeindex { namespace detail {
+namespace boost { namespace typeindex { namespace detail {
template <bool Condition>
BOOST_CXX14_CONSTEXPR inline void assert_compile_time_legths() BOOST_NOEXCEPT {
BOOST_STATIC_ASSERT_MSG(
);
}
- template <std::size_t ArrayLength>
+ template <unsigned int ArrayLength>
BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::mpl::false_) BOOST_NOEXCEPT {
return begin;
}
return static_cast<int>(*v1) - *v2;
}
- template <std::size_t ArrayLength>
+ template <unsigned int ArrayLength>
BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::mpl::true_) BOOST_NOEXCEPT {
const char* const it = constexpr_search(
begin, begin + ArrayLength,
return (it == begin + ArrayLength ? begin : it + sizeof(ctti_skip_until_runtime) - 1);
}
- template <std::size_t ArrayLength>
+ template <unsigned int ArrayLength>
BOOST_CXX14_CONSTEXPR inline const char* skip_begining(const char* begin) BOOST_NOEXCEPT {
assert_compile_time_legths<(ArrayLength > ctti_skip_size_at_begin + ctti_skip_size_at_end)>();
return skip_begining_runtime<ArrayLength - ctti_skip_size_at_begin>(
- begin + ctti_skip_size_at_begin,
+ begin + ctti_skip_size_at_begin,
boost::mpl::bool_<ctti_skip_more_at_runtime>()
);
}
#if !defined(__clang__) && defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
- template <std::size_t... I>
+ template <unsigned int... I>
struct index_seq {};
template <typename Left, typename Right>
struct make_index_sequence_join;
- template <std::size_t... Left, std::size_t... Right>
+ template <unsigned int... Left, unsigned int... Right>
struct make_index_sequence_join<index_seq<Left...>, index_seq<Right...> > {
typedef index_seq<Left..., Right...> type;
};
- template <std::size_t C, std::size_t D>
+ template <unsigned int C, unsigned int D>
struct make_index_seq_impl {
typedef typename make_index_sequence_join<
typename make_index_seq_impl<C, D / 2>::type,
>::type type;
};
- template <std::size_t C>
+ template <unsigned int C>
struct make_index_seq_impl<C, 0> {
typedef index_seq<> type;
};
- template <std::size_t C>
+ template <unsigned int C>
struct make_index_seq_impl<C, 1> {
typedef index_seq<C> type;
};
template <char... C>
struct cstring {
- static constexpr std::size_t size_ = sizeof...(C);
+ static constexpr unsigned int size_ = sizeof...(C);
static constexpr char data_[size_] = { C... };
};
/// This name must be as short as possible, to avoid code bloat
template <class T>
struct ctti {
-
+
#if !defined(__clang__) && defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
//helper functions
- template <std::size_t I>
+ template <unsigned int I>
constexpr static char s() BOOST_NOEXCEPT { // step
- constexpr std::size_t offset =
+ constexpr unsigned int offset =
(I >= 10u ? 1u : 0u)
+ (I >= 100u ? 1u : 0u)
+ (I >= 1000u ? 1u : 0u)
#endif
}
- template <std::size_t ...Indexes>
+ template <unsigned int ...Indexes>
constexpr static const char* impl(::boost::typeindex::detail::index_seq<Indexes...> ) BOOST_NOEXCEPT {
return ::boost::typeindex::detail::cstring<s<Indexes>()...>::data_;
}
- template <std::size_t D = 0> // `D` means `Dummy`
+ template <unsigned int D = 0> // `D` means `Dummy`
constexpr static const char* n() BOOST_NOEXCEPT {
#if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE)
- constexpr std::size_t size = sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE);
+ constexpr unsigned int size = sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE);
#elif defined(__FUNCSIG__)
- constexpr std::size_t size = sizeof(__FUNCSIG__);
+ constexpr unsigned int size = sizeof(__FUNCSIG__);
#elif defined(__PRETTY_FUNCTION__) \
|| defined(__GNUC__) \
|| (defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)) \
|| (defined(__ICC) && (__ICC >= 600)) \
|| defined(__ghs__) \
|| defined(__DMC__)
- constexpr std::size_t size = sizeof(__PRETTY_FUNCTION__);
+ constexpr unsigned int size = sizeof(__PRETTY_FUNCTION__);
#else
boost::typeindex::detail::failed_to_get_function_name();
#endif
}} // namespace boost::detail
#endif // BOOST_TYPE_INDEX_DETAIL_COMPILE_TIME_TYPE_INFO_HPP
-
//
-// Copyright (c) Antony Polukhin, 2013-2015.
+// Copyright (c) Antony Polukhin, 2013-2017.
//
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
#include <boost/mpl/if.hpp>
#include <boost/mpl/or.hpp>
+#if !((defined(_MSC_VER) && _MSC_VER > 1600) \
+ || (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ > 5 && defined(__GXX_EXPERIMENTAL_CXX0X__)) \
+ || (defined(__GNUC__) && __GNUC__ > 4 && __cplusplus >= 201103 ))
+# include <boost/functional/hash.hpp>
+#endif
+
#if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \
|| (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744)
# include <boost/type_traits/is_signed.hpp>
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) \
+ || (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ > 5 && defined(__GXX_EXPERIMENTAL_CXX0X__)) \
+ || (defined(__GNUC__) && __GNUC__ > 4 && __cplusplus >= 201103)
return data_->hash_code();
#else
return boost::hash_range(raw_name(), raw_name() + std::strlen(raw_name()));
/// \b Override: This function \b may be redefined in Derived class. Overrides \b must not throw.
/// \return Hash code of a type. By default hashes types by raw_name().
- /// \note <boost/functional/hash.hpp> has to be included if this function is used.
+ /// \note Derived class header \b must include <boost/functional/hash.hpp>, \b unless this function is redefined in
+ /// Derived class to not use boost::hash_range().
inline std::size_t hash_code() const BOOST_NOEXCEPT {
const char* const name_raw = derived().raw_name();
return boost::hash_range(name_raw, name_raw + std::strlen(name_raw));
typedef T& type;
};
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using add_const_t = typename add_const<T>::type;
+
+#endif
+
} // namespace boost
#endif // BOOST_TT_ADD_CONST_HPP_INCLUDED
template <class T> struct add_cv<T&>{ typedef T& type; };
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using add_cv_t = typename add_cv<T>::type;
+
+#endif
+
} // namespace boost
#endif // BOOST_TT_ADD_CV_HPP_INCLUDED
};
#endif
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using add_lvalue_reference_t = typename add_lvalue_reference<T>::type;
+
+#endif
+
}
#endif // BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP
#endif
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using add_pointer_t = typename add_pointer<T>::type;
+
+#endif
+
} // namespace boost
#endif // BOOST_TT_ADD_POINTER_HPP_INCLUDED
template <> struct add_reference<volatile void> { typedef volatile void type; };
#endif
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+template <class T> using add_reference_t = typename add_reference<T>::type;
+
+#endif
+
+
} // namespace boost
#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED
typedef typename boost::type_traits_detail::add_rvalue_reference_imp<T>::type type;
};
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using add_rvalue_reference_t = typename add_rvalue_reference<T>::type;
+
+#endif
+
} // namespace boost
#endif // BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
template <class T> struct add_volatile<T&>{ typedef T& type; };
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using add_volatile_t = typename add_volatile<T>::type;
+
+#endif
+
} // namespace boost
#endif // BOOST_TT_ADD_VOLATILE_HPP_INCLUDED
template <bool b, class T, class U> struct conditional { typedef T type; };
template <class T, class U> struct conditional<false, T, U> { typedef U type; };
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <bool b, class T, class U> using conditional_t = typename conditional<b, T, U>::type;
+
+#endif
+
} // namespace boost
typedef typename boost::detail::decay_imp<Ty, boost::is_array<Ty>::value, boost::is_function<Ty>::value>::type type;
};
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using decay_t = typename decay<T>::type;
+
+#endif
+
} // namespace boost
+++ /dev/null
-// Copyright 2005 Alexander Nasonov.
-// 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 FILE_boost_type_traits_integral_promotion_hpp_INCLUDED
-#define FILE_boost_type_traits_integral_promotion_hpp_INCLUDED
-
-#include <boost/config.hpp>
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/is_enum.hpp>
-#include <boost/type_traits/is_volatile.hpp>
-#include <boost/type_traits/remove_cv.hpp>
-
-namespace boost {
-
-namespace type_traits { namespace detail {
-
-// 4.5/2
-template <class T> struct need_promotion : public boost::is_enum<T> {};
-
-// 4.5/1
-template<> struct need_promotion<char > : public true_type {};
-template<> struct need_promotion<signed char > : public true_type {};
-template<> struct need_promotion<unsigned char > : public true_type {};
-template<> struct need_promotion<signed short int > : public true_type {};
-template<> struct need_promotion<unsigned short int> : public true_type {};
-
-
-// Specializations for non-standard types.
-// Type is promoted if it's smaller then int.
-
-#define BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(T) \
- template<> struct need_promotion<T> \
- : public integral_constant<bool, (sizeof(T) < sizeof(int))> {};
-
-// Same set of integral types as in boost/type_traits/is_integral.hpp.
-// Please, keep in sync.
-#if (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \
- || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER < 1300))
-// TODO: common macro for this #if. Or better yet, PP SEQ of non-standard types.
-BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int8 )
-BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int8 )
-BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int16 )
-BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int16)
-BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int32 )
-BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int32)
-#ifdef __BORLANDC__
-BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int64)
-BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE( __int64)
-#endif
-#endif
-
-#if defined(BOOST_HAS_LONG_LONG)
-BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(boost::ulong_long_type)
-BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(boost::long_long_type )
-#elif defined(BOOST_HAS_MS_INT64)
-BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(unsigned __int64)
-BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE( __int64)
-#endif
-
-#undef BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE
-
-
-#ifndef BOOST_NO_INTRINSIC_WCHAR_T
-// 4.5/2
-template<> struct need_promotion<wchar_t> : public true_type {};
-#endif
-
-// 4.5/3 (integral bit-field) is not supported.
-
-// 4.5/4
-template<> struct need_promotion<bool> : public true_type {};
-
-
-// Get promoted type by index and cv qualifiers.
-
-template<int Index, int IsConst, int IsVolatile> struct promote_from_index;
-
-#define BOOST_TT_AUX_PROMOTE_FROM_INDEX(N,T) \
- template<> struct promote_from_index<N,0,0> { typedef T type; }; \
- template<> struct promote_from_index<N,0,1> { typedef T volatile type; }; \
- template<> struct promote_from_index<N,1,0> { typedef T const type; }; \
- template<> struct promote_from_index<N,1,1> { typedef T const volatile type; };
-
-
-BOOST_TT_AUX_PROMOTE_FROM_INDEX(1, int )
-BOOST_TT_AUX_PROMOTE_FROM_INDEX(2, unsigned int )
-BOOST_TT_AUX_PROMOTE_FROM_INDEX(3, long )
-BOOST_TT_AUX_PROMOTE_FROM_INDEX(4, unsigned long)
-
-
-// WARNING: integral promotions to non-standard types
-// long long and __int64 are not defined by the standard.
-// Additional specialisations and overloads shouldn't
-// introduce ambiguity, though.
-
-#if defined(BOOST_HAS_LONG_LONG)
-BOOST_TT_AUX_PROMOTE_FROM_INDEX(5, boost::long_long_type )
-BOOST_TT_AUX_PROMOTE_FROM_INDEX(6, boost::ulong_long_type)
-#elif defined(BOOST_HAS_MS_INT64)
-BOOST_TT_AUX_PROMOTE_FROM_INDEX(7, __int64 )
-BOOST_TT_AUX_PROMOTE_FROM_INDEX(8, unsigned __int64)
-#endif
-
-#undef BOOST_TT_AUX_PROMOTE_FROM_INDEX
-
-
-// Define BOOST_TT_AUX_PROMOTED_INDEX_TESTER:
-#if !defined(BOOST_MSVC)
-
-template<int N>
-struct sized_type_for_promotion
-{
- typedef char (&type)[N];
-};
-
-#define BOOST_TT_AUX_PROMOTED_INDEX_TESTER(I,T) \
- sized_type_for_promotion<I>::type promoted_index_tester(T);
-
-#else
-
-#define BOOST_TT_AUX_PROMOTED_INDEX_TESTER(I,T) \
- char (&promoted_index_tester(T))[I];
-
-#endif
-
-BOOST_TT_AUX_PROMOTED_INDEX_TESTER(1, int )
-BOOST_TT_AUX_PROMOTED_INDEX_TESTER(2, unsigned int )
-BOOST_TT_AUX_PROMOTED_INDEX_TESTER(3, long )
-BOOST_TT_AUX_PROMOTED_INDEX_TESTER(4, unsigned long)
-
-#if defined(BOOST_HAS_LONG_LONG)
-BOOST_TT_AUX_PROMOTED_INDEX_TESTER(5, boost::long_long_type )
-BOOST_TT_AUX_PROMOTED_INDEX_TESTER(6, boost::ulong_long_type)
-#elif defined(BOOST_HAS_MS_INT64)
-BOOST_TT_AUX_PROMOTED_INDEX_TESTER(7, __int64 )
-BOOST_TT_AUX_PROMOTED_INDEX_TESTER(8, unsigned __int64)
-#endif
-
-#undef BOOST_TT_AUX_PROMOTED_INDEX_TESTER
-
-
-// Get an index of promoted type for type T.
-// Precondition: need_promotion<T>
-template<class T>
-struct promoted_index
-{
- static T testee; // undefined
- BOOST_STATIC_CONSTANT(int, value = sizeof(promoted_index_tester(+testee)) );
- // Unary plus promotes testee LOOK HERE ---> ^
-};
-
-template<class T>
-struct integral_promotion_impl
-{
- typedef BOOST_DEDUCED_TYPENAME promote_from_index<
- (boost::type_traits::detail::promoted_index<T>::value)
- , (boost::is_const<T>::value)
- , (boost::is_volatile<T>::value)
- >::type type;
-};
-
-template<class T, bool b> struct integral_promotion { typedef T type; };
-template<class T> struct integral_promotion<T, true> : public integral_promotion_impl<T>{};
-
-} }
-
-template <class T> struct integral_promotion
-{
-private:
- typedef boost::type_traits::detail::need_promotion<typename remove_cv<T>::type> tag_type;
-public:
- typedef typename boost::type_traits::detail::integral_promotion<T, tag_type::value>::type type;
-};
-
-}
-
-#endif // #ifndef FILE_boost_type_traits_integral_promotion_hpp_INCLUDED
-
-// (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).
>::type type;
};
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using make_signed_t = typename make_signed<T>::type;
+
+#endif
+
} // namespace boost
#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED
>::type type;
};
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using make_unsigned_t = typename make_unsigned<T>::type;
+
+#endif
+
} // namespace boost
#endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED
#endif
#endif
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using remove_all_extents_t = typename remove_all_extents<T>::type;
+
+#endif
+
} // namespace boost
#endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
template <class T> struct remove_bounds : public remove_extent<T> {};
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+template <class T> using remove_bounds_t = typename remove_bounds<T>::type;
+
+#endif
+
+
} // namespace boost
#endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
#endif
#endif
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using remove_const_t = typename remove_const<T>::type;
+
+#endif
+
} // namespace boost
#endif // BOOST_TT_REMOVE_CONST_HPP_INCLUDED
#endif
#endif
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using remove_cv_t = typename remove_cv<T>::type;
+
+#endif
} // namespace boost
#endif
#endif
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using remove_extent_t = typename remove_extent<T>::type;
+
+#endif
+
} // namespace boost
#endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
#endif
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using remove_pointer_t = typename remove_pointer<T>::type;
+
+#endif
+
} // namespace boost
#endif // BOOST_TT_REMOVE_POINTER_HPP_INCLUDED
template <class T> struct remove_reference<T&const volatile>{ typedef T type; };
#endif
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using remove_reference_t = typename remove_reference<T>::type;
+
+#endif
} // namespace boost
#endif
#endif
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ template <class T> using remove_volatile_t = typename remove_volatile<T>::type;
+
+#endif
} // namespace boost
--- /dev/null
+// (C) Copyright Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+//
+// defines is_same:
+
+#ifndef BOOST_TT_SAME_TRAITS_HPP_INCLUDED
+#define BOOST_TT_SAME_TRAITS_HPP_INCLUDED
+
+#include <boost/type_traits/is_same.hpp>
+
+#endif // BOOST_TT_SAME_TRAITS_HPP_INCLUDED
#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
}
template<class OptionalPointee>
-struct equal_pointees_t : std::binary_function<OptionalPointee,OptionalPointee,bool>
+struct equal_pointees_t
{
+ typedef bool result_type;
+ typedef OptionalPointee first_argument_type;
+ typedef OptionalPointee second_argument_type;
+
bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const
{ return equal_pointees(x,y) ; }
} ;
}
template<class OptionalPointee>
-struct less_pointees_t : std::binary_function<OptionalPointee,OptionalPointee,bool>
+struct less_pointees_t
{
+ typedef bool result_type;
+ typedef OptionalPointee first_argument_type;
+ typedef OptionalPointee second_argument_type;
+
bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const
{ return less_pointees(x,y) ; }
} ;
#define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_RESULT_OF_NUM_ARGS,<boost/utility/detail/result_of_iterate.hpp>))
#include BOOST_PP_ITERATE()
+#if 0
+// inform dependency trackers, as they can't see through macro includes
+#include <boost/utility/detail/result_of_iterate.hpp>
+#endif
+
#else
# define BOOST_NO_RESULT_OF 1
#endif
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002 Eric Friedman, Itay Maman
-// Copyright (c) 2016 Antony Polukhin
+// Copyright (c) 2016-2017 Antony Polukhin
//
// Portions Copyright (C) 2002 David Abrahams
//
#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 {
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)
#include <boost/mpl/front.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/if.hpp>
+#include <boost/mpl/insert_range.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/is_sequence.hpp>
#include <boost/mpl/iterator_range.hpp>
#include <boost/mpl/iter_fold_if.hpp>
+#include <boost/mpl/list.hpp>
#include <boost/mpl/logical.hpp>
#include <boost/mpl/max_element.hpp>
#include <boost/mpl/next.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551)) || \
BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
- operand; // suppresses warnings
+ (void)operand; // suppresses warnings
#endif
BOOST_VARIANT_AUX_RETURN_VOID;
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);
}
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);
#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);
}
private: // precondition assertions
BOOST_STATIC_ASSERT(( ::boost::mpl::is_sequence<Types>::value ));
+ typedef typename boost::mpl::insert_range<
+ boost::mpl::list<>
+ , boost::mpl::end< boost::mpl::list<> >::type
+ , Types
+ >::type copied_sequence_t;
public: // metafunction result
typedef variant<
- detail::variant::over_sequence< Types >
+ detail::variant::over_sequence<copied_sequence_t>
> type;
};
-
///////////////////////////////////////////////////////////////////////////////
// function template swap
//
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__
*/
// BOOST_VERSION / 100 % 1000 is the minor version
// BOOST_VERSION / 100000 is the major version
-#define BOOST_VERSION 106200
+#define BOOST_VERSION 106501
//
// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
// 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_62"
+#define BOOST_LIB_VERSION "1_65_1"
#endif
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
-// See http://www.boost.org/libs/smart_ptr/weak_ptr.htm for documentation.
+// See http://www.boost.org/libs/smart_ptr/ for documentation.
//
#include <boost/smart_ptr/weak_ptr.hpp>