]> git.lyx.org Git - lyx.git/commitdiff
Update local boost version to version 1.62
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 19 Oct 2016 15:31:54 +0000 (17:31 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 19 Oct 2016 15:33:41 +0000 (17:33 +0200)
This avoids some warnings with gcc6.

113 files changed:
3rdparty/boost/boost/bind/bind.hpp
3rdparty/boost/boost/config/compiler/borland.hpp
3rdparty/boost/boost/config/compiler/clang.hpp
3rdparty/boost/boost/config/compiler/codegear.hpp
3rdparty/boost/boost/config/compiler/comeau.hpp
3rdparty/boost/boost/config/compiler/common_edg.hpp
3rdparty/boost/boost/config/compiler/compaq_cxx.hpp
3rdparty/boost/boost/config/compiler/cray.hpp
3rdparty/boost/boost/config/compiler/digitalmars.hpp
3rdparty/boost/boost/config/compiler/gcc.hpp
3rdparty/boost/boost/config/compiler/gcc_xml.hpp
3rdparty/boost/boost/config/compiler/greenhills.hpp
3rdparty/boost/boost/config/compiler/hp_acc.hpp
3rdparty/boost/boost/config/compiler/intel.hpp
3rdparty/boost/boost/config/compiler/kai.hpp
3rdparty/boost/boost/config/compiler/metrowerks.hpp
3rdparty/boost/boost/config/compiler/mpw.hpp
3rdparty/boost/boost/config/compiler/pathscale.hpp
3rdparty/boost/boost/config/compiler/pgi.hpp
3rdparty/boost/boost/config/compiler/sgi_mipspro.hpp
3rdparty/boost/boost/config/compiler/sunpro_cc.hpp
3rdparty/boost/boost/config/compiler/vacpp.hpp
3rdparty/boost/boost/config/compiler/visualc.hpp
3rdparty/boost/boost/config/compiler/xlcpp.hpp
3rdparty/boost/boost/config/platform/linux.hpp
3rdparty/boost/boost/config/select_compiler_config.hpp
3rdparty/boost/boost/config/stdlib/libcpp.hpp
3rdparty/boost/boost/config/stdlib/libstdcpp3.hpp
3rdparty/boost/boost/config/suffix.hpp
3rdparty/boost/boost/detail/iterator.hpp
3rdparty/boost/boost/exception/exception.hpp
3rdparty/boost/boost/function/function_base.hpp
3rdparty/boost/boost/function/function_template.hpp
3rdparty/boost/boost/functional/hash/hash.hpp
3rdparty/boost/boost/lexical_cast/detail/converter_lexical_streams.hpp
3rdparty/boost/boost/math/policies/policy.hpp
3rdparty/boost/boost/math/tools/config.hpp
3rdparty/boost/boost/math_fwd.hpp
3rdparty/boost/boost/move/adl_move_swap.hpp
3rdparty/boost/boost/move/algo/move.hpp
3rdparty/boost/boost/move/core.hpp
3rdparty/boost/boost/move/detail/meta_utils_core.hpp
3rdparty/boost/boost/move/detail/type_traits.hpp
3rdparty/boost/boost/optional/optional_fwd.hpp
3rdparty/boost/boost/predef/hardware/simd/x86_amd/versions.h
3rdparty/boost/boost/regex/v4/basic_regex_parser.hpp
3rdparty/boost/boost/regex/v4/cpp_regex_traits.hpp
3rdparty/boost/boost/regex/v4/instances.hpp
3rdparty/boost/boost/regex/v4/perl_matcher.hpp
3rdparty/boost/boost/regex/v4/perl_matcher_common.hpp
3rdparty/boost/boost/regex/v4/perl_matcher_non_recursive.hpp
3rdparty/boost/boost/regex/v4/perl_matcher_recursive.hpp
3rdparty/boost/boost/regex/v4/regex_format.hpp
3rdparty/boost/boost/regex/v4/regex_traits.hpp
3rdparty/boost/boost/regex/v4/regex_traits_defaults.hpp
3rdparty/boost/boost/regex/v4/w32_regex_traits.hpp
3rdparty/boost/boost/signals2/detail/foreign_ptr.hpp
3rdparty/boost/boost/signals2/detail/signal_template.hpp
3rdparty/boost/boost/signals2/detail/slot_call_iterator.hpp
3rdparty/boost/boost/signals2/last_value.hpp
3rdparty/boost/boost/signals2/optional_last_value.hpp
3rdparty/boost/boost/signals2/slot_base.hpp
3rdparty/boost/boost/smart_ptr/shared_ptr.hpp
3rdparty/boost/boost/type_index.hpp
3rdparty/boost/boost/type_index/ctti_type_index.hpp
3rdparty/boost/boost/type_index/detail/compile_time_type_info.hpp
3rdparty/boost/boost/type_index/type_index_facade.hpp
3rdparty/boost/boost/type_traits/has_nothrow_assign.hpp
3rdparty/boost/boost/type_traits/has_nothrow_constructor.hpp
3rdparty/boost/boost/type_traits/has_trivial_assign.hpp
3rdparty/boost/boost/type_traits/has_trivial_copy.hpp
3rdparty/boost/boost/type_traits/has_trivial_move_assign.hpp
3rdparty/boost/boost/type_traits/has_trivial_move_constructor.hpp
3rdparty/boost/boost/type_traits/is_abstract.hpp
3rdparty/boost/boost/type_traits/is_array.hpp
3rdparty/boost/boost/type_traits/is_assignable.hpp
3rdparty/boost/boost/type_traits/is_const.hpp
3rdparty/boost/boost/type_traits/is_default_constructible.hpp
3rdparty/boost/boost/type_traits/is_destructible.hpp
3rdparty/boost/boost/type_traits/is_nothrow_move_constructible.hpp
3rdparty/boost/boost/type_traits/is_pod.hpp
3rdparty/boost/boost/type_traits/is_volatile.hpp
3rdparty/boost/boost/type_traits/remove_all_extents.hpp
3rdparty/boost/boost/type_traits/remove_const.hpp
3rdparty/boost/boost/type_traits/remove_cv.hpp
3rdparty/boost/boost/type_traits/remove_extent.hpp
3rdparty/boost/boost/type_traits/remove_pointer.hpp
3rdparty/boost/boost/type_traits/remove_volatile.hpp
3rdparty/boost/boost/type_traits/type_with_alignment.hpp
3rdparty/boost/boost/utility/base_from_member.hpp
3rdparty/boost/boost/variant/apply_visitor.hpp
3rdparty/boost/boost/variant/detail/apply_visitor_binary.hpp
3rdparty/boost/boost/variant/detail/apply_visitor_delayed.hpp
3rdparty/boost/boost/variant/detail/apply_visitor_unary.hpp
3rdparty/boost/boost/variant/detail/backup_holder.hpp
3rdparty/boost/boost/variant/detail/cast_storage.hpp
3rdparty/boost/boost/variant/detail/config.hpp
3rdparty/boost/boost/variant/detail/enable_recursive_fwd.hpp
3rdparty/boost/boost/variant/detail/forced_return.hpp
3rdparty/boost/boost/variant/detail/generic_result_type.hpp
3rdparty/boost/boost/variant/detail/has_result_type.hpp
3rdparty/boost/boost/variant/detail/initializer.hpp
3rdparty/boost/boost/variant/detail/make_variant_list.hpp
3rdparty/boost/boost/variant/detail/move.hpp
3rdparty/boost/boost/variant/detail/over_sequence.hpp
3rdparty/boost/boost/variant/detail/substitute_fwd.hpp
3rdparty/boost/boost/variant/detail/variant_io.hpp
3rdparty/boost/boost/variant/detail/visitation_impl.hpp
3rdparty/boost/boost/variant/recursive_wrapper_fwd.hpp
3rdparty/boost/boost/variant/static_visitor.hpp
3rdparty/boost/boost/variant/variant.hpp
3rdparty/boost/boost/variant/variant_fwd.hpp
3rdparty/boost/boost/version.hpp

index f793551d1afa65519c2453c0e45a7fa8e5a5dfe4..85d675a0e33ab398dfb3d0129aa62a14899fd3be 100644 (file)
@@ -887,9 +887,17 @@ public:
 
     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+    {
+        rrlist1<A1&> a( a1_ );
+        return b.eval( a );
+    }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+    {
+        rrlist1<A1&> a( a1_ );
+        return b.eval( a );
+    }
 };
 
 template< class A1, class A2 > class rrlist2
@@ -915,9 +923,17 @@ public:
 
     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+    {
+        rrlist2<A1&, A2&> a( a1_, a2_ );
+        return b.eval( a );
+    }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+    {
+        rrlist2<A1&, A2&> a( a1_, a2_ );
+        return b.eval( a );
+    }
 };
 
 template< class A1, class A2, class A3 > class rrlist3
@@ -946,9 +962,17 @@ public:
 
     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+    {
+        rrlist3<A1&, A2&, A3&> a( a1_, a2_, a3_ );
+        return b.eval( a );
+    }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+    {
+        rrlist3<A1&, A2&, A3&> a( a1_, a2_, a3_ );
+        return b.eval( a );
+    }
 };
 
 template< class A1, class A2, class A3, class A4 > class rrlist4
@@ -980,9 +1004,17 @@ public:
 
     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+    {
+        rrlist4<A1&, A2&, A3&, A4&> a( a1_, a2_, a3_, a4_ );
+        return b.eval( a );
+    }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+    {
+        rrlist4<A1&, A2&, A3&, A4&> a( a1_, a2_, a3_, a4_ );
+        return b.eval( a );
+    }
 };
 
 template< class A1, class A2, class A3, class A4, class A5 > class rrlist5
@@ -1017,9 +1049,17 @@ public:
 
     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+    {
+        rrlist5<A1&, A2&, A3&, A4&, A5&> a( a1_, a2_, a3_, a4_, a5_ );
+        return b.eval( a );
+    }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+    {
+        rrlist5<A1&, A2&, A3&, A4&, A5&> a( a1_, a2_, a3_, a4_, a5_ );
+        return b.eval( a );
+    }
 };
 
 template< class A1, class A2, class A3, class A4, class A5, class A6 > class rrlist6
@@ -1057,9 +1097,17 @@ public:
 
     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+    {
+        rrlist6<A1&, A2&, A3&, A4&, A5&, A6&> a( a1_, a2_, a3_, a4_, a5_, a6_ );
+        return b.eval( a );
+    }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+    {
+        rrlist6<A1&, A2&, A3&, A4&, A5&, A6&> a( a1_, a2_, a3_, a4_, a5_, a6_ );
+        return b.eval( a );
+    }
 };
 
 template< class A1, class A2, class A3, class A4, class A5, class A6, class A7 > class rrlist7
@@ -1100,9 +1148,17 @@ public:
 
     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+    {
+        rrlist7<A1&, A2&, A3&, A4&, A5&, A6&, A7&> a( a1_, a2_, a3_, a4_, a5_, a6_, a7_ );
+        return b.eval( a );
+    }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+    {
+        rrlist7<A1&, A2&, A3&, A4&, A5&, A6&, A7&> a( a1_, a2_, a3_, a4_, a5_, a6_, a7_ );
+        return b.eval( a );
+    }
 };
 
 template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class rrlist8
@@ -1146,9 +1202,17 @@ public:
 
     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+    {
+        rrlist8<A1&, A2&, A3&, A4&, A5&, A6&, A7&, A8&> a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_ );
+        return b.eval( a );
+    }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+    {
+        rrlist8<A1&, A2&, A3&, A4&, A5&, A6&, A7&, A8&> a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_ );
+        return b.eval( a );
+    }
 };
 
 template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > class rrlist9
@@ -1195,9 +1259,17 @@ public:
 
     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const
+    {
+        rrlist9<A1&, A2&, A3&, A4&, A5&, A6&, A7&, A8&, A9&> a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_, a9_ );
+        return b.eval( a );
+    }
 
-    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
+    template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const
+    {
+        rrlist9<A1&, A2&, A3&, A4&, A5&, A6&, A7&, A8&, A9&> a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_, a9_ );
+        return b.eval( a );
+    }
 };
 
 template<class R, class F, class L> class bind_t
index 80dd230034821765c7ff7ba0a48708421b5570d9..ccd930ea53a2cb4427aae4a504ccaa6e18f8473b 100644 (file)
 #define BOOST_NO_CXX11_INLINE_NAMESPACES
 #define BOOST_NO_CXX11_REF_QUALIFIERS
 #define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
 
 // C++ 14:
 #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
index 01355bb7d537484ebf40dd0b564905e865e47221..150e3c0d521bb00b0f8b315005deffec21021519 100644 (file)
 #  define BOOST_NO_TYPEID
 #endif
 
-#if defined(__int64) && !defined(__GNUC__)
+#if !__has_feature(cxx_thread_local)
+#  define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+
+#ifdef __is_identifier
+#if !__is_identifier(__int64) && !defined(__GNUC__)
 #  define BOOST_HAS_MS_INT64
 #endif
+#endif
+
+#if __has_include(<stdint.h>)
+#  define BOOST_HAS_STDINT_H
+#endif
+
 
 #define BOOST_HAS_NRVO
 
 //
 // Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t
 //
-#if defined(_MSC_VER) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
+#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
 #  define BOOST_NO_CXX11_CHAR16_T
 #  define BOOST_NO_CXX11_CHAR32_T
 #endif
 
+#if defined(_MSC_VER) && (_MSC_VER >= 1800) && !defined(__GNUC__)
+#define BOOST_HAS_EXPM1
+#define BOOST_HAS_LOG1P
+#endif
+
 #if !__has_feature(cxx_constexpr)
 #  define BOOST_NO_CXX11_CONSTEXPR
 #endif
index 02bd792a15d9a4817e287c083e8615e083cf5150..e2f6061b37346fdd3f83f537e26a2d5ca6ba788e 100644 (file)
 #define BOOST_NO_CXX11_INLINE_NAMESPACES
 #define BOOST_NO_CXX11_REF_QUALIFIERS
 #define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
 
 // C++ 14:
 #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
index 278222dcfdde3a32cbfeb65313b4d3e04a71ba07..09841604f90537b640e1f8e05c4e09a48a66b4cb 100644 (file)
@@ -12,7 +12,7 @@
 
 //  Comeau C++ compiler setup:
 
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
 
 #if (__COMO_VERSION__ <= 4245)
 
index b92e574d609a2411870c759c978f3a806461cb8f..c09faeb0dd92d9554a4d6ea6cce0f6fa905febec 100644 (file)
 #define BOOST_NO_CXX11_INLINE_NAMESPACES
 #define BOOST_NO_CXX11_REF_QUALIFIERS
 #define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
 
 // C++ 14:
 #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
index b44486c6739f17faed43ff6b6c066f5a1dcd2c9c..4d6b8ab3ac7a602b9856d39988bac25046693c6a 100644 (file)
@@ -9,7 +9,7 @@
 
 #define BOOST_COMPILER "HP Tru64 C++ " BOOST_STRINGIZE(__DECCXX_VER)
 
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
 
 //
 // versions check:
index 3f66043357c2f9c8434695b7be6c3a18c3decdac..837f815234a61e58b42520f604d68b65cc07e2ce 100644 (file)
@@ -21,7 +21,7 @@
 #  error "Unsupported Cray compiler, please try running the configure script."
 #endif
 
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
 
 
 //
@@ -60,6 +60,7 @@
 #define BOOST_NO_CXX11_CHAR16_T
 #define BOOST_NO_CXX11_REF_QUALIFIERS
 #define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
 
 
 //#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
index a3d293c7b5f47ba41febaa25f75f60cd0a94e9fc..c344aae0442af42689ea4c301282cf0339f63d3c 100644 (file)
@@ -82,6 +82,7 @@
 #define BOOST_NO_CXX11_INLINE_NAMESPACES
 #define BOOST_NO_CXX11_REF_QUALIFIERS
 #define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
 
 // C++ 14:
 #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
index fbd3dd9c1918ceafa285f2ded3e6e1be3997f03e..e319d0495800eb8079100a01e0552e9a7c942199 100644 (file)
 //
 #if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11)
 #  define BOOST_NO_CXX11_ALIGNAS
+#  define BOOST_NO_CXX11_THREAD_LOCAL
 #endif
 
 // C++0x features in 4.8.1 and later
index c11f29dd01b258f09d317bfee28ee06839d25c98..b56c78628cdceb300811234345ad533535bbbc46 100644 (file)
@@ -59,7 +59,8 @@
 #  define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
 #  define BOOST_NO_CXX11_INLINE_NAMESPACES
 #  define BOOST_NO_CXX11_REF_QUALIFIERS
-#define BOOST_NO_CXX11_FINAL
+#  define BOOST_NO_CXX11_FINAL
+#  define BOOST_NO_CXX11_THREAD_LOCAL
 
 // C++ 14:
 #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
index 038b6b2b52e7b3dcd8bd9e9c1b310176262286a0..a76a07cf4a640dc0939ca3ad1f20a395c54ab371 100644 (file)
@@ -9,7 +9,7 @@
 
 #define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs)
 
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
 
 //
 // versions check:
index fb63839a579770ebd81f47b93bbf6d233f963d41..a773b8c442e55a4b774d8aa2b3a322ba7c2110ee 100644 (file)
@@ -13,7 +13,7 @@
 //  HP aCC C++ compiler setup:
 
 #if defined(__EDG__)
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
 #endif
 
 #if (__HP_aCC <= 33100)
 #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
 #define BOOST_NO_CXX11_INLINE_NAMESPACES
 #define BOOST_NO_CXX11_REF_QUALIFIERS
