summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-contrib <[email protected]>2024-05-15 11:32:45 +0300
committerrobot-contrib <[email protected]>2024-05-15 11:56:50 +0300
commit88df312c5a67faabad4e46a7662cf7d2970ae4e9 (patch)
treea8111ea738250ed70bb83a31d004a44ed2fd990b
parentb10957798b82d3f8946c6d773acb1b1212ec3166 (diff)
Update contrib/restricted/boost/function to 1.85.0
e0f2ba4eb69ee69baef77b3eccd7b950eb95c58a
-rw-r--r--contrib/restricted/boost/function/README.md4
-rw-r--r--contrib/restricted/boost/function/include/boost/function.hpp68
-rw-r--r--contrib/restricted/boost/function/include/boost/function/detail/epilogue.hpp39
-rw-r--r--contrib/restricted/boost/function/include/boost/function/detail/function_iterate.hpp16
-rw-r--r--contrib/restricted/boost/function/include/boost/function/detail/maybe_include.hpp369
-rw-r--r--contrib/restricted/boost/function/include/boost/function/detail/prologue.hpp27
-rw-r--r--contrib/restricted/boost/function/include/boost/function/detail/requires_cxx11.hpp22
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function0.hpp12
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function1.hpp4
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function10.hpp12
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function2.hpp4
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function3.hpp4
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function4.hpp12
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function5.hpp12
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function6.hpp12
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function7.hpp12
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function8.hpp12
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function9.hpp12
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function_base.hpp176
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function_fwd.hpp77
-rw-r--r--contrib/restricted/boost/function/include/boost/function/function_template.hpp683
-rw-r--r--contrib/restricted/boost/function/ya.make5
22 files changed, 322 insertions, 1272 deletions
diff --git a/contrib/restricted/boost/function/README.md b/contrib/restricted/boost/function/README.md
index 6b1bb443c39..8b3449cb697 100644
--- a/contrib/restricted/boost/function/README.md
+++ b/contrib/restricted/boost/function/README.md
@@ -7,9 +7,9 @@ into the C++11 standard as [`std::function`](https://en.cppreference.com/w/cpp/u
## Currently supported compilers
-* g++ 4.8 or later
+* g++ 4.7 or later
* clang++ 3.9 or later
-* Visual Studio 2005-2022
+* Visual Studio 2013-2022
Tested on [Github Actions](https://github.com/boostorg/function/actions) and [Appveyor](https://ci.appveyor.com/project/pdimov/function/).
diff --git a/contrib/restricted/boost/function/include/boost/function.hpp b/contrib/restricted/boost/function/include/boost/function.hpp
index f6ee8820acf..6fd7388bd1b 100644
--- a/contrib/restricted/boost/function/include/boost/function.hpp
+++ b/contrib/restricted/boost/function/include/boost/function.hpp
@@ -1,3 +1,6 @@
+#ifndef BOOST_FUNCTION_HPP_INCLUDED
+#define BOOST_FUNCTION_HPP_INCLUDED
+
// Boost.Function library
// Copyright Douglas Gregor 2001-2003. Use, modification and
@@ -10,67 +13,6 @@
// William Kempf, Jesse Jones and Karl Nelson were all very helpful in the
// design of this library.
-#ifndef BOOST_FUNCTION_MAX_ARGS
-# define BOOST_FUNCTION_MAX_ARGS 10
-#endif // BOOST_FUNCTION_MAX_ARGS
-
-#if !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS)
-
-#if !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED)
-#define BOOST_FUNCTION_MAX_ARGS_DEFINED 0
-#endif
-
-#include <functional> // unary_function, binary_function
-
-#include <boost/preprocessor/iterate.hpp>
-#include <boost/config/workaround.hpp>
-
-// Include the prologue here so that the use of file-level iteration
-// in anything that may be included by function_template.hpp doesn't break
-#include <boost/function/detail/prologue.hpp>
-
-// Older Visual Age C++ version do not handle the file iteration well
-#if BOOST_WORKAROUND(__IBMCPP__, >= 500) && BOOST_WORKAROUND(__IBMCPP__, < 800)
-# if BOOST_FUNCTION_MAX_ARGS >= 0
-# include <boost/function/function0.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 1
-# include <boost/function/function1.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 2
-# include <boost/function/function2.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 3
-# include <boost/function/function3.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 4
-# include <boost/function/function4.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 5
-# include <boost/function/function5.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 6
-# include <boost/function/function6.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 7
-# include <boost/function/function7.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 8
-# include <boost/function/function8.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 9
-# include <boost/function/function9.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 10
-# include <boost/function/function10.hpp>
-# endif
-#else
-// What is the '3' for?
-# define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_FUNCTION_MAX_ARGS,<boost/function/detail/function_iterate.hpp>))
-# include BOOST_PP_ITERATE()
-# undef BOOST_PP_ITERATION_PARAMS_1
-#endif
-
-#include <boost/function/detail/epilogue.hpp>
+#include <boost/function/function_template.hpp>
-#endif // !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS)
+#endif // #ifndef BOOST_FUNCTION_HPP_INCLUDED
diff --git a/contrib/restricted/boost/function/include/boost/function/detail/epilogue.hpp b/contrib/restricted/boost/function/include/boost/function/detail/epilogue.hpp
deleted file mode 100644
index 908788bcd1b..00000000000
--- a/contrib/restricted/boost/function/include/boost/function/detail/epilogue.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// Boost.Function library
-
-#ifndef BOOST_FUNCTION_EPILOGUE_HPP
-#define BOOST_FUNCTION_EPILOGUE_HPP
-
-// Copyright 2023 Peter Dimov
-// Distributed under the Boost Software License, Version 1.0.
-// https://www.boost.org/LICENSE_1_0.txt
-
-// Resolve C++20 issue with fn == bind(...)
-// https://github.com/boostorg/function/issues/45
-
-#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
-
-namespace boost
-{
-
-namespace _bi
-{
-
-template<class R, class F, class L> class bind_t;
-
-} // namespace _bi
-
-template<class S, class R, class F, class L> bool operator==( function<S> const& f, _bi::bind_t<R, F, L> const& b )
-{
- return f.contains( b );
-}
-
-template<class S, class R, class F, class L> bool operator!=( function<S> const& f, _bi::bind_t<R, F, L> const& b )
-{
- return !f.contains( b );
-}
-
-} // namespace boost
-
-#endif // #if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
-
-#endif // #ifndef BOOST_FUNCTION_EPILOGUE_HPP
diff --git a/contrib/restricted/boost/function/include/boost/function/detail/function_iterate.hpp b/contrib/restricted/boost/function/include/boost/function/detail/function_iterate.hpp
deleted file mode 100644
index 5370b36aac5..00000000000
--- a/contrib/restricted/boost/function/include/boost/function/detail/function_iterate.hpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// Boost.Function library
-
-// Copyright Douglas Gregor 2003. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-#if !defined(BOOST_PP_IS_ITERATING)
-# error Boost.Function - do not include this file!
-#endif
-
-#define BOOST_FUNCTION_NUM_ARGS BOOST_PP_ITERATION()
-#include <boost/function/detail/maybe_include.hpp>
-#undef BOOST_FUNCTION_NUM_ARGS
-
diff --git a/contrib/restricted/boost/function/include/boost/function/detail/maybe_include.hpp b/contrib/restricted/boost/function/include/boost/function/detail/maybe_include.hpp
deleted file mode 100644
index ec88905dcd9..00000000000
--- a/contrib/restricted/boost/function/include/boost/function/detail/maybe_include.hpp
+++ /dev/null
@@ -1,369 +0,0 @@
-// Boost.Function library
-
-// Copyright Douglas Gregor 2003. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-
-#if BOOST_FUNCTION_NUM_ARGS == 0
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 0
-# ifndef BOOST_FUNCTION_0
-# define BOOST_FUNCTION_0
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 1
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 1
-# ifndef BOOST_FUNCTION_1
-# define BOOST_FUNCTION_1
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 2
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 2
-# ifndef BOOST_FUNCTION_2
-# define BOOST_FUNCTION_2
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 3
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 3
-# ifndef BOOST_FUNCTION_3
-# define BOOST_FUNCTION_3
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 4
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 4
-# ifndef BOOST_FUNCTION_4
-# define BOOST_FUNCTION_4
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 5
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 5
-# ifndef BOOST_FUNCTION_5
-# define BOOST_FUNCTION_5
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 6
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 6
-# ifndef BOOST_FUNCTION_6
-# define BOOST_FUNCTION_6
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 7
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 7
-# ifndef BOOST_FUNCTION_7
-# define BOOST_FUNCTION_7
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 8
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 8
-# ifndef BOOST_FUNCTION_8
-# define BOOST_FUNCTION_8
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 9
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 9
-# ifndef BOOST_FUNCTION_9
-# define BOOST_FUNCTION_9
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 10
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 10
-# ifndef BOOST_FUNCTION_10
-# define BOOST_FUNCTION_10
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 11
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 11
-# ifndef BOOST_FUNCTION_11
-# define BOOST_FUNCTION_11
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 12
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 12
-# ifndef BOOST_FUNCTION_12
-# define BOOST_FUNCTION_12
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 13
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 13
-# ifndef BOOST_FUNCTION_13
-# define BOOST_FUNCTION_13
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 14
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 14
-# ifndef BOOST_FUNCTION_14
-# define BOOST_FUNCTION_14
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 15
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 15
-# ifndef BOOST_FUNCTION_15
-# define BOOST_FUNCTION_15
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 16
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 16
-# ifndef BOOST_FUNCTION_16
-# define BOOST_FUNCTION_16
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 17
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 17
-# ifndef BOOST_FUNCTION_17
-# define BOOST_FUNCTION_17
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 18
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 18
-# ifndef BOOST_FUNCTION_18
-# define BOOST_FUNCTION_18
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 19
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 19
-# ifndef BOOST_FUNCTION_19
-# define BOOST_FUNCTION_19
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 20
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 20
-# ifndef BOOST_FUNCTION_20
-# define BOOST_FUNCTION_20
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 21
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 21
-# ifndef BOOST_FUNCTION_21
-# define BOOST_FUNCTION_21
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 22
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 22
-# ifndef BOOST_FUNCTION_22
-# define BOOST_FUNCTION_22
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 23
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 23
-# ifndef BOOST_FUNCTION_23
-# define BOOST_FUNCTION_23
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 24
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 24
-# ifndef BOOST_FUNCTION_24
-# define BOOST_FUNCTION_24
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 25
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 25
-# ifndef BOOST_FUNCTION_25
-# define BOOST_FUNCTION_25
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 26
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 26
-# ifndef BOOST_FUNCTION_26
-# define BOOST_FUNCTION_26
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 27
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 27
-# ifndef BOOST_FUNCTION_27
-# define BOOST_FUNCTION_27
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 28
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 28
-# ifndef BOOST_FUNCTION_28
-# define BOOST_FUNCTION_28
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 29
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 29
-# ifndef BOOST_FUNCTION_29
-# define BOOST_FUNCTION_29
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 30
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 30
-# ifndef BOOST_FUNCTION_30
-# define BOOST_FUNCTION_30
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 31
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 31
-# ifndef BOOST_FUNCTION_31
-# define BOOST_FUNCTION_31
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 32
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 32
-# ifndef BOOST_FUNCTION_32
-# define BOOST_FUNCTION_32
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 33
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 33
-# ifndef BOOST_FUNCTION_33
-# define BOOST_FUNCTION_33
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 34
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 34
-# ifndef BOOST_FUNCTION_34
-# define BOOST_FUNCTION_34
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 35
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 35
-# ifndef BOOST_FUNCTION_35
-# define BOOST_FUNCTION_35
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 36
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 36
-# ifndef BOOST_FUNCTION_36
-# define BOOST_FUNCTION_36
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 37
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 37
-# ifndef BOOST_FUNCTION_37
-# define BOOST_FUNCTION_37
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 38
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 38
-# ifndef BOOST_FUNCTION_38
-# define BOOST_FUNCTION_38
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 39
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 39
-# ifndef BOOST_FUNCTION_39
-# define BOOST_FUNCTION_39
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 40
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 40
-# ifndef BOOST_FUNCTION_40
-# define BOOST_FUNCTION_40
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 41
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 41
-# ifndef BOOST_FUNCTION_41
-# define BOOST_FUNCTION_41
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 42
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 42
-# ifndef BOOST_FUNCTION_42
-# define BOOST_FUNCTION_42
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 43
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 43
-# ifndef BOOST_FUNCTION_43
-# define BOOST_FUNCTION_43
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 44
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 44
-# ifndef BOOST_FUNCTION_44
-# define BOOST_FUNCTION_44
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 45
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 45
-# ifndef BOOST_FUNCTION_45
-# define BOOST_FUNCTION_45
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 46
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 46
-# ifndef BOOST_FUNCTION_46
-# define BOOST_FUNCTION_46
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 47
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 47
-# ifndef BOOST_FUNCTION_47
-# define BOOST_FUNCTION_47
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 48
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 48
-# ifndef BOOST_FUNCTION_48
-# define BOOST_FUNCTION_48
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 49
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 49
-# ifndef BOOST_FUNCTION_49
-# define BOOST_FUNCTION_49
-# include <boost/function/function_template.hpp>
-# endif
-#elif BOOST_FUNCTION_NUM_ARGS == 50
-# undef BOOST_FUNCTION_MAX_ARGS_DEFINED
-# define BOOST_FUNCTION_MAX_ARGS_DEFINED 50
-# ifndef BOOST_FUNCTION_50
-# define BOOST_FUNCTION_50
-# include <boost/function/function_template.hpp>
-# endif
-#else
-# error Cannot handle Boost.Function objects that accept more than 50 arguments!
-#endif
diff --git a/contrib/restricted/boost/function/include/boost/function/detail/prologue.hpp b/contrib/restricted/boost/function/include/boost/function/detail/prologue.hpp
deleted file mode 100644
index 2edebe06137..00000000000
--- a/contrib/restricted/boost/function/include/boost/function/detail/prologue.hpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// Boost.Function library
-
-// Copyright Douglas Gregor 2002-2003. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-
-#ifndef BOOST_FUNCTION_PROLOGUE_HPP
-#define BOOST_FUNCTION_PROLOGUE_HPP
-# include <boost/function/detail/requires_cxx11.hpp>
-# include <cassert>
-# include <algorithm>
-# include <boost/config/no_tr1/functional.hpp> // unary_function, binary_function
-# include <boost/throw_exception.hpp>
-# include <boost/config.hpp>
-# include <boost/function/function_base.hpp>
-# include <boost/mem_fn.hpp>
-# include <boost/type_traits/is_integral.hpp>
-# include <boost/preprocessor/enum.hpp>
-# include <boost/preprocessor/enum_params.hpp>
-# include <boost/preprocessor/cat.hpp>
-# include <boost/preprocessor/repeat.hpp>
-# include <boost/preprocessor/inc.hpp>
-# include <boost/type_traits/is_void.hpp>
-#endif // BOOST_FUNCTION_PROLOGUE_HPP
diff --git a/contrib/restricted/boost/function/include/boost/function/detail/requires_cxx11.hpp b/contrib/restricted/boost/function/include/boost/function/detail/requires_cxx11.hpp
deleted file mode 100644
index 8ed947c95e6..00000000000
--- a/contrib/restricted/boost/function/include/boost/function/detail/requires_cxx11.hpp
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef BOOST_FUNCTION_DETAIL_REQUIRES_CXX11_HPP_INCLUDED
-#define BOOST_FUNCTION_DETAIL_REQUIRES_CXX11_HPP_INCLUDED
-
-// Copyright 2023 Peter Dimov
-// Distributed under the Boost Software License, Version 1.0.
-// https://www.boost.org/LICENSE_1_0.txt
-
-#include <boost/config.hpp>
-#include <boost/config/pragma_message.hpp>
-
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \
- defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
- defined(BOOST_NO_CXX11_DECLTYPE) || \
- defined(BOOST_NO_CXX11_CONSTEXPR) || \
- defined(BOOST_NO_CXX11_NOEXCEPT) || \
- defined(BOOST_NO_CXX11_HDR_FUNCTIONAL)
-
-BOOST_PRAGMA_MESSAGE("C++03 support was deprecated in Boost.Function 1.82 and will be removed in Boost.Function 1.85.")
-
-#endif
-
-#endif // #ifndef BOOST_FUNCTION_DETAIL_REQUIRES_CXX11_HPP_INCLUDED
diff --git a/contrib/restricted/boost/function/include/boost/function/function0.hpp b/contrib/restricted/boost/function/include/boost/function/function0.hpp
deleted file mode 100644
index 65a02e5facb..00000000000
--- a/contrib/restricted/boost/function/include/boost/function/function0.hpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// Boost.Function library
-
-// Copyright Douglas Gregor 2002-2003. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-
-#define BOOST_FUNCTION_NUM_ARGS 0
-#include <boost/function/detail/maybe_include.hpp>
-#undef BOOST_FUNCTION_NUM_ARGS
diff --git a/contrib/restricted/boost/function/include/boost/function/function1.hpp b/contrib/restricted/boost/function/include/boost/function/function1.hpp
index 9089715155c..b0275b26cef 100644
--- a/contrib/restricted/boost/function/include/boost/function/function1.hpp
+++ b/contrib/restricted/boost/function/include/boost/function/function1.hpp
@@ -7,6 +7,4 @@
// For more information, see http://www.boost.org
-#define BOOST_FUNCTION_NUM_ARGS 1
-#include <boost/function/detail/maybe_include.hpp>
-#undef BOOST_FUNCTION_NUM_ARGS
+#include <boost/function/function_template.hpp>
diff --git a/contrib/restricted/boost/function/include/boost/function/function10.hpp b/contrib/restricted/boost/function/include/boost/function/function10.hpp
deleted file mode 100644
index 65627248496..00000000000
--- a/contrib/restricted/boost/function/include/boost/function/function10.hpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// Boost.Function library
-
-// Copyright Douglas Gregor 2002-2003. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-
-#define BOOST_FUNCTION_NUM_ARGS 10
-#include <boost/function/detail/maybe_include.hpp>
-#undef BOOST_FUNCTION_NUM_ARGS
diff --git a/contrib/restricted/boost/function/include/boost/function/function2.hpp b/contrib/restricted/boost/function/include/boost/function/function2.hpp
index dc8bf97521d..b0275b26cef 100644
--- a/contrib/restricted/boost/function/include/boost/function/function2.hpp
+++ b/contrib/restricted/boost/function/include/boost/function/function2.hpp
@@ -7,6 +7,4 @@
// For more information, see http://www.boost.org
-#define BOOST_FUNCTION_NUM_ARGS 2
-#include <boost/function/detail/maybe_include.hpp>
-#undef BOOST_FUNCTION_NUM_ARGS
+#include <boost/function/function_template.hpp>
diff --git a/contrib/restricted/boost/function/include/boost/function/function3.hpp b/contrib/restricted/boost/function/include/boost/function/function3.hpp
index 19d1a49dd5a..b0275b26cef 100644
--- a/contrib/restricted/boost/function/include/boost/function/function3.hpp
+++ b/contrib/restricted/boost/function/include/boost/function/function3.hpp
@@ -7,6 +7,4 @@
// For more information, see http://www.boost.org
-#define BOOST_FUNCTION_NUM_ARGS 3
-#include <boost/function/detail/maybe_include.hpp>
-#undef BOOST_FUNCTION_NUM_ARGS
+#include <boost/function/function_template.hpp>
diff --git a/contrib/restricted/boost/function/include/boost/function/function4.hpp b/contrib/restricted/boost/function/include/boost/function/function4.hpp
deleted file mode 100644
index f3349e2dc97..00000000000
--- a/contrib/restricted/boost/function/include/boost/function/function4.hpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// Boost.Function library
-
-// Copyright Douglas Gregor 2002-2003. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-
-#define BOOST_FUNCTION_NUM_ARGS 4
-#include <boost/function/detail/maybe_include.hpp>
-#undef BOOST_FUNCTION_NUM_ARGS
diff --git a/contrib/restricted/boost/function/include/boost/function/function5.hpp b/contrib/restricted/boost/function/include/boost/function/function5.hpp
deleted file mode 100644
index a1305eb5ce2..00000000000
--- a/contrib/restricted/boost/function/include/boost/function/function5.hpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// Boost.Function library
-
-// Copyright Douglas Gregor 2002-2003. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-
-#define BOOST_FUNCTION_NUM_ARGS 5
-#include <boost/function/detail/maybe_include.hpp>
-#undef BOOST_FUNCTION_NUM_ARGS
diff --git a/contrib/restricted/boost/function/include/boost/function/function6.hpp b/contrib/restricted/boost/function/include/boost/function/function6.hpp
deleted file mode 100644
index 1f609149196..00000000000
--- a/contrib/restricted/boost/function/include/boost/function/function6.hpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// Boost.Function library
-
-// Copyright Douglas Gregor 2002-2003. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-
-#define BOOST_FUNCTION_NUM_ARGS 6
-#include <boost/function/detail/maybe_include.hpp>
-#undef BOOST_FUNCTION_NUM_ARGS
diff --git a/contrib/restricted/boost/function/include/boost/function/function7.hpp b/contrib/restricted/boost/function/include/boost/function/function7.hpp
deleted file mode 100644
index 68542ed46aa..00000000000
--- a/contrib/restricted/boost/function/include/boost/function/function7.hpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// Boost.Function library
-
-// Copyright Douglas Gregor 2002-2003. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-
-#define BOOST_FUNCTION_NUM_ARGS 7
-#include <boost/function/detail/maybe_include.hpp>
-#undef BOOST_FUNCTION_NUM_ARGS
diff --git a/contrib/restricted/boost/function/include/boost/function/function8.hpp b/contrib/restricted/boost/function/include/boost/function/function8.hpp
deleted file mode 100644
index cf2c37661f7..00000000000
--- a/contrib/restricted/boost/function/include/boost/function/function8.hpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// Boost.Function library
-
-// Copyright Douglas Gregor 2002-2003. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-
-#define BOOST_FUNCTION_NUM_ARGS 8
-#include <boost/function/detail/maybe_include.hpp>
-#undef BOOST_FUNCTION_NUM_ARGS
diff --git a/contrib/restricted/boost/function/include/boost/function/function9.hpp b/contrib/restricted/boost/function/include/boost/function/function9.hpp
deleted file mode 100644
index 590e0883d78..00000000000
--- a/contrib/restricted/boost/function/include/boost/function/function9.hpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// Boost.Function library
-
-// Copyright Douglas Gregor 2002-2003. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-
-#define BOOST_FUNCTION_NUM_ARGS 9
-#include <boost/function/detail/maybe_include.hpp>
-#undef BOOST_FUNCTION_NUM_ARGS
diff --git a/contrib/restricted/boost/function/include/boost/function/function_base.hpp b/contrib/restricted/boost/function/include/boost/function/function_base.hpp
index 00c7ce8e465..7f78e36ecab 100644
--- a/contrib/restricted/boost/function/include/boost/function/function_base.hpp
+++ b/contrib/restricted/boost/function/include/boost/function/function_base.hpp
@@ -40,11 +40,8 @@
# pragma warning( disable : 4127 ) // "conditional expression is constant"
#endif
-#if defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG)
-# define BOOST_FUNCTION_TARGET_FIX(x) x
-#else
-# define BOOST_FUNCTION_TARGET_FIX(x)
-#endif // __ICL etc
+// retained because used in a test
+#define BOOST_FUNCTION_TARGET_FIX(x)
# define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \
typename ::boost::enable_if_< \
@@ -116,30 +113,6 @@ namespace boost {
mutable char data[sizeof(function_buffer_members)];
};
- /**
- * The unusable class is a placeholder for unused function arguments
- * It is also completely unusable except that it constructable from
- * anything. This helps compilers without partial specialization to
- * handle Boost.Function objects returning void.
- */
- struct unusable
- {
- unusable() {}
- template<typename T> unusable(const T&) {}
- };
-
- /* Determine the return type. This supports compilers that do not support
- * void returns or partial specialization by silently changing the return
- * type to "unusable".
- */
- template<typename T> struct function_return_type { typedef T type; };
-
- template<>
- struct function_return_type<void>
- {
- typedef unusable type;
- };
-
// The operation type to perform on the given functor/function pointer
enum functor_manager_operation_type {
clone_functor_tag,
@@ -289,16 +262,15 @@ namespace boost {
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) {
+ if (op == clone_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);
- if (op == move_functor_tag) {
+ } else if (op == move_functor_tag) {
functor_type* f = reinterpret_cast<functor_type*>(in_buffer.data);
- (void)f; // suppress warning about the value of f not being used (MSVC)
+ new (reinterpret_cast<void*>(out_buffer.data)) functor_type(std::move(*f));
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);
@@ -440,14 +412,9 @@ namespace boost {
functor_manager_operation_type op, false_type)
{
typedef functor_wrapper<Functor,Allocator> functor_wrapper_type;
-#if defined(BOOST_NO_CXX11_ALLOCATOR)
- typedef typename Allocator::template rebind<functor_wrapper_type>::other
- wrapper_allocator_type;
- typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
-#else
+
using wrapper_allocator_type = typename std::allocator_traits<Allocator>::template rebind_alloc<functor_wrapper_type>;
using wrapper_allocator_pointer_type = typename std::allocator_traits<wrapper_allocator_type>::pointer;
-#endif
if (op == clone_functor_tag) {
// Clone the functor
@@ -457,11 +424,7 @@ namespace boost {
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);
-#if defined(BOOST_NO_CXX11_ALLOCATOR)
- wrapper_allocator.construct(copy, *f);
-#else
std::allocator_traits<wrapper_allocator_type>::construct(wrapper_allocator, copy, *f);
-#endif
// Get back to the original pointer type
functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
@@ -474,11 +437,7 @@ namespace boost {
functor_wrapper_type* victim =
static_cast<functor_wrapper_type*>(in_buffer.members.obj_ptr);
wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*victim));
-#if defined(BOOST_NO_CXX11_ALLOCATOR)
- wrapper_allocator.destroy(victim);
-#else
std::allocator_traits<wrapper_allocator_type>::destroy(wrapper_allocator, victim);
-#endif
wrapper_allocator.deallocate(victim,1);
out_buffer.members.obj_ptr = 0;
} else if (op == check_functor_type_tag) {
@@ -525,65 +484,6 @@ namespace boost {
// A type that is only used for comparisons against zero
struct useless_clear_type {};
-#ifdef BOOST_NO_SFINAE
- // These routines perform comparisons between a Boost.Function
- // object and an arbitrary function object (when the last
- // parameter is false_type) or against zero (when the
- // last parameter is true_type). They are only necessary
- // for compilers that don't support SFINAE.
- template<typename Function, typename Functor>
- bool
- compare_equal(const Function& f, const Functor&, int, true_type)
- { return f.empty(); }
-
- template<typename Function, typename Functor>
- bool
- compare_not_equal(const Function& f, const Functor&, int,
- true_type)
- { return !f.empty(); }
-
- template<typename Function, typename Functor>
- bool
- compare_equal(const Function& f, const Functor& g, long,
- false_type)
- {
- if (const Functor* fp = f.template target<Functor>())
- return function_equal(*fp, g);
- else return false;
- }
-
- template<typename Function, typename Functor>
- bool
- compare_equal(const Function& f, const reference_wrapper<Functor>& g,
- int, false_type)
- {
- if (const Functor* fp = f.template target<Functor>())
- return fp == g.get_pointer();
- else return false;
- }
-
- template<typename Function, typename Functor>
- bool
- compare_not_equal(const Function& f, const Functor& g, long,
- false_type)
- {
- if (const Functor* fp = f.template target<Functor>())
- return !function_equal(*fp, g);
- else return true;
- }
-
- template<typename Function, typename Functor>
- bool
- compare_not_equal(const Function& f,
- const reference_wrapper<Functor>& g, int,
- false_type)
- {
- if (const Functor* fp = f.template target<Functor>())
- return fp != g.get_pointer();
- else return true;
- }
-#endif // BOOST_NO_SFINAE
-
/**
* Stores the "manager" portion of the vtable for a
* boost::function object.
@@ -677,29 +577,6 @@ public:
}
}
-#if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3
- // GCC 3.3 and newer cannot copy with the global operator==, due to
- // problems with instantiation of function return types before it
- // has been verified that the argument types match up.
- template<typename Functor>
- BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
- operator==(Functor g) const
- {
- if (const Functor* fp = target<Functor>())
- return function_equal(*fp, g);
- else return false;
- }
-
- template<typename Functor>
- BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
- operator!=(Functor g) const
- {
- if (const Functor* fp = target<Functor>())
- return !function_equal(*fp, g);
- else return true;
- }
-#endif
-
public: // should be protected, but GCC 2.95.3 will fail to allow access
detail::function::vtable_base* get_vtable() const {
return reinterpret_cast<detail::function::vtable_base*>(
@@ -731,7 +608,6 @@ public:
# pragma clang diagnostic pop
#endif
-#ifndef BOOST_NO_SFINAE
inline bool operator==(const function_base& f,
detail::function::useless_clear_type*)
{
@@ -755,43 +631,10 @@ inline bool operator!=(detail::function::useless_clear_type*,
{
return !f.empty();
}
-#endif
-
-#ifdef BOOST_NO_SFINAE
-// Comparisons between boost::function objects and arbitrary function objects
-template<typename Functor>
- inline bool operator==(const function_base& f, Functor g)
- {
- typedef integral_constant<bool, (is_integral<Functor>::value)> integral;
- return detail::function::compare_equal(f, g, 0, integral());
- }
-
-template<typename Functor>
- inline bool operator==(Functor g, const function_base& f)
- {
- typedef integral_constant<bool, (is_integral<Functor>::value)> integral;
- return detail::function::compare_equal(f, g, 0, integral());
- }
-
-template<typename Functor>
- inline bool operator!=(const function_base& f, Functor g)
- {
- typedef integral_constant<bool, (is_integral<Functor>::value)> integral;
- return detail::function::compare_not_equal(f, g, 0, integral());
- }
-
-template<typename Functor>
- inline bool operator!=(Functor g, const function_base& f)
- {
- typedef integral_constant<bool, (is_integral<Functor>::value)> integral;
- return detail::function::compare_not_equal(f, g, 0, integral());
- }
-#else
-# if !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3)
// Comparisons between boost::function objects and arbitrary function
-// objects. GCC 3.3 and before has an obnoxious bug that prevents this
-// from working.
+// objects.
+
template<typename Functor>
BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
operator==(const function_base& f, Functor g)
@@ -827,7 +670,6 @@ template<typename Functor>
return !function_equal(g, *fp);
else return true;
}
-# endif
template<typename Functor>
BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
@@ -865,8 +707,6 @@ template<typename Functor>
else return true;
}
-#endif // Compiler supporting SFINAE
-
namespace detail {
namespace function {
inline bool has_empty_target(const function_base* f)
diff --git a/contrib/restricted/boost/function/include/boost/function/function_fwd.hpp b/contrib/restricted/boost/function/include/boost/function/function_fwd.hpp
index e79b504899e..fccfecc29ad 100644
--- a/contrib/restricted/boost/function/include/boost/function/function_fwd.hpp
+++ b/contrib/restricted/boost/function/include/boost/function/function_fwd.hpp
@@ -10,24 +10,9 @@
#define BOOST_FUNCTION_FWD_HPP
#include <boost/config.hpp>
-#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 && !defined(BOOST_STRICT_CONFIG)
-// Work around a compiler bug.
-// boost::python::objects::function has to be seen by the compiler before the
-// boost::function class template.
-namespace boost { namespace python { namespace objects {
- class function;
-}}}
-#endif
-
-#if defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \
- || !(defined(BOOST_STRICT_CONFIG) || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540)
-# define BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX
-#endif
-
namespace boost {
class bad_function_call;
-#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
// Preferred syntax
template<typename Signature> class function;
@@ -36,34 +21,44 @@ namespace boost {
{
f1.swap(f2);
}
-#endif // have partial specialization
// Portable syntax
- template<typename R> class function0;
- template<typename R, typename T1> class function1;
- template<typename R, typename T1, typename T2> class function2;
- template<typename R, typename T1, typename T2, typename T3> class function3;
- template<typename R, typename T1, typename T2, typename T3, typename T4>
- class function4;
- template<typename R, typename T1, typename T2, typename T3, typename T4,
- typename T5>
- class function5;
- template<typename R, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6>
- class function6;
- template<typename R, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7>
- class function7;
- template<typename R, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8>
- class function8;
- template<typename R, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8, typename T9>
- class function9;
- template<typename R, typename T1, typename T2, typename T3, typename T4,
- typename T5, typename T6, typename T7, typename T8, typename T9,
- typename T10>
- class function10;
+ template<typename R, typename... T> class function_n;
+
+ template<typename R, typename... T> using function0 = function_n<R, T...>;
+ template<typename R, typename... T> using function1 = function_n<R, T...>;
+ template<typename R, typename... T> using function2 = function_n<R, T...>;
+ template<typename R, typename... T> using function3 = function_n<R, T...>;
+ template<typename R, typename... T> using function4 = function_n<R, T...>;
+ template<typename R, typename... T> using function5 = function_n<R, T...>;
+ template<typename R, typename... T> using function6 = function_n<R, T...>;
+ template<typename R, typename... T> using function7 = function_n<R, T...>;
+ template<typename R, typename... T> using function8 = function_n<R, T...>;
+ template<typename R, typename... T> using function9 = function_n<R, T...>;
+
+ template<typename R, typename... T> using function10 = function_n<R, T...>;
+ template<typename R, typename... T> using function11 = function_n<R, T...>;
+ template<typename R, typename... T> using function12 = function_n<R, T...>;
+ template<typename R, typename... T> using function13 = function_n<R, T...>;
+ template<typename R, typename... T> using function14 = function_n<R, T...>;
+ template<typename R, typename... T> using function15 = function_n<R, T...>;
+ template<typename R, typename... T> using function16 = function_n<R, T...>;
+ template<typename R, typename... T> using function17 = function_n<R, T...>;
+ template<typename R, typename... T> using function18 = function_n<R, T...>;
+ template<typename R, typename... T> using function19 = function_n<R, T...>;
+
+ template<typename R, typename... T> using function20 = function_n<R, T...>;
+ template<typename R, typename... T> using function21 = function_n<R, T...>;
+ template<typename R, typename... T> using function22 = function_n<R, T...>;
+ template<typename R, typename... T> using function23 = function_n<R, T...>;
+ template<typename R, typename... T> using function24 = function_n<R, T...>;
+ template<typename R, typename... T> using function25 = function_n<R, T...>;
+ template<typename R, typename... T> using function26 = function_n<R, T...>;
+ template<typename R, typename... T> using function27 = function_n<R, T...>;
+ template<typename R, typename... T> using function28 = function_n<R, T...>;
+ template<typename R, typename... T> using function29 = function_n<R, T...>;
+
+ template<typename R, typename... T> using function30 = function_n<R, T...>;
}
#endif
diff --git a/contrib/restricted/boost/function/include/boost/function/function_template.hpp b/contrib/restricted/boost/function/include/boost/function/function_template.hpp
index 23814464124..ee3fc7ab4d7 100644
--- a/contrib/restricted/boost/function/include/boost/function/function_template.hpp
+++ b/contrib/restricted/boost/function/include/boost/function/function_template.hpp
@@ -1,3 +1,6 @@
+#ifndef BOOST_FUNCTION_FUNCTION_TEMPLATE_HPP_INCLUDED
+#define BOOST_FUNCTION_FUNCTION_TEMPLATE_HPP_INCLUDED
+
// Boost.Function library
// Copyright Douglas Gregor 2001-2006
@@ -8,125 +11,65 @@
// For more information, see http://www.boost.org
-// Note: this header is a header template and must NOT have multiple-inclusion
-// protection.
-#include <boost/function/detail/prologue.hpp>
+#include <boost/function/function_base.hpp>
#include <boost/core/no_exceptions_support.hpp>
+#include <boost/mem_fn.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/config.hpp>
+#include <algorithm>
+#include <cassert>
#if defined(BOOST_MSVC)
# pragma warning( push )
# pragma warning( disable : 4127 ) // "conditional expression is constant"
#endif
-#define BOOST_FUNCTION_TEMPLATE_PARMS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, typename T)
-
-#define BOOST_FUNCTION_TEMPLATE_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, T)
-
-#define BOOST_FUNCTION_PARM(J,I,D) BOOST_PP_CAT(T,I) BOOST_PP_CAT(a,I)
-
-#define BOOST_FUNCTION_PARMS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_PARM,BOOST_PP_EMPTY)
-
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
-# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, a)
-#else
-# define BOOST_FUNCTION_ARG(J,I,D) static_cast<BOOST_PP_CAT(T,I)&&>(BOOST_PP_CAT(a,I))
-# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG,BOOST_PP_EMPTY)
-#endif
-
-#define BOOST_FUNCTION_ARG_TYPE(J,I,D) \
- typedef BOOST_PP_CAT(T,I) BOOST_PP_CAT(BOOST_PP_CAT(arg, BOOST_PP_INC(I)),_type);
-
-#define BOOST_FUNCTION_ARG_TYPES BOOST_PP_REPEAT(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG_TYPE,BOOST_PP_EMPTY)
-
-// Comma if nonzero number of arguments
-#if BOOST_FUNCTION_NUM_ARGS == 0
-# define BOOST_FUNCTION_COMMA
-#else
-# define BOOST_FUNCTION_COMMA ,
-#endif // BOOST_FUNCTION_NUM_ARGS > 0
-
-// Class names used in this version of the code
-#define BOOST_FUNCTION_FUNCTION BOOST_JOIN(function,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_FUNCTION_INVOKER \
- BOOST_JOIN(function_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER \
- BOOST_JOIN(void_function_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER \
- BOOST_JOIN(function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER \
- BOOST_JOIN(void_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_FUNCTION_REF_INVOKER \
- BOOST_JOIN(function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER \
- BOOST_JOIN(void_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_MEMBER_INVOKER \
- BOOST_JOIN(function_mem_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_VOID_MEMBER_INVOKER \
- BOOST_JOIN(function_void_mem_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_GET_FUNCTION_INVOKER \
- BOOST_JOIN(get_function_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER \
- BOOST_JOIN(get_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER \
- BOOST_JOIN(get_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_GET_MEMBER_INVOKER \
- BOOST_JOIN(get_member_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_GET_INVOKER \
- BOOST_JOIN(get_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_VTABLE BOOST_JOIN(basic_vtable,BOOST_FUNCTION_NUM_ARGS)
-
-#ifndef BOOST_NO_VOID_RETURNS
-# define BOOST_FUNCTION_VOID_RETURN_TYPE void
-# define BOOST_FUNCTION_RETURN(X) X
-#else
-# define BOOST_FUNCTION_VOID_RETURN_TYPE boost::detail::function::unusable
-# define BOOST_FUNCTION_RETURN(X) X; return BOOST_FUNCTION_VOID_RETURN_TYPE ()
-#endif
-
namespace boost {
namespace detail {
namespace function {
template<
typename FunctionPtr,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
+ typename R,
+ typename... T
>
- struct BOOST_FUNCTION_FUNCTION_INVOKER
+ struct function_invoker
{
- static R invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
+ static R invoke(function_buffer& function_ptr,
+ T... a)
{
FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.members.func_ptr);
- return f(BOOST_FUNCTION_ARGS);
+ return f(static_cast<T&&>(a)...);
}
};
template<
typename FunctionPtr,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
+ typename R,
+ typename... T
>
- struct BOOST_FUNCTION_VOID_FUNCTION_INVOKER
+ struct void_function_invoker
{
- static BOOST_FUNCTION_VOID_RETURN_TYPE
- invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
+ static void
+ invoke(function_buffer& function_ptr,
+ T... a)
{
FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.members.func_ptr);
- BOOST_FUNCTION_RETURN(f(BOOST_FUNCTION_ARGS));
+ f(static_cast<T&&>(a)...);
}
};
template<
typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
+ typename R,
+ typename... T
>
- struct BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
+ struct function_obj_invoker
{
- static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
+ static R invoke(function_buffer& function_obj_ptr,
+ T... a)
{
FunctionObj* f;
@@ -134,20 +77,20 @@ namespace boost {
f = reinterpret_cast<FunctionObj*>(function_obj_ptr.data);
else
f = reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
- return (*f)(BOOST_FUNCTION_ARGS);
+ return (*f)(static_cast<T&&>(a)...);
}
};
template<
typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
+ typename R,
+ typename... T
>
- struct BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
+ struct void_function_obj_invoker
{
- static BOOST_FUNCTION_VOID_RETURN_TYPE
- invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
+ static void
+ invoke(function_buffer& function_obj_ptr,
+ T... a)
{
FunctionObj* f;
@@ -155,169 +98,165 @@ namespace boost {
f = reinterpret_cast<FunctionObj*>(function_obj_ptr.data);
else
f = reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
- BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS));
+ (*f)(static_cast<T&&>(a)...);
}
};
template<
typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
+ typename R,
+ typename... T
>
- struct BOOST_FUNCTION_FUNCTION_REF_INVOKER
+ struct function_ref_invoker
{
- static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
+ static R invoke(function_buffer& function_obj_ptr,
+ T... a)
{
FunctionObj* f =
reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
- return (*f)(BOOST_FUNCTION_ARGS);
+ return (*f)(static_cast<T&&>(a)...);
}
};
template<
typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
+ typename R,
+ typename... T
>
- struct BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER
+ struct void_function_ref_invoker
{
- static BOOST_FUNCTION_VOID_RETURN_TYPE
- invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
+ static void
+ invoke(function_buffer& function_obj_ptr,
+ T... a)
{
FunctionObj* f =
reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
- BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS));
+ (*f)(static_cast<T&&>(a)...);
}
};
-#if BOOST_FUNCTION_NUM_ARGS > 0
/* Handle invocation of member pointers. */
template<
typename MemberPtr,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
+ typename R,
+ typename... T
>
- struct BOOST_FUNCTION_MEMBER_INVOKER
+ struct member_invoker
{
- static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
+ static R invoke(function_buffer& function_obj_ptr,
+ T... a)
{
MemberPtr* f =
reinterpret_cast<MemberPtr*>(function_obj_ptr.data);
- return boost::mem_fn(*f)(BOOST_FUNCTION_ARGS);
+ return boost::mem_fn(*f)(static_cast<T&&>(a)...);
}
};
template<
typename MemberPtr,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
+ typename R,
+ typename... T
>
- struct BOOST_FUNCTION_VOID_MEMBER_INVOKER
+ struct void_member_invoker
{
- static BOOST_FUNCTION_VOID_RETURN_TYPE
- invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
+ static void
+ invoke(function_buffer& function_obj_ptr,
+ T... a)
{
MemberPtr* f =
reinterpret_cast<MemberPtr*>(function_obj_ptr.data);
- BOOST_FUNCTION_RETURN(boost::mem_fn(*f)(BOOST_FUNCTION_ARGS));
+ boost::mem_fn(*f)(static_cast<T&&>(a)...);
}
};
-#endif
template<
typename FunctionPtr,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
+ typename R,
+ typename... T
>
- struct BOOST_FUNCTION_GET_FUNCTION_INVOKER
+ struct get_function_invoker
{
typedef typename conditional<(is_void<R>::value),
- BOOST_FUNCTION_VOID_FUNCTION_INVOKER<
+ void_function_invoker<
FunctionPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>,
- BOOST_FUNCTION_FUNCTION_INVOKER<
+ function_invoker<
FunctionPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>
>::type type;
};
template<
typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
+ typename R,
+ typename... T
>
- struct BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
+ struct get_function_obj_invoker
{
typedef typename conditional<(is_void<R>::value),
- BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER<
+ void_function_obj_invoker<
FunctionObj,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>,
- BOOST_FUNCTION_FUNCTION_OBJ_INVOKER<
+ function_obj_invoker<
FunctionObj,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>
>::type type;
};
template<
typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
+ typename R,
+ typename... T
>
- struct BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER
+ struct get_function_ref_invoker
{
typedef typename conditional<(is_void<R>::value),
- BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER<
+ void_function_ref_invoker<
FunctionObj,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>,
- BOOST_FUNCTION_FUNCTION_REF_INVOKER<
+ function_ref_invoker<
FunctionObj,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>
>::type type;
};
-#if BOOST_FUNCTION_NUM_ARGS > 0
/* Retrieve the appropriate invoker for a member pointer. */
template<
typename MemberPtr,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
+ typename R,
+ typename... T
>
- struct BOOST_FUNCTION_GET_MEMBER_INVOKER
+ struct get_member_invoker
{
typedef typename conditional<(is_void<R>::value),
- BOOST_FUNCTION_VOID_MEMBER_INVOKER<
+ void_member_invoker<
MemberPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>,
- BOOST_FUNCTION_MEMBER_INVOKER<
+ member_invoker<
MemberPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>
>::type type;
};
-#endif
/* Given the tag returned by get_function_tag, retrieve the
actual invoker that will be used for the given function
@@ -329,20 +268,20 @@ namespace boost {
contains two typedefs, "invoker_type" and "manager_type",
which correspond to the invoker and manager types. */
template<typename Tag>
- struct BOOST_FUNCTION_GET_INVOKER { };
+ struct get_invoker { };
/* Retrieve the invoker for a function pointer. */
template<>
- struct BOOST_FUNCTION_GET_INVOKER<function_ptr_tag>
+ struct get_invoker<function_ptr_tag>
{
template<typename FunctionPtr,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ typename R, typename... T>
struct apply
{
- typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER<
+ typedef typename get_function_invoker<
FunctionPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>::type
invoker_type;
@@ -350,13 +289,13 @@ namespace boost {
};
template<typename FunctionPtr, typename Allocator,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ typename R, typename... T>
struct apply_a
{
- typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER<
+ typedef typename get_function_invoker<
FunctionPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>::type
invoker_type;
@@ -364,19 +303,18 @@ namespace boost {
};
};
-#if BOOST_FUNCTION_NUM_ARGS > 0
/* Retrieve the invoker for a member pointer. */
template<>
- struct BOOST_FUNCTION_GET_INVOKER<member_ptr_tag>
+ struct get_invoker<member_ptr_tag>
{
template<typename MemberPtr,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ typename R, typename... T>
struct apply
{
- typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER<
+ typedef typename get_member_invoker<
MemberPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>::type
invoker_type;
@@ -384,33 +322,32 @@ namespace boost {
};
template<typename MemberPtr, typename Allocator,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ typename R, typename... T>
struct apply_a
{
- typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER<
+ typedef typename get_member_invoker<
MemberPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>::type
invoker_type;
typedef functor_manager<MemberPtr> manager_type;
};
};
-#endif
/* Retrieve the invoker for a function object. */
template<>
- struct BOOST_FUNCTION_GET_INVOKER<function_obj_tag>
+ struct get_invoker<function_obj_tag>
{
template<typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ typename R, typename... T>
struct apply
{
- typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
+ typedef typename get_function_obj_invoker<
FunctionObj,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>::type
invoker_type;
@@ -418,13 +355,13 @@ namespace boost {
};
template<typename FunctionObj, typename Allocator,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ typename R, typename... T>
struct apply_a
{
- typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
+ typedef typename get_function_obj_invoker<
FunctionObj,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>::type
invoker_type;
@@ -434,16 +371,16 @@ namespace boost {
/* Retrieve the invoker for a reference to a function object. */
template<>
- struct BOOST_FUNCTION_GET_INVOKER<function_obj_ref_tag>
+ struct get_invoker<function_obj_ref_tag>
{
template<typename RefWrapper,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ typename R, typename... T>
struct apply
{
- typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER<
+ typedef typename get_function_ref_invoker<
typename RefWrapper::type,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>::type
invoker_type;
@@ -451,13 +388,13 @@ namespace boost {
};
template<typename RefWrapper, typename Allocator,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ typename R, typename... T>
struct apply_a
{
- typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER<
+ typedef typename get_function_ref_invoker<
typename RefWrapper::type,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ R,
+ T...
>::type
invoker_type;
@@ -473,30 +410,26 @@ namespace boost {
* members. It therefore cannot have any constructors,
* destructors, base classes, etc.
*/
- template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
- struct BOOST_FUNCTION_VTABLE
+ template<typename R, typename... T>
+ struct basic_vtable
{
-#ifndef BOOST_NO_VOID_RETURNS
typedef R result_type;
-#else
- typedef typename function_return_type<R>::type result_type;
-#endif // BOOST_NO_VOID_RETURNS
typedef result_type (*invoker_type)(function_buffer&
- BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS);
+ ,
+ T...);
template<typename F>
bool assign_to(F f, function_buffer& functor) const
{
typedef typename get_function_tag<F>::type tag;
- return assign_to(f, functor, tag());
+ return assign_to(std::move(f), functor, tag());
}
template<typename F,typename Allocator>
bool assign_to_a(F f, function_buffer& functor, Allocator a) const
{
typedef typename get_function_tag<F>::type tag;
- return assign_to_a(f, functor, a, tag());
+ return assign_to_a(std::move(f), functor, a, tag());
}
void clear(function_buffer& functor) const
@@ -521,8 +454,6 @@ namespace boost {
{
this->clear(functor);
if (f) {
- // should be a reinterpret cast, but some compilers insist
- // on giving cv-qualifiers to free functions
functor.members.func_ptr = reinterpret_cast<void (*)()>(f);
return true;
} else {
@@ -533,11 +464,10 @@ namespace boost {
bool
assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
{
- return assign_to(f,functor,function_ptr_tag());
+ return assign_to(std::move(f),functor,function_ptr_tag());
}
// Member pointers
-#if BOOST_FUNCTION_NUM_ARGS > 0
template<typename MemberPtr>
bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
{
@@ -564,7 +494,6 @@ namespace boost {
return false;
}
}
-#endif // BOOST_FUNCTION_NUM_ARGS > 0
// Function objects
// Assign to a function object using the small object optimization
@@ -572,13 +501,13 @@ namespace boost {
void
assign_functor(FunctionObj f, function_buffer& functor, true_type) const
{
- new (reinterpret_cast<void*>(functor.data)) FunctionObj(f);
+ new (reinterpret_cast<void*>(functor.data)) FunctionObj(std::move(f));
}
template<typename FunctionObj,typename Allocator>
void
assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, true_type) const
{
- assign_functor(f,functor,true_type());
+ assign_functor(std::move(f),functor,true_type());
}
// Assign to a function object allocated on the heap.
@@ -586,28 +515,21 @@ namespace boost {
void
assign_functor(FunctionObj f, function_buffer& functor, false_type) const
{
- functor.members.obj_ptr = new FunctionObj(f);
+ functor.members.obj_ptr = new FunctionObj(std::move(f));
}
template<typename FunctionObj,typename Allocator>
void
assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, false_type) const
{
typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
-#if defined(BOOST_NO_CXX11_ALLOCATOR)
- typedef typename Allocator::template rebind<functor_wrapper_type>::other
- wrapper_allocator_type;
- typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
-#else
+
using wrapper_allocator_type = typename std::allocator_traits<Allocator>::template rebind_alloc<functor_wrapper_type>;
using wrapper_allocator_pointer_type = typename std::allocator_traits<wrapper_allocator_type>::pointer;
-#endif
+
wrapper_allocator_type wrapper_allocator(a);
wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
-#if defined(BOOST_NO_CXX11_ALLOCATOR)
- wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
-#else
std::allocator_traits<wrapper_allocator_type>::construct(wrapper_allocator, copy, functor_wrapper_type(f,a));
-#endif
+
functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
functor.members.obj_ptr = new_f;
}
@@ -617,7 +539,7 @@ namespace boost {
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(std::move(f), functor,
integral_constant<bool, (function_allows_small_object_optimization<FunctionObj>::value)>());
return true;
} else {
@@ -629,7 +551,7 @@ namespace boost {
assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
{
if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
- assign_functor_a(f, functor, a,
+ assign_functor_a(std::move(f), functor, a,
integral_constant<bool, (function_allows_small_object_optimization<FunctionObj>::value)>());
return true;
} else {
@@ -660,26 +582,40 @@ namespace boost {
vtable_base base;
invoker_type invoker;
};
+
+ template <typename... T>
+ struct variadic_function_base
+ {};
+
+ template <typename T>
+ struct variadic_function_base<T>
+ {
+ typedef T argument_type;
+ };
+
+ template <typename T0, typename T1>
+ struct variadic_function_base<T0, T1>
+ {
+ typedef T0 first_argument_type;
+ typedef T1 second_argument_type;
+ };
+
} // end namespace function
} // end namespace detail
template<
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
+ typename R,
+ typename... T
>
- class BOOST_FUNCTION_FUNCTION : public function_base
+ class function_n : public function_base
+ , public detail::function::variadic_function_base<T...>
{
public:
-#ifndef BOOST_NO_VOID_RETURNS
typedef R result_type;
-#else
- typedef typename boost::detail::function::function_return_type<R>::type
- result_type;
-#endif // BOOST_NO_VOID_RETURNS
private:
- typedef boost::detail::function::BOOST_FUNCTION_VTABLE<
- R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>
+ typedef boost::detail::function::basic_vtable<
+ R, T...>
vtable_type;
vtable_type* get_vtable() const {
@@ -690,8 +626,6 @@ namespace boost {
struct clear_type {};
public:
- BOOST_STATIC_CONSTANT(int, args = BOOST_FUNCTION_NUM_ARGS);
-
// add signature for boost::lambda
template<typename Args>
struct sig
@@ -699,93 +633,68 @@ namespace boost {
typedef result_type type;
};
-#if BOOST_FUNCTION_NUM_ARGS == 1
- typedef T0 argument_type;
-#elif BOOST_FUNCTION_NUM_ARGS == 2
- typedef T0 first_argument_type;
- typedef T1 second_argument_type;
-#endif
-
- BOOST_STATIC_CONSTANT(int, arity = BOOST_FUNCTION_NUM_ARGS);
- BOOST_FUNCTION_ARG_TYPES
+ BOOST_STATIC_CONSTANT(int, arity = sizeof...(T));
- typedef BOOST_FUNCTION_FUNCTION self_type;
+ typedef function_n self_type;
- BOOST_DEFAULTED_FUNCTION(BOOST_FUNCTION_FUNCTION(), : function_base() {})
+ BOOST_DEFAULTED_FUNCTION(function_n(), : function_base() {})
// MSVC chokes if the following two constructors are collapsed into
// one with a default parameter.
template<typename Functor>
- BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f
-#ifndef BOOST_NO_SFINAE
+ function_n(Functor f
,typename boost::enable_if_<
!(is_integral<Functor>::value),
int>::type = 0
-#endif // BOOST_NO_SFINAE
) :
function_base()
{
- this->assign_to(f);
+ this->assign_to(std::move(f));
}
template<typename Functor,typename Allocator>
- BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a
-#ifndef BOOST_NO_SFINAE
+ function_n(Functor f, Allocator a
,typename boost::enable_if_<
!(is_integral<Functor>::value),
int>::type = 0
-#endif // BOOST_NO_SFINAE
) :
function_base()
{
- this->assign_to_a(f,a);
+ this->assign_to_a(std::move(f),a);
}
-#ifndef BOOST_NO_SFINAE
- BOOST_FUNCTION_FUNCTION(clear_type*) : function_base() { }
-#else
- BOOST_FUNCTION_FUNCTION(int zero) : function_base()
- {
- BOOST_ASSERT(zero == 0);
- }
-#endif
+ function_n(clear_type*) : function_base() { }
- BOOST_FUNCTION_FUNCTION(const BOOST_FUNCTION_FUNCTION& f) : function_base()
+ function_n(const function_n& f) : function_base()
{
this->assign_to_own(f);
}
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- BOOST_FUNCTION_FUNCTION(BOOST_FUNCTION_FUNCTION&& f) : function_base()
+ function_n(function_n&& f) : function_base()
{
this->move_assign(f);
}
-#endif
- ~BOOST_FUNCTION_FUNCTION() { clear(); }
+ ~function_n() { clear(); }
- result_type operator()(BOOST_FUNCTION_PARMS) const
+ result_type operator()(T... a) const
{
if (this->empty())
boost::throw_exception(bad_function_call());
return get_vtable()->invoker
- (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS);
+ (this->functor, static_cast<T&&>(a)...);
}
- // The distinction between when to use BOOST_FUNCTION_FUNCTION and
+ // The distinction between when to use function_n and
// when to use self_type is obnoxious. MSVC cannot handle self_type as
// the return type of these assignment operators, but Borland C++ cannot
- // handle BOOST_FUNCTION_FUNCTION as the type of the temporary to
+ // handle function_n as the type of the temporary to
// construct.
template<typename Functor>
-#ifndef BOOST_NO_SFINAE
typename boost::enable_if_<
!(is_integral<Functor>::value),
- BOOST_FUNCTION_FUNCTION&>::type
-#else
- BOOST_FUNCTION_FUNCTION&
-#endif
- operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
+ function_n&>::type
+ operator=(Functor f)
{
this->clear();
BOOST_TRY {
@@ -798,7 +707,7 @@ namespace boost {
return *this;
}
template<typename Functor,typename Allocator>
- void assign(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a)
+ void assign(Functor f, Allocator a)
{
this->clear();
BOOST_TRY{
@@ -810,23 +719,14 @@ namespace boost {
BOOST_CATCH_END
}
-#ifndef BOOST_NO_SFINAE
- BOOST_FUNCTION_FUNCTION& operator=(clear_type*)
+ function_n& operator=(clear_type*)
{
this->clear();
return *this;
}
-#else
- BOOST_FUNCTION_FUNCTION& operator=(int zero)
- {
- BOOST_ASSERT(zero == 0);
- this->clear();
- return *this;
- }
-#endif
- // Assignment from another BOOST_FUNCTION_FUNCTION
- BOOST_FUNCTION_FUNCTION& operator=(const BOOST_FUNCTION_FUNCTION& f)
+ // Assignment from another function_n
+ function_n& operator=(const function_n& f)
{
if (&f == this)
return *this;
@@ -842,9 +742,8 @@ namespace boost {
return *this;
}
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- // Move assignment from another BOOST_FUNCTION_FUNCTION
- BOOST_FUNCTION_FUNCTION& operator=(BOOST_FUNCTION_FUNCTION&& f)
+ // Move assignment from another function_n
+ function_n& operator=(function_n&& f)
{
if (&f == this)
return *this;
@@ -859,14 +758,13 @@ namespace boost {
BOOST_CATCH_END
return *this;
}
-#endif
- void swap(BOOST_FUNCTION_FUNCTION& other)
+ void swap(function_n& other)
{
if (&other == this)
return;
- BOOST_FUNCTION_FUNCTION tmp;
+ function_n tmp;
tmp.move_assign(*this);
this->move_assign(other);
other.move_assign(tmp);
@@ -882,27 +780,10 @@ namespace boost {
}
}
-#if (defined __SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && !(defined BOOST_NO_COMPILER_CONFIG)
- // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it
- operator bool () const { return !this->empty(); }
-#else
- private:
- struct dummy {
- void nonnull() {}
- };
-
- typedef void (dummy::*safe_bool)();
-
- public:
- operator safe_bool () const
- { return (this->empty())? 0 : &dummy::nonnull; }
-
- bool operator!() const
- { return this->empty(); }
-#endif
+ explicit operator bool () const { return !this->empty(); }
private:
- void assign_to_own(const BOOST_FUNCTION_FUNCTION& f)
+ void assign_to_own(const function_n& f)
{
if (!f.empty()) {
this->vtable = f.vtable;
@@ -935,10 +816,10 @@ namespace boost {
using boost::detail::function::vtable_base;
typedef typename boost::detail::function::get_function_tag<Functor>::type tag;
- typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker;
+ typedef boost::detail::function::get_invoker<tag> get_invoker;
typedef typename get_invoker::
- template apply<Functor, R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS>
+ template apply<Functor, R,
+ T...>
handler_type;
typedef typename handler_type::invoker_type invoker_type;
@@ -951,7 +832,7 @@ namespace boost {
static const vtable_type stored_vtable =
{ { &manager_type::manage }, &invoker_type::invoke };
- if (stored_vtable.assign_to(f, functor)) {
+ if (stored_vtable.assign_to(std::move(f), functor)) {
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 &&
@@ -969,10 +850,10 @@ namespace boost {
using boost::detail::function::vtable_base;
typedef typename boost::detail::function::get_function_tag<Functor>::type tag;
- typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker;
+ typedef boost::detail::function::get_invoker<tag> get_invoker;
typedef typename get_invoker::
- template apply_a<Functor, Allocator, R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS>
+ template apply_a<Functor, Allocator, R,
+ T...>
handler_type;
typedef typename handler_type::invoker_type invoker_type;
@@ -985,7 +866,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(std::move(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 &&
@@ -1000,7 +881,7 @@ namespace boost {
// 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)
+ void move_assign(function_n& f)
{
if (&f == this)
return;
@@ -1048,49 +929,41 @@ namespace boost {
}
};
- template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
- inline void swap(BOOST_FUNCTION_FUNCTION<
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ template<typename R, typename... T>
+ inline void swap(function_n<
+ R,
+ T...
>& f1,
- BOOST_FUNCTION_FUNCTION<
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
+ function_n<
+ R,
+ T...
>& f2)
{
f1.swap(f2);
}
// Poison comparisons between boost::function objects of the same type.
-template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
- void operator==(const BOOST_FUNCTION_FUNCTION<
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS>&,
- const BOOST_FUNCTION_FUNCTION<
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS>&);
-template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
- void operator!=(const BOOST_FUNCTION_FUNCTION<
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS>&,
- const BOOST_FUNCTION_FUNCTION<
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS>& );
-
-#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
+template<typename R, typename... T>
+ void operator==(const function_n<
+ R,
+ T...>&,
+ const function_n<
+ R,
+ T...>&);
+template<typename R, typename... T>
+ void operator!=(const function_n<
+ R,
+ T...>&,
+ const function_n<
+ R,
+ T...>& );
-#if BOOST_FUNCTION_NUM_ARGS == 0
-#define BOOST_FUNCTION_PARTIAL_SPEC R (void)
-#else
-#define BOOST_FUNCTION_PARTIAL_SPEC R (BOOST_FUNCTION_TEMPLATE_ARGS)
-#endif
-
-template<typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS>
-class function<BOOST_FUNCTION_PARTIAL_SPEC>
- : public BOOST_FUNCTION_FUNCTION<R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>
+template<typename R,
+ typename... T>
+class function<R (T...)>
+ : public function_n<R, T...>
{
- typedef BOOST_FUNCTION_FUNCTION<R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS> base_type;
+ typedef function_n<R, T...> base_type;
typedef function self_type;
struct clear_type {};
@@ -1101,40 +974,32 @@ public:
template<typename Functor>
function(Functor f
-#ifndef BOOST_NO_SFINAE
,typename boost::enable_if_<
!(is_integral<Functor>::value),
int>::type = 0
-#endif
) :
- base_type(f)
+ base_type(std::move(f))
{
}
template<typename Functor,typename Allocator>
function(Functor f, Allocator a
-#ifndef BOOST_NO_SFINAE
,typename boost::enable_if_<
!(is_integral<Functor>::value),
int>::type = 0
-#endif
) :
- base_type(f,a)
+ base_type(std::move(f),a)
{
}
-#ifndef BOOST_NO_SFINAE
function(clear_type*) : base_type() {}
-#endif
function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
// Move constructors
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)
{
@@ -1142,35 +1007,27 @@ public:
return *this;
}
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
self_type& operator=(self_type&& f)
{
self_type(static_cast<self_type&&>(f)).swap(*this);
return *this;
}
-#endif
template<typename Functor>
-#ifndef BOOST_NO_SFINAE
typename boost::enable_if_<
!(is_integral<Functor>::value),
self_type&>::type
-#else
- self_type&
-#endif
operator=(Functor f)
{
self_type(f).swap(*this);
return *this;
}
-#ifndef BOOST_NO_SFINAE
self_type& operator=(clear_type*)
{
this->clear();
return *this;
}
-#endif
self_type& operator=(const base_type& f)
{
@@ -1178,50 +1035,42 @@ public:
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
};
-#undef BOOST_FUNCTION_PARTIAL_SPEC
-#endif // have partial specialization
-
} // end namespace boost
-// Cleanup after ourselves...
-#undef BOOST_FUNCTION_VTABLE
-#undef BOOST_FUNCTION_COMMA
-#undef BOOST_FUNCTION_FUNCTION
-#undef BOOST_FUNCTION_FUNCTION_INVOKER
-#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
-#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
-#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
-#undef BOOST_FUNCTION_FUNCTION_REF_INVOKER
-#undef BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER
-#undef BOOST_FUNCTION_MEMBER_INVOKER
-#undef BOOST_FUNCTION_VOID_MEMBER_INVOKER
-#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
-#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
-#undef BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER
-#undef BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER
-#undef BOOST_FUNCTION_GET_INVOKER
-#undef BOOST_FUNCTION_TEMPLATE_PARMS
-#undef BOOST_FUNCTION_TEMPLATE_ARGS
-#undef BOOST_FUNCTION_PARMS
-#undef BOOST_FUNCTION_PARM
-#ifdef BOOST_FUNCTION_ARG
-# undef BOOST_FUNCTION_ARG
-#endif
-#undef BOOST_FUNCTION_ARGS
-#undef BOOST_FUNCTION_ARG_TYPE
-#undef BOOST_FUNCTION_ARG_TYPES
-#undef BOOST_FUNCTION_VOID_RETURN_TYPE
-#undef BOOST_FUNCTION_RETURN
-
#if defined(BOOST_MSVC)
# pragma warning( pop )
#endif
+
+// Resolve C++20 issue with fn == bind(...)
+// https://github.com/boostorg/function/issues/45
+
+namespace boost
+{
+
+namespace _bi
+{
+
+template<class R, class F, class L> class bind_t;
+
+} // namespace _bi
+
+template<class S, class R, class F, class L> bool operator==( function<S> const& f, _bi::bind_t<R, F, L> const& b )
+{
+ return f.contains( b );
+}
+
+template<class S, class R, class F, class L> bool operator!=( function<S> const& f, _bi::bind_t<R, F, L> const& b )
+{
+ return !f.contains( b );
+}
+
+} // namespace boost
+
+#endif // #ifndef BOOST_FUNCTION_FUNCTION_TEMPLATE_HPP_INCLUDED
diff --git a/contrib/restricted/boost/function/ya.make b/contrib/restricted/boost/function/ya.make
index 18d910cac9b..5a7f2bd2ad9 100644
--- a/contrib/restricted/boost/function/ya.make
+++ b/contrib/restricted/boost/function/ya.make
@@ -6,16 +6,15 @@ LICENSE(BSL-1.0)
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-VERSION(1.84.0)
+VERSION(1.85.0)
-ORIGINAL_SOURCE(https://github.com/boostorg/function/archive/boost-1.84.0.tar.gz)
+ORIGINAL_SOURCE(https://github.com/boostorg/function/archive/boost-1.85.0.tar.gz)
PEERDIR(
contrib/restricted/boost/assert
contrib/restricted/boost/bind
contrib/restricted/boost/config
contrib/restricted/boost/core
- contrib/restricted/boost/preprocessor
contrib/restricted/boost/throw_exception
contrib/restricted/boost/type_traits
)