]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix compiling bundled boost with MSVC and C++17 7807/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 13 Mar 2019 16:25:57 +0000 (17:25 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 13 Mar 2019 23:02:38 +0000 (00:02 +0100)
22 files changed:
bundled/boost-1.62.0/include/boost/algorithm/cxx14/equal.hpp
bundled/boost-1.62.0/include/boost/algorithm/string/detail/case_conv.hpp
bundled/boost-1.62.0/include/boost/algorithm/string/detail/util.hpp
bundled/boost-1.62.0/include/boost/config/stdlib/dinkumware.hpp
bundled/boost-1.62.0/include/boost/function/function_template.hpp
bundled/boost-1.62.0/include/boost/functional.hpp
bundled/boost-1.62.0/include/boost/functional/hash/extensions.hpp
bundled/boost-1.62.0/include/boost/functional/hash/hash.hpp
bundled/boost-1.62.0/include/boost/graph/astar_search.hpp
bundled/boost-1.62.0/include/boost/graph/detail/geodesic.hpp
bundled/boost-1.62.0/include/boost/graph/distributed/crauser_et_al_shortest_paths.hpp
bundled/boost-1.62.0/include/boost/graph/parallel/algorithm.hpp
bundled/boost-1.62.0/include/boost/graph/transitive_closure.hpp
bundled/boost-1.62.0/include/boost/iostreams/chain.hpp
bundled/boost-1.62.0/include/boost/numeric/conversion/detail/converter.hpp
bundled/boost-1.62.0/include/boost/signals2/detail/signal_template.hpp
bundled/boost-1.62.0/include/boost/signals2/detail/signals_common_macros.hpp
bundled/boost-1.62.0/include/boost/signals2/detail/slot_template.hpp
bundled/boost-1.62.0/include/boost/signals2/detail/variadic_arg_type.hpp
bundled/boost-1.62.0/include/boost/smart_ptr/owner_less.hpp
bundled/boost-1.62.0/include/boost/typeof/std/functional.hpp
bundled/boost-1.62.0/include/boost/utility/compare_pointees.hpp

index f1539f885cee76bfe13f43a55d80dac875c9b4d8..9f97be1d626d28b3c57f61d61dd2d3ef2ed33d6a 100644 (file)
@@ -13,7 +13,6 @@
 #define BOOST_ALGORITHM_EQUAL_HPP
 
 #include <algorithm>    // for std::equal
-#include <functional>   // for std::binary_function
 #include <iterator>
 
 namespace boost { namespace algorithm {
@@ -21,7 +20,7 @@ namespace boost { namespace algorithm {
 namespace detail {
 
     template <class T1, class T2>
-    struct eq : public std::binary_function<T1, T2, bool> {
+    struct eq {
         bool operator () ( const T1& v1, const T2& v2 ) const { return v1 == v2 ;}
         };
     
index 42621c74f06e78fc89e2527a72d967a3ed48b8a3..233912ca0f201d957894dde4fde7c309e7140660 100644 (file)
@@ -30,8 +30,10 @@ namespace boost {
 
             // a tolower functor
             template<typename CharT>
-            struct to_lowerF : public std::unary_function<CharT, CharT>
+            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<typename CharT>
-            struct to_upperF : public std::unary_function<CharT, CharT>
+            struct to_upperF
             {
+                typedef CharT argument_type;
+                typedef CharT result_type;
                 // Constructor
                 to_upperF( const std::locale& Loc ) : m_Loc( &Loc ) {}
 
index cf4a8b1c8cd457db73aa151586622702af941a85..7844b6723cc6154a50a3ffa232cf00f95288e0bd 100644 (file)
@@ -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<IteratorT>, SeqT >
+            struct copy_iterator_rangeF
             {
+                typedef iterator_range<IteratorT> argument_type;
+                typedef SeqT result_type;
                 SeqT operator()( const iterator_range<IteratorT>& Range ) const
                 {
                     return copy_range<SeqT>(Range);
index af8ddda528dad19c613ae599ee92ad41a0bfe423..293a17675f5c6058a637014a74d17e90bd248ce1 100644 (file)
 // 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
index 82c81d769733ab595760586d9de59a01c85e2922..7984c8323fed3ac3624ee3cbe005cc446c58910c 100644 (file)
@@ -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<T0,R>
-
-#elif BOOST_FUNCTION_NUM_ARGS == 2
-
-    , public std::binary_function<T0,T1,R>
-
-#endif
-
   {
   public:
 #ifndef BOOST_NO_VOID_RETURNS
index b618485c102e1bd49dc400e2ff293a8fbd424411..731e4e1f1c97599d8d85e6f46a3b2f17116fb56a 100644 (file)
 
 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 <typename Arg1, typename Result>
+            struct unary_function
+            {
+                typedef Arg1 argument_type;
+                typedef Result result_type;
+            };
+
+            template <typename Arg1, typename Arg2, typename Result>
+            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 Predicate>
     class unary_negate
-        : public std::unary_function<typename unary_traits<Predicate>::argument_type,bool>
+        : public boost::functional::detail::unary_function<typename unary_traits<Predicate>::argument_type,bool>
     {
       public:
         explicit unary_negate(typename unary_traits<Predicate>::param_type x)
@@ -181,7 +211,7 @@ namespace boost
     // --------------------------------------------------------------------------
     template <class Predicate>
     class binary_negate
-        : public std::binary_function<typename binary_traits<Predicate>::first_argument_type,
+        : public boost::functional::detail::binary_function<typename binary_traits<Predicate>::first_argument_type,
                                       typename binary_traits<Predicate>::second_argument_type,
                                       bool>
     {
@@ -218,7 +248,7 @@ namespace boost
     // --------------------------------------------------------------------------
     template <class Operation>
     class binder1st
-        : public std::unary_function<typename binary_traits<Operation>::second_argument_type,
+        : public boost::functional::detail::unary_function<typename binary_traits<Operation>::second_argument_type,
                                      typename binary_traits<Operation>::result_type>
     {       
       public:
@@ -264,7 +294,7 @@ namespace boost
     // --------------------------------------------------------------------------
     template <class Operation>
     class binder2nd
-        : public std::unary_function<typename binary_traits<Operation>::first_argument_type,
+        : public boost::functional::detail::unary_function<typename binary_traits<Operation>::first_argument_type,
                                      typename binary_traits<Operation>::result_type>
     {
       public:
@@ -309,7 +339,7 @@ namespace boost
     // mem_fun, etc
     // --------------------------------------------------------------------------
     template <class S, class T>
-    class mem_fun_t : public std::unary_function<T*, S>
+    class mem_fun_t : public boost::functional::detail::unary_function<T*, S>
     {
       public:
         explicit mem_fun_t(S (T::*p)())
@@ -325,7 +355,7 @@ namespace boost
     };
 
     template <class S, class T, class A>
-    class mem_fun1_t : public std::binary_function<T*, A, S>
+    class mem_fun1_t : public boost::functional::detail::binary_function<T*, A, S>
     {
       public:   
         explicit mem_fun1_t(S (T::*p)(A))
@@ -341,7 +371,7 @@ namespace boost
     };
 
     template <class S, class T>
-    class const_mem_fun_t : public std::unary_function<const T*, S>
+    class const_mem_fun_t : public boost::functional::detail::unary_function<const T*, S>
     {
       public:
         explicit const_mem_fun_t(S (T::*p)() const)
@@ -357,7 +387,7 @@ namespace boost
     };
 
     template <class S, class T, class A>
-    class const_mem_fun1_t : public std::binary_function<const T*, A, S>
+    class const_mem_fun1_t : public boost::functional::detail::binary_function<const T*, A, S>
     {
       public:
         explicit const_mem_fun1_t(S (T::*p)(A) const)
@@ -402,7 +432,7 @@ namespace boost
     // mem_fun_ref, etc
     // --------------------------------------------------------------------------
     template <class S, class T>
-    class mem_fun_ref_t : public std::unary_function<T&, S>
+    class mem_fun_ref_t : public boost::functional::detail::unary_function<T&, S>
     {
       public:
         explicit mem_fun_ref_t(S (T::*p)())
@@ -418,7 +448,7 @@ namespace boost
     };
 
     template <class S, class T, class A>
-    class mem_fun1_ref_t : public std::binary_function<T&, A, S>
+    class mem_fun1_ref_t : public boost::functional::detail::binary_function<T&, A, S>
     {
       public:
         explicit mem_fun1_ref_t(S (T::*p)(A))
@@ -434,7 +464,7 @@ namespace boost
     };
     
     template <class S, class T>
-    class const_mem_fun_ref_t : public std::unary_function<const T&, S>
+    class const_mem_fun_ref_t : public boost::functional::detail::unary_function<const T&, S>
     {
       public:
         explicit const_mem_fun_ref_t(S (T::*p)() const)
@@ -451,7 +481,7 @@ namespace boost
     };
 
     template <class S, class T, class A>
-    class const_mem_fun1_ref_t : public std::binary_function<const T&, A, S>
+    class const_mem_fun1_ref_t : public boost::functional::detail::binary_function<const T&, A, S>
     {
       public:
         explicit const_mem_fun1_ref_t(S (T::*p)(A) const)
@@ -497,7 +527,7 @@ namespace boost
     // ptr_fun
     // --------------------------------------------------------------------------
     template <class Arg, class Result>
-    class pointer_to_unary_function : public std::unary_function<Arg,Result>
+    class pointer_to_unary_function : public boost::functional::detail::unary_function<Arg,Result>
     {
       public:
         explicit pointer_to_unary_function(Result (*f)(Arg))
@@ -521,7 +551,7 @@ namespace boost
     }
 
     template <class Arg1, class Arg2, class Result>
-    class pointer_to_binary_function : public std::binary_function<Arg1,Arg2,Result>
+    class pointer_to_binary_function : public boost::functional::detail::binary_function<Arg1,Arg2,Result>
     {
       public:
         explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2))
index eafaefe85dcee8af62cf3d62f406efa5b6f3ea41..9f8fe4d65da1dbad8b432854e8767962cafde290 100644 (file)
@@ -254,8 +254,9 @@ namespace boost
 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
 
     template <class T> struct hash
-        : std::unary_function<T, std::size_t>
     {
+        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 <class T, unsigned int n> struct hash<T[n]>
-        : std::unary_function<T[n], std::size_t>
     {
+        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 <class T>
             struct inner
-                : std::unary_function<T, std::size_t>
             {
+                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
                 {
index 0a8ceeb4742e2553a266779398ef0e5a426ec08d..56941c964116ac55a57f4e151faad7bee1477b4c 100644 (file)
@@ -419,8 +419,9 @@ namespace boost
 
 #define BOOST_HASH_SPECIALIZE(type) \
     template <> struct hash<type> \
-         : public std::unary_function<type, std::size_t> \
     { \
+        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<type> \
-         : public std::unary_function<type, std::size_t> \
     { \
+        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 <class T>
     struct hash<T*>
-        : public std::unary_function<T*, std::size_t>
     {
+        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 <class T>
             struct inner
-                : public std::unary_function<T, std::size_t>
             {
+                typedef T argument_type;
+                typedef std::size_t result_type;
                 std::size_t operator()(T val) const
                 {
 #if !BOOST_WORKAROUND(__SUNPRO_CC, <= 590)
index 435ccf03b53a9d4857e952fa19bbd0c7474f0b59..95795f27c2d37968aebd4c4267643d9abb88a2d0 100644 (file)
@@ -46,11 +46,12 @@ namespace boost {
 
 
   template <class Graph, class CostType>
-  class astar_heuristic : public std::unary_function<
-    typename graph_traits<Graph>::vertex_descriptor, CostType>
+  class astar_heuristic
   {
   public:
     typedef typename graph_traits<Graph>::vertex_descriptor Vertex;
+    typedef Vertex argument_type;
+    typedef CostType result_type;
     astar_heuristic() {}
     CostType operator()(Vertex u) { return static_cast<CostType>(0); }
   };
index adcb17f0ae642f5886312dc68d282ab5d046ea38..0f2f2024fa2a0ca86c321f0667405b40c0835a06 100644 (file)
@@ -82,8 +82,11 @@ namespace detail {
     // Similar to std::plus<T>, but maximizes parameters
     // rather than adding them.
     template <typename T>
-    struct maximize : public std::binary_function<T, T, T>
+    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 <typename T>
-    struct reciprocal : public std::unary_function<T, T>
+    struct reciprocal
     {
-        typedef std::unary_function<T, T> 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; }
     };
index 060cbf9cabe937a1457929607b7d5707d948a243..70090ce4cfbe8255fcc19e06d277b3b7809b2701 100644 (file)
@@ -95,8 +95,10 @@ namespace detail {
   template<typename Vertex, typename DistanceMap, typename MinInWeightMap,
            typename Combine, typename Compare>
   struct min_in_distance_compare
-    : std::binary_function<Vertex, Vertex, bool>
   {
+    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<typename Vertex, typename DistanceMap, typename MinOutWeightMap,
            typename Combine, typename Compare>
-  struct min_out_distance_compare
-    : std::binary_function<Vertex, Vertex, bool>
+  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),
index eed9bf8769a07b1f23e42a0f135fb69b0be862f6..21ad7cc29588e430468f60831c13d3867379a6ec 100644 (file)
@@ -26,20 +26,29 @@ namespace boost { namespace parallel {
   };
 
   template<typename T>
-  struct minimum : std::binary_function<T, T, T>
+  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<typename T>
-  struct maximum : std::binary_function<T, T, T>
+  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<typename T>
-  struct sum : std::binary_function<T, T, T>
+  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; }
   };
 
index 4f81349bf2e1bdf4c36c308ed938c684e7fef938..c8c1629f455a70f2a738305f565509ccb940cc26 100644 (file)
@@ -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)
index bc0fab58ea128e5ce37232f8fe7140acb7feaf4e..78434f393aed40bca63167d84a7d4c900787b29b 100644 (file)
@@ -14,7 +14,6 @@
 
 #include <boost/assert.hpp>
 #include <exception>
-#include <functional>                           // unary_function.
 #include <iterator>                             // advance.
 #include <list>
 #include <memory>                               // 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<streambuf_type*, void>  {
+    struct closer {
+        typedef streambuf_type* argument_type;
+        typedef void result_type;
         closer(BOOST_IOS::openmode m) : mode_(m) { }
         void operator() (streambuf_type* b)
         {
index 10550f8daaed70a3c6a5acda30a7884635e5fdf0..2884e84e8d8afcc15f872611d7f5f78227fcd78c 100644 (file)
@@ -450,10 +450,7 @@ namespace boost { namespace numeric { namespace convdetail
   // Trivial Converter : used when (cv-unqualified) T == (cv-unqualified)  S
   //
   template<class Traits>
-  struct trivial_converter_impl : public std::unary_function<  BOOST_DEDUCED_TYPENAME Traits::argument_type
-                                                              ,BOOST_DEDUCED_TYPENAME Traits::result_type
-                                                            >
-                                 ,public dummy_range_checker<Traits>
+  struct trivial_converter_impl : public dummy_range_checker<Traits>
   {
     typedef Traits traits ;
 
@@ -471,10 +468,7 @@ namespace boost { namespace numeric { namespace convdetail
   // Rounding Converter : used for float to integral conversions.
   //
   template<class Traits,class RangeChecker,class RawConverter,class Float2IntRounder>
-  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<class Traits,class RangeChecker,class RawConverter>
-  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 ;
index fb7591bbc14cdd0432a50579224798ff4ffe7c0b..fa19499d871ea94e4f11e2bd7bf7fa8927860681 100644 (file)
@@ -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<typename Combiner::result_type>::type)
     {
       typedef detail::BOOST_SIGNALS2_SIGNAL_IMPL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)
         <BOOST_SIGNALS2_SIGNAL_TEMPLATE_INSTANTIATION> impl_class;
index 4ca4403827505fd6ac37086602e233dd79020f03..acc09362814d6ec0097d6ad32161d0d488bab7cf 100644 (file)
 #define BOOST_SIGNALS2_SIGNAL_TEMPLATE_SPECIALIZATION_DECL(arity) BOOST_SIGNALS2_SIGNAL_TEMPLATE_DECL(arity)
 #define BOOST_SIGNALS2_SIGNAL_TEMPLATE_SPECIALIZATION
 
-#define BOOST_SIGNALS2_STD_FUNCTIONAL_BASE(result_type) std_functional_base
+#define BOOST_SIGNALS2_STD_FUNCTIONAL_BASE std_functional_base
 
 #define BOOST_SIGNALS2_PP_COMMA_IF(arity) BOOST_PP_COMMA_IF(arity)
 
   ExtendedSlotFunction, \
   Mutex>
 
-#define BOOST_SIGNALS2_STD_FUNCTIONAL_BASE(result_type) \
-  std_functional_base<result_type , Args...>
+#define BOOST_SIGNALS2_STD_FUNCTIONAL_BASE \
+  std_functional_base<Args...>
 
 #define BOOST_SIGNALS2_PP_COMMA_IF(arity) ,
 
index fc19f5139cc45537889cd9940007d9fd7476c25e..1c17c5b76affcefa7f45e67de8b75913edf3c431 100644 (file)
@@ -35,7 +35,7 @@ namespace boost
 
     template<BOOST_SIGNALS2_SLOT_TEMPLATE_SPECIALIZATION_DECL(BOOST_SIGNALS2_NUM_ARGS)>
       class BOOST_SIGNALS2_SLOT_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS) BOOST_SIGNALS2_SLOT_TEMPLATE_SPECIALIZATION
-      : public slot_base, public detail::BOOST_SIGNALS2_STD_FUNCTIONAL_BASE(R)
+      : public slot_base, public detail::BOOST_SIGNALS2_STD_FUNCTIONAL_BASE
 
     {
     public:
index 14d54b2e3ed279b5a3a0db393d2f2e62db2d4edf..db9e81c2f3d6e513f8536c5c90418425e71d77ca 100644 (file)
@@ -32,15 +32,20 @@ namespace boost
         typedef typename variadic_arg_type<n - 1, Args...>::type type;
       };
 
-      template <typename R, typename ... Args>
+      template <typename ... Args>
         struct std_functional_base
       {};
-      template <typename R, typename T1>
-        struct std_functional_base<R, T1>: public std::unary_function<T1, R>
-      {};
-      template <typename R, typename T1, typename T2>
-        struct std_functional_base<R, T1, T2>: public std::binary_function<T1, T2, R>
-      {};
+      template <typename T1>
+           struct std_functional_base<T1>
+      {
+        typedef T1 argument_type;
+      };
+      template <typename T1, typename T2>
+        struct std_functional_base<T1, T2>
+      {
+        typedef T1 first_argument_type;
+        typedef T2 second_argument_type;
+      };
     } // namespace detail
   } // namespace signals2
 } // namespace boost
index 6899325bd61e6ee7e5bf0315fd9bb9623fb37f43..88c3c226d0b97d8d3d5146e4cdbed810b91edba4 100644 (file)
@@ -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 <functional>
-
 namespace boost
 {
-  template<typename T> class shared_ptr;
-  template<typename T> class weak_ptr;
-
-  namespace detail
-  {
-    template<typename T, typename U>
-      struct generic_owner_less : public std::binary_function<T, T, bool>
-    {
-      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<typename T> struct owner_less;
-
-  template<typename T>
-    struct owner_less<shared_ptr<T> >:
-    public detail::generic_owner_less<shared_ptr<T>, weak_ptr<T> >
-  {};
+template<class T = void> struct owner_less
+{
+    typedef bool result_type;
+    typedef T first_argument_type;
+    typedef T second_argument_type;
 
-  template<typename T>
-    struct owner_less<weak_ptr<T> >:
-    public detail::generic_owner_less<weak_ptr<T>, shared_ptr<T> >
-  {};
+    template<class U, class V> 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
index f1b157764e4ea69a84d82a9eae5e1d4ff82e9bfc..043a2ba27a0882c1b20cbdf4112550ca5183a3b0 100644 (file)
 
 #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)
index 7e2515c6eea20cb07f34a72dcbff6efe5bee7ec1..7914370f1fade6f08e46740ee365c88dfc651540 100644 (file)
@@ -33,14 +33,17 @@ bool equal_pointees ( OptionalPointee const& x, OptionalPointee const& y )
 }
 
 template<class OptionalPointee>
-struct equal_pointees_t : std::binary_function<OptionalPointee,OptionalPointee,bool>
+struct equal_pointees_t
 {
+  typedef bool result_type;
+  typedef OptionalPointee first_argument_type;
+  typedef OptionalPointee second_argument_type;
+
   bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const
     { return equal_pointees(x,y) ; }
 } ;
 
 // template<class OP> bool less_pointees(OP const& x, OP const& y);
-// template<class OP> 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<class OptionalPointee>
-struct less_pointees_t : std::binary_function<OptionalPointee,OptionalPointee,bool>
+struct less_pointees_t
 {
+  typedef bool result_type;
+  typedef OptionalPointee first_argument_type;
+  typedef OptionalPointee second_argument_type;
+
   bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const
     { return less_pointees(x,y) ; }
 } ;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.