+#define BOOST_NO_CXX11_THREAD_LOCAL
 
 /*
   See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and
index 88ac023acc3f6bee4b44cfe53d28cdffefa1f795..80969e9edd2f862c670cb7c133aacbf0342ad21e 100644 (file)
@@ -90,7 +90,7 @@
 
 #else
 
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
 
 #if defined(__INTEL_COMPILER)
 #if __INTEL_COMPILER == 9999
index 2337e6a8dd52888c6809bc2c37a364d6f74dc88a..960d501c8603429ad6c8c2266bb087141708ded7 100644 (file)
@@ -9,7 +9,7 @@
 
 //  Kai C++ compiler setup:
 
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
 
 #   if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG)
       // at least on Sun, the contents of <cwchar> is not in namespace std
index c930143450f2fcc60b5847f01e33bcf5a46bac28..3c5e22868a4491961dfc4b9e7c7e9e67b2448b05 100644 (file)
 #define BOOST_NO_CXX11_INLINE_NAMESPACES
 #define BOOST_NO_CXX11_REF_QUALIFIERS
 #define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
 
 // C++ 14:
 #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
index 76045bcd3f105dabe9a63c8dc0912453172ef0a1..084f9e154fecf421c15a3bf834d7b656d1eea445 100644 (file)
@@ -74,6 +74,7 @@
 #define BOOST_NO_CXX11_INLINE_NAMESPACES
 #define BOOST_NO_CXX11_REF_QUALIFIERS
 #define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
 
 // C++ 14:
 #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
index 7c211c4517a7d5ade0ad446ea01ec77a67308ed7..a5e65af49bd2ec6022e74a45916c4b89b56da9d4 100644 (file)
@@ -82,6 +82,7 @@
 #  define BOOST_NO_CXX11_INLINE_NAMESPACES
 #  define BOOST_NO_CXX11_REF_QUALIFIERS
 #  define BOOST_NO_CXX11_FINAL
+#  define BOOST_NO_CXX11_THREAD_LOCAL
 
 // C++ 14:
 #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
index e5605c9ec2516af1cf969829723c533b373ca1d6..fa2d5e402d5222fcf988c60fb9ecf0bae5cef37f 100644 (file)
 #define BOOST_NO_CXX11_INLINE_NAMESPACES
 #define BOOST_NO_CXX11_REF_QUALIFIERS
 #define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
 
 // C++ 14:
 #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
index 90688314ad5b5ccb88d3487be827730abb5ee61c..54433c997898d4bd221386f0594d18d6a979ee67 100644 (file)
@@ -9,7 +9,7 @@
 
 #define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION)
 
-#include "boost/config/compiler/common_edg.hpp"
+#include <boost/config/compiler/common_edg.hpp>
 
 //
 // Threading support:
index 6017660cbbb5eba23940dfba488032ed754ef994..8f07e0e9a2a5be3c465c61118cb49936ed0e92ce 100644 (file)
 #define BOOST_NO_CXX11_DECLTYPE_N3276
 #define BOOST_NO_CXX11_USER_DEFINED_LITERALS
 #define BOOST_NO_CXX11_REF_QUALIFIERS
+#define BOOST_NO_CXX11_THREAD_LOCAL
 #endif
 
 #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
 #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
 #  define BOOST_NO_CXX14_VARIABLE_TEMPLATES
 #endif
+
+// Turn on threading support for Solaris 12.
+// Ticket #11972
+#if (__SUNPRO_CC >= 0x5140) && defined(__SunOS_5_12) && !defined(BOOST_HAS_THREADS)
+# define BOOST_HAS_THREADS
+#endif
+
 //
 // Version
 //
index 6c228eab6e6c614b7a2243dbdb596a439244c8c4..3fbed9fafe4e9872b4c84c7babe19369a1409100 100644 (file)
 #define BOOST_NO_CXX11_INLINE_NAMESPACES
 #define BOOST_NO_CXX11_REF_QUALIFIERS
 #define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
 
 // C++ 14:
 #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
index baaab589efacfab82c8106e728d7deba94977038..72caff4974f0c70f7fcf9961cc586c22e6d24aab 100644 (file)
 #  define BOOST_NO_CXX11_DECLTYPE_N3276
 #endif
 
+#if _MSC_FULL_VER >= 180020827
+#define BOOST_HAS_EXPM1
+#define BOOST_HAS_LOG1P
+#endif
+
 // C++11 features supported by VC++ 14 (aka 2015)
 //
 #if (_MSC_FULL_VER < 190023026)
 #  define BOOST_NO_CXX14_BINARY_LITERALS
 #  define BOOST_NO_CXX14_GENERIC_LAMBDAS
 #  define BOOST_NO_CXX14_DIGIT_SEPARATORS
+#  define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+// C++11 features supported by VC++ 14 update 3 (aka 2015)
+//
+#if (_MSC_FULL_VER < 190024210)
+#  define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+#  define BOOST_NO_SFINAE_EXPR
+#  define BOOST_NO_CXX11_CONSTEXPR
 #endif
 
 // MSVC including version 14 has not yet completely
 // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
 // (Niels Dekker, LKEB, May 2010)
 #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
-// C++11 features not supported by any versions
-#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
 //
-// This is somewhat supported in VC14, but we may need to wait for
-// a service release before enabling:
+// C++ 11:
+//
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
 //
-#define BOOST_NO_CXX11_CONSTEXPR
-
 // C++ 14:
 #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
 #  define BOOST_NO_CXX14_AGGREGATE_NSDMI
 #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
 #  define BOOST_NO_CXX14_CONSTEXPR
 #endif
-#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
-#  define BOOST_NO_CXX14_VARIABLE_TEMPLATES
-#endif
 
 //
 // prefix and suffix headers:
index e369ecefd2205d1a984360c8cc80f24ebf4ae4ed..2aaafc3b665473aef095fe4516c187bcf9ab8a4d 100644 (file)
 #  define BOOST_NO_CXX14_VARIABLE_TEMPLATES
 #endif
 
+#if !__has_feature(cxx_thread_local)
+#  define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+
 #if __cplusplus < 201400
 // All versions with __cplusplus above this value seem to support this:
 #  define BOOST_NO_CXX14_DIGIT_SEPARATORS
index 6fa5f45be49a19b91aafdb1a78e183ae1b7974b1..8c43c7b6d3ca0bb160f336cfe7f9254224d8232a 100644 (file)
@@ -72,7 +72,7 @@
 // boilerplate code:
 #define BOOST_HAS_UNISTD_H
 #include <boost/config/posix_features.hpp>
-#ifdef __USE_GNU
+#if defined(__USE_GNU) && !defined(__ANDROID__) && !defined(ANDROID)
 #define BOOST_HAS_PTHREAD_YIELD
 #endif
 
index 4d87093af3acbeb5b5b2f68d499f3cf0fd39858f..7a757084281e6327231fc57b1ed17cdc01bc8743 100644 (file)
 //
 // 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"
+#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
 
index 645bb63bfc6d789b33319f44670b7ee011916ba8..096b8c0de2c4693e766adc73a7a80acf8e4069d1 100644 (file)
 #define BOOST_NO_STD_MESSAGES
 #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
+// "undefined reference to `__cxa_thread_atexit'".  It is fixed in the
+// most recent releases of libc++abi though...
+#  define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+
 #if defined(__has_include)
 #if !__has_include(<shared_mutex>)
 #  define BOOST_NO_CXX14_HDR_SHARED_MUTEX
index 9718bedcf23117bdf5a2b24d230a2c99d7cf1422..1d8f6ccbceb6825c7a58e4880c1fe9d0c3e683d9 100644 (file)
 // Oracle Solaris compiler uses it's own verison of libstdc++ but doesn't 
 // set __GNUC__
 //
+#if __SUNPRO_CC >= 0x5140
+#define BOOST_LIBSTDCXX_VERSION 50100
+#else
 #define BOOST_LIBSTDCXX_VERSION 40800
 #endif
+#endif
 
 #if !defined(BOOST_LIBSTDCXX_VERSION)
 #  define BOOST_LIBSTDCXX_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
 #endif
 
+// std::auto_ptr isn't provided with _GLIBCXX_DEPRECATED=0 (GCC 4.5 and earlier)
+// or _GLIBCXX_USE_DEPRECATED=0 (GCC 4.6 and later).
+#if defined(BOOST_LIBSTDCXX11)
+#  if BOOST_LIBSTDCXX_VERSION < 40600
+#     if !_GLIBCXX_DEPRECATED
+#        define BOOST_NO_AUTO_PTR
+#     endif
+#  elif !_GLIBCXX_USE_DEPRECATED
+#     define BOOST_NO_AUTO_PTR
+#  endif
+#endif
+
 //  C++0x headers in GCC 4.3.0 and later
 //
 #if (BOOST_LIBSTDCXX_VERSION < 40300) || !defined(BOOST_LIBSTDCXX11)
 
 //
 // Headers not present on Solaris with the Oracle compiler:
-#if defined(__SUNPRO_CC)
+#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5140)
 #define BOOST_NO_CXX11_HDR_FUTURE
 #define BOOST_NO_CXX11_HDR_FORWARD_LIST 
 #define BOOST_NO_CXX11_HDR_ATOMIC
index 17bf1020f547600753e3fee5a2ee26230c02afcc..eeaec2bf69355b980023726b97384fa1fa5ef470 100644 (file)
@@ -624,12 +624,22 @@ namespace std{ using ::type_info; }
 #    define BOOST_NORETURN __declspec(noreturn)
 #  elif defined(__GNUC__)
 #    define BOOST_NORETURN __attribute__ ((__noreturn__))
-#  else
-#    define BOOST_NO_NORETURN
-#    define BOOST_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
 //
index c2e8f1e2a594034833d0fb693ff7fa86f4ced04b..2498ef448ff770b82dd3c6fd2de46ded4ebc7bac 100644 (file)
@@ -9,6 +9,9 @@
 // This header is obsolete and will be deprecated.
 
 #include <iterator>
+#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
+#include <cstddef>
+#endif
 
 namespace boost
 {
@@ -19,6 +22,16 @@ namespace detail
 using std::iterator_traits;
 using std::distance;
 
+#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
+// std::distance from stlport with Oracle compiler 12.4 and 12.5 fails to deduce template parameters
+// when one of the arguments is an array and the other one is a pointer.
+template< typename T, std::size_t N >
+inline typename std::iterator_traits< T* >::difference_type distance(T (&left)[N], T* right)
+{
+    return std::distance(static_cast< T* >(left), right);
+}
+#endif
+
 } // namespace detail
 
 } // namespace boost
index 1f2bd9c20074590554d3b949b48e96ad4a300800..213af3dbb80b42ee7fd1a1b2454f3221e55c8dd6 100644 (file)
@@ -182,6 +182,18 @@ boost
         template <>
         struct get_info<throw_line>;
 
+        template <class>
+        struct set_info_rv;
+
+        template <>
+        struct set_info_rv<throw_function>;
+
+        template <>
+        struct set_info_rv<throw_file>;
+
+        template <>
+        struct set_info_rv<throw_line>;
+
         char const * get_diagnostic_information( exception const &, char const * );
 
         void copy_boost_exception( exception *, exception const * );
@@ -264,6 +276,11 @@ boost
         friend struct exception_detail::get_info<throw_function>;
         friend struct exception_detail::get_info<throw_file>;
         friend struct exception_detail::get_info<throw_line>;
+        template <class>
+        friend struct exception_detail::set_info_rv;
+        friend struct exception_detail::set_info_rv<throw_function>;
+        friend struct exception_detail::set_info_rv<throw_file>;
+        friend struct exception_detail::set_info_rv<throw_line>;
         friend void exception_detail::copy_boost_exception( exception *, exception const * );
 #endif
         mutable exception_detail::refcount_ptr<exception_detail::error_info_container> data_;
index 35c1995eceeb08aee9550c3482ae140a13c25e86..21a0c0da7f58cf1fd5af444340084dd065c8ccbe 100644 (file)
@@ -16,9 +16,9 @@
 #include <memory>
 #include <new>
 #include <boost/config.hpp>
-#include <boost/detail/sp_typeinfo.hpp>
 #include <boost/assert.hpp>
 #include <boost/integer.hpp>
+#include <boost/type_index.hpp>
 #include <boost/type_traits/has_trivial_copy.hpp>
 #include <boost/type_traits/has_trivial_destructor.hpp>
 #include <boost/type_traits/is_const.hpp>
 #   pragma warning( push )
 #   pragma warning( disable : 4793 ) // complaint about native code generation
 #   pragma warning( disable : 4127 ) // "conditional expression is constant"
-#endif       
-
-// Define BOOST_FUNCTION_STD_NS to the namespace that contains type_info.
-#ifdef BOOST_NO_STD_TYPEINFO
-// Embedded VC++ does not have type_info in namespace std
-#  define BOOST_FUNCTION_STD_NS
-#else
-#  define BOOST_FUNCTION_STD_NS std
-#endif
-
-// Borrowed from Boost.Python library: determines the cases where we
-// need to use std::type_info::name to compare instead of operator==.
-#if defined( BOOST_NO_TYPEID )
-#  define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y))
-#elif defined(__GNUC__) \
- || defined(_AIX) \
- || (   defined(__sgi) && defined(__host_mips))
-#  include <cstring>
-#  define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) \
-     (std::strcmp((X).name(),(Y).name()) == 0)
-# else
-#  define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y))
 #endif
 
 #if defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG)
@@ -87,15 +65,16 @@ namespace boost {
        * object pointers, and a structure that resembles a bound
        * member function pointer.
        */
