From: Daniel Arndt Date: Wed, 13 Mar 2019 16:25:57 +0000 (+0100) Subject: Fix compiling bundled boost with MSVC and C++17 X-Git-Tag: v9.1.0-rc1~273^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d929dd41a003e0131d24040d659e30315c5cf88;p=dealii.git Fix compiling bundled boost with MSVC and C++17 --- diff --git a/bundled/boost-1.62.0/include/boost/algorithm/cxx14/equal.hpp b/bundled/boost-1.62.0/include/boost/algorithm/cxx14/equal.hpp index f1539f885c..9f97be1d62 100644 --- a/bundled/boost-1.62.0/include/boost/algorithm/cxx14/equal.hpp +++ b/bundled/boost-1.62.0/include/boost/algorithm/cxx14/equal.hpp @@ -13,7 +13,6 @@ #define BOOST_ALGORITHM_EQUAL_HPP #include // for std::equal -#include // for std::binary_function #include namespace boost { namespace algorithm { @@ -21,7 +20,7 @@ namespace boost { namespace algorithm { namespace detail { template - struct eq : public std::binary_function { + struct eq { bool operator () ( const T1& v1, const T2& v2 ) const { return v1 == v2 ;} }; diff --git a/bundled/boost-1.62.0/include/boost/algorithm/string/detail/case_conv.hpp b/bundled/boost-1.62.0/include/boost/algorithm/string/detail/case_conv.hpp index 42621c74f0..233912ca0f 100644 --- a/bundled/boost-1.62.0/include/boost/algorithm/string/detail/case_conv.hpp +++ b/bundled/boost-1.62.0/include/boost/algorithm/string/detail/case_conv.hpp @@ -30,8 +30,10 @@ namespace boost { // a tolower functor template - struct to_lowerF : public std::unary_function + struct to_lowerF { + typedef CharT argument_type; + typedef CharT result_type; // Constructor to_lowerF( const std::locale& Loc ) : m_Loc( &Loc ) {} @@ -50,8 +52,10 @@ namespace boost { // a toupper functor template - struct to_upperF : public std::unary_function + struct to_upperF { + typedef CharT argument_type; + typedef CharT result_type; // Constructor to_upperF( const std::locale& Loc ) : m_Loc( &Loc ) {} diff --git a/bundled/boost-1.62.0/include/boost/algorithm/string/detail/util.hpp b/bundled/boost-1.62.0/include/boost/algorithm/string/detail/util.hpp index cf4a8b1c8c..7844b6723c 100644 --- a/bundled/boost-1.62.0/include/boost/algorithm/string/detail/util.hpp +++ b/bundled/boost-1.62.0/include/boost/algorithm/string/detail/util.hpp @@ -89,9 +89,10 @@ namespace boost { template< typename SeqT, typename IteratorT=BOOST_STRING_TYPENAME SeqT::const_iterator > - struct copy_iterator_rangeF : - public std::unary_function< iterator_range, SeqT > + struct copy_iterator_rangeF { + typedef iterator_range argument_type; + typedef SeqT result_type; SeqT operator()( const iterator_range& Range ) const { return copy_range(Range); diff --git a/bundled/boost-1.62.0/include/boost/config/stdlib/dinkumware.hpp b/bundled/boost-1.62.0/include/boost/config/stdlib/dinkumware.hpp index af8ddda528..293a17675f 100644 --- a/bundled/boost-1.62.0/include/boost/config/stdlib/dinkumware.hpp +++ b/bundled/boost-1.62.0/include/boost/config/stdlib/dinkumware.hpp @@ -180,7 +180,7 @@ // If _HAS_AUTO_PTR_ETC is defined to 0, std::auto_ptr is not available. // See https://www.visualstudio.com/en-us/news/vs2015-vs.aspx#C++ // and http://blogs.msdn.com/b/vcblog/archive/2015/06/19/c-11-14-17-features-in-vs-2015-rtm.aspx -# if defined(_HAS_AUTO_PTR_ETC) && (_HAS_AUTO_PTR_ETC == 0) +# if defined(_HAS_AUTO_PTR_ETC) && (_HAS_AUTO_PTR_ETC == 0) && !defined BOOST_NO_AUTO_PTR # define BOOST_NO_AUTO_PTR # endif #endif diff --git a/bundled/boost-1.62.0/include/boost/function/function_template.hpp b/bundled/boost-1.62.0/include/boost/function/function_template.hpp index 82c81d7697..7984c8323f 100644 --- a/bundled/boost-1.62.0/include/boost/function/function_template.hpp +++ b/bundled/boost-1.62.0/include/boost/function/function_template.hpp @@ -656,17 +656,6 @@ namespace boost { BOOST_FUNCTION_TEMPLATE_PARMS > class BOOST_FUNCTION_FUNCTION : public function_base - -#if BOOST_FUNCTION_NUM_ARGS == 1 - - , public std::unary_function - -#elif BOOST_FUNCTION_NUM_ARGS == 2 - - , public std::binary_function - -#endif - { public: #ifndef BOOST_NO_VOID_RETURNS diff --git a/bundled/boost-1.62.0/include/boost/functional.hpp b/bundled/boost-1.62.0/include/boost/functional.hpp index b618485c10..731e4e1f1c 100644 --- a/bundled/boost-1.62.0/include/boost/functional.hpp +++ b/bundled/boost-1.62.0/include/boost/functional.hpp @@ -18,6 +18,36 @@ namespace boost { + namespace functional + { + namespace detail { +#if defined(_HAS_AUTO_PTR_ETC) && !_HAS_AUTO_PTR_ETC + // std::unary_function and std::binary_function were both removed + // in C++17. + + template + struct unary_function + { + typedef Arg1 argument_type; + typedef Result result_type; + }; + + template + struct binary_function + { + typedef Arg1 first_argument_type; + typedef Arg2 second_argument_type; + typedef Result result_type; + }; +#else + // Use the standard objects when we have them. + + using std::unary_function; + using std::binary_function; +#endif + } + } + #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // -------------------------------------------------------------------------- // The following traits classes allow us to avoid the need for ptr_fun @@ -147,7 +177,7 @@ namespace boost // -------------------------------------------------------------------------- template class unary_negate - : public std::unary_function::argument_type,bool> + : public boost::functional::detail::unary_function::argument_type,bool> { public: explicit unary_negate(typename unary_traits::param_type x) @@ -181,7 +211,7 @@ namespace boost // -------------------------------------------------------------------------- template class binary_negate - : public std::binary_function::first_argument_type, + : public boost::functional::detail::binary_function::first_argument_type, typename binary_traits::second_argument_type, bool> { @@ -218,7 +248,7 @@ namespace boost // -------------------------------------------------------------------------- template class binder1st - : public std::unary_function::second_argument_type, + : public boost::functional::detail::unary_function::second_argument_type, typename binary_traits::result_type> { public: @@ -264,7 +294,7 @@ namespace boost // -------------------------------------------------------------------------- template class binder2nd - : public std::unary_function::first_argument_type, + : public boost::functional::detail::unary_function::first_argument_type, typename binary_traits::result_type> { public: @@ -309,7 +339,7 @@ namespace boost // mem_fun, etc // -------------------------------------------------------------------------- template - class mem_fun_t : public std::unary_function + class mem_fun_t : public boost::functional::detail::unary_function { public: explicit mem_fun_t(S (T::*p)()) @@ -325,7 +355,7 @@ namespace boost }; template - class mem_fun1_t : public std::binary_function + class mem_fun1_t : public boost::functional::detail::binary_function { public: explicit mem_fun1_t(S (T::*p)(A)) @@ -341,7 +371,7 @@ namespace boost }; template - class const_mem_fun_t : public std::unary_function + class const_mem_fun_t : public boost::functional::detail::unary_function { public: explicit const_mem_fun_t(S (T::*p)() const) @@ -357,7 +387,7 @@ namespace boost }; template - class const_mem_fun1_t : public std::binary_function + class const_mem_fun1_t : public boost::functional::detail::binary_function { public: explicit const_mem_fun1_t(S (T::*p)(A) const) @@ -402,7 +432,7 @@ namespace boost // mem_fun_ref, etc // -------------------------------------------------------------------------- template - class mem_fun_ref_t : public std::unary_function + class mem_fun_ref_t : public boost::functional::detail::unary_function { public: explicit mem_fun_ref_t(S (T::*p)()) @@ -418,7 +448,7 @@ namespace boost }; template - class mem_fun1_ref_t : public std::binary_function + class mem_fun1_ref_t : public boost::functional::detail::binary_function { public: explicit mem_fun1_ref_t(S (T::*p)(A)) @@ -434,7 +464,7 @@ namespace boost }; template - class const_mem_fun_ref_t : public std::unary_function + class const_mem_fun_ref_t : public boost::functional::detail::unary_function { public: explicit const_mem_fun_ref_t(S (T::*p)() const) @@ -451,7 +481,7 @@ namespace boost }; template - class const_mem_fun1_ref_t : public std::binary_function + class const_mem_fun1_ref_t : public boost::functional::detail::binary_function { public: explicit const_mem_fun1_ref_t(S (T::*p)(A) const) @@ -497,7 +527,7 @@ namespace boost // ptr_fun // -------------------------------------------------------------------------- template - class pointer_to_unary_function : public std::unary_function + class pointer_to_unary_function : public boost::functional::detail::unary_function { public: explicit pointer_to_unary_function(Result (*f)(Arg)) @@ -521,7 +551,7 @@ namespace boost } template - class pointer_to_binary_function : public std::binary_function + class pointer_to_binary_function : public boost::functional::detail::binary_function { public: explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2)) diff --git a/bundled/boost-1.62.0/include/boost/functional/hash/extensions.hpp b/bundled/boost-1.62.0/include/boost/functional/hash/extensions.hpp index eafaefe85d..9f8fe4d65d 100644 --- a/bundled/boost-1.62.0/include/boost/functional/hash/extensions.hpp +++ b/bundled/boost-1.62.0/include/boost/functional/hash/extensions.hpp @@ -254,8 +254,9 @@ namespace boost #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct hash - : std::unary_function { + typedef T argument_type; + typedef std::size_t result_type; #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) std::size_t operator()(T const& val) const { @@ -271,8 +272,9 @@ namespace boost #if BOOST_WORKAROUND(__DMC__, <= 0x848) template struct hash - : std::unary_function { + typedef T[n] argument_type; + typedef std::size_t result_type; std::size_t operator()(const T* val) const { return boost::hash_range(val, val+n); @@ -296,8 +298,9 @@ namespace boost { template struct inner - : std::unary_function { + typedef T argument_type; + typedef std::size_t result_type; #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) std::size_t operator()(T const& val) const { diff --git a/bundled/boost-1.62.0/include/boost/functional/hash/hash.hpp b/bundled/boost-1.62.0/include/boost/functional/hash/hash.hpp index 0a8ceeb474..56941c9641 100644 --- a/bundled/boost-1.62.0/include/boost/functional/hash/hash.hpp +++ b/bundled/boost-1.62.0/include/boost/functional/hash/hash.hpp @@ -419,8 +419,9 @@ namespace boost #define BOOST_HASH_SPECIALIZE(type) \ template <> struct hash \ - : public std::unary_function \ { \ + typedef type argument_type; \ + typedef std::size_t result_type; \ std::size_t operator()(type v) const \ { \ return boost::hash_value(v); \ @@ -429,8 +430,9 @@ namespace boost #define BOOST_HASH_SPECIALIZE_REF(type) \ template <> struct hash \ - : public std::unary_function \ { \ + typedef type argument_type; \ + typedef std::size_t result_type; \ std::size_t operator()(type const& v) const \ { \ return boost::hash_value(v); \ @@ -483,8 +485,9 @@ namespace boost template struct hash - : public std::unary_function { + typedef T* argument_type; + typedef std::size_t result_type; std::size_t operator()(T* v) const { #if !BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) @@ -516,8 +519,9 @@ namespace boost { template struct inner - : public std::unary_function { + typedef T argument_type; + typedef std::size_t result_type; std::size_t operator()(T val) const { #if !BOOST_WORKAROUND(__SUNPRO_CC, <= 590) diff --git a/bundled/boost-1.62.0/include/boost/graph/astar_search.hpp b/bundled/boost-1.62.0/include/boost/graph/astar_search.hpp index 435ccf03b5..95795f27c2 100644 --- a/bundled/boost-1.62.0/include/boost/graph/astar_search.hpp +++ b/bundled/boost-1.62.0/include/boost/graph/astar_search.hpp @@ -46,11 +46,12 @@ namespace boost { template - class astar_heuristic : public std::unary_function< - typename graph_traits::vertex_descriptor, CostType> + class astar_heuristic { public: typedef typename graph_traits::vertex_descriptor Vertex; + typedef Vertex argument_type; + typedef CostType result_type; astar_heuristic() {} CostType operator()(Vertex u) { return static_cast(0); } }; diff --git a/bundled/boost-1.62.0/include/boost/graph/detail/geodesic.hpp b/bundled/boost-1.62.0/include/boost/graph/detail/geodesic.hpp index adcb17f0ae..0f2f2024fa 100644 --- a/bundled/boost-1.62.0/include/boost/graph/detail/geodesic.hpp +++ b/bundled/boost-1.62.0/include/boost/graph/detail/geodesic.hpp @@ -82,8 +82,11 @@ namespace detail { // Similar to std::plus, but maximizes parameters // rather than adding them. template - struct maximize : public std::binary_function + struct maximize { + typedef T result_type; + typedef T first_argument_type; + typedef T second_argument_type; T operator ()(T x, T y) const { BOOST_USING_STD_MAX(); return max BOOST_PREVENT_MACRO_SUBSTITUTION (x, y); } }; @@ -93,11 +96,10 @@ namespace detail { // types, but should be specialized for those types that have // discrete notions of reciprocals. template - struct reciprocal : public std::unary_function + struct reciprocal { - typedef std::unary_function function_type; - typedef typename function_type::result_type result_type; - typedef typename function_type::argument_type argument_type; + typedef T result_type; + typedef T first_argument_type; T operator ()(T t) { return T(1) / t; } }; diff --git a/bundled/boost-1.62.0/include/boost/graph/distributed/crauser_et_al_shortest_paths.hpp b/bundled/boost-1.62.0/include/boost/graph/distributed/crauser_et_al_shortest_paths.hpp index 060cbf9cab..70090ce4cf 100644 --- a/bundled/boost-1.62.0/include/boost/graph/distributed/crauser_et_al_shortest_paths.hpp +++ b/bundled/boost-1.62.0/include/boost/graph/distributed/crauser_et_al_shortest_paths.hpp @@ -95,8 +95,10 @@ namespace detail { template struct min_in_distance_compare - : std::binary_function { + typedef Vertex first_argument_type; + typedef Vertex second_argument_type; + typedef bool result_type; min_in_distance_compare(DistanceMap d, MinInWeightMap m, Combine combine, Compare compare) : distance_map(d), min_in_weight(m), combine(combine), @@ -119,9 +121,11 @@ namespace detail { template - struct min_out_distance_compare - : std::binary_function + struct min_out_distance_compares { + typedef Vertex first_argument_type; + typedef Vertex second_argument_type; + typedef bool result_type; min_out_distance_compare(DistanceMap d, MinOutWeightMap m, Combine combine, Compare compare) : distance_map(d), min_out_weight(m), combine(combine), diff --git a/bundled/boost-1.62.0/include/boost/graph/parallel/algorithm.hpp b/bundled/boost-1.62.0/include/boost/graph/parallel/algorithm.hpp index eed9bf8769..21ad7cc295 100644 --- a/bundled/boost-1.62.0/include/boost/graph/parallel/algorithm.hpp +++ b/bundled/boost-1.62.0/include/boost/graph/parallel/algorithm.hpp @@ -26,20 +26,29 @@ namespace boost { namespace parallel { }; template - struct minimum : std::binary_function + struct minimum { + typedef T first_argument_type; + typedef T second_argument_type; + typedef T result_type; const T& operator()(const T& x, const T& y) const { return x < y? x : y; } }; template - struct maximum : std::binary_function + struct maximum { + typedef T first_argument_type; + typedef T second_argument_type; + typedef T result_type; const T& operator()(const T& x, const T& y) const { return x < y? y : x; } }; template - struct sum : std::binary_function + struct sum { + typedef T first_argument_type; + typedef T second_argument_type; + typedef T result_type; const T operator()(const T& x, const T& y) const { return x + y; } }; diff --git a/bundled/boost-1.62.0/include/boost/graph/transitive_closure.hpp b/bundled/boost-1.62.0/include/boost/graph/transitive_closure.hpp index 4f81349bf2..c8c1629f45 100644 --- a/bundled/boost-1.62.0/include/boost/graph/transitive_closure.hpp +++ b/bundled/boost-1.62.0/include/boost/graph/transitive_closure.hpp @@ -41,8 +41,9 @@ namespace boost { template < typename TheContainer, typename ST = std::size_t, typename VT = typename TheContainer::value_type > - struct subscript_t:public std::unary_function < ST, VT > + struct subscript_t { + typedef ST& argument_type; typedef VT& result_type; subscript_t(TheContainer & c):container(&c) diff --git a/bundled/boost-1.62.0/include/boost/iostreams/chain.hpp b/bundled/boost-1.62.0/include/boost/iostreams/chain.hpp index bc0fab58ea..78434f393a 100644 --- a/bundled/boost-1.62.0/include/boost/iostreams/chain.hpp +++ b/bundled/boost-1.62.0/include/boost/iostreams/chain.hpp @@ -14,7 +14,6 @@ #include #include -#include // unary_function. #include // advance. #include #include // allocator, auto_ptr. @@ -286,7 +285,9 @@ private: static void set_auto_close(streambuf_type* b, bool close) { b->set_auto_close(close); } - struct closer : public std::unary_function { + struct closer { + typedef streambuf_type* argument_type; + typedef void result_type; closer(BOOST_IOS::openmode m) : mode_(m) { } void operator() (streambuf_type* b) { diff --git a/bundled/boost-1.62.0/include/boost/numeric/conversion/detail/converter.hpp b/bundled/boost-1.62.0/include/boost/numeric/conversion/detail/converter.hpp index 10550f8daa..2884e84e8d 100644 --- a/bundled/boost-1.62.0/include/boost/numeric/conversion/detail/converter.hpp +++ b/bundled/boost-1.62.0/include/boost/numeric/conversion/detail/converter.hpp @@ -450,10 +450,7 @@ namespace boost { namespace numeric { namespace convdetail // Trivial Converter : used when (cv-unqualified) T == (cv-unqualified) S // template - struct trivial_converter_impl : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type - ,BOOST_DEDUCED_TYPENAME Traits::result_type - > - ,public dummy_range_checker + struct trivial_converter_impl : public dummy_range_checker { typedef Traits traits ; @@ -471,10 +468,7 @@ namespace boost { namespace numeric { namespace convdetail // Rounding Converter : used for float to integral conversions. // template - struct rounding_converter : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type - ,BOOST_DEDUCED_TYPENAME Traits::result_type - > - ,public RangeChecker + struct rounding_converter : public RangeChecker ,public Float2IntRounder ,public RawConverter { @@ -501,10 +495,7 @@ namespace boost { namespace numeric { namespace convdetail // Non-Rounding Converter : used for all other conversions. // template - struct non_rounding_converter : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type - ,BOOST_DEDUCED_TYPENAME Traits::result_type - > - ,public RangeChecker + struct non_rounding_converter : public RangeChecker ,public RawConverter { typedef RangeChecker RangeCheckerBase ; diff --git a/bundled/boost-1.62.0/include/boost/signals2/detail/signal_template.hpp b/bundled/boost-1.62.0/include/boost/signals2/detail/signal_template.hpp index fb7591bbc1..fa19499d87 100644 --- a/bundled/boost-1.62.0/include/boost/signals2/detail/signal_template.hpp +++ b/bundled/boost-1.62.0/include/boost/signals2/detail/signal_template.hpp @@ -599,7 +599,6 @@ namespace boost class BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) BOOST_SIGNALS2_SIGNAL_TEMPLATE_SPECIALIZATION: public signal_base, public detail::BOOST_SIGNALS2_STD_FUNCTIONAL_BASE - (typename detail::result_type_wrapper::type) { typedef detail::BOOST_SIGNALS2_SIGNAL_IMPL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) impl_class; diff --git a/bundled/boost-1.62.0/include/boost/signals2/detail/signals_common_macros.hpp b/bundled/boost-1.62.0/include/boost/signals2/detail/signals_common_macros.hpp index 4ca4403827..acc0936281 100644 --- a/bundled/boost-1.62.0/include/boost/signals2/detail/signals_common_macros.hpp +++ b/bundled/boost-1.62.0/include/boost/signals2/detail/signals_common_macros.hpp @@ -137,7 +137,7 @@ #define BOOST_SIGNALS2_SIGNAL_TEMPLATE_SPECIALIZATION_DECL(arity) BOOST_SIGNALS2_SIGNAL_TEMPLATE_DECL(arity) #define BOOST_SIGNALS2_SIGNAL_TEMPLATE_SPECIALIZATION -#define BOOST_SIGNALS2_STD_FUNCTIONAL_BASE(result_type) std_functional_base +#define BOOST_SIGNALS2_STD_FUNCTIONAL_BASE std_functional_base #define BOOST_SIGNALS2_PP_COMMA_IF(arity) BOOST_PP_COMMA_IF(arity) @@ -205,8 +205,8 @@ ExtendedSlotFunction, \ Mutex> -#define BOOST_SIGNALS2_STD_FUNCTIONAL_BASE(result_type) \ - std_functional_base +#define BOOST_SIGNALS2_STD_FUNCTIONAL_BASE \ + std_functional_base #define BOOST_SIGNALS2_PP_COMMA_IF(arity) , diff --git a/bundled/boost-1.62.0/include/boost/signals2/detail/slot_template.hpp b/bundled/boost-1.62.0/include/boost/signals2/detail/slot_template.hpp index fc19f5139c..1c17c5b76a 100644 --- a/bundled/boost-1.62.0/include/boost/signals2/detail/slot_template.hpp +++ b/bundled/boost-1.62.0/include/boost/signals2/detail/slot_template.hpp @@ -35,7 +35,7 @@ namespace boost template class BOOST_SIGNALS2_SLOT_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) BOOST_SIGNALS2_SLOT_TEMPLATE_SPECIALIZATION - : public slot_base, public detail::BOOST_SIGNALS2_STD_FUNCTIONAL_BASE(R) + : public slot_base, public detail::BOOST_SIGNALS2_STD_FUNCTIONAL_BASE { public: diff --git a/bundled/boost-1.62.0/include/boost/signals2/detail/variadic_arg_type.hpp b/bundled/boost-1.62.0/include/boost/signals2/detail/variadic_arg_type.hpp index 14d54b2e3e..db9e81c2f3 100644 --- a/bundled/boost-1.62.0/include/boost/signals2/detail/variadic_arg_type.hpp +++ b/bundled/boost-1.62.0/include/boost/signals2/detail/variadic_arg_type.hpp @@ -32,15 +32,20 @@ namespace boost typedef typename variadic_arg_type::type type; }; - template + template struct std_functional_base {}; - template - struct std_functional_base: public std::unary_function - {}; - template - struct std_functional_base: public std::binary_function - {}; + template + struct std_functional_base + { + typedef T1 argument_type; + }; + template + struct std_functional_base + { + typedef T1 first_argument_type; + typedef T2 second_argument_type; + }; } // namespace detail } // namespace signals2 } // namespace boost diff --git a/bundled/boost-1.62.0/include/boost/smart_ptr/owner_less.hpp b/bundled/boost-1.62.0/include/boost/smart_ptr/owner_less.hpp index 6899325bd6..88c3c226d0 100644 --- a/bundled/boost-1.62.0/include/boost/smart_ptr/owner_less.hpp +++ b/bundled/boost-1.62.0/include/boost/smart_ptr/owner_less.hpp @@ -5,53 +5,30 @@ // owner_less.hpp // // Copyright (c) 2008 Frank Mori Hess +// Copyright (c) 2016 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -// See http://www.boost.org/libs/smart_ptr/smart_ptr.htm for documentation. +// See http://www.boost.org/libs/smart_ptr/ for documentation. // -#include - namespace boost { - template class shared_ptr; - template class weak_ptr; - - namespace detail - { - template - struct generic_owner_less : public std::binary_function - { - bool operator()(const T &lhs, const T &rhs) const - { - return lhs.owner_before(rhs); - } - bool operator()(const T &lhs, const U &rhs) const - { - return lhs.owner_before(rhs); - } - bool operator()(const U &lhs, const T &rhs) const - { - return lhs.owner_before(rhs); - } - }; - } // namespace detail - template struct owner_less; - - template - struct owner_less >: - public detail::generic_owner_less, weak_ptr > - {}; +template struct owner_less +{ + typedef bool result_type; + typedef T first_argument_type; + typedef T second_argument_type; - template - struct owner_less >: - public detail::generic_owner_less, shared_ptr > - {}; + template bool operator()( U const & u, V const & v ) const + { + return u.owner_before( v ); + } +}; } // namespace boost -#endif // #ifndef BOOST_SMART_PTR_OWNER_LESS_HPP_INCLUDED +#endif // #ifndef BOOST_SMART_PTR_OWNER_LESS_HPP_INCLUDED \ No newline at end of file diff --git a/bundled/boost-1.62.0/include/boost/typeof/std/functional.hpp b/bundled/boost-1.62.0/include/boost/typeof/std/functional.hpp index f1b157764e..043a2ba27a 100644 --- a/bundled/boost-1.62.0/include/boost/typeof/std/functional.hpp +++ b/bundled/boost-1.62.0/include/boost/typeof/std/functional.hpp @@ -10,8 +10,10 @@ #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() +#ifndef BOOST_NO_CXX98_FUNCTION_BASE BOOST_TYPEOF_REGISTER_TEMPLATE(std::unary_function, 2) BOOST_TYPEOF_REGISTER_TEMPLATE(std::binary_function, 3) +#endif//BOOST_NO_CXX98_FUNCTION_BASE BOOST_TYPEOF_REGISTER_TEMPLATE(std::plus, 1) BOOST_TYPEOF_REGISTER_TEMPLATE(std::minus, 1) BOOST_TYPEOF_REGISTER_TEMPLATE(std::multiplies, 1) diff --git a/bundled/boost-1.62.0/include/boost/utility/compare_pointees.hpp b/bundled/boost-1.62.0/include/boost/utility/compare_pointees.hpp index 7e2515c6ee..7914370f1f 100644 --- a/bundled/boost-1.62.0/include/boost/utility/compare_pointees.hpp +++ b/bundled/boost-1.62.0/include/boost/utility/compare_pointees.hpp @@ -33,14 +33,17 @@ bool equal_pointees ( OptionalPointee const& x, OptionalPointee const& y ) } template -struct equal_pointees_t : std::binary_function +struct equal_pointees_t { + typedef bool result_type; + typedef OptionalPointee first_argument_type; + typedef OptionalPointee second_argument_type; + bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const { return equal_pointees(x,y) ; } } ; // template bool less_pointees(OP const& x, OP const& y); -// template struct less_pointees_t; // // Being OP a model of OptionalPointee (either a pointer or an optional): // @@ -56,8 +59,12 @@ bool less_pointees ( OptionalPointee const& x, OptionalPointee const& y ) } template -struct less_pointees_t : std::binary_function +struct less_pointees_t { + typedef bool result_type; + typedef OptionalPointee first_argument_type; + typedef OptionalPointee second_argument_type; + bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const { return less_pointees(x,y) ; } } ;