-      union function_buffer
+      union function_buffer_members
       {
         // For pointers to function objects
-        mutable void* obj_ptr;
+        typedef void* obj_ptr_t;
+        mutable obj_ptr_t obj_ptr;
 
         // For pointers to std::type_info objects
         struct type_t {
           // (get_functor_type_tag, check_functor_type_tag).
-          const detail::sp_typeinfo* type;
+          const boost::typeindex::type_info* type;
 
           // Whether the type is const-qualified.
           bool const_qualified;
@@ -104,7 +83,8 @@ namespace boost {
         } type;
 
         // For function pointers of all kinds
-        mutable void (*func_ptr)();
+        typedef void (*func_ptr_t)();
+        mutable func_ptr_t func_ptr;
 
         // For bound member pointers
         struct bound_memfunc_ptr_t {
@@ -119,9 +99,15 @@ namespace boost {
           bool is_const_qualified;
           bool is_volatile_qualified;
         } obj_ref;
+      };
+
+      union function_buffer
+      {
+        // Type-specific union members
+        mutable function_buffer_members members;
 
         // To relax aliasing constraints
-        mutable char data;
+        mutable char data[sizeof(function_buffer_members)];
       };
 
       /**
@@ -188,45 +174,42 @@ namespace boost {
       struct reference_manager
       {
         static inline void
-        manage(const function_buffer& in_buffer, function_buffer& out_buffer, 
+        manage(const function_buffer& in_buffer, function_buffer& out_buffer,
                functor_manager_operation_type op)
         {
           switch (op) {
-          case clone_functor_tag: 
-            out_buffer.obj_ref = in_buffer.obj_ref;
+          case clone_functor_tag:
+            out_buffer.members.obj_ref = in_buffer.members.obj_ref;
             return;
 
           case move_functor_tag:
-            out_buffer.obj_ref = in_buffer.obj_ref;
-            in_buffer.obj_ref.obj_ptr = 0;
+            out_buffer.members.obj_ref = in_buffer.members.obj_ref;
+            in_buffer.members.obj_ref.obj_ptr = 0;
             return;
 
           case destroy_functor_tag:
-            out_buffer.obj_ref.obj_ptr = 0;
+            out_buffer.members.obj_ref.obj_ptr = 0;
             return;
 
           case check_functor_type_tag:
             {
-              const detail::sp_typeinfo& check_type 
-                = *out_buffer.type.type;
-
               // Check whether we have the same type. We can add
               // cv-qualifiers, but we can't take them away.
-              if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(F))
-                  && (!in_buffer.obj_ref.is_const_qualified 
-                      || out_buffer.type.const_qualified)
-                  && (!in_buffer.obj_ref.is_volatile_qualified
-                      || out_buffer.type.volatile_qualified))
-                out_buffer.obj_ptr = in_buffer.obj_ref.obj_ptr;
+              if (*out_buffer.members.type.type == boost::typeindex::type_id<F>()
+                  && (!in_buffer.members.obj_ref.is_const_qualified
+                      || out_buffer.members.type.const_qualified)
+                  && (!in_buffer.members.obj_ref.is_volatile_qualified
+                      || out_buffer.members.type.volatile_qualified))
+                out_buffer.members.obj_ptr = in_buffer.members.obj_ref.obj_ptr;
               else
-                out_buffer.obj_ptr = 0;
+                out_buffer.members.obj_ptr = 0;
             }
             return;
 
           case get_functor_type_tag:
-            out_buffer.type.type = &BOOST_SP_TYPEID(F);
-            out_buffer.type.const_qualified = in_buffer.obj_ref.is_const_qualified;
-            out_buffer.type.volatile_qualified = in_buffer.obj_ref.is_volatile_qualified;
+            out_buffer.members.type.type = &boost::typeindex::type_id<F>().type_info();
+            out_buffer.members.type.const_qualified = in_buffer.members.obj_ref.is_const_qualified;
+            out_buffer.members.type.volatile_qualified = in_buffer.members.obj_ref.is_volatile_qualified;
             return;
           }
         }
@@ -240,9 +223,9 @@ namespace boost {
       struct function_allows_small_object_optimization
       {
         BOOST_STATIC_CONSTANT
-          (bool, 
+          (bool,
            value = ((sizeof(F) <= sizeof(function_buffer) &&
-                     (alignment_of<function_buffer>::value 
+                     (alignment_of<function_buffer>::value
                       % alignment_of<F>::value == 0))));
       };
 
@@ -254,7 +237,7 @@ namespace boost {
           A(a)
         {
         }
-        
+
         functor_wrapper(const functor_wrapper& f) :
           F(static_cast<const F&>(f)),
           A(static_cast<const A&>(f))
@@ -273,61 +256,57 @@ namespace boost {
 
         // Function pointers
         static inline void
-        manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer, 
+        manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer,
                 functor_manager_operation_type op)
         {
           if (op == clone_functor_tag)
-            out_buffer.func_ptr = in_buffer.func_ptr;
+            out_buffer.members.func_ptr = in_buffer.members.func_ptr;
           else if (op == move_functor_tag) {
-            out_buffer.func_ptr = in_buffer.func_ptr;
-            in_buffer.func_ptr = 0;
+            out_buffer.members.func_ptr = in_buffer.members.func_ptr;
+            in_buffer.members.func_ptr = 0;
           } else if (op == destroy_functor_tag)
-            out_buffer.func_ptr = 0;
+            out_buffer.members.func_ptr = 0;
           else if (op == check_functor_type_tag) {
-            const boost::detail::sp_typeinfo& check_type
-              = *out_buffer.type.type;
-            if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
-              out_buffer.obj_ptr = &in_buffer.func_ptr;
+            if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+              out_buffer.members.obj_ptr = &in_buffer.members.func_ptr;
             else
-              out_buffer.obj_ptr = 0;
+              out_buffer.members.obj_ptr = 0;
           } else /* op == get_functor_type_tag */ {
-            out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
-            out_buffer.type.const_qualified = false;
-            out_buffer.type.volatile_qualified = false;
+            out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+            out_buffer.members.type.const_qualified = false;
+            out_buffer.members.type.volatile_qualified = false;
           }
         }
 
         // Function objects that fit in the small-object buffer.
         static inline void
-        manage_small(const function_buffer& in_buffer, function_buffer& out_buffer, 
+        manage_small(const function_buffer& in_buffer, function_buffer& out_buffer,
                 functor_manager_operation_type op)
         {
           if (op == clone_functor_tag || op == move_functor_tag) {
-            const functor_type* in_functor = 
-              reinterpret_cast<const functor_type*>(&in_buffer.data);
-            new (reinterpret_cast<void*>(&out_buffer.data)) functor_type(*in_functor);
+            const functor_type* in_functor =
+              reinterpret_cast<const functor_type*>(in_buffer.data);
+            new (reinterpret_cast<void*>(out_buffer.data)) functor_type(*in_functor);
 
             if (op == move_functor_tag) {
-              functor_type* f = reinterpret_cast<functor_type*>(&in_buffer.data);
+              functor_type* f = reinterpret_cast<functor_type*>(in_buffer.data);
               (void)f; // suppress warning about the value of f not being used (MSVC)
               f->~Functor();
             }
           } else if (op == destroy_functor_tag) {
             // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type.
-             functor_type* f = reinterpret_cast<functor_type*>(&out_buffer.data);
+             functor_type* f = reinterpret_cast<functor_type*>(out_buffer.data);
              (void)f; // suppress warning about the value of f not being used (MSVC)
              f->~Functor();
           } else if (op == check_functor_type_tag) {
-            const detail::sp_typeinfo& check_type 
-              = *out_buffer.type.type;
-            if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
-              out_buffer.obj_ptr = &in_buffer.data;
+             if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+              out_buffer.members.obj_ptr = in_buffer.data;
             else
-              out_buffer.obj_ptr = 0;
+              out_buffer.members.obj_ptr = 0;
           } else /* op == get_functor_type_tag */ {
-            out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
-            out_buffer.type.const_qualified = false;
-            out_buffer.type.volatile_qualified = false;            
+            out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+            out_buffer.members.type.const_qualified = false;
+            out_buffer.members.type.volatile_qualified = false;
           }
         }
       };
@@ -340,7 +319,7 @@ namespace boost {
 
         // Function pointers
         static inline void
-        manager(const function_buffer& in_buffer, function_buffer& out_buffer, 
+        manager(const function_buffer& in_buffer, function_buffer& out_buffer,
                 functor_manager_operation_type op, function_ptr_tag)
         {
           functor_manager_common<Functor>::manage_ptr(in_buffer,out_buffer,op);
@@ -348,15 +327,15 @@ namespace boost {
 
         // Function objects that fit in the small-object buffer.
         static inline void
-        manager(const function_buffer& in_buffer, function_buffer& out_buffer, 
+        manager(const function_buffer& in_buffer, function_buffer& out_buffer,
                 functor_manager_operation_type op, mpl::true_)
         {
           functor_manager_common<Functor>::manage_small(in_buffer,out_buffer,op);
         }
-        
+
         // Function objects that require heap allocation
         static inline void
-        manager(const function_buffer& in_buffer, function_buffer& out_buffer, 
+        manager(const function_buffer& in_buffer, function_buffer& out_buffer,
                 functor_manager_operation_type op, mpl::false_)
         {
           if (op == clone_functor_tag) {
@@ -366,29 +345,27 @@ namespace boost {
             // jewillco: Changing this to static_cast because GCC 2.95.3 is
             // obsolete.
             const functor_type* f =
-              static_cast<const functor_type*>(in_buffer.obj_ptr);
+              static_cast<const functor_type*>(in_buffer.members.obj_ptr);
             functor_type* new_f = new functor_type(*f);
-            out_buffer.obj_ptr = new_f;
+            out_buffer.members.obj_ptr = new_f;
           } else if (op == move_functor_tag) {
-            out_buffer.obj_ptr = in_buffer.obj_ptr;
-            in_buffer.obj_ptr = 0;
+            out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
+            in_buffer.members.obj_ptr = 0;
           } else if (op == destroy_functor_tag) {
             /* Cast from the void pointer to the functor pointer type */
             functor_type* f =
-              static_cast<functor_type*>(out_buffer.obj_ptr);
+              static_cast<functor_type*>(out_buffer.members.obj_ptr);
             delete f;
-            out_buffer.obj_ptr = 0;
+            out_buffer.members.obj_ptr = 0;
           } else if (op == check_functor_type_tag) {
-            const detail::sp_typeinfo& check_type
-              = *out_buffer.type.type;
-            if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
-              out_buffer.obj_ptr = in_buffer.obj_ptr;
+            if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+              out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
             else
-              out_buffer.obj_ptr = 0;
+              out_buffer.members.obj_ptr = 0;
           } else /* op == get_functor_type_tag */ {
-            out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
-            out_buffer.type.const_qualified = false;
-            out_buffer.type.volatile_qualified = false;
+            out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+            out_buffer.members.type.const_qualified = false;
+            out_buffer.members.type.volatile_qualified = false;
           }
         }
 
@@ -396,7 +373,7 @@ namespace boost {
         // object can use the small-object optimization buffer or
         // whether we need to allocate it on the heap.
         static inline void
-        manager(const function_buffer& in_buffer, function_buffer& out_buffer, 
+        manager(const function_buffer& in_buffer, function_buffer& out_buffer,
                 functor_manager_operation_type op, function_obj_tag)
         {
           manager(in_buffer, out_buffer, op,
@@ -405,7 +382,7 @@ namespace boost {
 
         // For member pointers, we use the small-object optimization buffer.
         static inline void
-        manager(const function_buffer& in_buffer, function_buffer& out_buffer, 
+        manager(const function_buffer& in_buffer, function_buffer& out_buffer,
                 functor_manager_operation_type op, member_ptr_tag)
         {
           manager(in_buffer, out_buffer, op, mpl::true_());
@@ -415,15 +392,15 @@ namespace boost {
         /* Dispatch to an appropriate manager based on whether we have a
            function pointer or a function object pointer. */
         static inline void
-        manage(const function_buffer& in_buffer, function_buffer& out_buffer, 
+        manage(const function_buffer& in_buffer, function_buffer& out_buffer,
                functor_manager_operation_type op)
         {
           typedef typename get_function_tag<functor_type>::type tag_type;
           switch (op) {
           case get_functor_type_tag:
-            out_buffer.type.type = &BOOST_SP_TYPEID(functor_type);
-            out_buffer.type.const_qualified = false;
-            out_buffer.type.volatile_qualified = false;
+            out_buffer.members.type.type = &boost::typeindex::type_id<functor_type>().type_info();
+            out_buffer.members.type.const_qualified = false;
+            out_buffer.members.type.volatile_qualified = false;
             return;
 
           default:
@@ -441,7 +418,7 @@ namespace boost {
 
         // Function pointers
         static inline void
-        manager(const function_buffer& in_buffer, function_buffer& out_buffer, 
+        manager(const function_buffer& in_buffer, function_buffer& out_buffer,
                 functor_manager_operation_type op, function_ptr_tag)
         {
           functor_manager_common<Functor>::manage_ptr(in_buffer,out_buffer,op);
@@ -449,15 +426,15 @@ namespace boost {
 
         // Function objects that fit in the small-object buffer.
         static inline void
-        manager(const function_buffer& in_buffer, function_buffer& out_buffer, 
+        manager(const function_buffer& in_buffer, function_buffer& out_buffer,
                 functor_manager_operation_type op, mpl::true_)
         {
           functor_manager_common<Functor>::manage_small(in_buffer,out_buffer,op);
         }
-        
+
         // Function objects that require heap allocation
         static inline void
-        manager(const function_buffer& in_buffer, function_buffer& out_buffer, 
+        manager(const function_buffer& in_buffer, function_buffer& out_buffer,
                 functor_manager_operation_type op, mpl::false_)
         {
           typedef functor_wrapper<Functor,Allocator> functor_wrapper_type;
@@ -470,36 +447,34 @@ namespace boost {
             // GCC 2.95.3 gets the CV qualifiers wrong here, so we
             // can't do the static_cast that we should do.
             const functor_wrapper_type* f =
-              static_cast<const functor_wrapper_type*>(in_buffer.obj_ptr);
+              static_cast<const functor_wrapper_type*>(in_buffer.members.obj_ptr);
             wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*f));
             wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
             wrapper_allocator.construct(copy, *f);
 
             // Get back to the original pointer type
             functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
-            out_buffer.obj_ptr = new_f;
+            out_buffer.members.obj_ptr = new_f;
           } else if (op == move_functor_tag) {
-            out_buffer.obj_ptr = in_buffer.obj_ptr;
-            in_buffer.obj_ptr = 0;
+            out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
+            in_buffer.members.obj_ptr = 0;
           } else if (op == destroy_functor_tag) {
             /* Cast from the void pointer to the functor_wrapper_type */
             functor_wrapper_type* victim =
-              static_cast<functor_wrapper_type*>(in_buffer.obj_ptr);
+              static_cast<functor_wrapper_type*>(in_buffer.members.obj_ptr);
             wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*victim));
             wrapper_allocator.destroy(victim);
             wrapper_allocator.deallocate(victim,1);
-            out_buffer.obj_ptr = 0;
+            out_buffer.members.obj_ptr = 0;
           } else if (op == check_functor_type_tag) {
-            const detail::sp_typeinfo& check_type 
-              = *out_buffer.type.type;
-            if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
-              out_buffer.obj_ptr = in_buffer.obj_ptr;
+            if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+              out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
             else
-              out_buffer.obj_ptr = 0;
+              out_buffer.members.obj_ptr = 0;
           } else /* op == get_functor_type_tag */ {
-            out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
-            out_buffer.type.const_qualified = false;
-            out_buffer.type.volatile_qualified = false;
+            out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+            out_buffer.members.type.const_qualified = false;
+            out_buffer.members.type.volatile_qualified = false;
           }
         }
 
@@ -507,7 +482,7 @@ namespace boost {
         // object can use the small-object optimization buffer or
         // whether we need to allocate it on the heap.
         static inline void
-        manager(const function_buffer& in_buffer, function_buffer& out_buffer, 
+        manager(const function_buffer& in_buffer, function_buffer& out_buffer,
                 functor_manager_operation_type op, function_obj_tag)
         {
           manager(in_buffer, out_buffer, op,
@@ -518,15 +493,15 @@ namespace boost {
         /* Dispatch to an appropriate manager based on whether we have a
            function pointer or a function object pointer. */
         static inline void
-        manage(const function_buffer& in_buffer, function_buffer& out_buffer, 
+        manage(const function_buffer& in_buffer, function_buffer& out_buffer,
                functor_manager_operation_type op)
         {
           typedef typename get_function_tag<functor_type>::type tag_type;
           switch (op) {
           case get_functor_type_tag:
-            out_buffer.type.type = &BOOST_SP_TYPEID(functor_type);
-            out_buffer.type.const_qualified = false;
-            out_buffer.type.volatile_qualified = false;
+            out_buffer.members.type.type = &boost::typeindex::type_id<functor_type>().type_info();
+            out_buffer.members.type.const_qualified = false;
+            out_buffer.members.type.volatile_qualified = false;
             return;
 
           default:
@@ -604,8 +579,8 @@ namespace boost {
        */
       struct vtable_base
       {
-        void (*manager)(const function_buffer& in_buffer, 
-                        function_buffer& out_buffer, 
+        void (*manager)(const function_buffer& in_buffer,
+                        function_buffer& out_buffer,
                         functor_manager_operation_type op);
       };
     } // end namespace function
@@ -625,15 +600,15 @@ public:
   /** Determine if the function is empty (i.e., has no target). */
   bool empty() const { return !vtable; }
 
-  /** Retrieve the type of the stored function object, or BOOST_SP_TYPEID(void)
+  /** Retrieve the type of the stored function object, or type_id<void>()
       if this is empty. */
-  const detail::sp_typeinfo& target_type() const
+  const boost::typeindex::type_info& target_type() const
   {
-    if (!vtable) return BOOST_SP_TYPEID(void);
+    if (!vtable) return boost::typeindex::type_id<void>().type_info();
 
     detail::function::function_buffer type;
     get_vtable()->manager(functor, type, detail::function::get_functor_type_tag);
-    return *type.type.type;
+    return *type.members.type.type;
   }
 
   template<typename Functor>
@@ -642,12 +617,12 @@ public:
       if (!vtable) return 0;
 
       detail::function::function_buffer type_result;
-      type_result.type.type = &BOOST_SP_TYPEID(Functor);
-      type_result.type.const_qualified = is_const<Functor>::value;
-      type_result.type.volatile_qualified = is_volatile<Functor>::value;
-      get_vtable()->manager(functor, type_result, 
+      type_result.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+      type_result.members.type.const_qualified = is_const<Functor>::value;
+      type_result.members.type.volatile_qualified = is_volatile<Functor>::value;
+      get_vtable()->manager(functor, type_result,
                       detail::function::check_functor_type_tag);
-      return static_cast<Functor*>(type_result.obj_ptr);
+      return static_cast<Functor*>(type_result.members.obj_ptr);
     }
 
   template<typename Functor>
@@ -656,14 +631,14 @@ public:
       if (!vtable) return 0;
 
       detail::function::function_buffer type_result;
-      type_result.type.type = &BOOST_SP_TYPEID(Functor);
-      type_result.type.const_qualified = true;
-      type_result.type.volatile_qualified = is_volatile<Functor>::value;
-      get_vtable()->manager(functor, type_result, 
+      type_result.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+      type_result.members.type.const_qualified = true;
+      type_result.members.type.volatile_qualified = is_volatile<Functor>::value;
+      get_vtable()->manager(functor, type_result,
                       detail::function::check_functor_type_tag);
       // GCC 2.95.3 gets the CV qualifiers wrong here, so we
       // can't do the static_cast that we should do.
-      return static_cast<const Functor*>(type_result.obj_ptr);
+      return static_cast<const Functor*>(type_result.members.obj_ptr);
     }
 
   template<typename F>
@@ -883,10 +858,9 @@ namespace detail {
 } // end namespace boost
 
 #undef BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL
-#undef BOOST_FUNCTION_COMPARE_TYPE_ID
 
 #if defined(BOOST_MSVC)
 #   pragma warning( pop )
-#endif       
+#endif
 
 #endif // BOOST_FUNCTION_BASE_HEADER
index 211b81dbe3e28f6f7dc746fb0973432b0fb9e1f8..82c81d769733ab595760586d9de59a01c85e2922 100644 (file)
@@ -16,7 +16,7 @@
 #if defined(BOOST_MSVC)
 #   pragma warning( push )
 #   pragma warning( disable : 4127 ) // "conditional expression is constant"
-#endif       
+#endif
 
 #define BOOST_FUNCTION_TEMPLATE_PARMS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, typename T)
 
@@ -97,7 +97,7 @@ namespace boost {
         static R invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA
                         BOOST_FUNCTION_PARMS)
         {
-          FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+          FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.members.func_ptr);
           return f(BOOST_FUNCTION_ARGS);
         }
       };
@@ -114,7 +114,7 @@ namespace boost {
                BOOST_FUNCTION_PARMS)
 
         {
-          FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.func_ptr);
+          FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.members.func_ptr);
           BOOST_FUNCTION_RETURN(f(BOOST_FUNCTION_ARGS));
         }
       };
@@ -132,9 +132,9 @@ namespace boost {
         {
           FunctionObj* f;
           if (function_allows_small_object_optimization<FunctionObj>::value)
-            f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+            f = reinterpret_cast<FunctionObj*>(function_obj_ptr.data);
           else
-            f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+            f = reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
           return (*f)(BOOST_FUNCTION_ARGS);
         }
       };
@@ -153,9 +153,9 @@ namespace boost {
         {
           FunctionObj* f;
           if (function_allows_small_object_optimization<FunctionObj>::value)
-            f = reinterpret_cast<FunctionObj*>(&function_obj_ptr.data);
+            f = reinterpret_cast<FunctionObj*>(function_obj_ptr.data);
           else
-            f = reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+            f = reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
           BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS));
         }
       };
@@ -171,8 +171,8 @@ namespace boost {
                         BOOST_FUNCTION_PARMS)
 
         {
-          FunctionObj* f = 
-            reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+          FunctionObj* f =
+            reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
           return (*f)(BOOST_FUNCTION_ARGS);
         }
       };
@@ -189,8 +189,8 @@ namespace boost {
                BOOST_FUNCTION_PARMS)
 
         {
-          FunctionObj* f = 
-            reinterpret_cast<FunctionObj*>(function_obj_ptr.obj_ptr);
+          FunctionObj* f =
+            reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
           BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS));
         }
       };
@@ -208,8 +208,8 @@ namespace boost {
                         BOOST_FUNCTION_PARMS)
 
         {
-          MemberPtr* f = 
-            reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+          MemberPtr* f =
+            reinterpret_cast<MemberPtr*>(function_obj_ptr.data);
           return boost::mem_fn(*f)(BOOST_FUNCTION_ARGS);
         }
       };
@@ -226,8 +226,8 @@ namespace boost {
                BOOST_FUNCTION_PARMS)
 
         {
-          MemberPtr* f = 
-            reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+          MemberPtr* f =
+            reinterpret_cast<MemberPtr*>(function_obj_ptr.data);
           BOOST_FUNCTION_RETURN(boost::mem_fn(*f)(BOOST_FUNCTION_ARGS));
         }
       };
@@ -322,7 +322,7 @@ namespace boost {
 
       /* Given the tag returned by get_function_tag, retrieve the
          actual invoker that will be used for the given function
-         object. 
+         object.
 
          Each specialization contains an "apply" nested class template
          that accepts the function object, return type, function
@@ -513,21 +513,21 @@ namespace boost {
       private:
         // Function pointers
         template<typename FunctionPtr>
-        bool 
+        bool
         assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
         {
           this->clear(functor);
           if (f) {
             // should be a reinterpret cast, but some compilers insist
             // on giving cv-qualifiers to free functions
-            functor.func_ptr = reinterpret_cast<void (*)()>(f);
+            functor.members.func_ptr = reinterpret_cast<void (*)()>(f);
             return true;
           } else {
             return false;
           }
         }
         template<typename FunctionPtr,typename Allocator>
-        bool 
+        bool
         assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
         {
           return assign_to(f,functor,function_ptr_tag());
@@ -566,13 +566,13 @@ namespace boost {
         // Function objects
         // Assign to a function object using the small object optimization
         template<typename FunctionObj>
-        void 
+        void
         assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
         {
-          new (reinterpret_cast<void*>(&functor.data)) FunctionObj(f);
+          new (reinterpret_cast<void*>(functor.data)) FunctionObj(f);
         }
         template<typename FunctionObj,typename Allocator>
-        void 
+        void
         assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
         {
           assign_functor(f,functor,mpl::true_());
@@ -580,13 +580,13 @@ namespace boost {
 
         // Assign to a function object allocated on the heap.
         template<typename FunctionObj>
-        void 
+        void
         assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
         {
-          functor.obj_ptr = new FunctionObj(f);
+          functor.members.obj_ptr = new FunctionObj(f);
         }
         template<typename FunctionObj,typename Allocator>
-        void 
+        void
         assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
         {
           typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
@@ -597,15 +597,15 @@ namespace boost {
           wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
           wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
           functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
-          functor.obj_ptr = new_f;
+          functor.members.obj_ptr = new_f;
         }
 
         template<typename FunctionObj>
-        bool 
+        bool
         assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
         {
           if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
-            assign_functor(f, functor, 
+            assign_functor(f, functor,
                            mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
             return true;
           } else {
@@ -613,7 +613,7 @@ namespace boost {
           }
         }
         template<typename FunctionObj,typename Allocator>
-        bool 
+        bool
         assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
         {
           if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
@@ -627,18 +627,18 @@ namespace boost {
 
         // Reference to a function object
         template<typename FunctionObj>
-        bool 
-        assign_to(const reference_wrapper<FunctionObj>& f, 
+        bool
+        assign_to(const reference_wrapper<FunctionObj>& f,
                   function_buffer& functor, function_obj_ref_tag) const
         {
-          functor.obj_ref.obj_ptr = (void *)(f.get_pointer());
-          functor.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
-          functor.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
+          functor.members.obj_ref.obj_ptr = (void *)(f.get_pointer());
+          functor.members.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
+          functor.members.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
           return true;
         }
         template<typename FunctionObj,typename Allocator>
-        bool 
-        assign_to_a(const reference_wrapper<FunctionObj>& f, 
+        bool
+        assign_to_a(const reference_wrapper<FunctionObj>& f,
                   function_buffer& functor, Allocator, function_obj_ref_tag) const
         {
           return assign_to(f,functor,function_obj_ref_tag());
@@ -752,14 +752,14 @@ namespace boost {
     {
       this->assign_to_own(f);
     }
-    
+
 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
     BOOST_FUNCTION_FUNCTION(BOOST_FUNCTION_FUNCTION&& f) : function_base()
     {
       this->move_assign(f);
     }
 #endif
-    
+
     ~BOOST_FUNCTION_FUNCTION() { clear(); }
 
     result_type operator()(BOOST_FUNCTION_PARMS) const
@@ -840,12 +840,11 @@ namespace boost {
       BOOST_CATCH_END
       return *this;
     }
-    
+
 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
     // Move assignment from another BOOST_FUNCTION_FUNCTION
     BOOST_FUNCTION_FUNCTION& operator=(BOOST_FUNCTION_FUNCTION&& f)
     {
-      
       if (&f == this)
         return *this;
 
@@ -922,10 +921,10 @@ namespace boost {
       typedef typename boost::detail::function::get_function_tag<Functor>::type tag;
       typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker;
       typedef typename get_invoker::
-                         template apply<Functor, R BOOST_FUNCTION_COMMA 
+                         template apply<Functor, R BOOST_FUNCTION_COMMA
                         BOOST_FUNCTION_TEMPLATE_ARGS>
         handler_type;
-      
+
       typedef typename handler_type::invoker_type invoker_type;
       typedef typename handler_type::manager_type manager_type;
 
@@ -933,7 +932,7 @@ namespace boost {
       // static initialization. Otherwise, we will have a race
       // condition here in multi-threaded code. See
       // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/.
-      static const vtable_type stored_vtable = 
+      static const vtable_type stored_vtable =
         { { &manager_type::manage }, &invoker_type::invoke };
 
       if (stored_vtable.assign_to(f, functor)) {
@@ -944,7 +943,7 @@ namespace boost {
             boost::detail::function::function_allows_small_object_optimization<Functor>::value)
           value |= static_cast<std::size_t>(0x01);
         vtable = reinterpret_cast<boost::detail::function::vtable_base *>(value);
-      } else 
+      } else
         vtable = 0;
     }
 
@@ -956,11 +955,11 @@ namespace boost {
       typedef typename boost::detail::function::get_function_tag<Functor>::type tag;
       typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker;
       typedef typename get_invoker::
-                         template apply_a<Functor, R BOOST_FUNCTION_COMMA 
+                         template apply_a<Functor, R BOOST_FUNCTION_COMMA
                          BOOST_FUNCTION_TEMPLATE_ARGS,
                          Allocator>
         handler_type;
-      
+
       typedef typename handler_type::invoker_type invoker_type;
       typedef typename handler_type::manager_type manager_type;
 
@@ -971,7 +970,7 @@ namespace boost {
       static const vtable_type stored_vtable =
         { { &manager_type::manage }, &invoker_type::invoke };
 
-      if (stored_vtable.assign_to_a(f, functor, a)) { 
+      if (stored_vtable.assign_to_a(f, functor, a)) {
         std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
         // coverity[pointless_expression]: suppress coverity warnings on apparant if(const).
         if (boost::has_trivial_copy_constructor<Functor>::value &&
@@ -979,15 +978,15 @@ namespace boost {
             boost::detail::function::function_allows_small_object_optimization<Functor>::value)
           value |= static_cast<std::size_t>(0x01);
         vtable = reinterpret_cast<boost::detail::function::vtable_base *>(value);
-      } else 
+      } else
         vtable = 0;
     }
 
-    // Moves the value from the specified argument to *this. If the argument 
-    // has its function object allocated on the heap, move_assign will pass 
-    // its buffer to *this, and set the argument's buffer pointer to NULL. 
-    void move_assign(BOOST_FUNCTION_FUNCTION& f) 
-    { 
+    // Moves the value from the specified argument to *this. If the argument
+    // has its function object allocated on the heap, move_assign will pass
+    // its buffer to *this, and set the argument's buffer pointer to NULL.
+    void move_assign(BOOST_FUNCTION_FUNCTION& f)
+    {
       if (&f == this)
         return;
 
@@ -1098,7 +1097,7 @@ public:
   function(self_type&& f): base_type(static_cast<base_type&&>(f)){}
   function(base_type&& f): base_type(static_cast<base_type&&>(f)){}
 #endif
-  
+
   self_type& operator=(const self_type& f)
   {
     self_type(f).swap(*this);
@@ -1111,7 +1110,7 @@ public:
     self_type(static_cast<self_type&&>(f)).swap(*this);
     return *this;
   }
-#endif  
+#endif
 
   template<typename Functor>
 #ifndef BOOST_NO_SFINAE
@@ -1140,14 +1139,14 @@ public:
     self_type(f).swap(*this);
     return *this;
   }
-  
+
 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
   self_type& operator=(base_type&& f)
   {
     self_type(static_cast<base_type&&>(f)).swap(*this);
     return *this;
   }
-#endif 
+#endif
 };
 
 #undef BOOST_FUNCTION_PARTIAL_SPEC
@@ -1187,4 +1186,4 @@ public:
 
 #if defined(BOOST_MSVC)
 #   pragma warning( pop )
-#endif       
+#endif
index 2fb9f2111655aaacf4f5deaed01ff4deba044730..0a8ceeb4742e2553a266779398ef0e5a426ec08d 100644 (file)
@@ -212,7 +212,6 @@ namespace boost
             seed ^= value + 0x9e3779b9 + (seed<<6) + (seed>>2);
         }
 
-        template <typename SizeT>
         inline void hash_combine_impl(boost::uint32_t& h1,
                 boost::uint32_t k1)
         {
@@ -229,12 +228,11 @@ namespace boost
         }
 
 
-// Don't define 64-bit hash combine on platforms with 64 bit integers,
+// Don't define 64-bit hash combine on platforms without 64 bit integers,
 // and also not for 32-bit gcc as it warns about the 64-bit constant.
 #if !defined(BOOST_NO_INT64_T) && \
         !(defined(__GNUC__) && ULONG_MAX == 0xffffffff)
 
-        template <typename SizeT>
         inline void hash_combine_impl(boost::uint64_t& h,
                 boost::uint64_t k)
         {
@@ -247,6 +245,10 @@ namespace boost
 
             h ^= k;
             h *= m;
+
+            // Completely arbitrary number, to prevent 0's
+            // from hashing to 0.
+            h += 0xe6546b64;
         }
 
 #endif // BOOST_NO_INT64_T
index ba8d3b4dc32196a996218a9da1b8e38f1646a28d..981594995aefc2ef985ba0faa9fe976c4d0c3e4d 100644 (file)
@@ -467,7 +467,7 @@ namespace boost {
 
             template <std::size_t N>
             bool operator<<(boost::array<const CharT, N> const& input) BOOST_NOEXCEPT { 
-                return shl_char_array_limited(input.begin(), N); 
+                return shl_char_array_limited(input.data(), N);
             }
 
             template <std::size_t N>
@@ -697,7 +697,7 @@ namespace boost {
             template <class C, std::size_t N>
             bool operator>>(std::array<C, N>& output) BOOST_NOEXCEPT { 
                 BOOST_STATIC_ASSERT_MSG(
-                    (sizeof(boost::array<C, N>) == sizeof(boost::array<C, N>)),
+                    (sizeof(std::array<C, N>) == sizeof(boost::array<C, N>)),
                     "std::array<C, N> and boost::array<C, N> must have exactly the same layout."
                 );
                 return ((*this) >> reinterpret_cast<boost::array<C, N>& >(output));
index de813fb8aa5c7bc0fb1f846d07493bc610731978..c1e1a7be4a4afd6888d1f4b190101d05cbffd1c2 100644 (file)
@@ -914,11 +914,9 @@ struct series_factor_calc<T, Digits, mpl::true_, mpl::true_>
 template <class T, class Digits>
 struct series_factor_calc<T, Digits, mpl::true_, mpl::false_>
 {
-   BOOST_STATIC_CONSTANT(boost::uintmax_t, v = static_cast<boost::uintmax_t>(1u) << (Digits::value - 1));
-
    static BOOST_MATH_CONSTEXPR T get() BOOST_MATH_NOEXCEPT(T)
    {
-      return 1 / static_cast<T>(v);
+      return 1 / static_cast<T>(static_cast<boost::uintmax_t>(1u) << (Digits::value - 1));
    }
 };
 template <class T, class Digits>
index 75d29b646ed174e15372141e222817b9cdbf4dc8..32375e6a6e5d1e3c8dbf6a2a5972723694a2cf03 100644 (file)
@@ -442,8 +442,16 @@ namespace boost{ namespace math{
 
 #endif
 
-#endif // BOOST_MATH_TOOLS_CONFIG_HPP
+//
+// Thread local storage:
+//
+#if !defined(BOOST_NO_CXX11_THREAD_LOCAL) && !defined(BOOST_INTEL)
+#  define BOOST_MATH_THREAD_LOCAL thread_local
+#else
+#  define BOOST_MATH_THREAD_LOCAL
+#endif
 
+#endif // BOOST_MATH_TOOLS_CONFIG_HPP
 
 
 
index f9b79151a54b8c3de6efcdaddad2a111227fe6f5..9c9147ae12970f25cdec0e2136d2c75d920a3e0f 100644 (file)
@@ -90,17 +90,6 @@ template < static_gcd_type Value1, static_gcd_type Value2 >
 template < static_gcd_type Value1, static_gcd_type Value2 >
     struct static_lcm;
 
-
-//  From <boost/math/common_factor_rt.hpp>  ----------------------------------//
-
-template < typename IntegerType >
-    class gcd_evaluator;
-template < typename IntegerType >
-    class lcm_evaluator;
-
-// Also has a couple of function templates
-
-
 }  // namespace math
 }  // namespace boost
 
index 930320108dfcf51d9376b63a6b6857c1a7125fff..d6906a483f60706e6a28422009b6ba6087ff62a5 100644 (file)
@@ -231,8 +231,8 @@ BOOST_MOVE_FORCEINLINE void adl_move_swap(T& x, T& y)
 //! using boost::adl_move_swap.
 //! 
 //! Parameters:
-//!   first1, last1    -       the first range of elements to swap
-//!   first2   -       beginning of the second range of elements to swap
+//!   first1, last1   -   the first range of elements to swap
+//!   first2   -   beginning of the second range of elements to swap
 //!
 //! Type requirements:
 //!   - ForwardIt1, ForwardIt2 must meet the requirements of ForwardIterator.
index 943f286c943e07acbca3ec61315b03b6914a7db8..d35f04a399794bd41068009b11bedfdd8ad8a13e 100644 (file)
@@ -125,10 +125,10 @@ F uninitialized_move(I f, I l, F r
       }
    }
    BOOST_CATCH(...){
-          for (; back != r; ++back){
+      for (; back != r; ++back){
          back->~input_value_type();
       }
-          BOOST_RETHROW;
+      BOOST_RETHROW;
    }
    BOOST_CATCH_END
    return r;
index c9cbec23a1bb60cccfee3e3168f8b7b504c0fd29..1dd8a8c2717d79ecd036eee074213a3b83aca186 100644 (file)
 
    #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\
       public:\
-      TYPE& operator=(TYPE &t)\
-      {  this->operator=(const_cast<const TYPE &>(t)); return *this;}\
+      BOOST_MOVE_FORCEINLINE TYPE& operator=(TYPE &t)\
+      {  this->operator=(const_cast<const TYPE&>(t)); return *this;}\
       public:\
       BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
       {  return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this);  }\
index 4d715a060a6f7cbfe537b4d5d94f521c14de9c7e..40dbb6efc3ddbae0c90b4dc663c5476bc5288627 100644 (file)
@@ -114,6 +114,18 @@ struct is_same<T, T>
    static const bool value = true;
 };
 
+//////////////////////////////////////
+//        enable_if_same
+//////////////////////////////////////
+template <class T, class U, class R = void>
+struct enable_if_same : enable_if<is_same<T, U>, R> {};
+
+//////////////////////////////////////
+//        disable_if_same
+//////////////////////////////////////
+template <class T, class U, class R = void>
+struct disable_if_same : disable_if<is_same<T, U>, R> {};
+
 }  //namespace move_detail {
 }  //namespace boost {
 
index 816fdca7b22bd871b468a9cf9174b8437ffa7531..1b5d8388e4ab0dd3ad3cc6ddb14db7f10ad4d4d3 100644 (file)
 // BOOST_MOVE_IS_POD(T) should evaluate to true if T is a POD type
 // BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
 // BOOST_MOVE_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
+// (Note: this trait does not guarantee T is copy constructible, the copy constructor could be deleted but still be trivial)
 // BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy
 // BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
+// (Note: this trait does not guarantee T is assignable , the copy assignmen could be deleted but still be trivial)
 // BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy
 // BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
 // BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw
 #     define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
 #   endif
 #   if __has_feature(has_trivial_copy)
-#     //There are problems with deleted copy constructors detected as trivially copyable.
-#     //http://stackoverflow.com/questions/12754886/has-trivial-copy-behaves-differently-in-clang-and-gcc-whos-right
-#     define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && ::boost::move_detail::is_copy_constructible<T>::value)
+#     define BOOST_MOVE_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T)
 #   endif
 #   if __has_feature(has_trivial_assign)
 #     define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) )
 #endif
 
 #ifdef BOOST_MOVE_HAS_TRIVIAL_COPY
-   #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T)   BOOST_MOVE_HAS_TRIVIAL_COPY(T)
+   #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T)   ::boost::move_detail::is_pod<T>::value ||\
+                                                          (::boost::move_detail::is_copy_constructible<T>::value &&\
+                                                           BOOST_MOVE_HAS_TRIVIAL_COPY(T))
 #else
    #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T)   ::boost::move_detail::is_pod<T>::value
 #endif
    #define BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T)  ::boost::move_detail::is_pod<T>::value
 #endif
 
-#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY
-   #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T)   BOOST_MOVE_HAS_TRIVIAL_COPY(T)
-#else
-   #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T)   ::boost::move_detail::is_pod<T>::value
-#endif
-
 #ifdef BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR
    #define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T)   BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T)
 #else
 #endif
 
 #ifdef BOOST_MOVE_HAS_TRIVIAL_ASSIGN
-   #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T)
+   #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value ||\
+                                                      ( ::boost::move_detail::is_copy_assignable<T>::value &&\
+                                                         BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T))
 #else
    #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value
 #endif
@@ -821,9 +819,7 @@ struct is_trivially_copy_constructible
 {
    //In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with
    //deleted copy constructors so make sure the type is copy constructible.
-   static const bool value = ::boost::move_detail::is_pod<T>::value ||
-                             ( ::boost::move_detail::is_copy_constructible<T>::value &&
-                               BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) );
+   static const bool value = BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T);
 };
 
 //////////////////////////////////////
@@ -831,7 +827,7 @@ struct is_trivially_copy_constructible
 //////////////////////////////////////
 template<class T>
 struct is_trivially_move_constructible
-{  static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T); };
+{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T); };
 
 //////////////////////////////////////
 //       is_trivially_copy_assignable
@@ -841,9 +837,7 @@ struct is_trivially_copy_assignable
 {
    //In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with
    //deleted copy constructors so make sure the type is copy constructible.
-   static const bool value = ::boost::move_detail::is_pod<T>::value ||
-                             ( ::boost::move_detail::is_copy_assignable<T>::value &&
-                               BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) );
+   static const bool value = BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T);
 };                             
 
 //////////////////////////////////////
@@ -1005,7 +999,7 @@ BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1000)
 
 template<class T, std::size_t Len>
 union aligned_union
-{      
+{   
    T aligner;
    char dummy[Len];
 };
@@ -1023,7 +1017,7 @@ struct aligned_next<Len, Align, T, true>
 //End of search defaults to max_align_t
 template<std::size_t Len, std::size_t Align>
 struct aligned_next<Len, Align, max_align_t, false>
-{      typedef aligned_union<max_align_t, Len> type;   };
+{   typedef aligned_union<max_align_t, Len> type;   };
 
 //Now define a search list through types
 #define BOOST_MOVE_ALIGNED_NEXT_STEP(TYPE, NEXT_TYPE)\
index c41a34d39866a6ee5463ab8287aedd787535c2d4..faee253e55ba49a99d8fc69ee791a4b7159a27de 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP
 #define BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP
 
-#include <boost/config/suffix.hpp>
+#include <boost/config.hpp>
 
 namespace boost {
 
index 11157167c60521937e5c78ebe2871830f554749a..1f9e96c500c522bb71eab5937fea813f5acc64e3 100644 (file)
@@ -21,7 +21,7 @@ http://www.boost.org/LICENSE_1_0.txt)
 // ---------------------------------
 
 /*`
- [heading `BOOST_HW_SIMD_X86_SSE4A_VERSION`]
+ [heading `BOOST_HW_SIMD_X86_AMD_SSE4A_VERSION`]
 
  [@https://en.wikipedia.org/wiki/SSE4##SSE4A SSE4A] x86 extension (AMD specific).
 
@@ -30,7 +30,7 @@ http://www.boost.org/LICENSE_1_0.txt)
 #define BOOST_HW_SIMD_X86_AMD_SSE4A_VERSION BOOST_VERSION_NUMBER(4, 0, 0)
 
 /*`
- [heading `BOOST_HW_SIMD_X86_FMA4_VERSION`]
+ [heading `BOOST_HW_SIMD_X86_AMD_FMA4_VERSION`]
 
  [@https://en.wikipedia.org/wiki/FMA_instruction_set#FMA4_instruction_set FMA4] x86 extension (AMD specific).
 
@@ -39,7 +39,7 @@ http://www.boost.org/LICENSE_1_0.txt)
 #define BOOST_HW_SIMD_X86_AMD_FMA4_VERSION BOOST_VERSION_NUMBER(5, 1, 0)
 
 /*`
- [heading `BOOST_HW_SIMD_X86_XOP_VERSION`]
+ [heading `BOOST_HW_SIMD_X86_AMD_XOP_VERSION`]
 
  [@https://en.wikipedia.org/wiki/XOP_instruction_set XOP] x86 extension (AMD specific).
 
index d097eed959fb4d7c5d22464e4ddb84a0b0fd002d..0071a8ce8eafb1b9a925e806c6cb359fd0d24638 100644 (file)
@@ -38,6 +38,21 @@ namespace BOOST_REGEX_DETAIL_NS{
 #pragma warning(disable:4244 4800)
 #endif
 
+inline boost::intmax_t umax(mpl::false_ const&)
+{
+   // Get out clause here, just in case numeric_limits is unspecialized:
+   return std::numeric_limits<boost::intmax_t>::is_specialized ? (std::numeric_limits<boost::intmax_t>::max)() : INT_MAX;
+}
+inline boost::intmax_t umax(mpl::true_ const&)
+{
+   return (std::numeric_limits<std::size_t>::max)();
+}
+
+inline boost::intmax_t umax()
+{
+   return umax(mpl::bool_<std::numeric_limits<boost::intmax_t>::digits >= std::numeric_limits<std::size_t>::digits>());
+}
+
 template <class charT, class traits>
 class basic_regex_parser : public basic_regex_creator<charT, traits>
 {
@@ -528,7 +543,11 @@ bool basic_regex_parser<charT, traits>::parse_open_paren()
 template <class charT, class traits>
 bool basic_regex_parser<charT, traits>::parse_basic_escape()
 {
-   ++m_position;
+   if(++m_position == m_end)
+   {
+      fail(regex_constants::error_paren, m_position - m_base);
+      return false;
+   }
    bool result = true;
    switch(this->m_traits.escape_syntax_type(*m_position))
    {
@@ -868,7 +887,7 @@ escape_type_class_jump:
             return false;
          }
          const charT* pc = m_position;
-         int i = this->m_traits.toi(pc, m_end, 10);
+         boost::intmax_t i = this->m_traits.toi(pc, m_end, 10);
          if((i < 0) && syn_end)
          {
             // Check for a named capture, get the leftmost one if there is more than one:
@@ -1075,7 +1094,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
    // parse a repeat-range:
    //
    std::size_t min, max;
-   int v;
+   boost::intmax_t v;
    // skip whitespace:
    while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
       ++m_position;
@@ -1094,7 +1113,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
    // get min:
    v = this->m_traits.toi(m_position, m_end, 10);
    // skip whitespace:
-   if(v < 0)
+   if((v < 0) || (v > umax()))
    {
       if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
       {
@@ -1120,7 +1139,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
       while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
       return parse_literal();
    }
-   min = v;
+   min = static_cast<std::size_t>(v);
    // see if we have a comma:
    if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_comma)
    {
@@ -1143,7 +1162,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
       }
       // get the value if any:
       v = this->m_traits.toi(m_position, m_end, 10);
-      max = (v >= 0) ? (std::size_t)v : (std::numeric_limits<std::size_t>::max)();
+      max = ((v >= 0) && (v < umax())) ? (std::size_t)v : (std::numeric_limits<std::size_t>::max)();
    }
    else
    {
@@ -1665,19 +1684,19 @@ digraph<charT> basic_regex_parser<charT, traits>::get_next_set_literal(basic_cha
 // does a value fit in the specified charT type?
 //
 template <class charT>
-bool valid_value(charT, int v, const mpl::true_&)
+bool valid_value(charT, boost::intmax_t v, const mpl::true_&)
 {
    return (v >> (sizeof(charT) * CHAR_BIT)) == 0;
 }
 template <class charT>
-bool valid_value(charT, int, const mpl::false_&)
+bool valid_value(charT, boost::intmax_t, const mpl::false_&)
 {
    return true; // v will alsways fit in a charT
 }
 template <class charT>
-bool valid_value(charT c, int v)
+bool valid_value(charT c, boost::intmax_t v)
 {
-   return valid_value(c, v, mpl::bool_<(sizeof(charT) < sizeof(int))>());
+   return valid_value(c, v, mpl::bool_<(sizeof(charT) < sizeof(boost::intmax_t))>());
 }
 
 template <class charT, class traits>
@@ -1753,10 +1772,10 @@ charT basic_regex_parser<charT, traits>::unescape_character()
             fail(regex_constants::error_escape, m_position - m_base, "Missing } in hexadecimal escape sequence.");
             return result;
          }
-         int i = this->m_traits.toi(m_position, m_end, 16);
+         boost::intmax_t i = this->m_traits.toi(m_position, m_end, 16);
          if((m_position == m_end)
             || (i < 0)
-            || ((std::numeric_limits<charT>::is_specialized) && (i > (int)(std::numeric_limits<charT>::max)()))
+            || ((std::numeric_limits<charT>::is_specialized) && (i > (boost::intmax_t)(std::numeric_limits<charT>::max)()))
             || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
          {
             // Rewind to start of escape:
@@ -1771,7 +1790,7 @@ charT basic_regex_parser<charT, traits>::unescape_character()
       else
       {
          std::ptrdiff_t len = (std::min)(static_cast<std::ptrdiff_t>(2), static_cast<std::ptrdiff_t>(m_end - m_position));
-         int i = this->m_traits.toi(m_position, m_position + len, 16);
+         boost::intmax_t i = this->m_traits.toi(m_position, m_position + len, 16);
          if((i < 0)
             || !valid_value(charT(0), i))
          {
@@ -1790,7 +1809,7 @@ charT basic_regex_parser<charT, traits>::unescape_character()
       // followed by up to 3 octal digits:
       std::ptrdiff_t len = (std::min)(::boost::BOOST_REGEX_DETAIL_NS::distance(m_position, m_end), static_cast<std::ptrdiff_t>(4));
       const charT* bp = m_position;
-      int val = this->m_traits.toi(bp, bp + 1, 8);
+      boost::intmax_t val = this->m_traits.toi(bp, bp + 1, 8);
       if(val != 0)
       {
          // Rewind to start of escape:
@@ -1801,7 +1820,7 @@ charT basic_regex_parser<charT, traits>::unescape_character()
          return result;
       }
       val = this->m_traits.toi(m_position, m_position + len, 8);
-      if(val < 0) 
+      if((val < 0) || (val > (boost::intmax_t)(std::numeric_limits<charT>::max)()))
       {
          // Rewind to start of escape:
          --m_position;
@@ -1874,7 +1893,7 @@ bool basic_regex_parser<charT, traits>::parse_backref()
 {
    BOOST_ASSERT(m_position != m_end);
    const charT* pc = m_position;
-   int i = this->m_traits.toi(pc, pc + 1, 10);
+   boost::intmax_t i = this->m_traits.toi(pc, pc + 1, 10);
    if((i == 0) || (((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group) && (this->flags() & regbase::no_bk_refs)))
    {
       // not a backref at all but an octal escape sequence:
@@ -1996,7 +2015,7 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
    int max_mark = m_max_mark;
    m_mark_reset = -1;
    m_max_mark = m_mark_count;
-   int v;
+   boost::intmax_t v;
    //
    // select the actual extension used:
    //
index 709663a38563ae9c474a5c858c784f404a966c72..b7b32d8a5c3131d615559d64d9f530b896cbf6d9 100644 (file)
@@ -1027,11 +1027,11 @@ public:
       return m_pimpl->isctype(c, f);
 #endif
    }
-   int toi(const charT*& p1, const charT* p2, int radix)const;
+   boost::intmax_t toi(const charT*& p1, const charT* p2, int radix)const;
    int value(charT c, int radix)const
    {
       const charT* pc = &c;
-      return toi(pc, pc + 1, radix);
+      return (int)toi(pc, pc + 1, radix);
    }
    locale_type imbue(locale_type l)
    {
@@ -1069,7 +1069,7 @@ private:
 
 
 template <class charT>
-int cpp_regex_traits<charT>::toi(const charT*& first, const charT* last, int radix)const
+boost::intmax_t cpp_regex_traits<charT>::toi(const charT*& first, const charT* last, int radix)const
 {
    BOOST_REGEX_DETAIL_NS::parser_buf<charT>   sbuf;            // buffer for parsing numbers.
    std::basic_istream<charT>      is(&sbuf);       // stream for parsing numbers.
@@ -1082,7 +1082,7 @@ int cpp_regex_traits<charT>::toi(const charT*& first, const charT* last, int rad
    if(std::abs(radix) == 16) is >> std::hex;
    else if(std::abs(radix) == 8) is >> std::oct;
    else is >> std::dec;
-   int val;
+   boost::intmax_t val;
    if(is >> val)
    {
       first = first + ((last - first) - sbuf.in_avail());
index f66b237cb9494be868f8a28a2a7131d04aa97427..05ac71a6862b47bd2dcddfc1657b6b05fdd7921a 100644 (file)
@@ -157,7 +157,7 @@ bool cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::isctype(const BOOST_RE
 #endif
 } // namespace
 template BOOST_REGEX_DECL
-int cpp_regex_traits<BOOST_REGEX_CHAR_T>::toi(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, int radix)const;
+boost::intmax_t cpp_regex_traits<BOOST_REGEX_CHAR_T>::toi(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, int radix)const;
 template BOOST_REGEX_DECL
 std::string cpp_regex_traits<BOOST_REGEX_CHAR_T>::catalog_name(const std::string& name);
 template BOOST_REGEX_DECL
index a7298fbd7a6502342ab3e8b7fadc8b8034901631..96a086b81aaadbd6831f05d663dcbac2f3918622 100644 (file)
@@ -537,6 +537,7 @@ private:
    bool unwind_recursion_pop(bool);
    bool unwind_commit(bool);
    bool unwind_then(bool);
+   bool unwind_case(bool);
    void destroy_single_repeat();
    void push_matched_paren(int index, const sub_match<BidiIterator>& sub);
    void push_recursion_stopper();
@@ -547,6 +548,7 @@ private:
    void push_non_greedy_repeat(const re_syntax_base* ps);
    void push_recursion(int idx, const re_syntax_base* p, results_type* presults);
    void push_recursion_pop();
+   void push_case_change(bool);
 
    // pointer to base of stack:
    saved_state* m_stack_base;
index f3949ccf93010d79e0e2e4e6bb225ddffa761b21..6febff4cc5ee53321d2af4273934788732a0695c 100644 (file)
@@ -206,7 +206,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_imp()
    search_base = base;
    state_count = 0;
    m_match_flags |= regex_constants::match_all;
-   m_presult->set_size((m_match_flags & match_nosubs) ? 1 : 1 + re.mark_count(), search_base, last);
+   m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast<typename results_type::size_type>(1u + re.mark_count()), search_base, last);
    m_presult->set_base(base);
    m_presult->set_named_subs(this->re.get_named_subs());
    if(m_match_flags & match_posix)
@@ -268,7 +268,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::find_imp()
       // reset our state machine:
       search_base = position = base;
       pstate = re.get_first_state();
-      m_presult->set_size((m_match_flags & match_nosubs) ? 1 : 1 + re.mark_count(), base, last);
+      m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast<typename results_type::size_type>(1u + re.mark_count()), base, last);
       m_presult->set_base(base);
       m_presult->set_named_subs(this->re.get_named_subs());
       m_match_flags |= regex_constants::match_init;
@@ -287,13 +287,13 @@ bool perl_matcher<BidiIterator, Allocator, traits>::find_imp()
             ++position;
       }
       // reset $` start:
-      m_presult->set_size((m_match_flags & match_nosubs) ? 1 : 1 + re.mark_count(), search_base, last);
+      m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast<typename results_type::size_type>(1u + re.mark_count()), search_base, last);
       //if((base != search_base) && (base == backstop))
       //   m_match_flags |= match_prev_avail;
    }
    if(m_match_flags & match_posix)
    {
-      m_result.set_size(1 + re.mark_count(), base, last);
+      m_result.set_size(static_cast<typename results_type::size_type>(1u + re.mark_count()), base, last);
       m_result.set_base(base);
    }
 
@@ -793,15 +793,6 @@ inline bool perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref(
    return result;
 }
 
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case()
-{
-   // change our case sensitivity:
-   this->icase = static_cast<const re_case*>(pstate)->icase;
-   pstate = pstate->next.p;
-   return true;
-}
-
 template <class BidiIterator, class Allocator, class traits>
 bool perl_matcher<BidiIterator, Allocator, traits>::match_fail()
 {
index bf77eaa57b6f5766394747b8191a62f2ef33640b..aa7af3b42f8e2a8f941d44775c823e11b3660849 100644 (file)
@@ -138,6 +138,12 @@ struct saved_recursion : public saved_state
    Results results;
 };
 
+struct saved_change_case : public saved_state
+{
+   bool icase;
+   saved_change_case(bool c) : saved_state(18), icase(c) {}
+};
+
 template <class BidiIterator, class Allocator, class traits>
 bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
 {
@@ -242,6 +248,22 @@ inline void perl_matcher<BidiIterator, Allocator, traits>::push_matched_paren(in
    m_backup_state = pmp;
 }
 
+template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_case_change(bool c)
+{
+   //BOOST_ASSERT(index);
+   saved_change_case* pmp = static_cast<saved_change_case*>(m_backup_state);
+   --pmp;
+   if(pmp < m_stack_base)
+   {
+      extend_stack();
+      pmp = static_cast<saved_change_case*>(m_backup_state);
+      --pmp;
+   }
+   (void) new (pmp)saved_change_case(c);
+   m_backup_state = pmp;
+}
+
 template <class BidiIterator, class Allocator, class traits>
 inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion_stopper()
 {
@@ -347,6 +369,16 @@ inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion(int id
    m_backup_state = pmp;
 }
 
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case()
+{
+   // change our case sensitivity:
+   push_case_change(this->icase);
+   this->icase = static_cast<const re_case*>(pstate)->icase;
+   pstate = pstate->next.p;
+   return true;
+}
+
 template <class BidiIterator, class Allocator, class traits>
 bool perl_matcher<BidiIterator, Allocator, traits>::match_startmark()
 {
@@ -1142,6 +1174,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind(bool have_match)
       &perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop,
       &perl_matcher<BidiIterator, Allocator, traits>::unwind_commit,
       &perl_matcher<BidiIterator, Allocator, traits>::unwind_then,
+      &perl_matcher<BidiIterator, Allocator, traits>::unwind_case,
    };
 
    m_recursive_result = have_match;
@@ -1170,6 +1203,16 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_end(bool)
    return false; // end of stack nothing more to search
 }
 
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_case(bool)
+{
+   saved_change_case* pmp = static_cast<saved_change_case*>(m_backup_state);
+   icase = pmp->icase;
+   boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
+   m_backup_state = pmp;
+   return true;
+}
+
 template <class BidiIterator, class Allocator, class traits>
 bool perl_matcher<BidiIterator, Allocator, traits>::unwind_paren(bool have_match)
 {
index 3893837df3acffb43502b199c0e28af05f1ed6c8..33b915819363851b6722504d1ec3224b212269b3 100644 (file)
@@ -289,11 +289,13 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_alt()
          BidiIterator oldposition(position);
          const re_syntax_base* old_pstate = jmp->alt.p;
          pstate = pstate->next.p;
+         bool oldcase = icase;
          m_have_then = false;
          if(!match_all_states())
          {
             pstate = old_pstate;
             position = oldposition;
+            icase = oldcase;
             if(m_have_then)
             {
                m_can_backtrack = true;
@@ -1036,6 +1038,20 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_then()
    return false;
 }
 
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case()
+{
+   // change our case sensitivity:
+   bool oldcase = this->icase;
+   this->icase = static_cast<const re_case*>(pstate)->icase;
+   pstate = pstate->next.p;
+   bool result = match_all_states();
+   this->icase = oldcase;
+   return result;
+}
+
+
+
 template <class BidiIterator, class Allocator, class traits>
 bool perl_matcher<BidiIterator, Allocator, traits>::skip_until_paren(int index, bool have_match)
 {
index e9006a7bd2ad996287068a106945b8be2b371920..f0a0a11e40c484ad50490decdfc74c5fe48fbf4d 100644 (file)
@@ -86,7 +86,7 @@ struct trivial_format_traits
    }
    int toi(const charT*& p1, const charT* p2, int radix)const
    {
-      return global_toi(p1, p2, radix, *this);
+      return (int)global_toi(p1, p2, radix, *this);
    }
 };
 
@@ -165,7 +165,7 @@ private:
          std::vector<char_type> v(i, j);
          const char_type* start = &v[0];
          const char_type* pos = start;
-         int r = m_traits.toi(pos, &v[0] + v.size(), base);
+         int r = (int)m_traits.toi(pos, &v[0] + v.size(), base);
          std::advance(i, pos - start);
          return r;
       }
index 45a4bdf626d48ba1408d578f09e424f9456f16e0..5d427706543d9e81c0e952d3ee206ee77c85d1ef 100644 (file)
@@ -109,7 +109,7 @@ struct default_wrapper : public BaseT
    {
       return ((c & 0x7f) == c) ? get_default_escape_syntax_type(static_cast<char>(c)) : ::boost::regex_constants::escape_type_identity;
    }
-   int toi(const char_type*& p1, const char_type* p2, int radix)const
+   boost::intmax_t toi(const char_type*& p1, const char_type* p2, int radix)const
    {
       return ::boost::BOOST_REGEX_DETAIL_NS::global_toi(p1, p2, radix, *this);
    }
index 1821883717beb16fbef726f77b37ffa6ad180898..2a2cf21d374440429bccb9b6f5280c24276ca3ac 100644 (file)
@@ -304,13 +304,13 @@ int global_value(charT c)
    return -1;
 }
 template <class charT, class traits>
-int global_toi(const charT*& p1, const charT* p2, int radix, const traits& t)
+boost::intmax_t global_toi(const charT*& p1, const charT* p2, int radix, const traits& t)
 {
    (void)t; // warning suppression
-   int next_value = t.value(*p1, radix);
+   boost::intmax_t next_value = t.value(*p1, radix);
    if((p1 == p2) || (next_value < 0) || (next_value >= radix))
       return -1;
-   int result = 0;
+   boost::intmax_t result = 0;
    while(p1 != p2)
    {
       next_value = t.value(*p1, radix);
index 560cc217bb3ff49fbe8abd8df894af5175e69559..bf996d611973e46f054c76400319fd11e830f294 100644 (file)
@@ -640,13 +640,13 @@ public:
          return true;
       return false;
    }
-   int toi(const charT*& p1, const charT* p2, int radix)const
+   boost::intmax_t toi(const charT*& p1, const charT* p2, int radix)const
    {
       return ::boost::BOOST_REGEX_DETAIL_NS::global_toi(p1, p2, radix, *this);
    }
    int value(charT c, int radix)const
    {
-      int result = ::boost::BOOST_REGEX_DETAIL_NS::global_value(c);
+      int result = (int)::boost::BOOST_REGEX_DETAIL_NS::global_value(c);
       return result < radix ? result : -1;
    }
    locale_type imbue(locale_type l)
index 4349b38e6f439c41c16d87fb6cf834b7ab1bb2e8..a28ba4337c3a7de8a2285e5808f5cd1493468efa 100644 (file)
@@ -61,7 +61,6 @@ namespace boost
       struct foreign_shared_ptr_impl_base
       {
         virtual ~foreign_shared_ptr_impl_base() {}
-        virtual void* get() const = 0;
         virtual foreign_shared_ptr_impl_base * clone() const = 0;
       };
 
@@ -71,10 +70,6 @@ namespace boost
       public:
         foreign_shared_ptr_impl(const FSP &p): _p(p)
         {}
-        virtual void * get() const
-        {
-          return _p.get();
-        }
         virtual foreign_shared_ptr_impl * clone() const
         {
           return new foreign_shared_ptr_impl(*this);
index d3adcee6bc1d00cc8cca3621769fe5d406849c5a..036876727aca49dd9da2abfc602464534af2834c 100644 (file)
@@ -794,7 +794,6 @@ namespace boost
           shared_ptr<detail::BOOST_SIGNALS2_SIGNAL_IMPL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)
             <BOOST_SIGNALS2_SIGNAL_TEMPLATE_INSTANTIATION> >
             shared_pimpl(_weak_pimpl.lock());
-          if(shared_pimpl == 0) throw expired_slot();
           return (*shared_pimpl)(BOOST_SIGNALS2_SIGNATURE_ARG_NAMES(BOOST_SIGNALS2_NUM_ARGS));
         }
         result_type operator ()(BOOST_SIGNALS2_SIGNATURE_FULL_ARGS(BOOST_SIGNALS2_NUM_ARGS)) const
@@ -802,7 +801,6 @@ namespace boost
           shared_ptr<detail::BOOST_SIGNALS2_SIGNAL_IMPL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)
             <BOOST_SIGNALS2_SIGNAL_TEMPLATE_INSTANTIATION> >
             shared_pimpl(_weak_pimpl.lock());
-          if(shared_pimpl == 0) throw expired_slot();
           return (*shared_pimpl)(BOOST_SIGNALS2_SIGNATURE_ARG_NAMES(BOOST_SIGNALS2_NUM_ARGS));
         }
       private:
index ee8426f4748d48f106a9ac9731ed4bddb9ba3ca8..9fee16ec692dc145a4fcc3f159ca95023f713653 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <boost/assert.hpp>
 #include <boost/aligned_storage.hpp>
+#include <boost/core/no_exceptions_support.hpp>
 #include <boost/iterator/iterator_facade.hpp>
 #include <boost/optional.hpp>
 #include <boost/scoped_ptr.hpp>
@@ -38,7 +39,7 @@ namespace boost {
           disconnected_slot_count(0),
           m_active_slot(0)
         {}
-        
+
         ~slot_call_iterator_cache()
         {
           if(m_active_slot)
@@ -47,9 +48,9 @@ namespace boost {
             m_active_slot->dec_slot_refcount(lock);
           }
         }
-        
+
         template<typename M>
-        void set_active_slot(garbage_collecting_lock<M> &lock, 
+        void set_active_slot(garbage_collecting_lock<M> &lock,
           connection_body_base *active_slot)
         {
           if(m_active_slot)
@@ -58,7 +59,7 @@ namespace boost {
           if(m_active_slot)
             m_active_slot->inc_slot_refcount(lock);
         }
-        
+
         optional<ResultType> result;
         typedef auto_buffer<void_shared_ptr_variant, store_n_objects<10> > tracked_ptrs_type;
         tracked_ptrs_type tracked_ptrs;
@@ -104,15 +105,16 @@ namespace boost {
         dereference() const
         {
           if (!cache->result) {
-            try
+            BOOST_TRY
             {
               cache->result.reset(cache->f(*iter));
             }
-            catch(expired_slot &)
+            BOOST_CATCH(expired_slot &)
             {
               (*iter)->disconnect();
-              throw;
+              BOOST_RETHROW
             }
+            BOOST_CATCH_END
           }
           return cache->result.get();
         }
@@ -140,7 +142,7 @@ namespace boost {
           else
             cache->set_active_slot(lock, (*callable_iter).get());
         }
-        
+
         void lock_next_callable() const
         {
           if(iter == callable_iter)
index c5d5f33b217070ff888c406f4b3bbae140324b99..99fb6afbc3fb381b9c8ba9b015c14a816df08696 100644 (file)
 #ifndef BOOST_SIGNALS2_LAST_VALUE_HPP
 #define BOOST_SIGNALS2_LAST_VALUE_HPP
 
+#include <boost/core/no_exceptions_support.hpp>
 #include <boost/optional.hpp>
 #include <boost/signals2/expired_slot.hpp>
+#include <boost/throw_exception.hpp>
 #include <stdexcept>
 
 namespace boost {
@@ -36,16 +38,17 @@ namespace boost {
       {
         if(first == last)
         {
-          throw no_slots_error();
+          boost::throw_exception(no_slots_error());
         }
         optional<T> value;
         while (first != last)
         {
-          try
+          BOOST_TRY
           {
             value = *first;
           }
-          catch(const expired_slot &) {}
+          BOOST_CATCH(const expired_slot &) {}
+          BOOST_CATCH_END
           ++first;
         }
         if(value) return value.get();
@@ -62,11 +65,12 @@ namespace boost {
       {
         while (first != last)
         {
-          try
+          BOOST_TRY
           {
             *first;
           }
-          catch(const expired_slot &) {}
+          BOOST_CATCH(const expired_slot &) {}
+          BOOST_CATCH_END
           ++first;
         }
         return;
index 766e99bc537f8ad5f2f1f1be5d6a6df94be4ee14..812d152c73b46d620f31b09647b710f783c7ba00 100644 (file)
@@ -11,6 +11,7 @@
 #ifndef BOOST_SIGNALS2_OPTIONAL_LAST_VALUE_HPP
 #define BOOST_SIGNALS2_OPTIONAL_LAST_VALUE_HPP
 
+#include <boost/core/no_exceptions_support.hpp>
 #include <boost/optional.hpp>
 #include <boost/signals2/expired_slot.hpp>
 
@@ -29,11 +30,12 @@ namespace boost {
         optional<T> value;
         while (first != last)
         {
-          try
+          BOOST_TRY
           {
             value = *first;
           }
-          catch(const expired_slot &) {}
+          BOOST_CATCH(const expired_slot &) {}
+          BOOST_CATCH_END
           ++first;
         }
         return value;
@@ -50,11 +52,12 @@ namespace boost {
       {
         while (first != last)
         {
-          try
+          BOOST_TRY
           {
             *first;
           }
-          catch(const expired_slot &) {}
+          BOOST_CATCH(const expired_slot &) {}
+          BOOST_CATCH_END
           ++first;
         }
         return;
index 0dd80db1469e9a0a0ab74d1f8ccbca362c398d72..48c8c06fd619daeaff1d3be6c2bfb47f325cb6d6 100644 (file)
@@ -67,6 +67,7 @@ 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)
       locked_container_type lock() const
       {
         locked_container_type locked_objects;
@@ -81,6 +82,7 @@ namespace boost
         }
         return locked_objects;
       }
+    #endif
       bool expired() const
       {
         tracked_container_type::const_iterator it;
index bcefda8897d51be2638a4f141e4d6cf304b03e99..77f68bebd0e198c2262b69ae5763611713ccf63a 100644 (file)
@@ -642,6 +642,14 @@ public:
         return *this;
     }
 
+    // aliasing move
+    template<class Y>
+    shared_ptr( shared_ptr<Y> && r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn()
+    {
+        pn.swap( r.pn );
+        r.px = 0;
+    }
+
 #endif
 
 #if !defined( BOOST_NO_CXX11_NULLPTR )
@@ -679,7 +687,16 @@ public:
     {
         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 )
+    {
+        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
     {
index dce89d81d6ebaab47af4701e22561784750c3577..0310e2027b75d86922b08e781117c2dfbc2e9e96 100644 (file)
@@ -234,7 +234,7 @@ inline type_index type_id_with_cvr() BOOST_NOEXCEPT {
 
 /// Function that works exactly like C++ typeid(rtti_val) call, but returns boost::type_index.
 ///
-/// Retunrs runtime information about specified type.
+/// Returns runtime information about specified type.
 ///
 /// \b Requirements: RTTI available or Base and Derived classes must be marked with BOOST_TYPE_INDEX_REGISTER_CLASS.
 ///
@@ -249,7 +249,7 @@ inline type_index type_id_with_cvr() BOOST_NOEXCEPT {
 /// std::cout << ti.pretty_name();  // Outputs 'Derived'
 /// \endcode
 ///
-/// \param runtime_val Varaible which runtime type must be returned.
+/// \param runtime_val Variable which runtime type must be returned.
 /// \throw Nothing.
 /// \return boost::typeindex::type_index with information about the specified variable.
 template <class T>
index ac1e5d290dd03b28698cd7dc83481513560eea51..611ad92e1197a239b7d6b60a13201913e0e89ac9 100644 (file)
@@ -1,5 +1,5 @@
 //
-// Copyright (c) Antony Polukhin, 2013-2014.
+// Copyright (c) Antony Polukhin, 2013-2016.
 //
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -10,9 +10,9 @@
 #define BOOST_TYPE_INDEX_CTTI_TYPE_INDEX_HPP
 
 /// \file ctti_type_index.hpp
-/// \brief Contains boost::typeindex::ctti_type_index class.
+/// \brief Contains boost::typeindex::ctti_type_index class that is constexpr if C++14 constexpr is supported by compiler.
 ///
-/// boost::typeindex::ctti_type_index class can be used as a drop-in replacement 
+/// boost::typeindex::ctti_type_index class can be used as a drop-in replacement
 /// for std::type_index.
 ///
 /// It is used in situations when typeid() method is not available or 
@@ -89,37 +89,52 @@ inline const detail::ctti_data& ctti_construct() BOOST_NOEXCEPT {
 }
 
 /// \class ctti_type_index
-/// This class is a wrapper that pretends to work exactly like stl_type_index, but does 
+/// This class is a wrapper that pretends to work exactly like stl_type_index, but does
 /// not require RTTI support. \b For \b description \b of \b functions \b see type_index_facade.
 ///
-/// This class produces slightly longer type names, so consider using stl_type_index 
+/// This class on C++14 compatible compilers has following functions marked as constexpr:
+///     * default constructor
+///     * copy constructors and assignemnt operations
+///     * class methods: name(), before(const ctti_type_index& rhs), equal(const ctti_type_index& rhs)
+///     * static methods type_id<T>(), type_id_with_cvr<T>()
+///     * comparison operators
+///
+/// This class produces slightly longer type names, so consider using stl_type_index
 /// in situations when typeid() is working.
 class ctti_type_index: public type_index_facade<ctti_type_index, detail::ctti_data> {
-    const detail::ctti_data* data_;
+    const char* data_;
 
     inline std::size_t get_raw_name_length() const BOOST_NOEXCEPT;
 
+    BOOST_CXX14_CONSTEXPR inline explicit ctti_type_index(const char* data) BOOST_NOEXCEPT
+        : data_(data)
+    {}
+
 public:
     typedef detail::ctti_data type_info_t;
 
-    inline ctti_type_index() BOOST_NOEXCEPT
-        : data_(&ctti_construct<void>())
+    BOOST_CXX14_CONSTEXPR inline ctti_type_index() BOOST_NOEXCEPT
+        : data_(boost::detail::ctti<void>::n())
     {}
 
     inline ctti_type_index(const type_info_t& data) BOOST_NOEXCEPT
-        : data_(&data)
+        : data_(reinterpret_cast<const char*>(&data))
     {}
 
-    inline const type_info_t&  type_info() const BOOST_NOEXCEPT;
-    inline const char*  raw_name() const BOOST_NOEXCEPT;
+    inline const type_info_t& type_info() const BOOST_NOEXCEPT;
+    BOOST_CXX14_CONSTEXPR inline const char* raw_name() const BOOST_NOEXCEPT;
+    BOOST_CXX14_CONSTEXPR inline const char* name() const BOOST_NOEXCEPT;
     inline std::string  pretty_name() const;
     inline std::size_t  hash_code() const BOOST_NOEXCEPT;
 
+    BOOST_CXX14_CONSTEXPR inline bool equal(const ctti_type_index& rhs) const BOOST_NOEXCEPT;
+    BOOST_CXX14_CONSTEXPR inline bool before(const ctti_type_index& rhs) const BOOST_NOEXCEPT;
+
     template <class T>
-    inline static ctti_type_index type_id() BOOST_NOEXCEPT;
+    BOOST_CXX14_CONSTEXPR inline static ctti_type_index type_id() BOOST_NOEXCEPT;
 
     template <class T>
-    inline static ctti_type_index type_id_with_cvr() BOOST_NOEXCEPT;
+    BOOST_CXX14_CONSTEXPR inline static ctti_type_index type_id_with_cvr() BOOST_NOEXCEPT;
 
     template <class T>
     inline static ctti_type_index type_id_runtime(const T& variable) BOOST_NOEXCEPT;
@@ -127,22 +142,35 @@ public:
 
 
 inline const ctti_type_index::type_info_t& ctti_type_index::type_info() const BOOST_NOEXCEPT {
-    return *data_;
+    return *reinterpret_cast<const detail::ctti_data*>(data_);
+}
+
+
+BOOST_CXX14_CONSTEXPR inline bool ctti_type_index::equal(const ctti_type_index& rhs) const BOOST_NOEXCEPT {
+    const char* const left = raw_name();
+    const char* const right = rhs.raw_name();
+    return /*left == right ||*/ !boost::typeindex::detail::constexpr_strcmp(left, right);
+}
+
+BOOST_CXX14_CONSTEXPR inline bool ctti_type_index::before(const ctti_type_index& rhs) const BOOST_NOEXCEPT {
+    const char* const left = raw_name();
+    const char* const right = rhs.raw_name();
+    return /*left != right &&*/ boost::typeindex::detail::constexpr_strcmp(left, right) < 0;
 }
 
 
 template <class T>
-inline ctti_type_index ctti_type_index::type_id() BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline ctti_type_index ctti_type_index::type_id() BOOST_NOEXCEPT {
     typedef BOOST_DEDUCED_TYPENAME boost::remove_reference<T>::type no_ref_t;
     typedef BOOST_DEDUCED_TYPENAME boost::remove_cv<no_ref_t>::type no_cvr_t;
-    return ctti_construct<no_cvr_t>();
+    return ctti_type_index(boost::detail::ctti<no_cvr_t>::n());
 }
 
 
 
 template <class T>
-inline ctti_type_index ctti_type_index::type_id_with_cvr() BOOST_NOEXCEPT {
-    return ctti_construct<T>();
+BOOST_CXX14_CONSTEXPR inline ctti_type_index ctti_type_index::type_id_with_cvr() BOOST_NOEXCEPT {
+    return ctti_type_index(boost::detail::ctti<T>::n());
 }
 
 
@@ -152,8 +180,13 @@ inline ctti_type_index ctti_type_index::type_id_runtime(const T& variable) BOOST
 }
 
 
-inline const char* ctti_type_index::raw_name() const BOOST_NOEXCEPT {
-    return reinterpret_cast<const char*>(data_);
+BOOST_CXX14_CONSTEXPR inline const char* ctti_type_index::raw_name() const BOOST_NOEXCEPT {
+    return data_;
+}
+
+
+BOOST_CXX14_CONSTEXPR inline const char* ctti_type_index::name() const BOOST_NOEXCEPT {
+    return data_;
 }
 
 inline std::size_t ctti_type_index::get_raw_name_length() const BOOST_NOEXCEPT {
index 635b45d67c3a1c7d7e91ae4ec6c84cc4e1b67786..122a2ac013c256d983d1346df6777e4773cd49a8 100644 (file)
@@ -1,5 +1,5 @@
 //
-// Copyright (c) Antony Polukhin, 2012-2014.
+// Copyright (c) Antony Polukhin, 2012-2016.
 //
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -16,7 +16,6 @@
 #include <boost/config.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/mpl/bool.hpp>
-#include <algorithm>
 
 #ifdef BOOST_HAS_PRAGMA_ONCE
 # pragma once
         BOOST_STATIC_CONSTEXPR bool ctti_skip_more_at_runtime       = runtime_skip;                             \
         BOOST_STATIC_CONSTEXPR char ctti_skip_until_runtime[]       = runtime_skip_until;                       \
     }}} /* namespace boost::typeindex::detail */                                                                \
-    /**/  
+    /**/
 /// @endcond
 
+
 #if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
     /* Nothing to document. All the macro docs are moved to <boost/type_index.hpp> */
 #elif defined(BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING)
-
 #   include <boost/preprocessor/facilities/expand.hpp>
     BOOST_PP_EXPAND( BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING )
-
-#elif defined(_MSC_VER)
+#elif defined(_MSC_VER) && defined (BOOST_NO_CXX11_NOEXCEPT)
     // sizeof("const char *__cdecl boost::detail::ctti<") - 1, sizeof(">::n(void)") - 1
     BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(40, 10, false, "")
+#elif defined(_MSC_VER) && !defined (BOOST_NO_CXX11_NOEXCEPT)
+    // sizeof("const char *__cdecl boost::detail::ctti<") - 1, sizeof(">::n(void) noexcept") - 1
+    BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(40, 19, false, "")
 #elif defined(__clang__) && defined(__APPLE__)
     // Someone made __clang_major__ equal to LLVM version rather than compiler version
     // on APPLE platform.
     // sizeof("static const char *boost::detail::ctti<") - 1, sizeof(">::n()") - 1
     // note: checked on 3.0
     BOOST_TYPE_INDEX_REGISTER_CTTI_PARSING_PARAMS(39, 6, false, "")
-#elif defined(__clang__) && __clang_major__ == 3 && __clang_minor__ > 0
+#elif defined(__clang__) && (__clang_major__ >= 4 || (__clang_major__ == 3 && __clang_minor__ > 0))
     // 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__)
+#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__) && 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, "")
 #else
@@ -70,7 +74,7 @@
 
 namespace boost { namespace typeindex { namespace detail { 
     template <bool Condition>
-    inline void assert_compile_time_legths() BOOST_NOEXCEPT {
+    BOOST_CXX14_CONSTEXPR inline void assert_compile_time_legths() BOOST_NOEXCEPT {
         BOOST_STATIC_ASSERT_MSG(
             Condition,
             "TypeIndex library is misconfigured for your compiler. "
@@ -78,15 +82,63 @@ namespace boost { namespace typeindex { namespace detail {
             "'RTTI emulation limitations' of the documentation for more information."
         );
     }
-    
+
+    template <class T>
+    BOOST_CXX14_CONSTEXPR inline void failed_to_get_function_name() BOOST_NOEXCEPT {
+        BOOST_STATIC_ASSERT_MSG(
+            sizeof(T) && false,
+            "TypeIndex library could not detect your compiler. "
+            "Please make the BOOST_TYPE_INDEX_FUNCTION_SIGNATURE macro use "
+            "correct compiler macro for getting the whole function name. "
+            "Define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING to correct value after that."
+        );
+    }
+
     template <std::size_t ArrayLength>
-    inline const char* skip_begining_runtime(const char* begin, boost::mpl::false_) BOOST_NOEXCEPT {
+    BOOST_CXX14_CONSTEXPR inline const char* skip_begining_runtime(const char* begin, boost::mpl::false_) BOOST_NOEXCEPT {
         return begin;
     }
 
+    template<class ForwardIterator1, class ForwardIterator2>
+    BOOST_CXX14_CONSTEXPR inline ForwardIterator1 constexpr_search(
+        ForwardIterator1 first1,
+        ForwardIterator1 last1,
+        ForwardIterator2 first2,
+        ForwardIterator2 last2) BOOST_NOEXCEPT
+    {
+        if (first2 == last2) {
+            return first1;  // specified in C++11
+        }
+
+        while (first1 != last1) {
+            ForwardIterator1 it1 = first1;
+            ForwardIterator2 it2 = first2;
+
+            while (*it1 == *it2) {
+                ++it1;
+                ++it2;
+                if (it2 == last2) return first1;
+                if (it1 == last1) return last1;
+            }
+
+            ++first1;
+        }
+
+        return last1;
+    }
+
+    BOOST_CXX14_CONSTEXPR inline int constexpr_strcmp(const char *v1, const char *v2) BOOST_NOEXCEPT {
+        while (*v1 != '\0' && *v1 == *v2) {
+            ++v1;
+            ++v2;
+        };
+
+        return static_cast<int>(*v1) - *v2;
+    }
+
     template <std::size_t ArrayLength>
-    inline const char* skip_begining_runtime(const char* begin, boost::mpl::true_) BOOST_NOEXCEPT {
-        const char* const it = std::search(
+    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,
             ctti_skip_until_runtime, ctti_skip_until_runtime + sizeof(ctti_skip_until_runtime) - 1
         );
@@ -94,13 +146,54 @@ namespace boost { namespace typeindex { namespace detail {
     }
 
     template <std::size_t ArrayLength>
-    inline const char* skip_begining(const char* begin) BOOST_NOEXCEPT {
+    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, 
             boost::mpl::bool_<ctti_skip_more_at_runtime>()
         );
     }
+
+#if !defined(__clang__) && defined(__GNUC__) && !defined(BOOST_NO_CXX14_CONSTEXPR)
+    template <std::size_t... I>
+    struct index_seq {};
+
+    template <typename Left, typename Right>
+    struct make_index_sequence_join;
+
+    template <std::size_t... Left, std::size_t... 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>
+    struct make_index_seq_impl {
+        typedef typename make_index_sequence_join<
+            typename make_index_seq_impl<C, D / 2>::type,
+            typename make_index_seq_impl<C + D / 2, (D + 1) / 2>::type
+        >::type type;
+    };
+
+    template <std::size_t C>
+    struct make_index_seq_impl<C, 0> {
+        typedef index_seq<> type;
+    };
+
+    template <std::size_t 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 char data_[size_] = { C... };
+    };
+
+    template <char... C>
+    constexpr char cstring<C...>::data_[];
+#endif
+
 }}} // namespace boost::typeindex::detail
 
 namespace boost { namespace detail {
@@ -110,11 +203,68 @@ namespace boost { namespace detail {
 /// 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>
+    constexpr static char s() BOOST_NOEXCEPT { // step
+        constexpr std::size_t offset =
+                  (I >= 10u      ? 1u : 0u)
+                + (I >= 100u     ? 1u : 0u)
+                + (I >= 1000u    ? 1u : 0u)
+                + (I >= 10000u   ? 1u : 0u)
+                + (I >= 100000u  ? 1u : 0u)
+                + (I >= 1000000u ? 1u : 0u)
+        ;
 
+    #if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE)
+        return BOOST_TYPE_INDEX_FUNCTION_SIGNATURE[I + offset];
+    #elif defined(__FUNCSIG__)
+        return __FUNCSIG__[I + offset];
+    #else
+        return __PRETTY_FUNCTION__[I + offset];
+    #endif
+    }
+
+    template <std::size_t ...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`
+    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);
+    #elif defined(__FUNCSIG__)
+        constexpr std::size_t size = sizeof(__FUNCSIG__);
+    #elif defined(__PRETTY_FUNCTION__) \
+                    || defined(__GNUC__) \
+                    || (defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130)) \
+                    || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) \
+                    || (defined(__ICC) && (__ICC >= 600)) \
+                    || defined(__ghs__) \
+                    || defined(__DMC__)
+        constexpr std::size_t size = sizeof(__PRETTY_FUNCTION__);
+    #else
+        boost::typeindex::detail::failed_to_get_function_name();
+    #endif
+
+        boost::typeindex::detail::assert_compile_time_legths<
+            (size > boost::typeindex::detail::ctti_skip_size_at_begin + boost::typeindex::detail::ctti_skip_size_at_end + sizeof("const *") - 1)
+        >();
+        static_assert(!boost::typeindex::detail::ctti_skip_more_at_runtime, "Skipping for GCC in C++14 mode is unsupported");
+
+        typedef typename boost::typeindex::detail::make_index_seq_impl<
+            boost::typeindex::detail::ctti_skip_size_at_begin,
+            size - sizeof("const *") + 1 - boost::typeindex::detail::ctti_skip_size_at_begin
+        >::type idx_seq;
+        return impl(idx_seq());
+    }
+#else
     /// Returns raw name. Must be as short, as possible, to avoid code bloat
-    static const char* n() BOOST_NOEXCEPT {
+    BOOST_CXX14_CONSTEXPR static const char* n() BOOST_NOEXCEPT {
     #if defined(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE)
-        return boost::typeindex::detail::skip_begining< sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE >(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE);
+        return boost::typeindex::detail::skip_begining< sizeof(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE) >(BOOST_TYPE_INDEX_FUNCTION_SIGNATURE);
     #elif defined(__FUNCSIG__)
         return boost::typeindex::detail::skip_begining< sizeof(__FUNCSIG__) >(__FUNCSIG__);
     #elif defined(__PRETTY_FUNCTION__) \
@@ -124,18 +274,13 @@ struct ctti {
                 || (defined(__ICC) && (__ICC >= 600)) \
                 || defined(__ghs__) \
                 || defined(__DMC__)
-
         return boost::typeindex::detail::skip_begining< sizeof(__PRETTY_FUNCTION__) >(__PRETTY_FUNCTION__);
     #else
-        BOOST_STATIC_ASSERT_MSG(
-            sizeof(T) && false,
-            "TypeIndex library could not detect your compiler. "
-            "Please make the BOOST_TYPE_INDEX_FUNCTION_SIGNATURE macro use "
-            "correct compiler macro for getting the whole function name. "
-            "Define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING to correct value after that."
-        );
+        boost::typeindex::detail::failed_to_get_function_name();
+        return "";
     #endif
     }
+#endif
 };
 
 }} // namespace boost::detail
index 931dedca252fc015dcefffad11e86a1a382babb3..dd35df2caa3614206a8bbcb01bfcc1bb43fcb338 100644 (file)
@@ -66,7 +66,7 @@ template <class Derived, class TypeInfo>
 class type_index_facade {
 private:
     /// @cond
-    const Derived & derived() const BOOST_NOEXCEPT {
+    BOOST_CXX14_CONSTEXPR const Derived & derived() const BOOST_NOEXCEPT {
       return *static_cast<Derived const*>(this);
     }
     /// @endcond
@@ -154,34 +154,34 @@ protected:
 
 /// @cond
 template <class Derived, class TypeInfo>
-inline bool operator == (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator == (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
     return static_cast<Derived const&>(lhs).equal(static_cast<Derived const&>(rhs));
 }
 
 template <class Derived, class TypeInfo>
-inline bool operator < (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
-    return static_cast<Derived const&>(lhs).before(static_cast<Derived const&>(rhs));;
+BOOST_CXX14_CONSTEXPR inline bool operator < (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+    return static_cast<Derived const&>(lhs).before(static_cast<Derived const&>(rhs));
 }
 
 
 
 template <class Derived, class TypeInfo>
-inline bool operator > (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator > (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
     return rhs < lhs;
 }
 
 template <class Derived, class TypeInfo>
-inline bool operator <= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator <= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
     return !(lhs > rhs);
 }
 
 template <class Derived, class TypeInfo>
-inline bool operator >= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator >= (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
     return !(lhs < rhs);
 }
 
 template <class Derived, class TypeInfo>
-inline bool operator != (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
+BOOST_CXX14_CONSTEXPR inline bool operator != (const type_index_facade<Derived, TypeInfo>& lhs, const type_index_facade<Derived, TypeInfo>& rhs) BOOST_NOEXCEPT {
     return !(lhs == rhs);
 }
 
index 65fbeefc39120e30ea3e5fbf4d5c1ed846ddf484..7517fa804bfbfa89f0246be8b8f41e8032eb184c 100644 (file)
@@ -9,6 +9,7 @@
 #ifndef BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
 #define BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED
 
+#include <cstddef> // size_t
 #include <boost/type_traits/integral_constant.hpp>
 #include <boost/type_traits/intrinsics.hpp>
 
index a71d42e6e4a368fbc1c13727660a1f7774aee073..fa47b1db3cdb24c0dd2b571adf456f2c49f2c864 100644 (file)
@@ -9,6 +9,7 @@
 #ifndef BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED
 #define BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED
 
+#include <cstddef> // size_t
 #include <boost/type_traits/intrinsics.hpp>
 #include <boost/type_traits/integral_constant.hpp>
 
index a434dae726ce78abc8209b53f355727b4de86df6..15b917e71690161219fd91c340f531d20f4e9cb4 100644 (file)
@@ -9,6 +9,7 @@
 #ifndef BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED
 #define BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED
 
+#include <cstddef> // size_t
 #include <boost/type_traits/detail/config.hpp>
 #include <boost/type_traits/intrinsics.hpp>
 #include <boost/type_traits/integral_constant.hpp>
index 9d3265d1dc97061fd90e9cfdc96d2bfe746ab6e7..fd6ad2d03b3dfca2c6089c4e9805c643ada81e70 100644 (file)
@@ -9,6 +9,7 @@
 #ifndef BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED
 #define BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED
 
+#include <cstddef> // size_t
 #include <boost/type_traits/intrinsics.hpp>
 #include <boost/type_traits/is_pod.hpp>
 #include <boost/type_traits/is_reference.hpp>
index f7bb1987cbece4881079b7d0e286e8206ab8f94a..6d954ab669d5577045f2936be7e7bf6362a9631b 100644 (file)
@@ -11,6 +11,7 @@
 #ifndef BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED
 #define BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED
 
+#include <cstddef> // size_t
 #include <boost/type_traits/intrinsics.hpp>
 #include <boost/type_traits/integral_constant.hpp>
 
index 9e601f38ae94d9f4ea974861c31c424728bcdca4..5784f4bbfffd7187de614fb93dcdf81ea04e2548 100644 (file)
@@ -11,6 +11,7 @@
 #ifndef BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
 #define BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
 
+#include <cstddef> // size_t
 #include <boost/type_traits/intrinsics.hpp>
 #include <boost/type_traits/integral_constant.hpp>
 
index 7715c5ca375fe9e2468be44ba54587c528d1b9ea..781d94a47953ceedf374d28da74235b6415bb4fd 100644 (file)
@@ -48,6 +48,7 @@
 //              to degrade gracefully, rather than trash the compiler (John Maddock).
 //
 
+#include <cstddef> // size_t
 #include <boost/type_traits/intrinsics.hpp>
 #include <boost/type_traits/integral_constant.hpp>
 #ifndef BOOST_IS_ABSTRACT
index 497dc49327fefa62d5f12cb5f548a68e564c16f6..53e1613ab6e3b9071e470be5d174fc125064f066 100644 (file)
@@ -15,7 +15,7 @@
 #define BOOST_TT_IS_ARRAY_HPP_INCLUDED
 
 #include <boost/type_traits/integral_constant.hpp>
-#include <cstddef>
+#include <cstddef> // size_t
 
 namespace boost {
 
index 9cf681dd31f7498ffe10a81bfccab1debde00ab7..49d171616a14dce15a9d90f6608ae129c7c652a5 100644 (file)
@@ -9,6 +9,7 @@
 #ifndef BOOST_TT_IS_ASSIGNABLE_HPP_INCLUDED
 #define BOOST_TT_IS_ASSIGNABLE_HPP_INCLUDED
 
+#include <cstddef> // size_t
 #include <boost/type_traits/integral_constant.hpp>
 #include <boost/detail/workaround.hpp>
 
index d9dd2aa3263289efe1a421e22d83951ede48bc56..e0ed88a34b3cc6575e770facd86460b9819fa0b7 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef BOOST_TT_IS_CONST_HPP_INCLUDED
 #define BOOST_TT_IS_CONST_HPP_INCLUDED
 
+#include <cstddef> // size_t
 #include <boost/type_traits/integral_constant.hpp>
 
 namespace boost {
@@ -35,7 +36,7 @@ namespace boost {
    template <class T>
    struct is_const : public false_type {};
    template <class T> struct is_const<T const> : public true_type{};
-   template <class T, size_t N> struct is_const<T const[N]> : public true_type{};
+   template <class T, std::size_t N> struct is_const<T const[N]> : public true_type{};
    template <class T> struct is_const<T const[]> : public true_type{};
 
 #endif
index 0b7d960e7d6c056d35b4faedf0ce0415a0a5065b..fa5d76a22d57968d397d16c60f3870886b28d915 100644 (file)
@@ -9,6 +9,7 @@
 #ifndef BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED
 #define BOOST_TT_IS_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED
 
+#include <cstddef> // size_t
 #include <boost/type_traits/integral_constant.hpp>
 #include <boost/detail/workaround.hpp>
 
index 9f1e5d98170a6afefaab19d9ecfb28a39294e0b9..742d99073001b258359aa93009c7540d98eb34d0 100644 (file)
@@ -9,6 +9,7 @@
 #ifndef BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED
 #define BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED
 
+#include <cstddef> // size_t
 #include <boost/type_traits/integral_constant.hpp>
 #include <boost/detail/workaround.hpp>
 
index 4c8f7347264a7f936ef755521885881d43cf37bc..0d5d57a0f8e0e53fba6806701d64a063aa3c85c4 100644 (file)
@@ -11,6 +11,7 @@
 #ifndef BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED
 #define BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED
 
+#include <cstddef> // size_t
 #include <boost/config.hpp>
 #include <boost/type_traits/intrinsics.hpp>
 #include <boost/type_traits/integral_constant.hpp>
index 9204c93e25896f6146326b1514fbea84f38c5dd0..9bd196257ac92e258a6eaf3e7dcc7bdfba413b89 100644 (file)
@@ -9,6 +9,7 @@
 #ifndef BOOST_TT_IS_POD_HPP_INCLUDED
 #define BOOST_TT_IS_POD_HPP_INCLUDED
 
+#include <cstddef> // size_t
 #include <boost/type_traits/detail/config.hpp>
 #include <boost/type_traits/is_void.hpp>
 #include <boost/type_traits/is_scalar.hpp>
index cefe9873081f92b1cdf996f111ae41040484138f..5b8e716b473f876f7857ab7126a630662e081f6b 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef BOOST_TT_IS_VOLATILE_HPP_INCLUDED
 #define BOOST_TT_IS_VOLATILE_HPP_INCLUDED
 
+#include <cstddef> // size_t
 #include <boost/type_traits/integral_constant.hpp>
 
 namespace boost {
@@ -35,7 +36,7 @@ namespace boost {
    template <class T>
    struct is_volatile : public false_type {};
    template <class T> struct is_volatile<T volatile> : public true_type{};
-   template <class T, size_t N> struct is_volatile<T volatile[N]> : public true_type{};
+   template <class T, std::size_t N> struct is_volatile<T volatile[N]> : public true_type{};
    template <class T> struct is_volatile<T volatile[]> : public true_type{};
 
 #endif
index 3ccdc9828148e38eb02b8abab2b7a052eb182bea..90c90d352386601b92982b7b26ce5bcdc2adab9c 100644 (file)
@@ -10,7 +10,7 @@
 #define BOOST_TT_REMOVE_ALL_EXTENTS_HPP_INCLUDED
 
 #include <boost/config.hpp>
-#include <cstddef>
+#include <cstddef> // size_t
 #include <boost/detail/workaround.hpp>
 
 namespace boost {
index b47f8514602a1f6a336f94fc5730042d198c044e..e238962c6d03a62314f7ac2ff3139df30b661a3e 100644 (file)
@@ -12,7 +12,7 @@
 #define BOOST_TT_REMOVE_CONST_HPP_INCLUDED
 
 #include <boost/config.hpp>
-#include <cstddef>
+#include <cstddef> // size_t
 #include <boost/detail/workaround.hpp>
 
 namespace boost {
index b50607f2cee2ce052e4781daf8a6c700a0e942ed..08393cfb8191f5b29809c5fbb580d81420472a91 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
-#include <cstddef>
+#include <cstddef> // size_t
 
 namespace boost {
 
index 0b50a070346c05f198ce1983fbfe8abb7c01041c..b6528e525b0d8b2bc658c4469f0a33265ed1a615 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
-#include <cstddef>
+#include <cstddef> // size_t
 
 namespace boost {
 
index fb79e59d2245dd5045e55715e2fb79ed804f4b20..921665266fdbb0b545882a00ee68d0753d216454 100644 (file)
@@ -18,7 +18,7 @@
 
 namespace boost {
 
-#ifdef BOOST_MSVC
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1900)
 
 namespace detail{
 
index 475e39d22c4137e3b2c5cebfca0aef0f6275725f..f5870f317f3598cb197a51ace9f68efcaed3e52c 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
-#include <cstddef>
+#include <cstddef> // size_t
 
 namespace boost {
 
index ffa054a2f17f26952ccaf2da8e3ce1c4a07ea33d..ddf1d982949da9357e1828913d71998e10d27e75 100644 (file)
@@ -12,7 +12,7 @@
 #include <boost/type_traits/is_pod.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/config.hpp>
-#include <cstddef>
+#include <cstddef> // size_t
 #include <boost/detail/workaround.hpp>
 
 #ifdef BOOST_MSVC
index fc0e13c0d7249716ad676e19f8015de94dde4620..604541d19acff25e6b124aee8edcc560eb6b5974 100644 (file)
 //         {}
 // This macro should only persist within this file.
 
-#define BOOST_PRIVATE_CTR_DEF( z, n, data )                            \
-    template < BOOST_PP_ENUM_PARAMS(n, typename T) >                   \
-    explicit base_from_member( BOOST_PP_ENUM_BINARY_PARAMS(n, T, x) )  \
-        : member( BOOST_PP_ENUM_PARAMS(n, x) )                         \
-        {}                                                             \
+#define BOOST_PRIVATE_CTR_DEF( z, n, data )                   \
+    template < BOOST_PP_ENUM_PARAMS(n, typename T) >          \
+    base_from_member( BOOST_PP_ENUM_BINARY_PARAMS(n, T, x) )  \
+        : member( BOOST_PP_ENUM_PARAMS(n, x) )                \
+        {}                                                    \
     /**/
 
 
@@ -142,7 +142,8 @@ protected:
         : member()
         {}
 
-    BOOST_PP_REPEAT_FROM_TO( 1, BOOST_PP_INC(BOOST_BASE_FROM_MEMBER_MAX_ARITY),
+    template < typename T0 > explicit base_from_member( T0 x0 ) : member( x0 ) {}
+    BOOST_PP_REPEAT_FROM_TO( 2, BOOST_PP_INC(BOOST_BASE_FROM_MEMBER_MAX_ARITY),
      BOOST_PRIVATE_CTR_DEF, _ )
 #endif
 
index 53bada09e9565efb6a27fb4cd4ed6c01b45b0a59..6ad54fb70025dc693e593ba99c9ac02d319ae533 100644 (file)
@@ -13,8 +13,8 @@
 #ifndef BOOST_VARIANT_APPLY_VISITOR_HPP
 #define BOOST_VARIANT_APPLY_VISITOR_HPP
 
-#include "boost/variant/detail/apply_visitor_unary.hpp"
-#include "boost/variant/detail/apply_visitor_binary.hpp"
-#include "boost/variant/detail/apply_visitor_delayed.hpp"
+#include <boost/variant/detail/apply_visitor_unary.hpp>
+#include <boost/variant/detail/apply_visitor_binary.hpp>
+#include <boost/variant/detail/apply_visitor_delayed.hpp>
 
 #endif // BOOST_VARIANT_APPLY_VISITOR_HPP
index e5e22e1d82cf23326f39f25ac7b9363b8f68ebb0..6670cd8d27d284677e634db45a88a73ebcd6971c 100644 (file)
 #ifndef BOOST_VARIANT_DETAIL_APPLY_VISITOR_BINARY_HPP
 #define BOOST_VARIANT_DETAIL_APPLY_VISITOR_BINARY_HPP
 
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
-#include "boost/variant/detail/generic_result_type.hpp"
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/variant/detail/generic_result_type.hpp>
 
-#include "boost/variant/detail/apply_visitor_unary.hpp"
+#include <boost/variant/detail/apply_visitor_unary.hpp>
 
 #if BOOST_WORKAROUND(__EDG__, BOOST_TESTED_AT(302))
-#include "boost/utility/enable_if.hpp"
-#include "boost/mpl/not.hpp"
-#include "boost/type_traits/is_const.hpp"
+#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/type_traits/is_const.hpp>
 #endif
 
 
 #if !defined(BOOST_NO_CXX14_DECLTYPE_AUTO) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
-#   include "boost/variant/detail/has_result_type.hpp"
+#   include <boost/variant/detail/has_result_type.hpp>
 #endif
 
 namespace boost {
index 29f46141d826ff17890bb4504640c95f339db0c5..515a93ef013ec54d0d5a71eb379fe27751018e00 100644 (file)
 #ifndef BOOST_VARIANT_DETAIL_APPLY_VISITOR_DELAYED_HPP
 #define BOOST_VARIANT_DETAIL_APPLY_VISITOR_DELAYED_HPP
 
-#include "boost/variant/detail/generic_result_type.hpp"
+#include <boost/variant/detail/generic_result_type.hpp>
 
-#include "boost/variant/detail/apply_visitor_unary.hpp"
-#include "boost/variant/detail/apply_visitor_binary.hpp"
-#include "boost/variant/variant_fwd.hpp" // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
+#include <boost/variant/detail/apply_visitor_unary.hpp>
+#include <boost/variant/detail/apply_visitor_binary.hpp>
+#include <boost/variant/variant_fwd.hpp> // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
 
 
-#include "boost/variant/detail/has_result_type.hpp"
+#include <boost/variant/detail/has_result_type.hpp>
 #include <boost/core/enable_if.hpp>
 
 namespace boost {
index 63c21a3fea1a6728e1990707f753a9dd41d90411..d4e2c166dce1ef5a0cce7bcd5d87f1520469bef8 100644 (file)
 #ifndef BOOST_VARIANT_DETAIL_APPLY_VISITOR_UNARY_HPP
 #define BOOST_VARIANT_DETAIL_APPLY_VISITOR_UNARY_HPP
 
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
-#include "boost/variant/detail/generic_result_type.hpp"
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/variant/detail/generic_result_type.hpp>
 
 #if BOOST_WORKAROUND(__EDG__, BOOST_TESTED_AT(302))
-#include "boost/core/enable_if.hpp"
-#include "boost/mpl/not.hpp"
-#include "boost/type_traits/is_const.hpp"
+#include <boost/core/enable_if.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/type_traits/is_const.hpp>
 #endif
 
 #if !defined(BOOST_NO_CXX14_DECLTYPE_AUTO) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
@@ -30,7 +30,7 @@
 #   include <boost/mpl/size.hpp>
 #   include <boost/utility/declval.hpp>
 #   include <boost/core/enable_if.hpp>
-#   include "boost/variant/detail/has_result_type.hpp"
+#   include <boost/variant/detail/has_result_type.hpp>
 #endif
 
 namespace boost {
index 1ccf160ce77d8b981be9608ffbb406411819bdad..c11f12cf58d62f58c6e07cb40cdfb5b495b77930 100644 (file)
@@ -13,8 +13,8 @@
 #ifndef BOOST_VARIANT_DETAIL_BACKUP_HOLDER_HPP
 #define BOOST_VARIANT_DETAIL_BACKUP_HOLDER_HPP
 
-#include "boost/config.hpp"
-#include "boost/assert.hpp"
+#include <boost/config.hpp>
+#include <boost/assert.hpp>
 
 namespace boost {
 namespace detail { namespace variant {
index 24feed6bd2c69bc596e8d19214f3250e7f78c923..0320278c15828f2a9f6cb27334307de694206cfa 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef BOOST_VARIANT_DETAIL_CAST_STORAGE_HPP
 #define BOOST_VARIANT_DETAIL_CAST_STORAGE_HPP
 
-#include "boost/config.hpp"
+#include <boost/config.hpp>
 
 namespace boost {
 namespace detail { namespace variant {
index 84564a46b153d78bb0f5728c2068823ebfaeeb6e..70725e2cc8a7fdbb958d0d17b032c51d84fabc0e 100644 (file)
@@ -3,8 +3,8 @@
 // See http://www.boost.org for updates, documentation, and revision history.
 //-----------------------------------------------------------------------------
 //
-// Copyright (c) 2003
-// Eric Friedman
+// Copyright (c) 2003 Eric Friedman
+// Copyright (c) 2016 Antony Polukhin
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
 #ifndef BOOST_VARIANT_DETAIL_CONFIG_HPP
 #define BOOST_VARIANT_DETAIL_CONFIG_HPP
 
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
-
-///////////////////////////////////////////////////////////////////////////////
-// macro BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING
-//
-#if BOOST_WORKAROUND(__MWERKS__, <= 0x3201) \
- || BOOST_WORKAROUND(BOOST_INTEL, <= 700) \
- && !defined(BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING)
-#   define BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// macro BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND
-//
-#if !defined(BOOST_NO_SFINAE) \
- && !BOOST_WORKAROUND(BOOST_INTEL, <= 700) \
- && !defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND)
-#   define BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND
-#endif
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
 
 #endif // BOOST_VARIANT_DETAIL_CONFIG_HPP
index 39a6b71463120a945befafa9f81c0621bbd81172..cac156b1569726d26f66cd120e30f3f8a94a2bc0 100644 (file)
 #ifndef BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_FWD_HPP
 #define BOOST_VARIANT_DETAIL_ENABLE_RECURSIVE_FWD_HPP
 
-#include "boost/mpl/aux_/config/ctps.hpp"
+#include <boost/mpl/aux_/config/ctps.hpp>
 
-#include "boost/mpl/bool_fwd.hpp"
+#include <boost/mpl/bool_fwd.hpp>
 
-#   include "boost/mpl/bool.hpp"
+#   include <boost/mpl/bool.hpp>
 
 namespace boost {
 namespace detail { namespace variant {
index 522b796fe0e637161bd728ebe901c7e2554bb00c..333393a2ac7fab1e85fafcefb96aadf8eb81d9bb 100644 (file)
@@ -3,8 +3,8 @@
 // See http://www.boost.org for updates, documentation, and revision history.
 //-----------------------------------------------------------------------------
 //
-// Copyright (c) 2003
-// Eric Friedman
+// Copyright (c) 2003 Eric Friedman
+// Copyright (c) 2015-2016 Antony Polukhin
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
 #ifndef BOOST_VARIANT_DETAIL_FORCED_RETURN_HPP
 #define BOOST_VARIANT_DETAIL_FORCED_RETURN_HPP
 
-#include "boost/config.hpp"
-#include "boost/variant/detail/generic_result_type.hpp"
-#include "boost/assert.hpp"
+#include <boost/config.hpp>
+#include <boost/variant/detail/generic_result_type.hpp>
+#include <boost/assert.hpp>
+#include <cstdlib> // std::abort
 
-namespace boost {
-namespace detail { namespace variant {
 
-///////////////////////////////////////////////////////////////////////////////
-// (detail) function template forced_return
-//
-// Logical error to permit invocation at runtime, but (artificially) satisfies
-// compile-time requirement of returning a result value.
-//
-
-#if !defined(BOOST_MSVC)                                \
- && !defined(BOOST_NO_VOID_RETURNS)
-
-// "standard" implementation:
-
-template <typename T>
-inline T forced_return()
-{
-    // logical error: should never be here! (see above)
-    BOOST_ASSERT(false);
+#ifdef BOOST_MSVC
+# pragma warning( push )
+# pragma warning( disable : 4702 ) // unreachable code
+#endif
 
-    T (*dummy_function_ptr)() = 0;
-    return dummy_function_ptr();
-}
+namespace boost { namespace detail { namespace variant {
 
-template <>
-inline void forced_return<void>()
-{
-    // logical error: should never be here! (see above)
-    BOOST_ASSERT(false);
+BOOST_NORETURN inline void forced_return_no_return() { // fixes `must return a value` warnings
+    using namespace std;
+    abort(); // some implementations have no std::abort
 }
 
-#elif !defined(BOOST_MSVC)
 
-// workaround implementation
+///////////////////////////////////////////////////////////////////////////////
+// (detail) function template forced_return
 //
-// TODO: Determine the most efficient way to handle this -- as below? by
-// throwing? by recursive call to forced_return itself? etc.
+// Logical error to permit invocation at runtime, but (artificially) satisfies
+// compile-time requirement of returning a result value.
 //
-
 template <typename T>
-inline
+BOOST_NORETURN inline
     BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T)
 forced_return()
 {
     // logical error: should never be here! (see above)
     BOOST_ASSERT(false);
 
+    forced_return_no_return();
+
+#ifdef BOOST_NO_NORETURN
     BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T) (*dummy)() = 0;
     return dummy();
+#endif
 }
 
-#else // defined(BOOST_MSVC)
+}}} // namespace boost::detail::variant
 
-# pragma warning( push )
-# pragma warning( disable : 4702 ) // unreachable code
-// msvc-specific implementation
-//
-// Leverages __declspec(noreturn) for optimized implementation.
-//
-
-__declspec(noreturn)
-inline void forced_return_no_return() {};
-
-template <typename T>
-inline
-    BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(T)
-forced_return()
-{
-    // logical error: should never be here! (see above)
-    BOOST_ASSERT(false);
-
-    forced_return_no_return();
-}
 
+#ifdef BOOST_MSVC
 # pragma warning( pop )
-
-#endif // BOOST_MSVC optimization
-
-}} // namespace detail::variant
-} // namespace boost
+#endif
 
 #endif // BOOST_VARIANT_DETAIL_FORCED_RETURN_HPP
index b3fbb19eeb2eb98be6d950dbd0381c76b93506c1..8b1289cacc7b95e08f4cd27f1e84d4eeba1d2aa6 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef BOOST_VARIANT_DETAIL_GENERIC_RESULT_TYPE_HPP
 #define BOOST_VARIANT_DETAIL_GENERIC_RESULT_TYPE_HPP
 
-#include "boost/config.hpp"
+#include <boost/config.hpp>
 
 //////////////////////////////////////////////////////////////////////////
 // (workaround) macro BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE
index 8ec3d361eec5f1ad31e29d65660b46e680980030..80cd56ab1190e3c129ac9599a072b336706b9e79 100644 (file)
@@ -12,8 +12,8 @@
 #ifndef BOOST_VARIANT_DETAIL_HAS_RESULT_TYPE_HPP
 #define BOOST_VARIANT_DETAIL_HAS_RESULT_TYPE_HPP
 
-#include "boost/config.hpp"
-#include "boost/type_traits/remove_reference.hpp"
+#include <boost/config.hpp>
+#include <boost/type_traits/remove_reference.hpp>
 
 
 namespace boost { namespace detail { namespace variant {
index f6f425e9b0d7c9181284673ea57e0a20b76d20ab..4a54c273c27b78cba60b593e7e679fdcd2aa97fc 100644 (file)
 
 #include <new> // for placement new
 
-#include "boost/config.hpp"
+#include <boost/config.hpp>
 
-#include "boost/call_traits.hpp"
-#include "boost/detail/reference_content.hpp"
-#include "boost/variant/recursive_wrapper_fwd.hpp"
-#include "boost/variant/detail/move.hpp"
+#include <boost/call_traits.hpp>
+#include <boost/detail/reference_content.hpp>
+#include <boost/variant/recursive_wrapper_fwd.hpp>
+#include <boost/variant/detail/move.hpp>
 
 #if !defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE)
-#   include "boost/mpl/aux_/value_wknd.hpp"
-#   include "boost/mpl/int.hpp"
-#   include "boost/mpl/iter_fold.hpp"
-#   include "boost/mpl/next.hpp"
-#   include "boost/mpl/deref.hpp"
-#   include "boost/mpl/pair.hpp"
-#   include "boost/mpl/protect.hpp"
+#   include <boost/mpl/aux_/value_wknd.hpp>
+#   include <boost/mpl/int.hpp>
+#   include <boost/mpl/iter_fold.hpp>
+#   include <boost/mpl/next.hpp>
+#   include <boost/mpl/deref.hpp>
+#   include <boost/mpl/pair.hpp>
+#   include <boost/mpl/protect.hpp>
 #else
-#   include "boost/variant/variant_fwd.hpp"
-#   include "boost/preprocessor/cat.hpp"
-#   include "boost/preprocessor/enum.hpp"
-#   include "boost/preprocessor/repeat.hpp"
+#   include <boost/variant/variant_fwd.hpp>
+#   include <boost/preprocessor/cat.hpp>
+#   include <boost/preprocessor/enum.hpp>
+#   include <boost/preprocessor/repeat.hpp>
 #endif
 
 namespace boost {
@@ -111,7 +111,7 @@ struct make_initializer_node
                 return BOOST_MPL_AUX_VALUE_WKND(index)::value; // which
             }
 
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES            
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
             static int initialize(void* dest, param2_T operand)
             {
                 // This assert must newer trigger, because all the reference contents are
index 37d725c0b6aef795aefce4da1e7a52e74e278ce5..b7a0feffd027bd72aeef4804ac7f052adb38f2ee 100644 (file)
 #ifndef BOOST_VARIANT_DETAIL_MAKE_VARIANT_LIST_HPP
 #define BOOST_VARIANT_DETAIL_MAKE_VARIANT_LIST_HPP
 
-#include "boost/variant/variant_fwd.hpp"
+#include <boost/variant/variant_fwd.hpp>
 
-#include "boost/mpl/list.hpp"
-#include "boost/preprocessor/cat.hpp"
-#include "boost/preprocessor/enum.hpp"
+#include <boost/mpl/list.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/enum.hpp>
 
 namespace boost {
 namespace detail { namespace variant {
index 0b12adf1ae6e20496b569d5fdf668649aa132d97..8900055b751b1c9b6ac2510bf79fd87452abb3e1 100644 (file)
 #include <iterator> // for iterator_traits
 #include <new> // for placement new
 
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
-#include "boost/move/move.hpp"
-#include "boost/move/adl_move_swap.hpp"
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/move/move.hpp>
+#include <boost/move/adl_move_swap.hpp>
 
 namespace boost { namespace detail { namespace variant {
 
index ff20a010c74e7ccc9ae86e2792ab3aebcb73ddf7..48394f072d83c171b821072589d168b4013a61d6 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef BOOST_VARIANT_DETAIL_OVER_SEQUENCE_HPP
 #define BOOST_VARIANT_DETAIL_OVER_SEQUENCE_HPP
 
-#include "boost/mpl/aux_/config/ctps.hpp"
+#include <boost/mpl/aux_/config/ctps.hpp>
 
 
 namespace boost {
index 8084cb8845108eef8eb24c13c630d20da7e5184d..cc490744e1fda86cd0e99eb0e902380f814e7a95 100644 (file)
@@ -13,9 +13,9 @@
 #ifndef BOOST_VARIANT_DETAIL_SUBSTITUTE_FWD_HPP
 #define BOOST_VARIANT_DETAIL_SUBSTITUTE_FWD_HPP
 
-#include "boost/mpl/aux_/lambda_arity_param.hpp"
-#include "boost/mpl/aux_/template_arity.hpp"
-#include "boost/mpl/int_fwd.hpp"
+#include <boost/mpl/aux_/lambda_arity_param.hpp>
+#include <boost/mpl/aux_/template_arity.hpp>
+#include <boost/mpl/int_fwd.hpp>
 
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -24,8 +24,8 @@
 // Defined if 'substitute' is not implementable on the current compiler.
 //
 
-#include "boost/mpl/aux_/config/ctps.hpp"
-#include "boost/mpl/aux_/config/ttp.hpp"
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/mpl/aux_/config/ttp.hpp>
 
 #if defined(BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS) \
  && !defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE)
index 192a3dea4ab9fc258be7ae58ca6a8c7da603ff42..63df74f24b9761b3e5da310c0bbb2750eeb20853 100644 (file)
 
 #include <iosfwd> // for std::basic_ostream forward declare
 
-#include "boost/variant/variant_fwd.hpp"
+#include <boost/variant/variant_fwd.hpp>
 
-#include "boost/detail/templated_streams.hpp"
-#include "boost/variant/static_visitor.hpp"
+#include <boost/detail/templated_streams.hpp>
+#include <boost/variant/static_visitor.hpp>
 
 namespace boost {
 
index a36cae5f2bda55489442c30c0ec4cbd905abcb3a..d741a4ab29a626b17405eac2dedac88f88ff9342 100644 (file)
 #ifndef BOOST_VARIANT_DETAIL_VISITATION_IMPL_HPP
 #define BOOST_VARIANT_DETAIL_VISITATION_IMPL_HPP
 
-#include "boost/config.hpp"
-
-#include "boost/variant/detail/backup_holder.hpp"
-#include "boost/variant/detail/cast_storage.hpp"
-#include "boost/variant/detail/forced_return.hpp"
-#include "boost/variant/detail/generic_result_type.hpp"
-#include "boost/variant/variant_fwd.hpp" // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
-
-#include "boost/mpl/eval_if.hpp"
-#include "boost/mpl/bool.hpp"
-#include "boost/mpl/identity.hpp"
-#include "boost/mpl/int.hpp"
-#include "boost/mpl/next.hpp"
-#include "boost/mpl/deref.hpp"
-#include "boost/mpl/or.hpp"
-#include "boost/preprocessor/cat.hpp"
-#include "boost/preprocessor/inc.hpp"
-#include "boost/preprocessor/repeat.hpp"
-#include "boost/type_traits/is_same.hpp"
-#include "boost/type_traits/has_nothrow_copy.hpp"
-#include "boost/type_traits/is_nothrow_move_constructible.hpp"
+#include <boost/config.hpp>
+
+#include <boost/variant/detail/backup_holder.hpp>
+#include <boost/variant/detail/cast_storage.hpp>
+#include <boost/variant/detail/forced_return.hpp>
+#include <boost/variant/detail/generic_result_type.hpp>
+#include <boost/variant/variant_fwd.hpp> // for BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/inc.hpp>
+#include <boost/preprocessor/repeat.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/has_nothrow_copy.hpp>
+#include <boost/type_traits/is_nothrow_move_constructible.hpp>
 
 #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) 
 # pragma warning (push) 
@@ -49,7 +49,7 @@
 #if !defined(BOOST_VARIANT_VISITATION_UNROLLING_LIMIT)
 
 #ifndef BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES
-#   include "boost/mpl/limits/list.hpp"
+#   include <boost/mpl/limits/list.hpp>
 #   define BOOST_VARIANT_VISITATION_UNROLLING_LIMIT   \
         BOOST_MPL_LIMIT_LIST_SIZE
 #else
@@ -258,7 +258,7 @@ visitation_impl(
     typedef typename is_same< next_type,apply_visitor_unrolled >::type
         is_apply_visitor_unrolled;
 
-    return visitation_impl(
+    return detail::variant::visitation_impl(
           internal_which, logical_which
         , visitor, storage
         , is_apply_visitor_unrolled()
index b42a68ffaf5765990b6d305ec6a2cae98a3a4bcf..2fc43412623ac43792a5b08ebf9d78bc05a59724 100644 (file)
@@ -3,8 +3,8 @@
 // See http://www.boost.org for updates, documentation, and revision history.
 //-----------------------------------------------------------------------------
 //
-// Copyright (c) 2002
-// Eric Friedman, Itay Maman
+// Copyright (c) 2002 Eric Friedman, Itay Maman
+// Copyright (c) 2016 Antony Polukhin
 //
 // Portions Copyright (C) 2002 David Abrahams
 //
 #define BOOST_VARIANT_RECURSIVE_WRAPPER_FWD_HPP
 
 #include <boost/mpl/bool.hpp>
-#include "boost/mpl/aux_/config/ctps.hpp"
-#include "boost/mpl/aux_/lambda_support.hpp"
+#include <boost/mpl/aux_/config/ctps.hpp>
+#include <boost/mpl/aux_/lambda_support.hpp>
 #include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/is_constructible.hpp>
 
 namespace boost {
 
@@ -40,10 +41,35 @@ namespace boost {
 //
 template <typename T> class recursive_wrapper;
 
+
+///////////////////////////////////////////////////////////////////////////////
+// metafunction is_constructible partial specializations.
+//
+// recursive_wrapper<T> is constructible only from T and recursive_wrapper<T>.
+//
+template <class T>          struct is_constructible<recursive_wrapper<T>, T>                            : boost::true_type{};
+template <class T>          struct is_constructible<recursive_wrapper<T>, const T>                      : boost::true_type{};
+template <class T>          struct is_constructible<recursive_wrapper<T>, T&>                           : boost::true_type{};
+template <class T>          struct is_constructible<recursive_wrapper<T>, const T&>                     : boost::true_type{};
+template <class T>          struct is_constructible<recursive_wrapper<T>, recursive_wrapper<T> >        : boost::true_type{};
+template <class T>          struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<T> >  : boost::true_type{};
+template <class T>          struct is_constructible<recursive_wrapper<T>, recursive_wrapper<T>& >       : boost::true_type{};
+template <class T>          struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<T>& > : boost::true_type{};
+
+template <class T, class U> struct is_constructible<recursive_wrapper<T>, U >                           : boost::false_type{};
+template <class T, class U> struct is_constructible<recursive_wrapper<T>, const U >                     : boost::false_type{};
+template <class T, class U> struct is_constructible<recursive_wrapper<T>, U& >                          : boost::false_type{};
+template <class T, class U> struct is_constructible<recursive_wrapper<T>, const U& >                    : boost::false_type{};
+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{};
+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{};
+
+
 ///////////////////////////////////////////////////////////////////////////////
 // metafunction is_recursive_wrapper (modeled on code by David Abrahams)
 //
-// True iff specified type matches recursive_wrapper<T>.
+// True if specified type matches recursive_wrapper<T>.
 //
 
 namespace detail {
index 27f56747eff8fea985dfdd4d4d50a6b10bc874c5..d1fc47e272578132abc1b7cc085d90324f150983 100644 (file)
 #ifndef BOOST_VARIANT_STATIC_VISITOR_HPP
 #define BOOST_VARIANT_STATIC_VISITOR_HPP
 
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
 
-#include "boost/mpl/if.hpp"
-#include "boost/type_traits/is_base_and_derived.hpp"
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_base_and_derived.hpp>
 
 #include <boost/type_traits/integral_constant.hpp>
 #include <boost/mpl/aux_/lambda_support.hpp>
index fa09eb5641c7e11117ab9a95b1bf0d79b18fb91e..629623850722ebf59297ad5d7e43f872559a5ba4 100644 (file)
@@ -4,7 +4,7 @@
 //-----------------------------------------------------------------------------
 //
 // Copyright (c) 2002-2003 Eric Friedman, Itay Maman
-// Copyright (c) 2012-2014 Antony Polukhin
+// Copyright (c) 2012-2016 Antony Polukhin
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
 #include <cstddef> // for std::size_t
 #include <new> // for placement new
 
-#include "boost/type_index.hpp"
-
-#include "boost/variant/detail/config.hpp"
-#include "boost/mpl/aux_/value_wknd.hpp"
-
-#include "boost/variant/variant_fwd.hpp"
-#include "boost/variant/detail/backup_holder.hpp"
-#include "boost/variant/detail/enable_recursive_fwd.hpp"
-#include "boost/variant/detail/forced_return.hpp"
-#include "boost/variant/detail/initializer.hpp"
-#include "boost/variant/detail/make_variant_list.hpp"
-#include "boost/variant/detail/over_sequence.hpp"
-#include "boost/variant/detail/visitation_impl.hpp"
-#include "boost/variant/detail/hash_variant.hpp"
-
-#include "boost/variant/detail/generic_result_type.hpp"
-#include "boost/variant/detail/move.hpp"
-
-#include "boost/detail/no_exceptions_support.hpp"
-#include "boost/detail/reference_content.hpp"
-#include "boost/aligned_storage.hpp"
-#include "boost/blank.hpp"
-#include "boost/math/common_factor_ct.hpp"
-#include "boost/static_assert.hpp"
-#include "boost/preprocessor/cat.hpp"
-#include "boost/preprocessor/repeat.hpp"
-#include "boost/type_traits/alignment_of.hpp"
-#include "boost/type_traits/add_const.hpp"
-#include "boost/type_traits/has_nothrow_constructor.hpp"
-#include "boost/type_traits/has_nothrow_copy.hpp"
-#include "boost/type_traits/is_nothrow_move_assignable.hpp"
-#include "boost/type_traits/is_nothrow_move_constructible.hpp"
-#include "boost/type_traits/is_const.hpp"
-#include "boost/type_traits/is_same.hpp"
-#include "boost/type_traits/is_rvalue_reference.hpp"
-#include "boost/utility/enable_if.hpp"
-#include "boost/utility/declval.hpp"
-#include "boost/variant/recursive_wrapper_fwd.hpp"
-#include "boost/variant/static_visitor.hpp"
-
-#include "boost/mpl/assert.hpp"
-#include "boost/mpl/begin_end.hpp"
-#include "boost/mpl/bool.hpp"
-#include "boost/mpl/deref.hpp"
-#include "boost/mpl/empty.hpp"
-#include "boost/mpl/eval_if.hpp"
-#include "boost/mpl/find_if.hpp"
-#include "boost/mpl/fold.hpp"
-#include "boost/mpl/front.hpp"
-#include "boost/mpl/identity.hpp"
-#include "boost/mpl/if.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/logical.hpp"
-#include "boost/mpl/max_element.hpp"
-#include "boost/mpl/next.hpp"
-#include "boost/mpl/not.hpp"
-#include "boost/mpl/pair.hpp"
-#include "boost/mpl/protect.hpp"
-#include "boost/mpl/push_front.hpp"
-#include "boost/mpl/same_as.hpp"
-#include "boost/mpl/size_t.hpp"
-#include "boost/mpl/sizeof.hpp"
-#include "boost/mpl/transform.hpp"
+#include <boost/type_index.hpp>
+
+#include <boost/variant/detail/config.hpp>
+#include <boost/mpl/aux_/value_wknd.hpp>
+
+#include <boost/variant/variant_fwd.hpp>
+#include <boost/variant/detail/backup_holder.hpp>
+#include <boost/variant/detail/enable_recursive_fwd.hpp>
+#include <boost/variant/detail/forced_return.hpp>
+#include <boost/variant/detail/initializer.hpp>
+#include <boost/variant/detail/make_variant_list.hpp>
+#include <boost/variant/detail/over_sequence.hpp>
+#include <boost/variant/detail/visitation_impl.hpp>
+#include <boost/variant/detail/hash_variant.hpp>
+
+#include <boost/variant/detail/generic_result_type.hpp>
+#include <boost/variant/detail/move.hpp>
+
+#include <boost/detail/no_exceptions_support.hpp>
+#include <boost/detail/reference_content.hpp>
+#include <boost/aligned_storage.hpp>
+#include <boost/blank.hpp>
+#include <boost/math/common_factor_ct.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repeat.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/has_nothrow_constructor.hpp>
+#include <boost/type_traits/has_nothrow_copy.hpp>
+#include <boost/type_traits/is_nothrow_move_assignable.hpp>
+#include <boost/type_traits/is_nothrow_move_constructible.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_rvalue_reference.hpp>
+#include <boost/type_traits/is_constructible.hpp>
+#include <boost/type_traits/add_lvalue_reference.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/utility/declval.hpp>
+#include <boost/variant/recursive_wrapper_fwd.hpp>
+#include <boost/variant/static_visitor.hpp>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/empty.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/if.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/logical.hpp>
+#include <boost/mpl/max_element.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/pair.hpp>
+#include <boost/mpl/protect.hpp>
+#include <boost/mpl/push_front.hpp>
+#include <boost/mpl/same_as.hpp>
+#include <boost/mpl/size_t.hpp>
+#include <boost/mpl/sizeof.hpp>
+#include <boost/mpl/transform.hpp>
 
 ///////////////////////////////////////////////////////////////////////////////
 // Implementation Macros:
 
 #if defined(BOOST_VARIANT_MINIMIZE_SIZE)
 #   include <climits> // for SCHAR_MAX
-#   include "boost/mpl/eval_if.hpp"
-#   include "boost/mpl/equal_to.hpp"
-#   include "boost/mpl/identity.hpp"
-#   include "boost/mpl/int.hpp"
-#   include "boost/mpl/if.hpp"
-#   include "boost/mpl/less.hpp"
-#   include "boost/mpl/long.hpp"
-#   include "boost/mpl/O1_size.hpp"
+#   include <boost/mpl/eval_if.hpp>
+#   include <boost/mpl/equal_to.hpp>
+#   include <boost/mpl/identity.hpp>
+#   include <boost/mpl/int.hpp>
+#   include <boost/mpl/if.hpp>
+#   include <boost/mpl/less.hpp>
+#   include <boost/mpl/long.hpp>
+#   include <boost/mpl/O1_size.hpp>
 #endif
 
 
@@ -253,6 +255,72 @@ struct is_variant_move_noexcept_assignable {
 };
 #endif // BOOST_NO_CXX11_NOEXCEPT
 
+///////////////////////////////////////////////////////////////////////////////
+// (detail) metafunction is_variant_constructible_from
+//
+// Derives from true_type if at least one variant's type is constructible from T.
+//
+template <class T1, class T2>
+struct is_constructible_ext:
+    boost::mpl::or_<
+        boost::is_constructible<
+            T1,
+            T2
+        >,
+        boost::is_constructible<
+            T1,
+            typename boost::add_lvalue_reference<T2>::type
+        >
+    >
+{};
+
+template <class T, class Types>
+struct is_variant_constructible_from:
+    boost::mpl::not_< boost::is_same<
+        typename boost::mpl::find_if<
+            Types,
+            is_constructible_ext<boost::mpl::_1, T>
+        >::type,
+        typename boost::mpl::end<Types>::type
+    > >
+{};
+
+template <BOOST_VARIANT_ENUM_PARAMS(typename T), class Types>
+struct is_variant_constructible_from< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Types >:
+    boost::is_same<
+        typename boost::mpl::find_if<
+            typename boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>::recursive_enabled_types,
+            mpl::not_< is_variant_constructible_from< boost::mpl::_1, Types> >
+        >::type,
+        typename boost::mpl::end< typename boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>::recursive_enabled_types >::type
+    >
+{};
+
+template <BOOST_VARIANT_ENUM_PARAMS(typename T), class Types>
+struct is_variant_constructible_from< const boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>& , Types >:
+    is_variant_constructible_from<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Types >
+{};
+
+template <BOOST_VARIANT_ENUM_PARAMS(typename T), class Types>
+struct is_variant_constructible_from< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>& , Types >:
+    is_variant_constructible_from<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Types >
+{};
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+template <BOOST_VARIANT_ENUM_PARAMS(typename T), class Types>
+struct is_variant_constructible_from< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>&& , Types >:
+    is_variant_constructible_from<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Types >
+{};
+
+template <BOOST_VARIANT_ENUM_PARAMS(typename T), class Types>
+struct is_variant_constructible_from< boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> const && , Types >:
+    is_variant_constructible_from<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Types >
+{};
+
+#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCE
+
+
 ///////////////////////////////////////////////////////////////////////////////
 // (detail) metafunction make_storage
 //
@@ -899,10 +967,10 @@ public: // structors
 public: // visitor interfaces
 
     template <typename T>
-    bool operator()(const T& rhs_content) const
+    bool operator()(T& rhs_content) const
     {
         // Since the precondition ensures lhs and rhs types are same, get T...
-        known_get<const T> getter;
+        known_get<T> getter;
         const T& lhs_content = lhs_.apply_visitor(getter);
 
         // ...and compare lhs and rhs contents:
@@ -1120,6 +1188,7 @@ private: // helpers, for typedefs (below)
           ::boost::mpl::not_< mpl::empty<specified_types> >::value
         ));
 
+public: // public typedefs
     typedef typename mpl::eval_if<
           is_recursive_
         , mpl::transform<
@@ -1129,9 +1198,7 @@ private: // helpers, for typedefs (below)
                 >
             >
         , mpl::identity< specified_types >
-        >::type recursive_enabled_types;
-
-public: // public typedefs
+        >::type recursive_enabled_types;    // used by is_variant_constructible_from<> trait
 
     typedef typename mpl::transform<
           recursive_enabled_types
@@ -1648,7 +1715,10 @@ private: // helpers, for structors, below
 #endif
 
     template <BOOST_VARIANT_ENUM_PARAMS(typename U)>
-    void convert_construct(
+    typename boost::enable_if<mpl::or_<
+        boost::is_same<boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>, variant>,
+        boost::detail::variant::is_variant_constructible_from<boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>&, internal_types>
+    > >::type convert_construct(
           boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>& operand
         , long
         )
@@ -1657,7 +1727,10 @@ private: // helpers, for structors, below
     }
 
     template <BOOST_VARIANT_ENUM_PARAMS(typename U)>
-    void convert_construct(
+    typename boost::enable_if<mpl::or_<
+        boost::is_same<boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>, variant>,
+        boost::detail::variant::is_variant_constructible_from<const boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>&, internal_types>
+    > >::type convert_construct(
           const boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>& operand
         , long
         )
@@ -1667,7 +1740,10 @@ private: // helpers, for structors, below
 
 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
     template <BOOST_VARIANT_ENUM_PARAMS(typename U)>
-    void convert_construct(
+    typename boost::enable_if<mpl::or_<
+        boost::is_same<boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>, variant>,
+        boost::detail::variant::is_variant_constructible_from<boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>&&, internal_types>
+    > >::type convert_construct(
           boost::variant<BOOST_VARIANT_ENUM_PARAMS(U)>&& operand
         , long
         )
@@ -1678,27 +1754,12 @@ private: // helpers, for structors, below
 
 public: // structors, cont.
 
-#if !defined(BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING)
-
     template <typename T>
-    variant(const T& operand)
-    {
-        convert_construct(operand, 1L);
-    }
-
-    template <typename T>
-    variant(T& operand)
-    {
-        convert_construct(operand, 1L);
-    }
-
-#elif defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND)
-
-    // For compilers that cannot distinguish between T& and const T& in
-    // template constructors, but do fully support SFINAE, we can workaround:
-
-    template <typename T>
-    variant(const T& operand)
+    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)
     {
         convert_construct(operand, 1L);
     }
@@ -1706,31 +1767,25 @@ public: // structors, cont.
     template <typename T>
     variant(
           T& operand
-        , typename enable_if<
-              mpl::not_< is_const<T> >
-            , void
-            >::type* = 0
+        , 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
         )
     {
         convert_construct(operand, 1L);
     }
 
-#else // !defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND)
-
-    // For compilers that cannot distinguish between T& and const T& in
-    // template constructors, and do NOT support SFINAE, we can't workaround:
-
-    template <typename T>
-    variant(const T& operand)
-    {
-        convert_construct(operand, 1L);
-    }
-#endif // BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING workarounds
-    
 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
     template <class T>
-    variant(T&& operand, typename boost::enable_if<boost::is_rvalue_reference<T&&> >::type* = 0, 
-        typename boost::disable_if<boost::is_const<T> >::type* = 0)
+    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)
     {
         convert_construct( detail::variant::move(operand), 1L);
     }
@@ -1748,7 +1803,7 @@ public: // structors, cont.
         // ...and activate the *this's primary storage on success:
         indicate_which(operand.which());
     }
-    
+
 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
     variant(variant&& operand) BOOST_NOEXCEPT_IF(variant_move_noexcept_constructible::type::value)
     {
@@ -2122,8 +2177,14 @@ public: // modifiers
 
 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
     template <class T>
-    typename boost::enable_if_c<boost::is_rvalue_reference<T&&>::value && !boost::is_const<T>::value, variant& >::type 
-        operator=(T&& rhs) 
+    typename boost::enable_if<
+        boost::mpl::and_<
+            boost::is_rvalue_reference<T&&>,
+            mpl::not_< boost::is_const<T> >,
+            boost::detail::variant::is_variant_constructible_from<T&&, internal_types>
+        >,
+        variant&
+    >::type operator=(T&& rhs) 
     {
         move_assign( detail::variant::move(rhs) );
         return *this;
@@ -2131,7 +2192,13 @@ public: // modifiers
 #endif // BOOST_NO_CXX11_RVALUE_REFERENCES
 
     template <typename T>
-    variant& operator=(const T& rhs)
+    typename boost::enable_if<
+        mpl::or_<
+            boost::is_same<T, variant>,
+            boost::detail::variant::is_variant_constructible_from<const T&, internal_types>
+        >,
+        variant&
+    >::type operator=(const T& rhs)
     {
         assign(rhs);
         return *this;
@@ -2146,7 +2213,7 @@ public: // modifiers
 
 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
     variant& operator=(variant&& rhs) 
-#if !defined(__GNUC__) || (__GNUC__ != 4) || (__GNUC_MINOR__ > 6)
+#if !defined(__GNUC__) || (__GNUC__ != 4) || (__GNUC_MINOR__ > 6) || defined(__clang__)
         BOOST_NOEXCEPT_IF(variant_move_noexcept_constructible::type::value && variant_move_noexcept_assignable::type::value)
 #endif
     {
@@ -2192,10 +2259,6 @@ public: // queries
 
 public: // prevent comparison with foreign types
 
-// Obsolete. Remove.
-#   define BOOST_VARIANT_AUX_FAIL_COMPARISON_RETURN_TYPE \
-    void
-
     template <typename U>
     void operator==(const U&) const
     {
@@ -2412,7 +2475,7 @@ inline void swap(
 // implementation additions
 
 #if !defined(BOOST_NO_IOSTREAM)
-#include "boost/variant/detail/variant_io.hpp"
+#include <boost/variant/detail/variant_io.hpp>
 #endif // BOOST_NO_IOSTREAM
 
 #endif // BOOST_VARIANT_VARIANT_HPP
index 4bf90aa1e1e18aa44da058ba0082a0a885b6d579..769ecc4e54028484e80af015085438425ca68b0c 100644 (file)
@@ -4,7 +4,7 @@
 //-----------------------------------------------------------------------------
 //
 // Copyright (c) 2003 Eric Friedman, Itay Maman
-// Copyright (c) 2013 Antony Polukhin
+// Copyright (c) 2013-2016 Antony Polukhin
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
 #ifndef BOOST_VARIANT_VARIANT_FWD_HPP
 #define BOOST_VARIANT_VARIANT_FWD_HPP
 
-#include "boost/variant/detail/config.hpp"
+#include <boost/variant/detail/config.hpp>
 
-#include "boost/blank_fwd.hpp"
-#include "boost/mpl/arg.hpp"
-#include "boost/mpl/limits/arity.hpp"
-#include "boost/mpl/aux_/na.hpp"
-#include "boost/preprocessor/cat.hpp"
-#include "boost/preprocessor/enum.hpp"
-#include "boost/preprocessor/enum_params.hpp"
-#include "boost/preprocessor/enum_shifted_params.hpp"
-#include "boost/preprocessor/repeat.hpp"
-
-///////////////////////////////////////////////////////////////////////////////
-// macro BOOST_VARIANT_NO_REFERENCE_SUPPORT
-//
-// Defined if variant does not support references as bounded types. 
-//
-#if defined(BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING) \
- && !defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND) \
- && !defined(BOOST_VARIANT_NO_REFERENCE_SUPPORT)
-#   define BOOST_VARIANT_NO_REFERENCE_SUPPORT
-#endif
+#include <boost/blank_fwd.hpp>
+#include <boost/mpl/arg.hpp>
+#include <boost/mpl/limits/arity.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/enum.hpp>
+#include <boost/preprocessor/enum_params.hpp>
+#include <boost/preprocessor/enum_shifted_params.hpp>
+#include <boost/preprocessor/repeat.hpp>
 
 ///////////////////////////////////////////////////////////////////////////////
 // macro BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT
@@ -54,7 +43,7 @@
 // so only types declared w/ MPL lambda workarounds will work.
 //
 
-#include "boost/variant/detail/substitute_fwd.hpp"
+#include <boost/variant/detail/substitute_fwd.hpp>
 
 #if defined(BOOST_VARIANT_DETAIL_NO_SUBSTITUTE) \
   && !defined(BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT)
 // Implementation-defined preprocessor symbol describing the actual
 // length of variant's pseudo-variadic template parameter list.
 //
-#include "boost/mpl/limits/list.hpp"
+#include <boost/mpl/limits/list.hpp>
 #define BOOST_VARIANT_LIMIT_TYPES \
     BOOST_MPL_LIMIT_LIST_SIZE
 
 // arguments. That is,
 //   make_recursive_variant< ..., T<[1], recursive_variant_, ... [N]> >.
 //
-#include "boost/mpl/limits/arity.hpp"
+#include <boost/mpl/limits/arity.hpp>
 #define BOOST_VARIANT_RECURSIVE_VARIANT_MAX_ARITY \
     BOOST_MPL_LIMIT_METAFUNCTION_ARITY
 
index ce6f79f8400a57138a4c8620da37bf5a7b5607cf..a382352cd540e7553d064ec36d293f39d7fee356 100644 (file)
@@ -19,7 +19,7 @@
 //  BOOST_VERSION / 100 % 1000 is the minor version
 //  BOOST_VERSION / 100000 is the major version
 
-#define BOOST_VERSION 106100
+#define BOOST_VERSION 106200
 
 //
 //  BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
@@ -27,6 +27,6 @@
 //  number, y is the minor version number, and z is the patch level if not 0.
 //  This is used by <config/auto_link.hpp> to select which library version to link to.
 
-#define BOOST_LIB_VERSION "1_61"
+#define BOOST_LIB_VERSION "1_62"
 
 #endif