diff --git a/lib/boost_1.84.0/Jamroot b/lib/boost_1.84.0/Jamroot deleted file mode 100644 index 33a31db19bf..00000000000 --- a/lib/boost_1.84.0/Jamroot +++ /dev/null @@ -1,344 +0,0 @@ -# Copyright Vladimir Prus 2002-2006. -# Copyright Dave Abrahams 2005-2006. -# Copyright Rene Rivera 2005-2007. -# Copyright Douglas Gregor 2005. -# -# 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) - -# Usage: -# -# b2 [options] [properties] [install|stage] -# -# Builds and installs Boost. -# -# Targets and Related Options: -# -# install Install headers and compiled library files to the -# ======= configured locations (below). -# -# --prefix= Install architecture independent files here. -# Default: C:\Boost on Windows -# Default: /usr/local on Unix, Linux, etc. -# -# --exec-prefix= Install architecture dependent files here. -# Default: -# -# --libdir= Install library files here. -# Default: /lib -# -# --includedir= Install header files here. -# Default: /include -# -# --cmakedir= Install CMake configuration files here. -# Default: /cmake -# -# --no-cmake-config Do not install CMake configuration files. -# -# stage Build and install only compiled library files to the -# ===== stage directory. -# -# --stagedir= Install library files here -# Default: ./stage -# -# Other Options: -# -# --build-type= Build the specified pre-defined set of variations of -# the libraries. Note, that which variants get built -# depends on what each library supports. -# -# -- minimal -- (default) Builds a minimal set of -# variants. On Windows, these are static -# multithreaded libraries in debug and release -# modes, using shared runtime. On Linux, these are -# static and shared multithreaded libraries in -# release mode. -# -# -- complete -- Build all possible variations. -# -# --build-dir=DIR Build in this location instead of building within -# the distribution tree. Recommended! -# -# --show-libraries Display the list of Boost libraries that require -# build and installation steps, and then exit. -# -# --layout= Determine whether to choose library names and header -# locations such that multiple versions of Boost or -# multiple compilers can be used on the same system. -# -# -- versioned -- Names of boost binaries include -# the Boost version number, name and version of -# the compiler and encoded build properties. Boost -# headers are installed in a subdirectory of -# whose name contains the Boost version -# number. -# -# -- tagged -- Names of boost binaries include the -# encoded build properties such as variant and -# threading, but do not including compiler name -# and version, or Boost version. This option is -# useful if you build several variants of Boost, -# using the same compiler. -# -# -- system -- Binaries names do not include the -# Boost version number or the name and version -# number of the compiler. Boost headers are -# installed directly into . This option is -# intended for system integrators building -# distribution packages. -# -# The default value is 'versioned' on Windows, and -# 'system' on Unix. -# -# --buildid=ID Add the specified ID to the name of built libraries. -# The default is to not add anything. -# -# --python-buildid=ID Add the specified ID to the name of built libraries -# that depend on Python. The default is to not add -# anything. This ID is added in addition to --buildid. -# -# --help This message. -# -# --with- Build and install the specified . If this -# option is used, only libraries specified using this -# option will be built. -# -# --without- Do not build, stage, or install the specified -# . By default, all libraries are built. -# -# Properties: -# -# toolset=toolset Indicate the toolset to build with. -# -# variant=debug|release Select the build variant -# -# link=static|shared Whether to build static or shared libraries -# -# threading=single|multi Whether to build single or multithreaded binaries -# -# runtime-link=static|shared -# Whether to link to static or shared C and C++ -# runtime. -# - -# TODO: -# - handle boost version -# - handle python options such as pydebug - -import boostcpp ; -import package ; - -import sequence ; -import xsltproc ; -import set ; -import path ; -import link ; -import notfile ; -import virtual-target ; -import "class" : new ; -import property-set ; -import threadapi-feature ; -import option ; -import property ; -# Backslash because of `bcp --namespace` -import tools/boost\_install/boost-install ; - -path-constant BOOST_ROOT : . ; -constant BOOST_VERSION : 1.84.0 ; -constant BOOST_JAMROOT_MODULE : $(__name__) ; - -# Allow subprojects to simply `import config : requires ;` to get access to the requires rule -modules.poke : BOOST_BUILD_PATH : $(BOOST_ROOT)/libs/config/checks [ modules.peek : BOOST_BUILD_PATH ] ; - -boostcpp.set-version $(BOOST_VERSION) ; - -use-project /boost/architecture : libs/config/checks/architecture ; - -local all-headers = - [ MATCH .*libs/(.*)/include/boost : [ glob libs/*/include/boost libs/*/*/include/boost ] ] ; - -for dir in $(all-headers) -{ - link-directory $(dir)-headers : libs/$(dir)/include/boost : . ; - explicit $(dir)-headers ; -} - -if $(all-headers) -{ - constant BOOST_MODULARLAYOUT : $(all-headers) ; -} - -project boost - : requirements . - - [ boostcpp.architecture ] - [ boostcpp.address-model ] - - # Disable auto-linking for all targets here, primarily because it caused - # troubles with V2. - BOOST_ALL_NO_LIB=1 - # Used to encode variant in target name. See the 'tag' rule below. - @$(__name__).tag - @handle-static-runtime - @clang-darwin-cxxstd-11 - # Comeau does not support shared lib - como:static - como-linux:_GNU_SOURCE=1 - # When building docs within Boost, we want the standard Boost style - boost.defaults=Boost - @threadapi-feature.detect - : usage-requirements . - : default-build - hidden - multi - : build-dir bin.v2 - ; - -# This rule is called by Boost.Build to determine the name of target. We use it -# to encode the build variant, compiler name and boost version in the target -# name. -# -rule tag ( name : type ? : property-set ) -{ - return [ boostcpp.tag $(name) : $(type) : $(property-set) ] ; -} - -rule python-tag ( name : type ? : property-set ) -{ - return [ boostcpp.python-tag $(name) : $(type) : $(property-set) ] ; -} - -rule handle-static-runtime ( properties * ) -{ - # Using static runtime with shared libraries is impossible on Linux, and - # dangerous on Windows. Therefore, we disallow it. This might be drastic, - # but it was disabled for a while without anybody complaining. - - local argv = [ modules.peek : ARGV ] ; - - if shared in $(properties) - && static in $(properties) - # For CW, static runtime is needed so that std::locale works. - && ! ( cw in $(properties) ) - && ! --allow-shared-static in $(argv) - { - boostcpp.emit-shared-static-warning ; - return no ; - } -} - -rule clang-darwin-cxxstd-11 ( properties * ) -{ - # AppleClang defaults to C++03 - - local result = [ property.select : $(properties) ] ; - - if darwin in $(properties) - { - result ?= 11 ; - } - - return $(result) ; -} - -all-libraries = [ MATCH .*libs/(.*)/build/.* : [ glob libs/*/build/Jamfile.v2 ] - [ glob libs/*/build/Jamfile ] ] ; - -all-libraries = [ sequence.unique $(all-libraries) ] ; -# The function_types library has a Jamfile, but it's used for maintenance -# purposes, there's no library to build and install. -all-libraries = [ set.difference $(all-libraries) : function_types ] ; - -# Setup convenient aliases for all libraries. - -local rule explicit-alias ( id : targets + ) -{ - alias $(id) : $(targets) ; - explicit $(id) ; -} - -# First, the complicated libraries: where the target name in Jamfile is -# different from its directory name. -explicit-alias prg_exec_monitor : libs/test/build//boost_prg_exec_monitor ; -explicit-alias test_exec_monitor : libs/test/build//boost_test_exec_monitor ; -explicit-alias unit_test_framework : libs/test/build//boost_unit_test_framework ; -explicit-alias serialization : libs/serialization/build//boost_serialization ; -explicit-alias wserialization : libs/serialization/build//boost_wserialization ; -for local l in $(all-libraries) -{ - if ! $(l) in test graph serialization headers - { - explicit-alias $(l) : libs/$(l)/build//boost_$(l) ; - } -} - -# Log has an additional target -explicit-alias log_setup : libs/log/build//boost_log_setup ; - -rule do-nothing { } - -rule generate-alias ( project name : property-set : sources * ) -{ - local action-name = [ $(property-set).get ] ; - local m = [ MATCH ^@(.*) : $(action-name) ] ; - property-set = [ property-set.empty ] ; - local action = [ new action $(sources) : $(m[1]) : $(property-set) ] ; - local t = [ new notfile-target $(name) : $(project) : $(action) ] ; - return [ virtual-target.register $(t) ] ; -} - -generate headers : $(all-headers)-headers : @generate-alias @do-nothing : : . ; - -#alias headers : $(all-headers)-headers : : : . ; -explicit headers ; - -# Make project ids of all libraries known. -for local l in $(all-libraries) -{ - use-project /boost/$(l) : libs/$(l)/build ; -} - -if [ path.exists $(BOOST_ROOT)/tools/inspect/build ] -{ - use-project /boost/tools/inspect : tools/inspect/build ; -} - -if [ path.exists $(BOOST_ROOT)/libs/wave/tool/build ] -{ - use-project /boost/libs/wave/tool : libs/wave/tool/build ; -} - -# Make the boost-install rule visible in subprojects - -# This rule should be called from libraries' Jamfiles and will create two -# targets, "install" and "stage", that will install or stage that library. The -# --prefix option is respected, but --with and --without options, naturally, are -# ignored. -# -# - libraries -- list of library targets to install. - -rule boost-install ( libraries * ) -{ - boost-install.boost-install $(libraries) ; -} - -# Creates a library target, adding autolink support and also creates -# stage and install targets via boost-install, above. -rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * ) -{ - autolink = shared:BOOST_$(name:U)_DYN_LINK=1 ; - name = boost_$(name) ; - lib $(name) - : $(sources) - : $(requirements) $(autolink) - : $(default-build) - : $(usage-requirements) $(autolink) - ; - boost-install $(name) ; -} - - -# Declare special top-level targets that build and install the desired variants -# of the libraries. -boostcpp.declare-targets $(all-libraries) ; diff --git a/lib/boost_1.84.0/STAN_CHANGES b/lib/boost_1.84.0/STAN_CHANGES deleted file mode 100644 index 7859366b9e3..00000000000 --- a/lib/boost_1.84.0/STAN_CHANGES +++ /dev/null @@ -1,4 +0,0 @@ -This file documents changes done for the stan-math project - -- Added a `#ifndef BOOST_DISABLE_ASSERTS` to boost/math/special_functions/detail/ibeta_inverse.hpp - to silence a warning about an unused variable. diff --git a/lib/boost_1.84.0/boost/any.hpp b/lib/boost_1.84.0/boost/any.hpp deleted file mode 100644 index f7812eef9fe..00000000000 --- a/lib/boost_1.84.0/boost/any.hpp +++ /dev/null @@ -1,367 +0,0 @@ -// See http://www.boost.org/libs/any for Documentation. - -#ifndef BOOST_ANY_INCLUDED -#define BOOST_ANY_INCLUDED - -#include -#ifdef BOOST_HAS_PRAGMA_ONCE -# pragma once -#endif - -/// \file boost/any.hpp -/// \brief \copybrief boost::any - -// what: variant type boost::any -// who: contributed by Kevlin Henney, -// with features contributed and bugs found by -// Antony Polukhin, Ed Brey, Mark Rodgers, -// Peter Dimov, and James Curran -// when: July 2001, April 2013 - 2020 - -#include -#include -#include -#include -#include - -#include // for std::addressof -#include - -namespace boost -{ - /// \brief A class whose instances can hold instances of any - /// type that satisfies \forcedlink{ValueType} requirements. - class any - { - public: - - /// \post this->empty() is true. - constexpr any() noexcept - : content(0) - { - } - - /// Makes a copy of `value`, so - /// that the initial content of the new instance is equivalent - /// in both type and value to `value`. - /// - /// \throws std::bad_alloc or any exceptions arising from the copy - /// constructor of the contained type. - template - any(const ValueType & value) - : content(new holder< - typename std::remove_cv::type>::type - >(value)) - { - static_assert( - !anys::detail::is_basic_any::value, - "boost::any shall not be constructed from boost::anys::basic_any" - ); - } - - /// Copy constructor that copies content of - /// `other` into new instance, so that any content - /// is equivalent in both type and value to the content of - /// `other`, or empty if `other` is empty. - /// - /// \throws May fail with a `std::bad_alloc` - /// exception or any exceptions arising from the copy - /// constructor of the contained type. - any(const any & other) - : content(other.content ? other.content->clone() : 0) - { - } - - /// Move constructor that moves content of - /// `other` into new instance and leaves `other` empty. - /// - /// \post other->empty() is true - /// \throws Nothing. - any(any&& other) noexcept - : content(other.content) - { - other.content = 0; - } - - /// Forwards `value`, so - /// that the initial content of the new instance is equivalent - /// in both type and value to `value` before the forward. - /// - /// \throws std::bad_alloc or any exceptions arising from the move or - /// copy constructor of the contained type. - template - any(ValueType&& value - , typename std::enable_if::value >::type* = 0 // disable if value has type `any&` - , typename std::enable_if::value >::type* = 0) // disable if value has type `const ValueType&&` - : content(new holder< typename std::decay::type >(std::forward(value))) - { - static_assert( - !anys::detail::is_basic_any::type>::value, - "boost::any shall not be constructed from boost::anys::basic_any" - ); - } - - /// Releases any and all resources used in management of instance. - /// - /// \throws Nothing. - ~any() noexcept - { - delete content; - } - - public: // modifiers - - /// Exchange of the contents of `*this` and `rhs`. - /// - /// \returns `*this` - /// \throws Nothing. - any & swap(any & rhs) noexcept - { - placeholder* tmp = content; - content = rhs.content; - rhs.content = tmp; - return *this; - } - - /// Copies content of `rhs` into - /// current instance, discarding previous content, so that the - /// new content is equivalent in both type and value to the - /// content of `rhs`, or empty if `rhs.empty()`. - /// - /// \throws std::bad_alloc - /// or any exceptions arising from the copy constructor of the - /// contained type. Assignment satisfies the strong guarantee - /// of exception safety. - any & operator=(const any& rhs) - { - any(rhs).swap(*this); - return *this; - } - - /// Moves content of `rhs` into - /// current instance, discarding previous content, so that the - /// new content is equivalent in both type and value to the - /// content of `rhs` before move, or empty if - /// `rhs.empty()`. - /// - /// \post `rhs->empty()` is true - /// \throws Nothing. - any & operator=(any&& rhs) noexcept - { - rhs.swap(*this); - any().swap(rhs); - return *this; - } - - /// Forwards `rhs`, - /// discarding previous content, so that the new content of is - /// equivalent in both type and value to - /// `rhs` before forward. - /// - /// \throws std::bad_alloc - /// or any exceptions arising from the move or copy constructor of the - /// contained type. Assignment satisfies the strong guarantee - /// of exception safety. - template - any & operator=(ValueType&& rhs) - { - static_assert( - !anys::detail::is_basic_any::type>::value, - "boost::anys::basic_any shall not be assigned into boost::any" - ); - any(std::forward(rhs)).swap(*this); - return *this; - } - - public: // queries - - /// \returns `true` if instance is empty, otherwise `false`. - /// \throws Nothing. - bool empty() const noexcept - { - return !content; - } - - /// \post this->empty() is true - void clear() noexcept - { - any().swap(*this); - } - - /// \returns the `typeid` of the - /// contained value if instance is non-empty, otherwise - /// `typeid(void)`. - /// - /// Useful for querying against types known either at compile time or - /// only at runtime. - const boost::typeindex::type_info& type() const noexcept - { - return content ? content->type() : boost::typeindex::type_id().type_info(); - } - - private: // types - /// @cond - class BOOST_SYMBOL_VISIBLE placeholder: public boost::anys::detail::placeholder - { - public: - virtual placeholder * clone() const = 0; - }; - - template - class holder final - : public placeholder - { - public: // structors - - holder(const ValueType & value) - : held(value) - { - } - - holder(ValueType&& value) - : held(static_cast< ValueType&& >(value)) - { - } - - public: // queries - - const boost::typeindex::type_info& type() const noexcept override - { - return boost::typeindex::type_id().type_info(); - } - - placeholder * clone() const BOOST_OVERRIDE - { - return new holder(held); - } - - public: // representation - - ValueType held; - - private: // intentionally left unimplemented - holder & operator=(const holder &); - }; - - private: // representation - template - friend ValueType * unsafe_any_cast(any *) noexcept; - - friend class boost::anys::unique_any; - - placeholder * content; - /// @endcond - }; - - /// Exchange of the contents of `lhs` and `rhs`. - /// \throws Nothing. - inline void swap(any & lhs, any & rhs) noexcept - { - lhs.swap(rhs); - } - - /// @cond - - // Note: The "unsafe" versions of any_cast are not part of the - // public interface and may be removed at any time. They are - // required where we know what type is stored in the any and can't - // use typeid() comparison, e.g., when our types may travel across - // different shared libraries. - template - inline ValueType * unsafe_any_cast(any * operand) noexcept - { - return std::addressof( - static_cast *>(operand->content)->held - ); - } - - template - inline const ValueType * unsafe_any_cast(const any * operand) noexcept - { - return boost::unsafe_any_cast(const_cast(operand)); - } - /// @endcond - - /// \returns Pointer to a ValueType stored in `operand`, nullptr if - /// `operand` does not contain specified `ValueType`. - template - ValueType * any_cast(any * operand) noexcept - { - return operand && operand->type() == boost::typeindex::type_id() - ? boost::unsafe_any_cast::type>(operand) - : 0; - } - - /// \returns Const pointer to a ValueType stored in `operand`, nullptr if - /// `operand` does not contain specified `ValueType`. - template - inline const ValueType * any_cast(const any * operand) noexcept - { - return boost::any_cast(const_cast(operand)); - } - - /// \returns ValueType stored in `operand` - /// \throws boost::bad_any_cast if `operand` does not contain - /// specified ValueType. - template - ValueType any_cast(any & operand) - { - typedef typename std::remove_reference::type nonref; - - nonref * result = boost::any_cast(std::addressof(operand)); - if(!result) - boost::throw_exception(bad_any_cast()); - - // Attempt to avoid construction of a temporary object in cases when - // `ValueType` is not a reference. Example: - // `static_cast(*result);` - // which is equal to `std::string(*result);` - typedef typename std::conditional< - std::is_reference::value, - ValueType, - typename std::add_lvalue_reference::type - >::type ref_type; - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable: 4172) // "returning address of local variable or temporary" but *result is not local! -#endif - return static_cast(*result); -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - } - - /// \returns `ValueType` stored in `operand` - /// \throws boost::bad_any_cast if `operand` does not contain - /// specified `ValueType`. - template - inline ValueType any_cast(const any & operand) - { - typedef typename std::remove_reference::type nonref; - return boost::any_cast(const_cast(operand)); - } - - /// \returns `ValueType` stored in `operand`, leaving the `operand` empty. - /// \throws boost::bad_any_cast if `operand` does not contain - /// specified `ValueType`. - template - inline ValueType any_cast(any&& operand) - { - static_assert( - std::is_rvalue_reference::value /*true if ValueType is rvalue or just a value*/ - || std::is_const< typename std::remove_reference::type >::value, - "boost::any_cast shall not be used for getting nonconst references to temporary objects" - ); - return boost::any_cast(operand); - } -} - -// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved. -// Copyright Antony Polukhin, 2013-2023. -// -// 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) - -#endif diff --git a/lib/boost_1.84.0/boost/any/fwd.hpp b/lib/boost_1.84.0/boost/any/fwd.hpp deleted file mode 100644 index 752f3aceff3..00000000000 --- a/lib/boost_1.84.0/boost/any/fwd.hpp +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright Antony Polukhin, 2021-2023. -// -// 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) - -// Contributed by Ruslan Arutyunyan -#ifndef BOOST_ANY_ANYS_FWD_HPP -#define BOOST_ANY_ANYS_FWD_HPP - -#include -#ifdef BOOST_HAS_PRAGMA_ONCE -# pragma once -#endif - -/// \file boost/any/fwd.hpp -/// \brief Forward declarations of Boost.Any library types. - -/// @cond -namespace boost { - -class any; - -namespace anys { - -class unique_any; - -template -class basic_any; - -namespace detail { - - template - struct is_basic_any: public std::false_type {}; - - template - struct is_basic_any > : public std::true_type {}; - - template - struct is_some_any: public is_basic_any {}; - - template <> - struct is_some_any: public std::true_type {}; - - template <> - struct is_some_any: public std::true_type {}; - -} // namespace detail - -} // namespace anys - -} // namespace boost -/// @endcond - -#endif // #ifndef BOOST_ANY_ANYS_FWD_HPP diff --git a/lib/boost_1.84.0/boost/bind/apply.hpp b/lib/boost_1.84.0/boost/bind/apply.hpp deleted file mode 100644 index 0520fd0a04c..00000000000 --- a/lib/boost_1.84.0/boost/bind/apply.hpp +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef BOOST_BIND_APPLY_HPP_INCLUDED -#define BOOST_BIND_APPLY_HPP_INCLUDED - -// -// apply.hpp -// -// Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd. -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#include -#include - -namespace boost -{ - -template struct apply -{ - typedef R result_type; - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template result_type operator()( F&& f, A&&... a ) const - { - return static_cast( f )( static_cast( a )... ); - } - -#else - - template result_type operator()(F & f) const - { - return f(); - } - - template result_type operator()(F & f, A1 & a1) const - { - return f(a1); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2) const - { - return f(a1, a2); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3) const - { - return f(a1, a2, a3); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4) const - { - return f(a1, a2, a3, a4); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const - { - return f(a1, a2, a3, a4, a5); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const - { - return f(a1, a2, a3, a4, a5, a6); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const - { - return f(a1, a2, a3, a4, a5, a6, a7); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const - { - return f(a1, a2, a3, a4, a5, a6, a7, a8); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const - { - return f(a1, a2, a3, a4, a5, a6, a7, a8, a9); - } - -#endif -}; - -} // namespace boost - -#endif // #ifndef BOOST_BIND_APPLY_HPP_INCLUDED diff --git a/lib/boost_1.84.0/boost/bind/bind.hpp b/lib/boost_1.84.0/boost/bind/bind.hpp deleted file mode 100644 index fd0ee144fdb..00000000000 --- a/lib/boost_1.84.0/boost/bind/bind.hpp +++ /dev/null @@ -1,2346 +0,0 @@ -#ifndef BOOST_BIND_BIND_HPP_INCLUDED -#define BOOST_BIND_BIND_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// bind.hpp - binds function objects to arguments -// -// Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd. -// Copyright (c) 2001 David Abrahams -// Copyright (c) 2005 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/bind/bind.html for documentation. -// - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) -#include // std::forward -#endif - -// Borland-specific bug, visit_each() silently fails to produce code - -#if defined(BOOST_BORLANDC) -# define BOOST_BIND_VISIT_EACH boost::visit_each -#else -# define BOOST_BIND_VISIT_EACH visit_each -#endif - -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable: 4512) // assignment operator could not be generated -#endif - -namespace boost -{ - -template class weak_ptr; - -namespace _bi // implementation details -{ - -// ref_compare - -template bool ref_compare( T const & a, T const & b, long ) -{ - return a == b; -} - -template bool ref_compare( arg const &, arg const &, int ) -{ - return true; -} - -template bool ref_compare( arg (*) (), arg (*) (), int ) -{ - return true; -} - -template bool ref_compare( reference_wrapper const & a, reference_wrapper const & b, int ) -{ - return a.get_pointer() == b.get_pointer(); -} - -// bind_t forward declaration for listN - -template class bind_t; - -template bool ref_compare( bind_t const & a, bind_t const & b, int ) -{ - return a.compare( b ); -} - -// value - -template class value -{ -public: - - value(T const & t): t_(t) {} - - T & get() { return t_; } - T const & get() const { return t_; } - - bool operator==(value const & rhs) const - { - return t_ == rhs.t_; - } - -private: - - T t_; -}; - -// ref_compare for weak_ptr - -template bool ref_compare( value< weak_ptr > const & a, value< weak_ptr > const & b, int ) -{ - return !(a.get() < b.get()) && !(b.get() < a.get()); -} - -// type - -template class type {}; - -// unwrap - -template struct unwrapper -{ - static inline F & unwrap( F & f, long ) - { - return f; - } - - template static inline F2 & unwrap( reference_wrapper rf, int ) - { - return rf.get(); - } - - template static inline _mfi::dm unwrap( R T::* pm, int ) - { - return _mfi::dm( pm ); - } -}; - -// listN - -class list0 -{ -public: - - list0() {} - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A &, long) - { - return unwrapper::unwrap(f, 0)(); - } - - template R operator()(type, F const & f, A &, long) const - { - return unwrapper::unwrap(f, 0)(); - } - - template void operator()(type, F & f, A &, int) - { - unwrapper::unwrap(f, 0)(); - } - - template void operator()(type, F const & f, A &, int) const - { - unwrapper::unwrap(f, 0)(); - } - - template void accept(V &) const - { - } - - bool operator==(list0 const &) const - { - return true; - } -}; - -#ifdef BOOST_MSVC -// MSVC is bright enough to realise that the parameter rhs -// in operator==may be unused for some template argument types: -#pragma warning(push) -#pragma warning(disable:4100) -#endif - -template< class A1 > class list1: private storage1< A1 > -{ -private: - - typedef storage1< A1 > base_type; - -public: - - explicit list1( A1 a1 ): base_type( a1 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list1 const & rhs) const - { - return ref_compare(base_type::a1_, rhs.a1_, 0); - } -}; - -struct logical_and; -struct logical_or; - -template< class A1, class A2 > class list2: private storage2< A1, A2 > -{ -private: - - typedef storage2< A1, A2 > base_type; - -public: - - list2( A1 a1, A2 a2 ): base_type( a1, a2 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); - } - - template bool operator()( type, logical_and & /*f*/, A & a, int ) - { - return a[ base_type::a1_ ] && a[ base_type::a2_ ]; - } - - template bool operator()( type, logical_and const & /*f*/, A & a, int ) const - { - return a[ base_type::a1_ ] && a[ base_type::a2_ ]; - } - - template bool operator()( type, logical_or & /*f*/, A & a, int ) - { - return a[ base_type::a1_ ] || a[ base_type::a2_ ]; - } - - template bool operator()( type, logical_or const & /*f*/, A & a, int ) const - { - return a[ base_type::a1_ ] || a[ base_type::a2_ ]; - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list2 const & rhs) const - { - return ref_compare(base_type::a1_, rhs.a1_, 0) && ref_compare(base_type::a2_, rhs.a2_, 0); - } -}; - -template< class A1, class A2, class A3 > class list3: private storage3< A1, A2, A3 > -{ -private: - - typedef storage3< A1, A2, A3 > base_type; - -public: - - list3( A1 a1, A2 a2, A3 a3 ): base_type( a1, a2, a3 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list3 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ); - } -}; - -template< class A1, class A2, class A3, class A4 > class list4: private storage4< A1, A2, A3, A4 > -{ -private: - - typedef storage4< A1, A2, A3, A4 > base_type; - -public: - - list4( A1 a1, A2 a2, A3 a3, A4 a4 ): base_type( a1, a2, a3, a4 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list4 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5 > class list5: private storage5< A1, A2, A3, A4, A5 > -{ -private: - - typedef storage5< A1, A2, A3, A4, A5 > base_type; - -public: - - list5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): base_type( a1, a2, a3, a4, a5 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list5 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ); - } -}; - -template class list6: private storage6< A1, A2, A3, A4, A5, A6 > -{ -private: - - typedef storage6< A1, A2, A3, A4, A5, A6 > base_type; - -public: - - list6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): base_type( a1, a2, a3, a4, a5, a6 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - A6 operator[] (boost::arg<6>) const { return base_type::a6_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list6 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ) && - ref_compare( base_type::a6_, rhs.a6_, 0 ); - } -}; - -template class list7: private storage7< A1, A2, A3, A4, A5, A6, A7 > -{ -private: - - typedef storage7< A1, A2, A3, A4, A5, A6, A7 > base_type; - -public: - - list7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): base_type( a1, a2, a3, a4, a5, a6, a7 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - A6 operator[] (boost::arg<6>) const { return base_type::a6_; } - A7 operator[] (boost::arg<7>) const { return base_type::a7_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } - A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list7 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ) && - ref_compare( base_type::a6_, rhs.a6_, 0 ) && - ref_compare( base_type::a7_, rhs.a7_, 0 ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class list8: private storage8< A1, A2, A3, A4, A5, A6, A7, A8 > -{ -private: - - typedef storage8< A1, A2, A3, A4, A5, A6, A7, A8 > base_type; - -public: - - list8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - A6 operator[] (boost::arg<6>) const { return base_type::a6_; } - A7 operator[] (boost::arg<7>) const { return base_type::a7_; } - A8 operator[] (boost::arg<8>) const { return base_type::a8_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } - A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } - A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list8 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ) && - ref_compare( base_type::a6_, rhs.a6_, 0 ) && - ref_compare( base_type::a7_, rhs.a7_, 0 ) && - ref_compare( base_type::a8_, rhs.a8_, 0 ); - } -}; - -template class list9: private storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > -{ -private: - - typedef storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > base_type; - -public: - - list9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - A6 operator[] (boost::arg<6>) const { return base_type::a6_; } - A7 operator[] (boost::arg<7>) const { return base_type::a7_; } - A8 operator[] (boost::arg<8>) const { return base_type::a8_; } - A9 operator[] (boost::arg<9>) const { return base_type::a9_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } - A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } - A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } - A9 operator[] (boost::arg<9> (*) ()) const { return base_type::a9_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } - - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list9 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ) && - ref_compare( base_type::a6_, rhs.a6_, 0 ) && - ref_compare( base_type::a7_, rhs.a7_, 0 ) && - ref_compare( base_type::a8_, rhs.a8_, 0 ) && - ref_compare( base_type::a9_, rhs.a9_, 0 ); - } -}; - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -// bind_t - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !(defined(BOOST_GCC) && BOOST_GCC < 40600) - -template< class A1 > class rrlist1 -{ -private: - - A1 & a1_; // not A1&& because of msvc-10.0 - -public: - - explicit rrlist1( A1 & a1 ): a1_( a1 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } // not static_cast because of g++ 4.9 - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist1 a( a1_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist1 a( a1_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2 > class rrlist2 -{ -private: - - A1 & a1_; - A2 & a2_; - -public: - - rrlist2( A1 & a1, A2 & a2 ): a1_( a1 ), a2_( a2 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist2 a( a1_, a2_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist2 a( a1_, a2_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3 > class rrlist3 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - -public: - - rrlist3( A1 & a1, A2 & a2, A3 & a3 ): a1_( a1 ), a2_( a2 ), a3_( a3 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist3 a( a1_, a2_, a3_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist3 a( a1_, a2_, a3_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3, class A4 > class rrlist4 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - -public: - - rrlist4( A1 & a1, A2 & a2, A3 & a3, A4 & a4 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist4 a( a1_, a2_, a3_, a4_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist4 a( a1_, a2_, a3_, a4_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5 > class rrlist5 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - -public: - - rrlist5( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist5 a( a1_, a2_, a3_, a4_, a5_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist5 a( a1_, a2_, a3_, a4_, a5_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5, class A6 > class rrlist6 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - A6 & a6_; - -public: - - rrlist6( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ), a6_( a6 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6>) const { return std::forward( a6_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward( a6_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist6 a( a1_, a2_, a3_, a4_, a5_, a6_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist6 a( a1_, a2_, a3_, a4_, a5_, a6_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5, class A6, class A7 > class rrlist7 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - A6 & a6_; - A7 & a7_; - -public: - - rrlist7( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ), a6_( a6 ), a7_( a7 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6>) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7>) const { return std::forward( a7_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7> (*) ()) const { return std::forward( a7_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist7 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist7 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class rrlist8 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - A6 & a6_; - A7 & a7_; - A8 & a8_; - -public: - - rrlist8( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ), a6_( a6 ), a7_( a7 ), a8_( a8 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6>) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7>) const { return std::forward( a7_ ); } - A8 && operator[] (boost::arg<8>) const { return std::forward( a8_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7> (*) ()) const { return std::forward( a7_ ); } - A8 && operator[] (boost::arg<8> (*) ()) const { return std::forward( a8_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist8 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist8 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > class rrlist9 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - A6 & a6_; - A7 & a7_; - A8 & a8_; - A9 & a9_; - -public: - - rrlist9( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ), a6_( a6 ), a7_( a7 ), a8_( a8 ), a9_( a9 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6>) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7>) const { return std::forward( a7_ ); } - A8 && operator[] (boost::arg<8>) const { return std::forward( a8_ ); } - A9 && operator[] (boost::arg<9>) const { return std::forward( a9_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7> (*) ()) const { return std::forward( a7_ ); } - A8 && operator[] (boost::arg<8> (*) ()) const { return std::forward( a8_ ); } - A9 && operator[] (boost::arg<9> (*) ()) const { return std::forward( a9_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - template typename result_traits::type operator[] (bind_t & b) const - { - rrlist9 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_, a9_ ); - return b.eval( a ); - } - - template typename result_traits::type operator[] (bind_t const & b) const - { - rrlist9 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_, a9_ ); - return b.eval( a ); - } -}; - -template class bind_t -{ -private: - - F f_; - L l_; - -public: - - typedef typename result_traits::type result_type; - typedef bind_t this_type; - - bind_t( F f, L const & l ): f_( f ), l_( l ) {} - - // - - result_type operator()() - { - list0 a; - return l_( type(), f_, a, 0 ); - } - - result_type operator()() const - { - list0 a; - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1 ) - { - rrlist1< A1 > a( a1 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1 ) const - { - rrlist1< A1 > a( a1 ); - return l_(type(), f_, a, 0); - } - - template result_type operator()( A1 && a1, A2 && a2 ) - { - rrlist2< A1, A2 > a( a1, a2 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2 ) const - { - rrlist2< A1, A2 > a( a1, a2 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3 ) - { - rrlist3< A1, A2, A3 > a( a1, a2, a3 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3 ) const - { - rrlist3< A1, A2, A3 > a( a1, a2, a3 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) - { - rrlist4< A1, A2, A3, A4 > a( a1, a2, a3, a4 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) const - { - rrlist4< A1, A2, A3, A4 > a( a1, a2, a3, a4 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) - { - rrlist5< A1, A2, A3, A4, A5 > a( a1, a2, a3, a4, a5 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) const - { - rrlist5< A1, A2, A3, A4, A5 > a( a1, a2, a3, a4, a5 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) - { - rrlist6< A1, A2, A3, A4, A5, A6 > a( a1, a2, a3, a4, a5, a6 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) const - { - rrlist6< A1, A2, A3, A4, A5, A6 > a( a1, a2, a3, a4, a5, a6 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) - { - rrlist7< A1, A2, A3, A4, A5, A6, A7 > a( a1, a2, a3, a4, a5, a6, a7 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) const - { - rrlist7< A1, A2, A3, A4, A5, A6, A7 > a( a1, a2, a3, a4, a5, a6, a7 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) - { - rrlist8< A1, A2, A3, A4, A5, A6, A7, A8 > a( a1, a2, a3, a4, a5, a6, a7, a8 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) const - { - rrlist8< A1, A2, A3, A4, A5, A6, A7, A8 > a( a1, a2, a3, a4, a5, a6, a7, a8 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) - { - rrlist9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > a( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) const - { - rrlist9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > a( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); - return l_( type(), f_, a, 0 ); - } - - // - - template result_type eval( A & a ) - { - return l_( type(), f_, a, 0 ); - } - - template result_type eval( A & a ) const - { - return l_( type(), f_, a, 0 ); - } - - template void accept( V & v ) const - { -#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( BOOST_BORLANDC ) - using boost::visit_each; -#endif - - BOOST_BIND_VISIT_EACH( v, f_, 0 ); - l_.accept( v ); - } - - bool compare( this_type const & rhs ) const - { - return ref_compare( f_, rhs.f_, 0 ) && l_ == rhs.l_; - } -}; - -#elif !defined( BOOST_NO_VOID_RETURNS ) - -template class bind_t -{ -public: - - typedef bind_t this_type; - - bind_t(F f, L const & l): f_(f), l_(l) {} - -#define BOOST_BIND_RETURN return -#include -#undef BOOST_BIND_RETURN - -}; - -#else // no void returns - -template struct bind_t_generator -{ - -template class implementation -{ -public: - - typedef implementation this_type; - - implementation(F f, L const & l): f_(f), l_(l) {} - -#define BOOST_BIND_RETURN return -#include -#undef BOOST_BIND_RETURN - -}; - -}; - -template<> struct bind_t_generator -{ - -template class implementation -{ -private: - - typedef void R; - -public: - - typedef implementation this_type; - - implementation(F f, L const & l): f_(f), l_(l) {} - -#define BOOST_BIND_RETURN -#include -#undef BOOST_BIND_RETURN - -}; - -}; - -template class bind_t: public bind_t_generator::BOOST_NESTED_TEMPLATE implementation -{ -public: - - bind_t(F f, L const & l): bind_t_generator::BOOST_NESTED_TEMPLATE implementation(f, l) {} - -}; - -#endif - -// function_equal - -#ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP - -// put overloads in _bi, rely on ADL - -# ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -template bool function_equal( bind_t const & a, bind_t const & b ) -{ - return a.compare(b); -} - -# else - -template bool function_equal_impl( bind_t const & a, bind_t const & b, int ) -{ - return a.compare(b); -} - -# endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -#else // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP - -// put overloads in boost - -} // namespace _bi - -# ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -template bool function_equal( _bi::bind_t const & a, _bi::bind_t const & b ) -{ - return a.compare(b); -} - -# else - -template bool function_equal_impl( _bi::bind_t const & a, _bi::bind_t const & b, int ) -{ - return a.compare(b); -} - -# endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -namespace _bi -{ - -#endif // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP - -// add_value - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || (__SUNPRO_CC >= 0x530) - -#if defined( BOOST_BORLANDC ) && BOOST_WORKAROUND( BOOST_BORLANDC, BOOST_TESTED_AT(0x582) ) - -template struct add_value -{ - typedef _bi::value type; -}; - -#else - -template< class T, int I > struct add_value_2 -{ - typedef boost::arg type; -}; - -template< class T > struct add_value_2< T, 0 > -{ - typedef _bi::value< T > type; -}; - -template struct add_value -{ - typedef typename add_value_2< T, boost::is_placeholder< T >::value >::type type; -}; - -#endif - -template struct add_value< value > -{ - typedef _bi::value type; -}; - -template struct add_value< reference_wrapper > -{ - typedef reference_wrapper type; -}; - -template struct add_value< arg > -{ - typedef boost::arg type; -}; - -template struct add_value< arg (*) () > -{ - typedef boost::arg (*type) (); -}; - -template struct add_value< bind_t > -{ - typedef bind_t type; -}; - -#else - -template struct _avt_0; - -template<> struct _avt_0<1> -{ - template struct inner - { - typedef T type; - }; -}; - -template<> struct _avt_0<2> -{ - template struct inner - { - typedef value type; - }; -}; - -typedef char (&_avt_r1) [1]; -typedef char (&_avt_r2) [2]; - -template _avt_r1 _avt_f(value); -template _avt_r1 _avt_f(reference_wrapper); -template _avt_r1 _avt_f(arg); -template _avt_r1 _avt_f(arg (*) ()); -template _avt_r1 _avt_f(bind_t); - -_avt_r2 _avt_f(...); - -template struct add_value -{ - static T t(); - typedef typename _avt_0::template inner::type type; -}; - -#endif - -// list_av_N - -template struct list_av_1 -{ - typedef typename add_value::type B1; - typedef list1 type; -}; - -template struct list_av_2 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef list2 type; -}; - -template struct list_av_3 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef list3 type; -}; - -template struct list_av_4 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef list4 type; -}; - -template struct list_av_5 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef list5 type; -}; - -template struct list_av_6 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef typename add_value::type B6; - typedef list6 type; -}; - -template struct list_av_7 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef typename add_value::type B6; - typedef typename add_value::type B7; - typedef list7 type; -}; - -template struct list_av_8 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef typename add_value::type B6; - typedef typename add_value::type B7; - typedef typename add_value::type B8; - typedef list8 type; -}; - -template struct list_av_9 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef typename add_value::type B6; - typedef typename add_value::type B7; - typedef typename add_value::type B8; - typedef typename add_value::type B9; - typedef list9 type; -}; - -// operator! - -struct logical_not -{ - template bool operator()(V const & v) const { return !v; } -}; - -template - bind_t< bool, logical_not, list1< bind_t > > - operator! (bind_t const & f) -{ - typedef list1< bind_t > list_type; - return bind_t ( logical_not(), list_type(f) ); -} - -// relational operators - -#define BOOST_BIND_OPERATOR( op, name ) \ -\ -struct name \ -{ \ - template bool operator()(V const & v, W const & w) const { return v op w; } \ -}; \ - \ -template \ - bind_t< bool, name, list2< bind_t, typename add_value::type > > \ - operator op (bind_t const & f, A2 a2) \ -{ \ - typedef typename add_value::type B2; \ - typedef list2< bind_t, B2> list_type; \ - return bind_t ( name(), list_type(f, a2) ); \ -} - -BOOST_BIND_OPERATOR( ==, equal ) -BOOST_BIND_OPERATOR( !=, not_equal ) - -BOOST_BIND_OPERATOR( <, less ) -BOOST_BIND_OPERATOR( <=, less_equal ) - -BOOST_BIND_OPERATOR( >, greater ) -BOOST_BIND_OPERATOR( >=, greater_equal ) - -BOOST_BIND_OPERATOR( &&, logical_and ) -BOOST_BIND_OPERATOR( ||, logical_or ) - -#undef BOOST_BIND_OPERATOR - -#if defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) - -// resolve ambiguity with rel_ops - -#define BOOST_BIND_OPERATOR( op, name ) \ -\ -template \ - bind_t< bool, name, list2< bind_t, bind_t > > \ - operator op (bind_t const & f, bind_t const & g) \ -{ \ - typedef list2< bind_t, bind_t > list_type; \ - return bind_t ( name(), list_type(f, g) ); \ -} - -BOOST_BIND_OPERATOR( !=, not_equal ) -BOOST_BIND_OPERATOR( <=, less_equal ) -BOOST_BIND_OPERATOR( >, greater ) -BOOST_BIND_OPERATOR( >=, greater_equal ) - -#endif - -// visit_each, ADL - -#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( BOOST_BORLANDC ) \ - && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) - -template void visit_each( V & v, value const & t, int ) -{ - using boost::visit_each; - BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); -} - -template void visit_each( V & v, bind_t const & t, int ) -{ - t.accept( v ); -} - -#endif - -} // namespace _bi - -// visit_each, no ADL - -#if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) || defined( BOOST_BORLANDC ) \ - || (defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) - -template void visit_each( V & v, _bi::value const & t, int ) -{ - BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); -} - -template void visit_each( V & v, _bi::bind_t const & t, int ) -{ - t.accept( v ); -} - -#endif - -// is_bind_expression - -template< class T > struct is_bind_expression -{ - enum _vt { value = 0 }; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template< class R, class F, class L > struct is_bind_expression< _bi::bind_t< R, F, L > > -{ - enum _vt { value = 1 }; -}; - -#endif - -// bind - -#ifndef BOOST_BIND -#define BOOST_BIND bind -#endif - -// generic function objects - -template - _bi::bind_t - BOOST_BIND(F f) -{ - typedef _bi::list0 list_type; - return _bi::bind_t (f, list_type()); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1) -{ - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t (f, list_type(a1)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2) -{ - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t (f, list_type(a1, a2)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) -{ - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -// generic function objects, alternative syntax - -template - _bi::bind_t - BOOST_BIND(boost::type, F f) -{ - typedef _bi::list0 list_type; - return _bi::bind_t (f, list_type()); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1) -{ - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t (f, list_type(a1)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2) -{ - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t (f, list_type(a1, a2)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3) -{ - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) - -// adaptable function objects - -template - _bi::bind_t<_bi::unspecified, F, _bi::list0> - BOOST_BIND(F f) -{ - typedef _bi::list0 list_type; - return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type()); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_1::type> - BOOST_BIND(F f, A1 a1) -{ - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_2::type> - BOOST_BIND(F f, A1 a1, A2 a2) -{ - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1, a2)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_3::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) -{ - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_4::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_5::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_6::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_7::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_8::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_9::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -#endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) - -// function pointers - -#define BOOST_BIND_CC -#define BOOST_BIND_ST -#define BOOST_BIND_NOEXCEPT - -#include - -# if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED ) -# undef BOOST_BIND_NOEXCEPT -# define BOOST_BIND_NOEXCEPT noexcept -# include -# endif - -#undef BOOST_BIND_CC -#undef BOOST_BIND_ST -#undef BOOST_BIND_NOEXCEPT - -#if defined(BOOST_BIND_ENABLE_STDCALL) && !defined(_M_X64) - -#define BOOST_BIND_CC __stdcall -#define BOOST_BIND_ST -#define BOOST_BIND_NOEXCEPT - -#include - -#undef BOOST_BIND_CC -#undef BOOST_BIND_ST -#undef BOOST_BIND_NOEXCEPT - -#endif - -#if defined(BOOST_BIND_ENABLE_FASTCALL) && !defined(_M_X64) - -#define BOOST_BIND_CC __fastcall -#define BOOST_BIND_ST -#define BOOST_BIND_NOEXCEPT - -#include - -#undef BOOST_BIND_CC -#undef BOOST_BIND_ST -#undef BOOST_BIND_NOEXCEPT - -#endif - -#ifdef BOOST_BIND_ENABLE_PASCAL - -#define BOOST_BIND_ST pascal -#define BOOST_BIND_CC -#define BOOST_BIND_NOEXCEPT - -#include - -#undef BOOST_BIND_ST -#undef BOOST_BIND_CC -#undef BOOST_BIND_NOEXCEPT - -#endif - -// member function pointers - -#define BOOST_BIND_MF_NAME(X) X -#define BOOST_BIND_MF_CC -#define BOOST_BIND_MF_NOEXCEPT - -#include -#include - -# if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED ) -# undef BOOST_BIND_MF_NOEXCEPT -# define BOOST_BIND_MF_NOEXCEPT noexcept -# include -# include -# endif - -#undef BOOST_BIND_MF_NAME -#undef BOOST_BIND_MF_CC -#undef BOOST_BIND_MF_NOEXCEPT - -#if defined(BOOST_MEM_FN_ENABLE_CDECL) && !defined(_M_X64) - -#define BOOST_BIND_MF_NAME(X) X##_cdecl -#define BOOST_BIND_MF_CC __cdecl -#define BOOST_BIND_MF_NOEXCEPT - -#include -#include - -#undef BOOST_BIND_MF_NAME -#undef BOOST_BIND_MF_CC -#undef BOOST_BIND_MF_NOEXCEPT - -#endif - -#if defined(BOOST_MEM_FN_ENABLE_STDCALL) && !defined(_M_X64) - -#define BOOST_BIND_MF_NAME(X) X##_stdcall -#define BOOST_BIND_MF_CC __stdcall -#define BOOST_BIND_MF_NOEXCEPT - -#include -#include - -#undef BOOST_BIND_MF_NAME -#undef BOOST_BIND_MF_CC -#undef BOOST_BIND_MF_NOEXCEPT - -#endif - -#if defined(BOOST_MEM_FN_ENABLE_FASTCALL) && !defined(_M_X64) - -#define BOOST_BIND_MF_NAME(X) X##_fastcall -#define BOOST_BIND_MF_CC __fastcall -#define BOOST_BIND_MF_NOEXCEPT - -#include -#include - -#undef BOOST_BIND_MF_NAME -#undef BOOST_BIND_MF_CC -#undef BOOST_BIND_MF_NOEXCEPT - -#endif - -// data member pointers - -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - || ( defined(BOOST_BORLANDC) && BOOST_WORKAROUND( BOOST_BORLANDC, BOOST_TESTED_AT( 0x620 ) ) ) - -template -_bi::bind_t< R, _mfi::dm, typename _bi::list_av_1::type > - BOOST_BIND(R T::*f, A1 a1) -{ - typedef _mfi::dm F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t( F(f), list_type(a1) ); -} - -#else - -namespace _bi -{ - -template< class Pm, int I > struct add_cref; - -template< class M, class T > struct add_cref< M T::*, 0 > -{ - typedef M type; -}; - -template< class M, class T > struct add_cref< M T::*, 1 > -{ -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable:4180) -#endif - typedef M const & type; -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif -}; - -template< class R, class T > struct add_cref< R (T::*) (), 1 > -{ - typedef void type; -}; - -#if !defined(__IBMCPP__) || __IBMCPP_FUNC_CV_TMPL_ARG_DEDUCTION - -template< class R, class T > struct add_cref< R (T::*) () const, 1 > -{ - typedef void type; -}; - -#if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED ) - -template< class R, class T > struct add_cref< R (T::*) () const noexcept, 1 > -{ - typedef void type; -}; - -#endif // __cpp_noexcept_function_type - -#endif // __IBMCPP__ - -template struct isref -{ - enum value_type { value = 0 }; -}; - -template struct isref< R& > -{ - enum value_type { value = 1 }; -}; - -template struct isref< R* > -{ - enum value_type { value = 1 }; -}; - -template struct dm_result -{ - typedef typename add_cref< Pm, 1 >::type type; -}; - -template struct dm_result< Pm, bind_t > -{ - typedef typename bind_t::result_type result_type; - typedef typename add_cref< Pm, isref< result_type >::value >::type type; -}; - -} // namespace _bi - -template< class A1, class M, class T > - -_bi::bind_t< - typename _bi::dm_result< M T::*, A1 >::type, - _mfi::dm, - typename _bi::list_av_1::type -> - -BOOST_BIND( M T::*f, A1 a1 ) -{ - typedef typename _bi::dm_result< M T::*, A1 >::type result_type; - typedef _mfi::dm F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t< result_type, F, list_type >( F( f ), list_type( a1 ) ); -} - -#endif - -} // namespace boost - -#ifndef BOOST_BIND_NO_PLACEHOLDERS - -# include - -#endif - -#ifdef BOOST_MSVC -# pragma warning(default: 4512) // assignment operator could not be generated -# pragma warning(pop) -#endif - -#endif // #ifndef BOOST_BIND_BIND_HPP_INCLUDED diff --git a/lib/boost_1.84.0/boost/bind/bind_mf2_cc.hpp b/lib/boost_1.84.0/boost/bind/bind_mf2_cc.hpp deleted file mode 100644 index be20b1d9077..00000000000 --- a/lib/boost_1.84.0/boost/bind/bind_mf2_cc.hpp +++ /dev/null @@ -1,228 +0,0 @@ -// -// bind/bind_mf2_cc.hpp - member functions, type<> syntax -// -// Do not include this header directly. -// -// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. -// Copyright (c) 2008 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/bind/bind.html for documentation. -// - -// 0 - -template - _bi::bind_t, typename _bi::list_av_1::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) () BOOST_BIND_MF_NOEXCEPT, A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -template - _bi::bind_t, typename _bi::list_av_1::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -// 1 - -template - _bi::bind_t, typename _bi::list_av_2::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -template - _bi::bind_t, typename _bi::list_av_2::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -// 2 - -template - _bi::bind_t, typename _bi::list_av_3::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -template - _bi::bind_t, typename _bi::list_av_3::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -// 3 - -template - _bi::bind_t, typename _bi::list_av_4::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t, typename _bi::list_av_4::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -// 4 - -template - _bi::bind_t, typename _bi::list_av_5::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t, typename _bi::list_av_5::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -// 5 - -template - _bi::bind_t, typename _bi::list_av_6::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t, typename _bi::list_av_6::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -// 6 - -template - _bi::bind_t, typename _bi::list_av_7::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t, typename _bi::list_av_7::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -// 7 - -template - _bi::bind_t, typename _bi::list_av_8::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t, typename _bi::list_av_8::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -// 8 - -template - _bi::bind_t, typename _bi::list_av_9::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -template - _bi::bind_t, typename _bi::list_av_9::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} diff --git a/lib/boost_1.84.0/boost/bind/bind_mf_cc.hpp b/lib/boost_1.84.0/boost/bind/bind_mf_cc.hpp deleted file mode 100644 index 5a1610b42a3..00000000000 --- a/lib/boost_1.84.0/boost/bind/bind_mf_cc.hpp +++ /dev/null @@ -1,441 +0,0 @@ -// -// bind/bind_mf_cc.hpp - support for different calling conventions -// -// Do not include this header directly. -// -// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - -// 0 - -template - _bi::bind_t, typename _bi::list_av_1::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () BOOST_BIND_MF_NOEXCEPT, A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -template - _bi::bind_t, typename _bi::list_av_1::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_1::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () BOOST_BIND_MF_NOEXCEPT, A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_1::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -// 1 - -template - _bi::bind_t, typename _bi::list_av_2::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -template - _bi::bind_t, typename _bi::list_av_2::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_2::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_2::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -// 2 - -template - _bi::bind_t, typename _bi::list_av_3::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -template - _bi::bind_t, typename _bi::list_av_3::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_3::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_3::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -// 3 - -template - _bi::bind_t, typename _bi::list_av_4::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t, typename _bi::list_av_4::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_4::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_4::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -// 4 - -template - _bi::bind_t, typename _bi::list_av_5::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t, typename _bi::list_av_5::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_5::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_5::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -// 5 - -template - _bi::bind_t, typename _bi::list_av_6::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t, typename _bi::list_av_6::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_6::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_6::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -// 6 - -template - _bi::bind_t, typename _bi::list_av_7::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t, typename _bi::list_av_7::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_7::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_7::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -// 7 - -template - _bi::bind_t, typename _bi::list_av_8::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t, typename _bi::list_av_8::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_8::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_8::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -// 8 - -template - _bi::bind_t, typename _bi::list_av_9::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -template - _bi::bind_t, typename _bi::list_av_9::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_9::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -template - typename boost::enable_if_c::value, - _bi::bind_t, typename _bi::list_av_9::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} diff --git a/lib/boost_1.84.0/boost/bind/bind_template.hpp b/lib/boost_1.84.0/boost/bind/bind_template.hpp deleted file mode 100644 index 212ced7fa79..00000000000 --- a/lib/boost_1.84.0/boost/bind/bind_template.hpp +++ /dev/null @@ -1,345 +0,0 @@ -// -// bind/bind_template.hpp -// -// Do not include this header directly. -// -// Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd. -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - - typedef typename result_traits::type result_type; - - result_type operator()() - { - list0 a; - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - result_type operator()() const - { - list0 a; - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1) - { - list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1) const - { - list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1) - { - list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1) const - { - list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2) - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2) const - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 & a2) - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 & a2) const - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - - template result_type operator()(A1 & a1, A2 const & a2) - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 const & a2) const - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - - template result_type operator()(A1 const & a1, A2 const & a2) - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2) const - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3) - { - list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3) const - { - list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) - { - list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const - { - list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) - { - list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const - { - list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) - { - list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const - { - list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) - { - list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const - { - list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) - { - list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const - { - list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) - { - list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const - { - list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) - { - list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const - { - list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) - { - list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const - { - list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) - { - list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const - { - list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) - { - list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const - { - list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) - { - list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const - { - list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) - { - list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const - { - list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) - { - list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const - { - list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type eval(A & a) - { - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type eval(A & a) const - { - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template void accept(V & v) const - { -#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( BOOST_BORLANDC ) - - using boost::visit_each; - -#endif - BOOST_BIND_VISIT_EACH(v, f_, 0); - l_.accept(v); - } - - bool compare(this_type const & rhs) const - { - return ref_compare(f_, rhs.f_, 0) && l_ == rhs.l_; - } - -private: - - F f_; - L l_; diff --git a/lib/boost_1.84.0/boost/bind/detail/is_same.hpp b/lib/boost_1.84.0/boost/bind/detail/is_same.hpp deleted file mode 100644 index 995b39f4e6a..00000000000 --- a/lib/boost_1.84.0/boost/bind/detail/is_same.hpp +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef BOOST_BIND_DETAIL_IS_SAME_HPP_INCLUDED -#define BOOST_BIND_DETAIL_IS_SAME_HPP_INCLUDED - -// is_same::value is true when T1 == T2 -// -// Copyright 2014 Peter Dimov -// -// Distributed under the Boost Software License, Version 1.0. -// See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt - -#include - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -namespace boost -{ -namespace _bi -{ - -template< class T1, class T2 > struct is_same -{ - BOOST_STATIC_CONSTANT( bool, value = false ); -}; - -template< class T > struct is_same< T, T > -{ - BOOST_STATIC_CONSTANT( bool, value = true ); -}; - -} // namespace _bi -} // namespace boost - -#endif // #ifndef BOOST_BIND_DETAIL_IS_SAME_HPP_INCLUDED diff --git a/lib/boost_1.84.0/boost/bind/detail/requires_cxx11.hpp b/lib/boost_1.84.0/boost/bind/detail/requires_cxx11.hpp deleted file mode 100644 index 600f58ff192..00000000000 --- a/lib/boost_1.84.0/boost/bind/detail/requires_cxx11.hpp +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef BOOST_BIND_DETAIL_REQUIRES_CXX11_HPP_INCLUDED -#define BOOST_BIND_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 -#include - -#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.Bind 1.82 and will be removed in Boost.Bind 1.85.") - -#endif - -#endif // #ifndef BOOST_BIND_DETAIL_REQUIRES_CXX11_HPP_INCLUDED diff --git a/lib/boost_1.84.0/boost/bind/mem_fn.hpp b/lib/boost_1.84.0/boost/bind/mem_fn.hpp deleted file mode 100644 index 1078e7c5a97..00000000000 --- a/lib/boost_1.84.0/boost/bind/mem_fn.hpp +++ /dev/null @@ -1,404 +0,0 @@ -#ifndef BOOST_BIND_MEM_FN_HPP_INCLUDED -#define BOOST_BIND_MEM_FN_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// mem_fn.hpp - a generalization of std::mem_fun[_ref] -// -// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. -// Copyright (c) 2001 David Abrahams -// Copyright (c) 2003-2005 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/bind/mem_fn.html for documentation. -// - -#include -#include -#include -#include - -namespace boost -{ - -#if defined(BOOST_NO_VOID_RETURNS) - -#define BOOST_MEM_FN_CLASS_F , class F -#define BOOST_MEM_FN_TYPEDEF(X) - -namespace _mfi // mem_fun_impl -{ - -template struct mf -{ - -#define BOOST_MEM_FN_RETURN return - -#define BOOST_MEM_FN_NAME(X) inner_##X -#define BOOST_MEM_FN_CC - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#if defined(BOOST_MEM_FN_ENABLE_CDECL) && !defined(_M_X64) - -#define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl -#define BOOST_MEM_FN_CC __cdecl - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#if defined(BOOST_MEM_FN_ENABLE_STDCALL) && !defined(_M_X64) - -#define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall -#define BOOST_MEM_FN_CC __stdcall - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#if defined(BOOST_MEM_FN_ENABLE_FASTCALL) && !defined(_M_X64) - -#define BOOST_MEM_FN_NAME(X) inner_##X##_fastcall -#define BOOST_MEM_FN_CC __fastcall - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#undef BOOST_MEM_FN_RETURN - -}; // struct mf - -template<> struct mf -{ - -#define BOOST_MEM_FN_RETURN - -#define BOOST_MEM_FN_NAME(X) inner_##X -#define BOOST_MEM_FN_CC - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#if defined(BOOST_MEM_FN_ENABLE_CDECL) && !defined(_M_X64) - -#define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl -#define BOOST_MEM_FN_CC __cdecl - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_STDCALL - -#define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall -#define BOOST_MEM_FN_CC __stdcall - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_FASTCALL - -#define BOOST_MEM_FN_NAME(X) inner_##X##_fastcall -#define BOOST_MEM_FN_CC __fastcall - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#undef BOOST_MEM_FN_RETURN - -}; // struct mf - -#undef BOOST_MEM_FN_CLASS_F -#undef BOOST_MEM_FN_TYPEDEF_F - -#define BOOST_MEM_FN_NAME(X) X -#define BOOST_MEM_FN_NAME2(X) inner_##X -#define BOOST_MEM_FN_CC - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_NAME2 -#undef BOOST_MEM_FN_CC - -#if defined(BOOST_MEM_FN_ENABLE_CDECL) && !defined(_M_X64) - -#define BOOST_MEM_FN_NAME(X) X##_cdecl -#define BOOST_MEM_FN_NAME2(X) inner_##X##_cdecl -#define BOOST_MEM_FN_CC __cdecl - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_NAME2 -#undef BOOST_MEM_FN_CC - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_STDCALL - -#define BOOST_MEM_FN_NAME(X) X##_stdcall -#define BOOST_MEM_FN_NAME2(X) inner_##X##_stdcall -#define BOOST_MEM_FN_CC __stdcall - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_NAME2 -#undef BOOST_MEM_FN_CC - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_FASTCALL - -#define BOOST_MEM_FN_NAME(X) X##_fastcall -#define BOOST_MEM_FN_NAME2(X) inner_##X##_fastcall -#define BOOST_MEM_FN_CC __fastcall - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_NAME2 -#undef BOOST_MEM_FN_CC - -#endif - -} // namespace _mfi - -#else // #ifdef BOOST_NO_VOID_RETURNS - -#define BOOST_MEM_FN_CLASS_F -#define BOOST_MEM_FN_TYPEDEF(X) typedef X; - -namespace _mfi -{ - -#define BOOST_MEM_FN_RETURN return - -#define BOOST_MEM_FN_NAME(X) X -#define BOOST_MEM_FN_CC - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#if defined(BOOST_MEM_FN_ENABLE_CDECL) && !defined(_M_X64) - -#define BOOST_MEM_FN_NAME(X) X##_cdecl -#define BOOST_MEM_FN_CC __cdecl - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#if defined(BOOST_MEM_FN_ENABLE_STDCALL) && !defined(_M_X64) - -#define BOOST_MEM_FN_NAME(X) X##_stdcall -#define BOOST_MEM_FN_CC __stdcall - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#if defined(BOOST_MEM_FN_ENABLE_FASTCALL) && !defined(_M_X64) - -#define BOOST_MEM_FN_NAME(X) X##_fastcall -#define BOOST_MEM_FN_CC __fastcall - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#undef BOOST_MEM_FN_RETURN - -} // namespace _mfi - -#undef BOOST_MEM_FN_CLASS_F -#undef BOOST_MEM_FN_TYPEDEF - -#endif // #ifdef BOOST_NO_VOID_RETURNS - -#define BOOST_MEM_FN_NAME(X) X -#define BOOST_MEM_FN_CC -#define BOOST_MEM_FN_NOEXCEPT - -#include - -#if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED ) -# undef BOOST_MEM_FN_NOEXCEPT -# define BOOST_MEM_FN_NOEXCEPT noexcept -# include -#endif - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NOEXCEPT - -#if defined(BOOST_MEM_FN_ENABLE_CDECL) && !defined(_M_X64) - -#define BOOST_MEM_FN_NAME(X) X##_cdecl -#define BOOST_MEM_FN_CC __cdecl -#define BOOST_MEM_FN_NOEXCEPT - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NOEXCEPT - -#endif - -#if defined(BOOST_MEM_FN_ENABLE_STDCALL) && !defined(_M_X64) - -#define BOOST_MEM_FN_NAME(X) X##_stdcall -#define BOOST_MEM_FN_CC __stdcall -#define BOOST_MEM_FN_NOEXCEPT - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NOEXCEPT - -#endif - -#if defined(BOOST_MEM_FN_ENABLE_FASTCALL) && !defined(_M_X64) - -#define BOOST_MEM_FN_NAME(X) X##_fastcall -#define BOOST_MEM_FN_CC __fastcall -#define BOOST_MEM_FN_NOEXCEPT - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NOEXCEPT - -#endif - -// data member support - -namespace _mfi -{ - -template class dm -{ -public: - - typedef R const & result_type; - typedef T const * argument_type; - -private: - - typedef R (T::*F); - F f_; - - template R const & call(U & u, T const *) const - { - return (u.*f_); - } - - template R const & call(U & u, void const *) const - { - return (get_pointer(u)->*f_); - } - -public: - - explicit dm(F f): f_(f) {} - - R & operator()(T * p) const - { - return (p->*f_); - } - - R const & operator()(T const * p) const - { - return (p->*f_); - } - - template R const & operator()(U const & u) const - { - return call(u, &u); - } - -#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && !BOOST_WORKAROUND(__MWERKS__, < 0x3200) - - R & operator()(T & t) const - { - return (t.*f_); - } - - R const & operator()(T const & t) const - { - return (t.*f_); - } - -#endif - - bool operator==(dm const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(dm const & rhs) const - { - return f_ != rhs.f_; - } -}; - -} // namespace _mfi - -template _mfi::dm mem_fn(R T::*f) -{ - return _mfi::dm(f); -} - -} // namespace boost - -#endif // #ifndef BOOST_BIND_MEM_FN_HPP_INCLUDED diff --git a/lib/boost_1.84.0/boost/bind/mem_fn_cc.hpp b/lib/boost_1.84.0/boost/bind/mem_fn_cc.hpp deleted file mode 100644 index 03e38300a56..00000000000 --- a/lib/boost_1.84.0/boost/bind/mem_fn_cc.hpp +++ /dev/null @@ -1,103 +0,0 @@ -// -// bind/mem_fn_cc.hpp - support for different calling conventions -// -// Do not include this header directly. -// -// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/bind/mem_fn.html for documentation. -// - -template _mfi::BOOST_MEM_FN_NAME(mf0) mem_fn(R (BOOST_MEM_FN_CC T::*f) () BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(mf0)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf0) mem_fn(R (BOOST_MEM_FN_CC T::*f) () const BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf0)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf1) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1) BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(mf1)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf1) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1) const BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf1)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf2) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2) BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(mf2)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf2) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2) const BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf2)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf3) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3) BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(mf3)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf3) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3) const BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf3)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf4) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4) BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(mf4)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf4) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4) const BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf4)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf5) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5) BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(mf5)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf5) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5) const BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf5)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf6) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6) BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(mf6)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf6) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6) const BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf6)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf7) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7) BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(mf7)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf7) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7) const BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf7)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf8) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7, A8) BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(mf8)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf8) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7, A8) const BOOST_MEM_FN_NOEXCEPT) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf8)(f); -} diff --git a/lib/boost_1.84.0/boost/bind/mem_fn_template.hpp b/lib/boost_1.84.0/boost/bind/mem_fn_template.hpp deleted file mode 100644 index b26d585dbc8..00000000000 --- a/lib/boost_1.84.0/boost/bind/mem_fn_template.hpp +++ /dev/null @@ -1,1047 +0,0 @@ -// -// bind/mem_fn_template.hpp -// -// Do not include this header directly -// -// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/bind/mem_fn.html for documentation. -// - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) -# define BOOST_MEM_FN_ENABLE_CONST_OVERLOADS -#endif - -// mf0 - -template class BOOST_MEM_FN_NAME(mf0) -{ -public: - - typedef R result_type; - typedef T * argument_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) ()) - F f_; - - template R call(U & u, T const *) const - { - BOOST_MEM_FN_RETURN (u.*f_)(); - } - - template R call(U & u, void const *) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf0)(F f): f_(f) {} - - R operator()(T * p) const - { - BOOST_MEM_FN_RETURN (p->*f_)(); - } - - template R operator()(U & u) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p); - } - -#endif - - R operator()(T & t) const - { - BOOST_MEM_FN_RETURN (t.*f_)(); - } - - bool operator==(BOOST_MEM_FN_NAME(mf0) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf0) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf0 - -template class BOOST_MEM_FN_NAME(cmf0) -{ -public: - - typedef R result_type; - typedef T const * argument_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) () const) - F f_; - - template R call(U & u, T const *) const - { - BOOST_MEM_FN_RETURN (u.*f_)(); - } - - template R call(U & u, void const *) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf0)(F f): f_(f) {} - - template R operator()(U const & u) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p); - } - - R operator()(T const & t) const - { - BOOST_MEM_FN_RETURN (t.*f_)(); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf0) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf0) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf1 - -template class BOOST_MEM_FN_NAME(mf1) -{ -public: - - typedef R result_type; - typedef T * first_argument_type; - typedef A1 second_argument_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1)) - F f_; - - template R call(U & u, T const *, B1 & b1) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1); - } - - template R call(U & u, void const *, B1 & b1) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf1)(F f): f_(f) {} - - R operator()(T * p, A1 a1) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1); - } - - template R operator()(U & u, A1 a1) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1); - } - -#endif - - R operator()(T & t, A1 a1) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1); - } - - bool operator==(BOOST_MEM_FN_NAME(mf1) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf1) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf1 - -template class BOOST_MEM_FN_NAME(cmf1) -{ -public: - - typedef R result_type; - typedef T const * first_argument_type; - typedef A1 second_argument_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1) const) - F f_; - - template R call(U & u, T const *, B1 & b1) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1); - } - - template R call(U & u, void const *, B1 & b1) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf1)(F f): f_(f) {} - - template R operator()(U const & u, A1 a1) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1); - } - - R operator()(T const & t, A1 a1) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf1) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf1) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf2 - -template class BOOST_MEM_FN_NAME(mf2) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2)) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf2)(F f): f_(f) {} - - R operator()(T * p, A1 a1, A2 a2) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2); - } - - template R operator()(U & u, A1 a1, A2 a2) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1, A2 a2) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2); - } - -#endif - - R operator()(T & t, A1 a1, A2 a2) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2); - } - - bool operator==(BOOST_MEM_FN_NAME(mf2) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf2) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf2 - -template class BOOST_MEM_FN_NAME(cmf2) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2) const) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf2)(F f): f_(f) {} - - template R operator()(U const & u, A1 a1, A2 a2) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2); - } - - R operator()(T const & t, A1 a1, A2 a2) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf2) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf2) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf3 - -template class BOOST_MEM_FN_NAME(mf3) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3)) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf3)(F f): f_(f) {} - - R operator()(T * p, A1 a1, A2 a2, A3 a3) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3); - } - - template R operator()(U & u, A1 a1, A2 a2, A3 a3) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); - } - -#endif - - R operator()(T & t, A1 a1, A2 a2, A3 a3) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3); - } - - bool operator==(BOOST_MEM_FN_NAME(mf3) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf3) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf3 - -template class BOOST_MEM_FN_NAME(cmf3) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf3)(F f): f_(f) {} - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); - } - - R operator()(T const & t, A1 a1, A2 a2, A3 a3) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf3) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf3) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf4 - -template class BOOST_MEM_FN_NAME(mf4) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4)) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf4)(F f): f_(f) {} - - R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4); - } - - template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); - } - -#endif - - R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4); - } - - bool operator==(BOOST_MEM_FN_NAME(mf4) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf4) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf4 - -template class BOOST_MEM_FN_NAME(cmf4) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf4)(F f): f_(f) {} - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); - } - - R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf4) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf4) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf5 - -template class BOOST_MEM_FN_NAME(mf5) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5)) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf5)(F f): f_(f) {} - - R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5); - } - - template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); - } - -#endif - - R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5); - } - - bool operator==(BOOST_MEM_FN_NAME(mf5) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf5) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf5 - -template class BOOST_MEM_FN_NAME(cmf5) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf5)(F f): f_(f) {} - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); - } - - R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf5) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf5) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf6 - -template class BOOST_MEM_FN_NAME(mf6) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6)) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf6)(F f): f_(f) {} - - R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6); - } - - template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); - } - -#endif - - R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6); - } - - bool operator==(BOOST_MEM_FN_NAME(mf6) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf6) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf6 - -template class BOOST_MEM_FN_NAME(cmf6) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf6)(F f): f_(f) {} - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); - } - - R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf6) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf6) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf7 - -template class BOOST_MEM_FN_NAME(mf7) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7)) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf7)(F f): f_(f) {} - - R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7); - } - - template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); - } - -#endif - - R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7); - } - - bool operator==(BOOST_MEM_FN_NAME(mf7) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf7) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf7 - -template class BOOST_MEM_FN_NAME(cmf7) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf7)(F f): f_(f) {} - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); - } - - R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf7) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf7) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf8 - -template class BOOST_MEM_FN_NAME(mf8) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8)) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf8)(F f): f_(f) {} - - R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); - } - - template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); - } - -#endif - - R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); - } - - bool operator==(BOOST_MEM_FN_NAME(mf8) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf8) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf8 - -template class BOOST_MEM_FN_NAME(cmf8) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf8)(F f): f_(f) {} - - R operator()(T const * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); - } - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); - } - - R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf8) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf8) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -#undef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS diff --git a/lib/boost_1.84.0/boost/bind/mem_fn_vw.hpp b/lib/boost_1.84.0/boost/bind/mem_fn_vw.hpp deleted file mode 100644 index f3fc58db04e..00000000000 --- a/lib/boost_1.84.0/boost/bind/mem_fn_vw.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// -// bind/mem_fn_vw.hpp - void return helper wrappers -// -// Do not include this header directly -// -// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/bind/mem_fn.html for documentation. -// - -template struct BOOST_MEM_FN_NAME(mf0): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (); - explicit BOOST_MEM_FN_NAME(mf0)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf0): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf0) -{ - typedef R (BOOST_MEM_FN_CC T::*F) () const; - explicit BOOST_MEM_FN_NAME(cmf0)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf0)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf1): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf1) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1); - explicit BOOST_MEM_FN_NAME(mf1)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf1)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf1): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf1) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1) const; - explicit BOOST_MEM_FN_NAME(cmf1)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf1)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf2): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf2) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2); - explicit BOOST_MEM_FN_NAME(mf2)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf2)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf2): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf2) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2) const; - explicit BOOST_MEM_FN_NAME(cmf2)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf2)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf3): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf3) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3); - explicit BOOST_MEM_FN_NAME(mf3)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf3)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf3): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf3) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const; - explicit BOOST_MEM_FN_NAME(cmf3)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf3)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf4): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf4) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4); - explicit BOOST_MEM_FN_NAME(mf4)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf4)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf4): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf4) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const; - explicit BOOST_MEM_FN_NAME(cmf4)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf4)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf5): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf5) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5); - explicit BOOST_MEM_FN_NAME(mf5)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf5)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf5): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf5) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const; - explicit BOOST_MEM_FN_NAME(cmf5)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf5)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf6): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf6) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6); - explicit BOOST_MEM_FN_NAME(mf6)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf6)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf6): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf6) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const; - explicit BOOST_MEM_FN_NAME(cmf6)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf6)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf7): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf7) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7); - explicit BOOST_MEM_FN_NAME(mf7)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf7)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf7): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf7) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const; - explicit BOOST_MEM_FN_NAME(cmf7)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf7)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf8): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf8) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8); - explicit BOOST_MEM_FN_NAME(mf8)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf8)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf8): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf8) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const; - explicit BOOST_MEM_FN_NAME(cmf8)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf8)(f) {} -}; - diff --git a/lib/boost_1.84.0/boost/bind/placeholders.hpp b/lib/boost_1.84.0/boost/bind/placeholders.hpp deleted file mode 100644 index 5e4b96d8d5f..00000000000 --- a/lib/boost_1.84.0/boost/bind/placeholders.hpp +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED -#define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// bind/placeholders.hpp - _N definitions -// -// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. -// Copyright 2015 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/bind/bind.html for documentation. -// - -#include -#include - -namespace boost -{ - -namespace placeholders -{ - -#if defined(BOOST_BORLANDC) || defined(__GNUC__) && (__GNUC__ < 4) - -inline boost::arg<1> _1() { return boost::arg<1>(); } -inline boost::arg<2> _2() { return boost::arg<2>(); } -inline boost::arg<3> _3() { return boost::arg<3>(); } -inline boost::arg<4> _4() { return boost::arg<4>(); } -inline boost::arg<5> _5() { return boost::arg<5>(); } -inline boost::arg<6> _6() { return boost::arg<6>(); } -inline boost::arg<7> _7() { return boost::arg<7>(); } -inline boost::arg<8> _8() { return boost::arg<8>(); } -inline boost::arg<9> _9() { return boost::arg<9>(); } - -#elif !defined(BOOST_NO_CXX17_INLINE_VARIABLES) - -BOOST_INLINE_CONSTEXPR boost::arg<1> _1; -BOOST_INLINE_CONSTEXPR boost::arg<2> _2; -BOOST_INLINE_CONSTEXPR boost::arg<3> _3; -BOOST_INLINE_CONSTEXPR boost::arg<4> _4; -BOOST_INLINE_CONSTEXPR boost::arg<5> _5; -BOOST_INLINE_CONSTEXPR boost::arg<6> _6; -BOOST_INLINE_CONSTEXPR boost::arg<7> _7; -BOOST_INLINE_CONSTEXPR boost::arg<8> _8; -BOOST_INLINE_CONSTEXPR boost::arg<9> _9; - -#else - -BOOST_STATIC_CONSTEXPR boost::arg<1> _1; -BOOST_STATIC_CONSTEXPR boost::arg<2> _2; -BOOST_STATIC_CONSTEXPR boost::arg<3> _3; -BOOST_STATIC_CONSTEXPR boost::arg<4> _4; -BOOST_STATIC_CONSTEXPR boost::arg<5> _5; -BOOST_STATIC_CONSTEXPR boost::arg<6> _6; -BOOST_STATIC_CONSTEXPR boost::arg<7> _7; -BOOST_STATIC_CONSTEXPR boost::arg<8> _8; -BOOST_STATIC_CONSTEXPR boost::arg<9> _9; - -#endif - -} // namespace placeholders - -} // namespace boost - -#endif // #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED diff --git a/lib/boost_1.84.0/boost/bind/protect.hpp b/lib/boost_1.84.0/boost/bind/protect.hpp deleted file mode 100644 index 9c7c120aaf2..00000000000 --- a/lib/boost_1.84.0/boost/bind/protect.hpp +++ /dev/null @@ -1,349 +0,0 @@ -#ifndef BOOST_BIND_PROTECT_HPP_INCLUDED -#define BOOST_BIND_PROTECT_HPP_INCLUDED - -// -// protect.hpp -// -// Copyright 2002, 2020 Peter Dimov -// Copyright 2009 Steven Watanabe -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#include -#include -#include -#include - -namespace boost -{ - -namespace _bi -{ - -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !(defined(BOOST_GCC) && BOOST_GCC < 40600) - -template struct protect_make_void -{ - typedef void type; -}; - -template struct protect_result_type -{ -}; - -template struct protect_result_type< F, typename protect_make_void::type > -{ - typedef typename F::result_type result_type; -}; - -template class protected_bind_t: public protect_result_type -{ -private: - - F f_; - -public: - - explicit protected_bind_t( F f ): f_( f ) - { - } - - template auto operator()( A&&... a ) -> decltype( f_( std::forward(a)... ) ) - { - return f_( std::forward(a)... ); - } - - template auto operator()( A&&... a ) const -> decltype( f_( std::forward(a)... ) ) - { - return f_( std::forward(a)... ); - } -}; - -#else - -template class protected_bind_t -{ -private: - - F f_; - -public: - - typedef typename F::result_type result_type; - - explicit protected_bind_t(F f): f_(f) - { - } - - result_type operator()() - { - return f_(); - } - - result_type operator()() const - { - return f_(); - } - - template result_type operator()(A1 & a1) - { - return f_(a1); - } - - template result_type operator()(A1 & a1) const - { - return f_(a1); - } - - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(const A1 & a1) - { - return f_(a1); - } - - template result_type operator()(const A1 & a1) const - { - return f_(a1); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2) - { - return f_(a1, a2); - } - - template result_type operator()(A1 & a1, A2 & a2) const - { - return f_(a1, a2); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 & a2) - { - return f_(a1, a2); - } - - template result_type operator()(A1 const & a1, A2 & a2) const - { - return f_(a1, a2); - } - - template result_type operator()(A1 & a1, A2 const & a2) - { - return f_(a1, a2); - } - - template result_type operator()(A1 & a1, A2 const & a2) const - { - return f_(a1, a2); - } - - template result_type operator()(A1 const & a1, A2 const & a2) - { - return f_(a1, a2); - } - - template result_type operator()(A1 const & a1, A2 const & a2) const - { - return f_(a1, a2); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3) - { - return f_(a1, a2, a3); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3) const - { - return f_(a1, a2, a3); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) - { - return f_(a1, a2, a3); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const - { - return f_(a1, a2, a3); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) - { - return f_(a1, a2, a3, a4); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const - { - return f_(a1, a2, a3, a4); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) - { - return f_(a1, a2, a3, a4); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const - { - return f_(a1, a2, a3, a4); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) - { - return f_(a1, a2, a3, a4, a5); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const - { - return f_(a1, a2, a3, a4, a5); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) - { - return f_(a1, a2, a3, a4, a5); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const - { - return f_(a1, a2, a3, a4, a5); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) - { - return f_(a1, a2, a3, a4, a5, a6); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const - { - return f_(a1, a2, a3, a4, a5, a6); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) - { - return f_(a1, a2, a3, a4, a5, a6); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const - { - return f_(a1, a2, a3, a4, a5, a6); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) - { - return f_(a1, a2, a3, a4, a5, a6, a7); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const - { - return f_(a1, a2, a3, a4, a5, a6, a7); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) - { - return f_(a1, a2, a3, a4, a5, a6, a7); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const - { - return f_(a1, a2, a3, a4, a5, a6, a7); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); - } - -#endif -}; - -#endif - -} // namespace _bi - -template _bi::protected_bind_t protect(F f) -{ - return _bi::protected_bind_t(f); -} - -} // namespace boost - -#endif // #ifndef BOOST_BIND_PROTECT_HPP_INCLUDED diff --git a/lib/boost_1.84.0/boost/bind/storage.hpp b/lib/boost_1.84.0/boost/bind/storage.hpp deleted file mode 100644 index 2ab0db185e2..00000000000 --- a/lib/boost_1.84.0/boost/bind/storage.hpp +++ /dev/null @@ -1,476 +0,0 @@ -#ifndef BOOST_BIND_STORAGE_HPP_INCLUDED -#define BOOST_BIND_STORAGE_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// bind/storage.hpp -// -// boost/bind.hpp support header, optimized storage -// -// Copyright (c) 2006 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/bind/bind.html for documentation. -// - -#include -#include -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable: 4512) // assignment operator could not be generated -#endif - -namespace boost -{ - -namespace _bi -{ - -// 1 - -template struct storage1 -{ - explicit storage1( A1 a1 ): a1_( a1 ) {} - - template void accept(V & v) const - { - BOOST_BIND_VISIT_EACH(v, a1_, 0); - } - - A1 a1_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( BOOST_BORLANDC ) - -template struct storage1< boost::arg > -{ - explicit storage1( boost::arg ) {} - - template void accept(V &) const { } - - static boost::arg a1_() { return boost::arg(); } -}; - -template struct storage1< boost::arg (*) () > -{ - explicit storage1( boost::arg (*) () ) {} - - template void accept(V &) const { } - - static boost::arg a1_() { return boost::arg(); } -}; - -#endif - -// 2 - -template struct storage2: public storage1 -{ - typedef storage1 inherited; - - storage2( A1 a1, A2 a2 ): storage1( a1 ), a2_( a2 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a2_, 0); - } - - A2 a2_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage2< A1, boost::arg >: public storage1 -{ - typedef storage1 inherited; - - storage2( A1 a1, boost::arg ): storage1( a1 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a2_() { return boost::arg(); } -}; - -template struct storage2< A1, boost::arg (*) () >: public storage1 -{ - typedef storage1 inherited; - - storage2( A1 a1, boost::arg (*) () ): storage1( a1 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a2_() { return boost::arg(); } -}; - -#endif - -// 3 - -template struct storage3: public storage2< A1, A2 > -{ - typedef storage2 inherited; - - storage3( A1 a1, A2 a2, A3 a3 ): storage2( a1, a2 ), a3_( a3 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a3_, 0); - } - - A3 a3_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage3< A1, A2, boost::arg >: public storage2< A1, A2 > -{ - typedef storage2 inherited; - - storage3( A1 a1, A2 a2, boost::arg ): storage2( a1, a2 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a3_() { return boost::arg(); } -}; - -template struct storage3< A1, A2, boost::arg (*) () >: public storage2< A1, A2 > -{ - typedef storage2 inherited; - - storage3( A1 a1, A2 a2, boost::arg (*) () ): storage2( a1, a2 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a3_() { return boost::arg(); } -}; - -#endif - -// 4 - -template struct storage4: public storage3< A1, A2, A3 > -{ - typedef storage3 inherited; - - storage4( A1 a1, A2 a2, A3 a3, A4 a4 ): storage3( a1, a2, a3 ), a4_( a4 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a4_, 0); - } - - A4 a4_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage4< A1, A2, A3, boost::arg >: public storage3< A1, A2, A3 > -{ - typedef storage3 inherited; - - storage4( A1 a1, A2 a2, A3 a3, boost::arg ): storage3( a1, a2, a3 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a4_() { return boost::arg(); } -}; - -template struct storage4< A1, A2, A3, boost::arg (*) () >: public storage3< A1, A2, A3 > -{ - typedef storage3 inherited; - - storage4( A1 a1, A2 a2, A3 a3, boost::arg (*) () ): storage3( a1, a2, a3 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a4_() { return boost::arg(); } -}; - -#endif - -// 5 - -template struct storage5: public storage4< A1, A2, A3, A4 > -{ - typedef storage4 inherited; - - storage5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): storage4( a1, a2, a3, a4 ), a5_( a5 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a5_, 0); - } - - A5 a5_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage5< A1, A2, A3, A4, boost::arg >: public storage4< A1, A2, A3, A4 > -{ - typedef storage4 inherited; - - storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg ): storage4( a1, a2, a3, a4 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a5_() { return boost::arg(); } -}; - -template struct storage5< A1, A2, A3, A4, boost::arg (*) () >: public storage4< A1, A2, A3, A4 > -{ - typedef storage4 inherited; - - storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg (*) () ): storage4( a1, a2, a3, a4 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a5_() { return boost::arg(); } -}; - -#endif - -// 6 - -template struct storage6: public storage5< A1, A2, A3, A4, A5 > -{ - typedef storage5 inherited; - - storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): storage5( a1, a2, a3, a4, a5 ), a6_( a6 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a6_, 0); - } - - A6 a6_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage6< A1, A2, A3, A4, A5, boost::arg >: public storage5< A1, A2, A3, A4, A5 > -{ - typedef storage5 inherited; - - storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg ): storage5( a1, a2, a3, a4, a5 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a6_() { return boost::arg(); } -}; - -template struct storage6< A1, A2, A3, A4, A5, boost::arg (*) () >: public storage5< A1, A2, A3, A4, A5 > -{ - typedef storage5 inherited; - - storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg (*) () ): storage5( a1, a2, a3, a4, a5 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a6_() { return boost::arg(); } -}; - -#endif - -// 7 - -template struct storage7: public storage6< A1, A2, A3, A4, A5, A6 > -{ - typedef storage6 inherited; - - storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): storage6( a1, a2, a3, a4, a5, a6 ), a7_( a7 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a7_, 0); - } - - A7 a7_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg >: public storage6< A1, A2, A3, A4, A5, A6 > -{ - typedef storage6 inherited; - - storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg ): storage6( a1, a2, a3, a4, a5, a6 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a7_() { return boost::arg(); } -}; - -template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg (*) () >: public storage6< A1, A2, A3, A4, A5, A6 > -{ - typedef storage6 inherited; - - storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg (*) () ): storage6( a1, a2, a3, a4, a5, a6 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a7_() { return boost::arg(); } -}; - -#endif - -// 8 - -template struct storage8: public storage7< A1, A2, A3, A4, A5, A6, A7 > -{ - typedef storage7 inherited; - - storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): storage7( a1, a2, a3, a4, a5, a6, a7 ), a8_( a8 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a8_, 0); - } - - A8 a8_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg >: public storage7< A1, A2, A3, A4, A5, A6, A7 > -{ - typedef storage7 inherited; - - storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a8_() { return boost::arg(); } -}; - -template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg (*) () >: public storage7< A1, A2, A3, A4, A5, A6, A7 > -{ - typedef storage7 inherited; - - storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg (*) () ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a8_() { return boost::arg(); } -}; - -#endif - -// 9 - -template struct storage9: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > -{ - typedef storage8 inherited; - - storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ), a9_( a9 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a9_, 0); - } - - A9 a9_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > -{ - typedef storage8 inherited; - - storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a9_() { return boost::arg(); } -}; - -template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg (*) () >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > -{ - typedef storage8 inherited; - - storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg (*) () ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a9_() { return boost::arg(); } -}; - -#endif - -} // namespace _bi - -} // namespace boost - -#ifdef BOOST_MSVC -# pragma warning(default: 4512) // assignment operator could not be generated -# pragma warning(pop) -#endif - -#endif // #ifndef BOOST_BIND_STORAGE_HPP_INCLUDED diff --git a/lib/boost_1.84.0/boost/cobalt/channel.hpp b/lib/boost_1.84.0/boost/cobalt/channel.hpp deleted file mode 100644 index c408b3b81f1..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/channel.hpp +++ /dev/null @@ -1,286 +0,0 @@ -// -// Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef BOOST_COBALT_CHANNEL_HPP -#define BOOST_COBALT_CHANNEL_HPP - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -namespace boost::cobalt -{ - -template -struct channel_reader; - -// tag::outline[] -template -struct channel -{ - // end::outline[] -#if defined(BOOST_COBALT_NO_PMR) - channel(std::size_t limit = 0u, - executor executor = this_thread::get_executor()); -#else - // tag::outline[] - // create a channel with a buffer limit, executor & resource. - explicit - channel(std::size_t limit = 0u, - executor executor = this_thread::get_executor(), - pmr::memory_resource * resource = this_thread::get_default_resource()); - // end::outline[] -#endif - // tag::outline[] - // not movable. - channel(channel && rhs) noexcept = delete; - channel & operator=(channel && lhs) noexcept = delete; - - using executor_type = executor; - const executor_type & get_executor(); - - // Closes the channel - ~channel(); - bool is_open() const; - // close the operation, will cancel all pending ops, too - void close(); - - // end::outline[] - private: -#if !defined(BOOST_COBALT_NO_PMR) - boost::circular_buffer> buffer_; -#else - boost::circular_buffer buffer_; -#endif - executor_type executor_; - bool is_closed_{false}; - - struct read_op : intrusive::list_base_hook > - { - channel * chn; - boost::source_location loc; - bool cancelled = false; - std::optional direct{}; - asio::cancellation_slot cancel_slot{}; - unique_handle awaited_from{nullptr}; - void (*begin_transaction)(void*) = nullptr; - - void transactional_unlink() - { - if (begin_transaction) - begin_transaction(awaited_from.get()); - this->unlink(); - } - - struct cancel_impl; - bool await_ready() { return !chn->buffer_.empty(); } - template - BOOST_NOINLINE - std::coroutine_handle await_suspend(std::coroutine_handle h); - T await_resume(); - std::tuple await_resume(const struct as_tuple_tag & ); - system::result await_resume(const struct as_result_tag &); - explicit operator bool() const {return chn && chn->is_open();} - }; - - struct write_op : intrusive::list_base_hook > - { - channel * chn; - variant2::variant ref; - boost::source_location loc; - bool cancelled = false, direct = false; - asio::cancellation_slot cancel_slot{}; - - unique_handle awaited_from{nullptr}; - void (*begin_transaction)(void*) = nullptr; - - void transactional_unlink() - { - if (begin_transaction) - begin_transaction(awaited_from.get()); - this->unlink(); - } - - struct cancel_impl; - - bool await_ready() { return !chn->buffer_.full(); } - template - BOOST_NOINLINE - std::coroutine_handle await_suspend(std::coroutine_handle h); - void await_resume(); - std::tuple await_resume(const struct as_tuple_tag & ); - system::result await_resume(const struct as_result_tag &); - explicit operator bool() const {return chn && chn->is_open();} - }; - - boost::intrusive::list > read_queue_; - boost::intrusive::list > write_queue_; - public: - read_op read(const boost::source_location & loc = BOOST_CURRENT_LOCATION) {return read_op{{}, this, loc}; } - write_op write(const T && value, const boost::source_location & loc = BOOST_CURRENT_LOCATION) - { - return write_op{{}, this, &value, loc}; - } - write_op write(const T & value, const boost::source_location & loc = BOOST_CURRENT_LOCATION) - { - return write_op{{}, this, &value, loc}; - } - write_op write( T && value, const boost::source_location & loc = BOOST_CURRENT_LOCATION) - { - return write_op{{}, this, &value, loc}; - } - write_op write( T & value, const boost::source_location & loc = BOOST_CURRENT_LOCATION) - { - return write_op{{}, this, &value, loc}; - } - /* - // tag::outline[] - // an awaitable that yields T - using __read_op__ = __unspecified__; - - // an awaitable that yields void - using __write_op__ = __unspecified__; - - // read a value to a channel - __read_op__ read(); - - // write a value to the channel - __write_op__ write(const T && value); - __write_op__ write(const T & value); - __write_op__ write( T && value); - __write_op__ write( T & value); - - // write a value to the channel if T is void - __write_op__ write(); // end::outline[] - */ - // tag::outline[] - -}; -// end::outline[] - -template<> -struct channel -{ - explicit - channel(std::size_t limit = 0u, - executor executor = this_thread::get_executor()) - : limit_(limit), executor_(executor) {} - channel(channel &&) noexcept = delete; - channel & operator=(channel && lhs) noexcept = delete; - - using executor_type = executor; - const executor_type & get_executor() {return executor_;} - - BOOST_COBALT_DECL ~channel(); - - bool is_open() const {return !is_closed_;} - BOOST_COBALT_DECL void close(); - - private: - std::size_t limit_; - std::size_t n_{0u}; - executor_type executor_; - bool is_closed_{false}; - - struct read_op : intrusive::list_base_hook > - { - channel * chn; - boost::source_location loc; - bool cancelled = false, direct = false; - asio::cancellation_slot cancel_slot{}; - unique_handle awaited_from{nullptr}; - void (*begin_transaction)(void*) = nullptr; - - void transactional_unlink() - { - if (begin_transaction) - begin_transaction(awaited_from.get()); - this->unlink(); - } - - struct cancel_impl; - bool await_ready() { return (chn->n_ > 0); } - template - BOOST_NOINLINE - std::coroutine_handle await_suspend(std::coroutine_handle h); - BOOST_COBALT_DECL void await_resume(); - BOOST_COBALT_DECL std::tuple await_resume(const struct as_tuple_tag & ); - BOOST_COBALT_DECL system::result await_resume(const struct as_result_tag &); - explicit operator bool() const {return chn && chn->is_open();} - }; - - struct write_op : intrusive::list_base_hook > - { - channel * chn; - boost::source_location loc; - bool cancelled = false, direct = false; - asio::cancellation_slot cancel_slot{}; - unique_handle awaited_from{nullptr}; - void (*begin_transaction)(void*) = nullptr; - - void transactional_unlink() - { - if (begin_transaction) - begin_transaction(awaited_from.get()); - this->unlink(); - } - - struct cancel_impl; - bool await_ready() - { - return chn->n_ < chn->limit_; - } - - template - BOOST_NOINLINE - std::coroutine_handle await_suspend(std::coroutine_handle h); - - BOOST_COBALT_DECL void await_resume(); - BOOST_COBALT_DECL std::tuple await_resume(const struct as_tuple_tag & ); - BOOST_COBALT_DECL system::result await_resume(const struct as_result_tag &); - explicit operator bool() const {return chn && chn->is_open();} - }; - - boost::intrusive::list > read_queue_; - boost::intrusive::list > write_queue_; - public: - read_op read(const boost::source_location & loc = BOOST_CURRENT_LOCATION) {return read_op{{}, this, loc}; } - write_op write(const boost::source_location & loc = BOOST_CURRENT_LOCATION) {return write_op{{}, this, loc}; } -}; - -template -struct channel_reader -{ - channel_reader(channel & chan, - const boost::source_location & loc = BOOST_CURRENT_LOCATION) : chan_(&chan), loc_(loc) {} - - auto operator co_await () - { - return chan_->read(loc_); - } - - explicit operator bool () const {return chan_ && chan_->is_open();} - - private: - channel * chan_; - boost::source_location loc_; -}; - -} - -#include - -#endif //BOOST_COBALT_CHANNEL_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/config.hpp b/lib/boost_1.84.0/boost/cobalt/config.hpp deleted file mode 100644 index 6ae1fec92f8..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/config.hpp +++ /dev/null @@ -1,81 +0,0 @@ -// -// Copyright (c) 2023 Klemens Morgenstern (klemens.morgenstern@gmx.net) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#include - -#ifndef BOOST_COBALT_CONFIG_HPP -#define BOOST_COBALT_CONFIG_HPP - -#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_COBALT_DYN_LINK) -#if defined(BOOST_COBALT_SOURCE) -#define BOOST_COBALT_DECL BOOST_SYMBOL_EXPORT -#else -#define BOOST_COBALT_DECL BOOST_SYMBOL_IMPORT -#endif -#else -#define BOOST_COBALT_DECL -#endif - -#if defined(BOOST_COBALT_USE_IO_CONTEXT) -# include -#elif !defined(BOOST_COBALT_CUSTOM_EXECUTOR) -# include -#endif - -#if BOOST_VERSION < 108200 -#error "Boost.Async needs Boost v1.82 or later otherwise the Boost.ASIO is missing needed support" -#endif - -#if defined(_MSC_VER) -// msvc doesn't correctly suspend for self-deletion, hence we must workaround here -#define BOOST_COBALT_NO_SELF_DELETE 1 -#endif - -#if !defined(BOOST_COBALT_USE_STD_PMR) && \ - !defined(BOOST_COBALT_USE_BOOST_CONTAINER_PMR) && \ - !defined(BOOST_COBALT_USE_CUSTOM_PMR) && \ - !defined(BOOST_COBALT_NO_PMR) -#define BOOST_COBALT_USE_STD_PMR 1 -#endif - -#if defined(BOOST_COBALT_USE_BOOST_CONTAINER_PMR) -#include -#include -#include -#include -#include -#include -#endif - -#if defined(BOOST_COBALT_USE_STD_PMR) -#include -#endif - -#if !defined(BOOST_COBALT_OP_SBO_SIZE) -#define BOOST_COBALT_SBO_BUFFER_SIZE 4096 -#endif - -namespace boost::cobalt -{ - -#if defined(BOOST_COBALT_USE_IO_CONTEXT) -using executor = boost::asio::io_context::executor_type; -#elif !defined(BOOST_COBALT_CUSTOM_EXECUTOR) -using executor = boost::asio::any_io_executor; -#endif - -#if defined(BOOST_COBALT_USE_BOOST_CONTAINER_PMR) -namespace pmr = boost::container::pmr; -#endif - -#if defined(BOOST_COBALT_USE_STD_PMR) -namespace pmr = std::pmr; -#endif - -} - -#endif //BOOST_COBALT_CONFIG_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/detail/generator.hpp b/lib/boost_1.84.0/boost/cobalt/detail/generator.hpp deleted file mode 100644 index 2c2760cb057..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/detail/generator.hpp +++ /dev/null @@ -1,600 +0,0 @@ -// -// Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef BOOST_COBALT_DETAIL_GENERATOR_HPP -#define BOOST_COBALT_DETAIL_GENERATOR_HPP - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace boost::cobalt -{ - - -template -struct generator; - -namespace detail -{ - -template -struct generator_yield_awaitable; - -template -struct generator_receiver; - -template -struct generator_receiver_base -{ - std::optional pushed_value; - auto get_awaitable(const Push & push) requires std::is_copy_constructible_v - { - using impl = generator_receiver; - return typename impl::awaitable{static_cast(this), &push}; - } - auto get_awaitable( Push && push) - { - using impl = generator_receiver; - return typename impl::awaitable{static_cast(this), &push}; - } -}; - -template -struct generator_receiver_base -{ - bool pushed_value{false}; - - auto get_awaitable() - { - using impl = generator_receiver; - return typename impl::awaitable{static_cast(this), static_cast(nullptr)}; - } -}; - -template -struct generator_promise; - -template -struct generator_receiver : generator_receiver_base -{ - std::exception_ptr exception; - std::optional result, result_buffer; - Yield get_result() - { - if (result_buffer) - { - auto res = *std::exchange(result, std::nullopt); - if (result_buffer) - result.emplace(*std::exchange(result_buffer, std::nullopt)); - return res; - } - else - return *std::exchange(result, std::nullopt); - } - bool done = false; - unique_handle awaited_from{nullptr}; - unique_handle> yield_from{nullptr}; - - bool lazy = false; - - bool ready() { return exception || result || done; } - - generator_receiver() = default; - generator_receiver(generator_receiver && lhs) - : generator_receiver_base{std::move(lhs.pushed_value)}, - exception(std::move(lhs.exception)), done(lhs.done), - result(std::move(lhs.result)), - result_buffer(std::move(lhs.result_buffer)), - awaited_from(std::move(lhs.awaited_from)), yield_from{std::move(lhs.yield_from)}, - lazy(lhs.lazy), reference(lhs.reference), cancel_signal(lhs.cancel_signal) - - { - if (!lhs.done && !lhs.exception) - { - reference = this; - lhs.exception = moved_from_exception(); - } - lhs.done = true; - } - - ~generator_receiver() - { - if (!done && reference == this) - reference = nullptr; - } - - generator_receiver(generator_receiver * &reference, asio::cancellation_signal & cancel_signal) - : reference(reference), cancel_signal(cancel_signal) - { - reference = this; - } - - generator_receiver * &reference; - asio::cancellation_signal & cancel_signal; - - using yield_awaitable = generator_yield_awaitable; - - yield_awaitable get_yield_awaitable(generator_promise * pro) {return {pro}; } - static yield_awaitable terminator() {return {nullptr}; } - - template - void yield_value(T && t) - { - if (!result) - result.emplace(std::forward(t)); - else - { - BOOST_ASSERT(!result_buffer); - result_buffer.emplace(std::forward(t)); - } - - } - - struct awaitable - { - generator_receiver *self; - std::exception_ptr ex; - asio::cancellation_slot cl; - - variant2::variant to_push; - - - awaitable(generator_receiver * self, Push * to_push) : self(self), to_push(to_push) - { - } - awaitable(generator_receiver * self, const Push * to_push) - : self(self), to_push(to_push) - { - } - - awaitable(const awaitable & aw) noexcept : self(aw.self), to_push(aw.to_push) - { - } - - bool await_ready() const - { - BOOST_ASSERT(!ex); - return self->ready(); - } - - template - std::coroutine_handle await_suspend(std::coroutine_handle h) - { - if (self->done) // ok, so we're actually done already, so noop - return std::noop_coroutine(); - - - if (!ex && self->awaited_from != nullptr) // generator already being awaited, that's an error! - ex = already_awaited(); - - if (ex) - return h; - - if constexpr (requires (Promise p) {p.get_cancellation_slot();}) - if ((cl = h.promise().get_cancellation_slot()).is_connected()) - cl.emplace(self->cancel_signal); - - self->awaited_from.reset(h.address()); - - std::coroutine_handle res = std::noop_coroutine(); - if (self->yield_from != nullptr) - res = self->yield_from.release(); - - if ((to_push.index() > 0) && !self->pushed_value && self->lazy) - { - if constexpr (std::is_void_v) - self->pushed_value = true; - else - { - if (to_push.index() == 1) - self->pushed_value.emplace(std::move(*variant2::get<1>(to_push))); - else - { - if constexpr (std::is_copy_constructible_v) - self->pushed_value.emplace(std::move(*variant2::get<2>(to_push))); - else - { - BOOST_ASSERT(!"push value is not movable"); - } - } - } - to_push = variant2::monostate{}; - } - return std::coroutine_handle::from_address(res.address()); - } - - Yield await_resume(const boost::source_location & loc = BOOST_CURRENT_LOCATION) - { - return await_resume(as_result_tag{}).value(loc); - } - - std::tuple await_resume( - const as_tuple_tag &) - { - auto res = await_resume(as_result_tag{}); - if (res.has_error()) - return {res.error(), Yield{}}; - else - return {nullptr, res.value()}; - } - - system::result await_resume(const as_result_tag& ) - { - if (cl.is_connected()) - cl.clear(); - if (ex) - return {system::in_place_error, ex}; - if (self->exception) - return {system::in_place_error, std::exchange(self->exception, nullptr)}; - if (!self->result) // missing co_return this is accepted behaviour, if the compiler agrees - return {system::in_place_error, std::make_exception_ptr(std::runtime_error("cobalt::generator returned void"))}; - - if (to_push.index() > 0) - { - BOOST_ASSERT(!self->pushed_value); - if constexpr (std::is_void_v) - self->pushed_value = true; - else - { - if (to_push.index() == 1) - self->pushed_value.emplace(std::move(*variant2::get<1>(to_push))); - else - { - if constexpr (std::is_copy_constructible_v) - self->pushed_value.emplace(std::move(*variant2::get<2>(to_push))); - else - { - BOOST_ASSERT(!"push value is not movable"); - } - } - - } - to_push = variant2::monostate{}; - } - - // now we also want to resume the coroutine, so it starts work - if (self->yield_from != nullptr && !self->lazy) - { - auto exec = self->yield_from->get_executor(); - auto alloc = asio::get_associated_allocator(self->yield_from); - asio::post( - std::move(exec), - asio::bind_allocator( - alloc, - [y = std::exchange(self->yield_from, nullptr)]() mutable - { - if (y->receiver) // make sure we only resume eagerly when attached to a generator object - std::move(y)(); - })); - } - - return {system::in_place_value, self->get_result()}; - } - - void interrupt_await() & - { - if (!self) - return ; - ex = detached_exception(); - - if (self->awaited_from) - self->awaited_from.release().resume(); - } - }; - - void interrupt_await() & - { - exception = detached_exception(); - awaited_from.release().resume(); - } - - void rethrow_if() - { - if (exception) - std::rethrow_exception(exception); - } -}; - -template -struct generator_promise - : promise_memory_resource_base, - promise_cancellation_base, - promise_throw_if_cancelled_base, - enable_awaitables>, - enable_await_allocator>, - enable_await_executor< generator_promise> -{ - using promise_cancellation_base::await_transform; - using promise_throw_if_cancelled_base::await_transform; - using enable_awaitables>::await_transform; - using enable_await_allocator>::await_transform; - using enable_await_executor>::await_transform; - - [[nodiscard]] generator get_return_object() - { - return generator{this}; - } - - mutable asio::cancellation_signal signal; - - using executor_type = executor; - executor_type exec; - const executor_type & get_executor() const {return exec;} - - template - generator_promise(Args & ...args) - : -#if !defined(BOOST_COBALT_NO_PMR) - promise_memory_resource_base(detail::get_memory_resource_from_args(args...)), -#endif - exec{detail::get_executor_from_args(args...)} - { - this->reset_cancellation_source(signal.slot()); - } - - std::suspend_never initial_suspend() {return {};} - - struct final_awaitable - { - generator_promise * generator; - bool await_ready() const noexcept - { - return generator->receiver && generator->receiver->awaited_from.get() == nullptr; - } - - auto await_suspend(std::coroutine_handle h) noexcept - { - std::coroutine_handle res = std::noop_coroutine(); - if (generator->receiver && generator->receiver->awaited_from.get() != nullptr) - res = generator->receiver->awaited_from.release(); - if (generator->receiver) - generator->receiver->done = true; - - - if (auto & rec = h.promise().receiver; rec != nullptr) - { - if (!rec->done && !rec->exception) - rec->exception = detail::completed_unexpected(); - rec->done = true; - rec->awaited_from.reset(nullptr); - rec = nullptr; - } - - detail::self_destroy(h); - return res; - } - - void await_resume() noexcept - { - if (generator->receiver) - generator->receiver->done = true; - } - }; - - auto final_suspend() noexcept - { - return final_awaitable{this}; - } - - void unhandled_exception() - { - if (this->receiver) - this->receiver->exception = std::current_exception(); - else - throw ; - } - - void return_value(const Yield & res) requires std::is_copy_constructible_v - { - if (this->receiver) - this->receiver->yield_value(res); - } - - void return_value(Yield && res) - { - if (this->receiver) - this->receiver->yield_value(std::move(res)); - } - - generator_receiver* receiver{nullptr}; - - auto await_transform(this_coro::initial_t val) - { - if(receiver) - { - receiver->lazy = true; - return receiver->get_yield_awaitable(this); - } - else - return generator_receiver::terminator(); - } - - template - auto yield_value(Yield_ && ret) - { - if(receiver) - { - // if this is lazy, there might still be a value in there. - receiver->yield_value(std::forward(ret)); - return receiver->get_yield_awaitable(this); - } - else - return generator_receiver::terminator(); - } - - void interrupt_await() & - { - if (this->receiver) - { - this->receiver->exception = detached_exception(); - std::coroutine_handle::from_address(this->receiver->awaited_from.release()).resume(); - } - } - - ~generator_promise() - { - if (this->receiver) - { - if (!this->receiver->done && !this->receiver->exception) - this->receiver->exception = detail::completed_unexpected(); - this->receiver->done = true; - this->receiver->awaited_from.reset(nullptr); - } - } - -}; - -template -struct generator_yield_awaitable -{ - generator_promise *self; - constexpr bool await_ready() const - { - return self && self->receiver && self->receiver->pushed_value && !self->receiver->result; - } - - std::coroutine_handle await_suspend( - std::coroutine_handle> h -#if defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING) - , const boost::source_location & loc = BOOST_CURRENT_LOCATION -#endif - ) - { - if (self == nullptr) // we're a terminator, kill it - { - if (auto & rec = h.promise().receiver; rec != nullptr) - { - if (!rec->done && !rec->exception) - rec->exception = detail::completed_unexpected(); - rec->done = true; - rec->awaited_from.reset(nullptr); - rec = nullptr; - } - - detail::self_destroy(h); - return std::noop_coroutine(); - } - std::coroutine_handle res = std::noop_coroutine(); - if (self->receiver->awaited_from.get() != nullptr) - res = self->receiver->awaited_from.release(); -#if defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING) - self->receiver->yield_from.reset(&h.promise(), loc); -#else - self->receiver->yield_from.reset(&h.promise()); -#endif - return res; - } - - Push await_resume() - { - BOOST_ASSERT(self->receiver); - BOOST_ASSERT(self->receiver->pushed_value); - return *std::exchange(self->receiver->pushed_value, std::nullopt); - } -}; - -template -struct generator_yield_awaitable -{ - generator_promise *self; - constexpr bool await_ready() { return self && self->receiver && self->receiver->pushed_value; } - - std::coroutine_handle<> await_suspend( - std::coroutine_handle> h -#if defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING) - , const boost::source_location & loc = BOOST_CURRENT_LOCATION -#endif - ) - { - if (self == nullptr) // we're a terminator, kill it - { - if (auto & rec = h.promise().receiver; rec != nullptr) - { - if (!rec->done && !rec->exception) - rec->exception = detail::completed_unexpected(); - rec->done = true; - rec->awaited_from.reset(nullptr); - rec = nullptr; - } - detail::self_destroy(h); - return std::noop_coroutine(); - } - std::coroutine_handle res = std::noop_coroutine(); - BOOST_ASSERT(self); - if (self->receiver->awaited_from.get() != nullptr) - res = self->receiver->awaited_from.release(); -#if defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING) - self->receiver->yield_from.reset(&h.promise(), loc); -#else - self->receiver->yield_from.reset(&h.promise()); -#endif - return res; - } - - void await_resume() - { - BOOST_ASSERT(self->receiver->pushed_value); - self->receiver->pushed_value = false; - } - -}; - - -template -struct generator_base -{ - auto operator()( Push && push) - { - return static_cast*>(this)->receiver_.get_awaitable(std::move(push)); - } - auto operator()(const Push & push) requires std::is_copy_constructible_v - { - return static_cast*>(this)->receiver_.get_awaitable(push); - } -}; - -template -struct generator_base -{ - auto operator co_await () - { - return static_cast*>(this)->receiver_.get_awaitable(); - } -}; - -template -struct generator_with_awaitable -{ - generator_base &g; - std::optional::awaitable> awaitable; - - template - void await_suspend(std::coroutine_handle h) - { - g.cancel(); - awaitable.emplace(g.operator co_await()); - return awaitable->await_suspend(h); - } - - void await_resume() {} - -}; - -} - -} - -#endif //BOOST_COBALT_DETAIL_GENERATOR_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/detail/promise.hpp b/lib/boost_1.84.0/boost/cobalt/detail/promise.hpp deleted file mode 100644 index e9dc78edab8..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/detail/promise.hpp +++ /dev/null @@ -1,385 +0,0 @@ -// -// Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef BOOST_COBALT_DETAIL_PROMISE_HPP -#define BOOST_COBALT_DETAIL_PROMISE_HPP - -#include -#include -#include -#include -#include - -#include - - - - -#include - -#include -#include -#include -#include - -namespace boost::cobalt -{ - -struct as_tuple_tag; -struct as_result_tag; - -template -struct promise; - -namespace detail -{ - -template -struct promise_receiver; - -template -struct promise_value_holder -{ - std::optional result; - bool result_taken = false; - - system::result get_result_value() - { - result_taken = true; - BOOST_ASSERT(result); - return {system::in_place_value, std::move(*result)}; - } - - void return_value(T && ret) - { - result.emplace(std::move(ret)); - static_cast*>(this)->set_done(); - } - - void return_value(const T & ret) - { - result.emplace(ret); - static_cast*>(this)->set_done(); - } - -}; - -template<> -struct promise_value_holder -{ - bool result_taken = false; - system::result get_result_value() - { - result_taken = true; - return {system::in_place_value}; - } - - inline void return_void(); -}; - - - -template -struct promise_receiver : promise_value_holder -{ - std::exception_ptr exception; - system::result get_result() - { - if (exception && !done) // detached error - return {system::in_place_error, std::exchange(exception, nullptr)}; - else if (exception) - { - this->result_taken = true; - return {system::in_place_error, exception}; - } - return this->get_result_value(); - } - void unhandled_exception() - { - exception = std::current_exception(); - set_done(); - } - - bool done = false; - unique_handle awaited_from{nullptr}; - - void set_done() - { - done = true; - } - - promise_receiver() = default; - promise_receiver(promise_receiver && lhs) noexcept - : promise_value_holder(std::move(lhs)), - exception(std::move(lhs.exception)), done(lhs.done), awaited_from(std::move(lhs.awaited_from)), - reference(lhs.reference), cancel_signal(lhs.cancel_signal) - { - if (!done && !exception) - { - reference = this; - lhs.exception = moved_from_exception(); - } - - lhs.done = true; - - } - - ~promise_receiver() - { - if (!done && reference == this) - reference = nullptr; - } - - promise_receiver(promise_receiver * &reference, asio::cancellation_signal & cancel_signal) - : reference(reference), cancel_signal(cancel_signal) - { - reference = this; - } - - struct awaitable - { - promise_receiver * self; - std::exception_ptr ex; - asio::cancellation_slot cl; - - awaitable(promise_receiver * self) : self(self) - { - } - - awaitable(awaitable && aw) : self(aw.self) - { - } - - ~awaitable () - { - } - bool await_ready() const { return self->done; } - - template - bool await_suspend(std::coroutine_handle h) - { - if (self->done) // ok, so we're actually done already, so noop - return false; - - if (ex) - return false; - - if (self->awaited_from != nullptr) // we're already being awaited, that's an error! - { - ex = already_awaited(); - return false; - } - - if constexpr (requires (Promise p) {p.get_cancellation_slot();}) - if ((cl = h.promise().get_cancellation_slot()).is_connected()) - cl.emplace(self->cancel_signal); - - self->awaited_from.reset(h.address()); - return true; - } - - T await_resume(const boost::source_location & loc = BOOST_CURRENT_LOCATION) - { - if (cl.is_connected()) - cl.clear(); - if (ex) - std::rethrow_exception(ex); - return self->get_result().value(loc); - } - - system::result await_resume(const as_result_tag &) - { - if (cl.is_connected()) - cl.clear(); - if (ex) - return {system::in_place_error, std::move(ex)}; - return self->get_result(); - } - - auto await_resume(const as_tuple_tag &) - { - if (cl.is_connected()) - cl.clear(); - - if constexpr (std::is_void_v) - { - if (ex) - return std::move(ex); - return self->get_result().error(); - } - else - { - if (ex) - return std::make_tuple(std::move(ex), T{}); - auto res = self->get_result(); - if (res.has_error()) - return std::make_tuple(res.error(), T{}); - else - return std::make_tuple(std::exception_ptr(), std::move(*res)); - } - } - void interrupt_await() & - { - if (!self) - return ; - ex = detached_exception(); - if (self->awaited_from) - self->awaited_from.release().resume(); - } - }; - - promise_receiver * &reference; - asio::cancellation_signal & cancel_signal; - - awaitable get_awaitable() {return awaitable{this};} - - - void interrupt_await() & - { - exception = detached_exception(); - awaited_from.release().resume(); - } -}; - -inline void promise_value_holder::return_void() -{ - static_cast*>(this)->set_done(); -} - -template -struct cobalt_promise_result -{ - promise_receiver* receiver{nullptr}; - void return_value(Return && ret) - { - if(receiver) - receiver->return_value(std::move(ret)); - } - - void return_value(const Return & ret) - { - if(receiver) - receiver->return_value(ret); - } - -}; - -template<> -struct cobalt_promise_result -{ - promise_receiver* receiver{nullptr}; - void return_void() - { - if(receiver) - receiver->return_void(); - } -}; - -template -struct cobalt_promise - : promise_memory_resource_base, - promise_cancellation_base, - promise_throw_if_cancelled_base, - enable_awaitables>, - enable_await_allocator>, - enable_await_executor>, - cobalt_promise_result -{ - using promise_cancellation_base::await_transform; - using promise_throw_if_cancelled_base::await_transform; - using enable_awaitables>::await_transform; - using enable_await_allocator>::await_transform; - using enable_await_executor>::await_transform; - - [[nodiscard]] promise get_return_object() - { - return promise{this}; - } - - mutable asio::cancellation_signal signal; - - using executor_type = executor; - executor_type exec; - const executor_type & get_executor() const {return exec;} - - template - cobalt_promise(Args & ...args) - : -#if !defined(BOOST_COBALT_NO_PMR) - promise_memory_resource_base(detail::get_memory_resource_from_args(args...)), -#endif - exec{detail::get_executor_from_args(args...)} - { - this->reset_cancellation_source(signal.slot()); - } - - std::suspend_never initial_suspend() {return {};} - auto final_suspend() noexcept - { - return final_awaitable{this}; - } - - void unhandled_exception() - { - if (this->receiver) - this->receiver->unhandled_exception(); - else - throw ; - } - - ~cobalt_promise() - { - if (this->receiver) - { - if (!this->receiver->done && !this->receiver->exception) - this->receiver->exception = completed_unexpected(); - this->receiver->set_done(); - this->receiver->awaited_from.reset(nullptr); - } - - } - private: - struct final_awaitable - { - cobalt_promise * promise; - bool await_ready() const noexcept - { - return promise->receiver && promise->receiver->awaited_from.get() == nullptr; - } - - std::coroutine_handle await_suspend(std::coroutine_handle h) noexcept - { - std::coroutine_handle res = std::noop_coroutine(); - if (promise->receiver && promise->receiver->awaited_from.get() != nullptr) - res = promise->receiver->awaited_from.release(); - - - if (auto &rec = h.promise().receiver; rec != nullptr) - { - if (!rec->done && !rec->exception) - rec->exception = completed_unexpected(); - rec->set_done(); - rec->awaited_from.reset(nullptr); - rec = nullptr; - } - detail::self_destroy(h); - return res; - } - - void await_resume() noexcept - { - } - }; - - -}; - -} - -} - -#endif //BOOST_COBALT_DETAIL_PROMISE_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/detail/spawn.hpp b/lib/boost_1.84.0/boost/cobalt/detail/spawn.hpp deleted file mode 100644 index ebcda8ecb06..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/detail/spawn.hpp +++ /dev/null @@ -1,148 +0,0 @@ -// -// Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef BOOST_COBALT_DETAIL_SPAWN_HPP -#define BOOST_COBALT_DETAIL_SPAWN_HPP - -#include -#include - -#include - -namespace boost::cobalt -{ -template -struct task; -} - -namespace boost::cobalt::detail -{ - -struct async_initiate_spawn -{ - template - void operator()(Handler && h, task a, executor exec) - { - auto & rec = a.receiver_; - if (rec.done) - return asio::dispatch( - asio::get_associated_immediate_executor(h, exec), - asio::append(std::forward(h), rec.exception, rec.exception ? T() : *rec.get_result())); - -#if !defined(BOOST_COBALT_NO_PMR) - auto dalloc = pmr::polymorphic_allocator{boost::cobalt::this_thread::get_default_resource()}; - auto alloc = asio::get_associated_allocator(h, dalloc); -#else - auto alloc = asio::get_associated_allocator(h); -#endif - auto recs = allocate_unique>(alloc, std::move(rec)); - - auto sl = asio::get_associated_cancellation_slot(h); - if (sl.is_connected()) - sl.template emplace(recs->promise->signal, exec); - - auto p = recs.get(); - - p->promise->exec.emplace(exec); - p->promise->exec_ = exec; - - struct completion_handler - { - using allocator_type = std::decay_t; - - allocator_type get_allocator() const { return alloc_; } - allocator_type alloc_; - - using executor_type = std::decay_t; - const executor_type &get_executor() const { return exec_; } - executor_type exec_; - - decltype(recs) r; - Handler handler; - - void operator()() - { - auto ex = r->exception; - T rr{}; - if (r->result) - rr = std::move(*r->result); - r.reset(); - std::move(handler)(ex, std::move(rr)); - } - }; - - p->awaited_from.reset(detail::post_coroutine( - completion_handler{ - alloc, asio::get_associated_executor(h, exec), std::move(recs), std::move(h) - }).address()); - - asio::dispatch(exec, std::coroutine_handle>::from_promise(*p->promise)); - } - - template - void operator()(Handler && h, task a, executor exec) - { - if (a.receiver_.done) - return asio::dispatch( - asio::get_associated_immediate_executor(h, exec), - asio::append(std::forward(h), a.receiver_.exception)); - - -#if !defined(BOOST_COBALT_NO_PMR) - auto alloc = asio::get_associated_allocator(h, pmr::polymorphic_allocator{boost::cobalt::this_thread::get_default_resource()}); -#else - auto alloc = asio::get_associated_allocator(h); -#endif - auto recs = allocate_unique>(alloc, std::move(a.receiver_)); - - if (recs->done) - return asio::dispatch(asio::get_associated_immediate_executor(h, exec), - asio::append(std::forward(h), recs->exception)); - - auto sl = asio::get_associated_cancellation_slot(h); - if (sl.is_connected()) - sl.template emplace(recs->promise->signal, exec); - - auto p = recs.get(); - - p->promise->exec.emplace(exec); - p->promise->exec_ = exec; - - struct completion_handler - { - using allocator_type = std::decay_t; - - const allocator_type &get_allocator() const { return alloc_; } - - allocator_type alloc_; - - using executor_type = std::decay_t; - const executor_type &get_executor() const { return exec_; } - - executor_type exec_; - decltype(recs) r; - Handler handler; - - void operator()() - { - auto ex = r->exception; - r.reset(); - std::move(handler)(ex); - } - }; - - p->awaited_from.reset(detail::post_coroutine(completion_handler{ - alloc, asio::get_associated_executor(h, exec), std::move(recs), std::forward(h) - }).address()); - - asio::dispatch(exec, std::coroutine_handle>::from_promise(*p->promise)); - } -}; - -} - -#endif //BOOST_COBALT_DETAIL_SPAWN_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/detail/task.hpp b/lib/boost_1.84.0/boost/cobalt/detail/task.hpp deleted file mode 100644 index d5afb39af1d..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/detail/task.hpp +++ /dev/null @@ -1,395 +0,0 @@ -// -// Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef BOOST_COBALT_DETAIL_TASK_HPP -#define BOOST_COBALT_DETAIL_TASK_HPP - -#include -#include -#include -#include - -#include -#include - - -#include -#include -#include - -namespace boost::cobalt -{ - -struct as_tuple_tag; -struct as_result_tag; - -template -struct task; - -namespace detail -{ - -template -struct task_receiver; - -template -struct task_value_holder -{ - std::optional result; - bool result_taken = false; - - system::result get_result_value() - { - result_taken = true; - BOOST_ASSERT(result); - return {system::in_place_value, std::move(*result)}; - } - - void return_value(T && ret) - { - result.emplace(std::move(ret)); - static_cast*>(this)->set_done(); - } - void return_value(const T & ret) - { - result.emplace(ret); - static_cast*>(this)->set_done(); - } -}; - -template<> -struct task_value_holder -{ - bool result_taken = false; - system::result get_result_value() - { - result_taken = true; - return {system::in_place_value}; - } - - inline void return_void(); -}; - - -template -struct task_promise; - -template -struct task_receiver : task_value_holder -{ - std::exception_ptr exception; - system::result get_result() - { - if (exception && !done) // detached error - return {system::in_place_error, std::exchange(exception, nullptr)}; - else if (exception) - { - this->result_taken = true; - return {system::in_place_error, exception}; - } - return this->get_result_value(); - } - - void unhandled_exception() - { - exception = std::current_exception(); - set_done(); - } - - bool done = false; - unique_handle awaited_from{nullptr}; - - void set_done() - { - done = true; - } - - task_receiver() = default; - task_receiver(task_receiver && lhs) - : task_value_holder(std::move(lhs)), - exception(std::move(lhs.exception)), done(lhs.done), awaited_from(std::move(lhs.awaited_from)), - promise(lhs.promise) - { - if (!done && !exception) - { - promise->receiver = this; - lhs.exception = moved_from_exception(); - } - - lhs.done = true; - } - - ~task_receiver() - { - if (!done && promise && promise->receiver == this) - { - promise->receiver = nullptr; - if (!promise->started) - std::coroutine_handle>::from_promise(*promise).destroy(); - } - } - - task_receiver(task_promise * promise) - : promise(promise) - { - promise->receiver = this; - } - - struct awaitable - { - task_receiver * self; - asio::cancellation_slot cl; - awaitable(task_receiver * self) : self(self) - { - } - - awaitable(awaitable && aw) : self(aw.self) - { - } - - ~awaitable () - { - } - - bool await_ready() const { return self->done; } - - template - BOOST_NOINLINE std::coroutine_handle await_suspend(std::coroutine_handle h) - { - if (self->done) // ok, so we're actually done already, so noop - return std::coroutine_handle::from_address(h.address()); - - if constexpr (requires (Promise p) {p.get_cancellation_slot();}) - if ((cl = h.promise().get_cancellation_slot()).is_connected()) - cl.emplace(self->promise->signal); - - - if constexpr (requires (Promise p) {p.get_executor();}) - self->promise->exec.emplace(h.promise().get_executor()); - else - self->promise->exec.emplace(this_thread::get_executor()); - self->promise->exec_ = self->promise->exec->get_executor(); - self->awaited_from.reset(h.address()); - - return std::coroutine_handle>::from_promise(*self->promise); - } - - T await_resume(const boost::source_location & loc = BOOST_CURRENT_LOCATION) - { - if (cl.is_connected()) - cl.clear(); - - return self->get_result().value(loc); - } - - system::result await_resume(const as_result_tag &) - { - if (cl.is_connected()) - cl.clear(); - return self->get_result(); - } - - auto await_resume(const as_tuple_tag &) - { - if (cl.is_connected()) - cl.clear(); - auto res = self->get_result(); - if constexpr (std::is_void_v) - return res.error(); - else - { - if (res.has_error()) - return std::make_tuple(res.error(), T{}); - else - return std::make_tuple(std::exception_ptr(), std::move(*res)); - } - - } - - void interrupt_await() & - { - if (!self) - return ; - self->exception = detached_exception(); - if (self->awaited_from) - self->awaited_from.release().resume(); - } - }; - - task_promise * promise; - - awaitable get_awaitable() {return awaitable{this};} - - - void interrupt_await() & - { - exception = detached_exception(); - awaited_from.release().resume(); - } -}; - -inline void task_value_holder::return_void() -{ - static_cast*>(this)->set_done(); -} - -template -struct task_promise_result -{ - task_receiver* receiver{nullptr}; - void return_value(Return && ret) - { - if(receiver) - receiver->return_value(std::move(ret)); - } - void return_value(const Return & ret) - { - if(receiver) - receiver->return_value(ret); - } -}; - -template<> -struct task_promise_result -{ - task_receiver* receiver{nullptr}; - void return_void() - { - if(receiver) - receiver->return_void(); - } -}; - -struct async_initiate_spawn; - -template -struct task_promise - : promise_memory_resource_base, - promise_cancellation_base, - promise_throw_if_cancelled_base, - enable_awaitables>, - enable_await_allocator>, - enable_await_executor>, - task_promise_result -{ - using promise_cancellation_base::await_transform; - using promise_throw_if_cancelled_base::await_transform; - using enable_awaitables>::await_transform; - using enable_await_allocator>::await_transform; - using enable_await_executor>::await_transform; - - [[nodiscard]] task get_return_object() - { - return task{this}; - } - - mutable asio::cancellation_signal signal; - - using executor_type = executor; - std::optional> exec; - std::optional exec_; - const executor_type & get_executor() const - { - if (!exec) - throw_exception(asio::bad_executor()); - BOOST_ASSERT(exec_); - return *exec_; - } - - template - task_promise(Args & ...args) -#if !defined(BOOST_COBALT_NO_PMR) - : promise_memory_resource_base(detail::get_memory_resource_from_args_global(args...)) -#endif - { - this->reset_cancellation_source(signal.slot()); - } - - struct initial_awaitable - { - task_promise * promise; - - bool await_ready() const noexcept {return false;} - void await_suspend(std::coroutine_handle<>) {} - - void await_resume() - { - promise->started = true; - } - }; - - auto initial_suspend() - { - - return initial_awaitable{this}; - } - - struct final_awaitable - { - task_promise * promise; - bool await_ready() const noexcept - { - return promise->receiver && promise->receiver->awaited_from.get() == nullptr; - } - - BOOST_NOINLINE - auto await_suspend(std::coroutine_handle h) noexcept - { - std::coroutine_handle res = std::noop_coroutine(); - if (promise->receiver && promise->receiver->awaited_from.get() != nullptr) - res = promise->receiver->awaited_from.release(); - - - if (auto & rec = h.promise().receiver; rec != nullptr) - { - if (!rec->done && !rec->exception) - rec->exception = completed_unexpected(); - rec->set_done(); - rec->awaited_from.reset(nullptr); - rec = nullptr; - } - detail::self_destroy(h); - return res; - } - - void await_resume() noexcept - { - } - }; - - auto final_suspend() noexcept - { - return final_awaitable{this}; - } - - void unhandled_exception() - { - if (this->receiver) - this->receiver->unhandled_exception(); - else - throw ; - } - - ~task_promise() - { - if (this->receiver) - { - if (!this->receiver->done && !this->receiver->exception) - this->receiver->exception = completed_unexpected(); - this->receiver->set_done(); - this->receiver->awaited_from.reset(nullptr); - } - } - bool started = false; - friend struct async_initiate; -}; - -} - -} - -#endif //BOOST_COBALT_DETAIL_TASK_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/detail/with.hpp b/lib/boost_1.84.0/boost/cobalt/detail/with.hpp deleted file mode 100644 index cc47d27ceb9..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/detail/with.hpp +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) 2022 Klemens D. Morgenstern -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_COBALT_DETAIL_WITH_HPP -#define BOOST_COBALT_DETAIL_WITH_HPP - -#include -#include - -#include - -namespace boost::cobalt::detail -{ - -template -struct [[nodiscard]] with_impl -{ - struct promise_type; - - bool await_ready() { return false;} - - template - BOOST_NOINLINE auto await_suspend(std::coroutine_handle h) -> std::coroutine_handle; - inline T await_resume(); - - private: - with_impl(promise_type & promise) : promise(promise) {} - promise_type & promise; -}; - -template -struct with_promise_value -{ - std::optional result; - - void return_value(std::optional && value) - { - if (value) // so non-move-assign types work - result.emplace(std::move(*value)); - } - - T get_result() - { - return std::move(result).value(); - } -}; - -template<> -struct with_promise_value -{ - void return_void() {} - void get_result() {} -}; - - -template -struct with_impl::promise_type - : with_promise_value, - enable_awaitables, - enable_await_allocator -{ - using enable_awaitables::await_transform; - using enable_await_allocator::await_transform; - - - using executor_type = executor; - const executor_type & get_executor() const {return *exec;} - std::optional exec; - - with_impl get_return_object() - { - return with_impl{*this}; - } - - std::exception_ptr e; - void unhandled_exception() - { - e = std::current_exception(); - } - - std::suspend_always initial_suspend() {return {};} - - struct final_awaitable - { - promise_type *promise; - - bool await_ready() const noexcept - { - return false; - } - BOOST_NOINLINE - auto await_suspend(std::coroutine_handle h) noexcept -> std::coroutine_handle - { - return std::coroutine_handle::from_address(h.promise().awaited_from.address()); - } - - void await_resume() noexcept - { - } - }; - - auto final_suspend() noexcept - { - return final_awaitable{this}; - } - using cancellation_slot_type = asio::cancellation_slot; - cancellation_slot_type get_cancellation_slot() const {return slot_;} - asio::cancellation_slot slot_; - - std::coroutine_handle awaited_from{nullptr}; - -}; - -template -T with_impl::await_resume() -{ - auto e = promise.e; - auto res = std::move(promise.get_result()); - std::coroutine_handle::from_promise(promise).destroy(); - if (e) - std::rethrow_exception(e); - - return std::move(res); -} - -template<> -inline void with_impl::await_resume() -{ - auto e = promise.e; - std::coroutine_handle::from_promise(promise).destroy(); - if (e) - std::rethrow_exception(e); -} - -template -template -auto with_impl::await_suspend(std::coroutine_handle h) -> std::coroutine_handle -{ - if constexpr (requires (Promise p) {p.get_executor();}) - promise.exec.emplace(h.promise().get_executor()); - else - promise.exec.emplace(this_thread::get_executor()); - - if constexpr (requires (Promise p) {p.get_cancellation_slot();}) - promise.slot_ = h.promise().get_cancellation_slot(); - - promise.awaited_from = h; - return std::coroutine_handle::from_promise(promise); -} - -} - -#endif //BOOST_COBALT_DETAIL_WITH_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/error.hpp b/lib/boost_1.84.0/boost/cobalt/error.hpp deleted file mode 100644 index 59ff4015a1e..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/error.hpp +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2023 Klemens D. Morgenstern -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_COBALT_ERROR_HPP -#define BOOST_COBALT_ERROR_HPP - -#include -#include - -namespace boost::cobalt -{ - -enum class error -{ - moved_from, - detached, - completed_unexpected, - wait_not_ready, - already_awaited, - allocation_failed -}; - - -struct cobalt_category_t final : system::error_category -{ - cobalt_category_t() : system::error_category(0x7d4c7b49d8a4fdull) {} - - - std::string message( int ev ) const override - { - - return message(ev, nullptr, 0u); - } - char const * message( int ev, char * , std::size_t ) const noexcept override - { - switch (static_cast(ev)) - { - case error::moved_from: - return "moved from"; - case error::detached: - return "detached"; - case error::completed_unexpected: - return "completed unexpected"; - case error::wait_not_ready: - return "wait not ready"; - case error::already_awaited: - return "already awaited"; - case error::allocation_failed: - return "allocation failed"; - default: - return "unknown cobalt error"; - } - } - - const char * name() const BOOST_NOEXCEPT override - { - return "boost.cobalt"; - } -}; - -BOOST_COBALT_DECL system::error_category & cobalt_category(); -BOOST_COBALT_DECL system::error_code make_error_code(error e); - -} - -template<> struct boost::system::is_error_code_enum -{ - static const bool value = true; -}; - -#endif //BOOST_COBALT_ERROR_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/generator.hpp b/lib/boost_1.84.0/boost/cobalt/generator.hpp deleted file mode 100644 index 2ef76d9920b..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/generator.hpp +++ /dev/null @@ -1,113 +0,0 @@ -// -// Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef BOOST_COBALT_GENERATOR_HPP -#define BOOST_COBALT_GENERATOR_HPP - -#include - - -namespace boost::cobalt -{ - -// tag::outline[] -template -struct [[nodiscard]] generator -// end::outline[] - : detail::generator_base -// tag::outline[] -{ - // Movable - - generator(generator &&lhs) noexcept = default; - generator& operator=(generator &&) noexcept = default; - - // True until it co_returns & is co_awaited after <1> - explicit operator bool() const; - - // Cancel the generator. <3> - void cancel(asio::cancellation_type ct = asio::cancellation_type::all); - - // Check if a value is available - bool ready() const; - - // Get the returned value. If !ready() this function has undefined behaviour. - Yield get(); - - // Cancel & detach the generator. - ~generator(); - - // end::outline[] - using promise_type = detail::generator_promise; - - generator(const generator &) = delete; - generator& operator=(const generator &) = delete; - - - private: - template - friend struct detail::generator_base; - template - friend struct detail::generator_promise; - - generator(detail::generator_promise * generator) : receiver_(generator->receiver, generator->signal) - { - } - detail::generator_receiver receiver_; - - /* tag::outline[] - // an awaitable that results in value of `Yield`. - using __generator_awaitable__ = __unspecified__; - - // Present when `Push` != `void` - __generator_awaitable__ operator()( Push && push); - __generator_awaitable__ operator()(const Push & push); - - // Present when `Push` == `void`, i.e. can `co_await` the generator directly. - __generator_awaitable__ operator co_await (); // <2> - end::outline[] - */ - - -// tag::outline[] - -}; -// end::outline[] - - - -template -inline generator::operator bool() const -{ - return !receiver_.done || receiver_.result || receiver_.exception; -} - -template -inline void generator::cancel(asio::cancellation_type ct) -{ - if (!receiver_.done && receiver_.reference == &receiver_) - receiver_.cancel_signal.emit(ct); -} - -template -inline bool generator::ready() const { return receiver_.result || receiver_.exception; } - -template -inline Yield generator::get() -{ - BOOST_ASSERT(ready()); - receiver_.rethrow_if(); - return receiver_.get_result(); -} - -template -inline generator::~generator() { cancel(); } - - -} - -#endif //BOOST_COBALT_GENERATOR_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/impl/channel.hpp b/lib/boost_1.84.0/boost/cobalt/impl/channel.hpp deleted file mode 100644 index 1b1abc21937..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/impl/channel.hpp +++ /dev/null @@ -1,363 +0,0 @@ -// -// Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef BOOST_COBALT_IMPL_CHANNEL_HPP -#define BOOST_COBALT_IMPL_CHANNEL_HPP - -#include -#include - -#include - -namespace boost::cobalt -{ - -#if !defined(BOOST_COBALT_NO_PMR) -template -inline channel::channel( - std::size_t limit, - executor executor, - pmr::memory_resource * resource) - : buffer_(limit, resource), executor_(executor) {} -#else -template -inline channel::channel( - std::size_t limit, - executor executor) - : buffer_(limit), executor_(executor) {} -#endif - -template -auto channel::get_executor() -> const executor_type & {return executor_;} - -template -bool channel::is_open() const {return !is_closed_;} - - -template -channel::~channel() -{ - while (!read_queue_.empty()) - read_queue_.front().awaited_from.reset(); - - while (!write_queue_.empty()) - write_queue_.front().awaited_from.reset(); - -} - -template -void channel::close() -{ - is_closed_ = true; - while (!read_queue_.empty()) - { - auto & op = read_queue_.front(); - op.unlink(); - op.cancelled = true; - op.cancel_slot.clear(); - - if (op.awaited_from) - asio::post(executor_, std::move(op.awaited_from)); - } - while (!write_queue_.empty()) - { - auto & op = write_queue_.front(); - op.unlink(); - op.cancelled = true; - op.cancel_slot.clear(); - if (op.awaited_from) - asio::post(executor_, std::move(op.awaited_from)); - } -} - - -template -struct channel::read_op::cancel_impl -{ - read_op * op; - cancel_impl(read_op * op) : op(op) {} - void operator()(asio::cancellation_type) - { - op->cancelled = true; - op->unlink(); - if (op->awaited_from) - asio::post( - op->chn->executor_, - std::move(op->awaited_from)); - op->cancel_slot.clear(); - } -}; - -template -template -std::coroutine_handle channel::read_op::await_suspend(std::coroutine_handle h) -{ - if constexpr (requires (Promise p) {p.get_cancellation_slot();}) - if ((cancel_slot = h.promise().get_cancellation_slot()).is_connected()) - cancel_slot.emplace(this); - - if (awaited_from) - boost::throw_exception(std::runtime_error("already-awaited"), loc); - awaited_from.reset(h.address()); - // currently nothing to read - if constexpr (requires (Promise p) {p.begin_transaction();}) - begin_transaction = +[](void * p){std::coroutine_handle::from_address(p).promise().begin_transaction();}; - - if (chn->write_queue_.empty()) - { - chn->read_queue_.push_back(*this); - return std::noop_coroutine(); - } - else - { - cancel_slot.clear(); - auto & op = chn->write_queue_.front(); - op.transactional_unlink(); - op.direct = true; - if (op.ref.index() == 0) - direct = std::move(*variant2::get<0>(op.ref)); - else - direct = *variant2::get<1>(op.ref); - BOOST_ASSERT(op.awaited_from); - asio::post(chn->executor_, std::move(awaited_from)); - return op.awaited_from.release(); - } -} - - -template -T channel::read_op::await_resume() -{ - return await_resume(as_result_tag{}).value(loc); -} - -template -std::tuple channel::read_op::await_resume(const struct as_tuple_tag &) -{ - auto res = await_resume(as_result_tag{}); - - if (res.has_error()) - return {res.error(), T{}}; - else - return {system::error_code{}, std::move(*res)}; - -} - -template -system::result channel::read_op::await_resume(const struct as_result_tag &) -{ - if (cancel_slot.is_connected()) - cancel_slot.clear(); - - if (cancelled) - return {system::in_place_error, asio::error::operation_aborted}; - - T value = direct ? std::move(*direct) : std::move(chn->buffer_.front()); - if (!direct) - chn->buffer_.pop_front(); - - if (!chn->write_queue_.empty()) - { - auto &op = chn->write_queue_.front(); - BOOST_ASSERT(chn->read_queue_.empty()); - if (op.await_ready()) - { - op.transactional_unlink(); - BOOST_ASSERT(op.awaited_from); - asio::post(chn->executor_, std::move(op.awaited_from)); - } - } - return {system::in_place_value, value}; -} - -template -struct channel::write_op::cancel_impl -{ - write_op * op; - cancel_impl(write_op * op) : op(op) {} - void operator()(asio::cancellation_type) - { - op->cancelled = true; - op->unlink(); - if (op->awaited_from) - asio::post( - op->chn->executor_, std::move(op->awaited_from)); - op->cancel_slot.clear(); - } -}; - -template -template -std::coroutine_handle channel::write_op::await_suspend(std::coroutine_handle h) -{ - if constexpr (requires (Promise p) {p.get_cancellation_slot();}) - if ((cancel_slot = h.promise().get_cancellation_slot()).is_connected()) - cancel_slot.emplace(this); - - awaited_from.reset(h.address()); - if constexpr (requires (Promise p) {p.begin_transaction();}) - begin_transaction = +[](void * p){std::coroutine_handle::from_address(p).promise().begin_transaction();}; - - // currently nothing to read - if (chn->read_queue_.empty()) - { - chn->write_queue_.push_back(*this); - return std::noop_coroutine(); - } - else - { - cancel_slot.clear(); - auto & op = chn->read_queue_.front(); - op.transactional_unlink(); - if (ref.index() == 0) - op.direct = std::move(*variant2::get<0>(ref)); - else - op.direct = *variant2::get<1>(ref); - - BOOST_ASSERT(op.awaited_from); - direct = true; - asio::post(chn->executor_, std::move(awaited_from)); - - return op.awaited_from.release(); - } -} - -template -std::tuple channel::write_op::await_resume(const struct as_tuple_tag &) -{ - return await_resume(as_result_tag{}).error(); -} - -template -void channel::write_op::await_resume() -{ - await_resume(as_result_tag{}).value(loc); -} - -template -system::result channel::write_op::await_resume(const struct as_result_tag &) -{ - if (cancel_slot.is_connected()) - cancel_slot.clear(); - if (cancelled) - boost::throw_exception(system::system_error(asio::error::operation_aborted), loc); - - - if (!direct) - { - BOOST_ASSERT(!chn->buffer_.full()); - if (ref.index() == 0) - chn->buffer_.push_back(std::move(*variant2::get<0>(ref))); - else - chn->buffer_.push_back(*variant2::get<1>(ref)); - } - - if (!chn->read_queue_.empty()) - { - auto & op = chn->read_queue_.front(); - BOOST_ASSERT(chn->write_queue_.empty()); - if (op.await_ready()) - { - op.transactional_unlink(); - BOOST_ASSERT(op.awaited_from); - asio::post(chn->executor_, std::move(op.awaited_from)); - } - } - return system::in_place_value; -} - -struct channel::read_op::cancel_impl -{ - read_op * op; - cancel_impl(read_op * op) : op(op) {} - void operator()(asio::cancellation_type) - { - op->cancelled = true; - op->unlink(); - asio::post(op->chn->executor_, std::move(op->awaited_from)); - op->cancel_slot.clear(); - } -}; - -struct channel::write_op::cancel_impl -{ - write_op * op; - cancel_impl(write_op * op) : op(op) {} - void operator()(asio::cancellation_type) - { - op->cancelled = true; - op->unlink(); - asio::post(op->chn->executor_, std::move(op->awaited_from)); - op->cancel_slot.clear(); - } -}; - -template -std::coroutine_handle channel::read_op::await_suspend(std::coroutine_handle h) -{ - if constexpr (requires (Promise p) {p.get_cancellation_slot();}) - if ((cancel_slot = h.promise().get_cancellation_slot()).is_connected()) - cancel_slot.emplace(this); - - awaited_from.reset(h.address()); - - if constexpr (requires (Promise p) {p.begin_transaction();}) - begin_transaction = +[](void * p){std::coroutine_handle::from_address(p).promise().begin_transaction();}; - - // nothing to read currently, enqueue - if (chn->write_queue_.empty()) - { - chn->read_queue_.push_back(*this); - return std::noop_coroutine(); - } - else // we're good, we can read, so we'll do that, but we need to post, so we need to initialize a transactin. - { - cancel_slot.clear(); - auto & op = chn->write_queue_.front(); - op.unlink(); - op.direct = true; - BOOST_ASSERT(op.awaited_from); - direct = true; - asio::post(chn->executor_, std::move(awaited_from)); - return op.awaited_from.release(); - } -} - - -template -std::coroutine_handle channel::write_op::await_suspend(std::coroutine_handle h) -{ - if constexpr (requires (Promise p) {p.get_cancellation_slot();}) - if ((cancel_slot = h.promise().get_cancellation_slot()).is_connected()) - cancel_slot.emplace(this); - - awaited_from.reset(h.address()); - // currently nothing to read - if constexpr (requires (Promise p) {p.begin_transaction();}) - begin_transaction = +[](void * p){std::coroutine_handle::from_address(p).promise().begin_transaction();}; - - if (chn->read_queue_.empty()) - { - chn->write_queue_.push_back(*this); - return std::noop_coroutine(); - } - else - { - cancel_slot.clear(); - auto & op = chn->read_queue_.front(); - op.unlink(); - op.direct = true; - BOOST_ASSERT(op.awaited_from); - direct = true; - asio::post(chn->executor_, std::move(awaited_from)); - return op.awaited_from.release(); - } -} - -} - -#endif //BOOST_COBALT_IMPL_CHANNEL_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/op.hpp b/lib/boost_1.84.0/boost/cobalt/op.hpp deleted file mode 100644 index 424831d47fa..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/op.hpp +++ /dev/null @@ -1,209 +0,0 @@ -// -// Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef BOOST_COBALT_OP_HPP -#define BOOST_COBALT_OP_HPP - -#include -#include -#include - -namespace boost::cobalt -{ - - -template -struct op -{ - virtual void ready(cobalt::handler) {}; - virtual void initiate(cobalt::completion_handler complete) = 0 ; - virtual ~op() = default; - - struct awaitable - { - op &op_; - std::optional> result; - - awaitable(op * op_) : op_(*op_) {} - awaitable(awaitable && lhs) - : op_(lhs.op_) - , result(std::move(lhs.result)) - { - } - - bool await_ready() - { - op_.ready(handler(result)); - return result.has_value(); - } - - char buffer[BOOST_COBALT_SBO_BUFFER_SIZE]; - detail::sbo_resource resource{buffer, sizeof(buffer)}; - - detail::completed_immediately_t completed_immediately = detail::completed_immediately_t::no; - std::exception_ptr init_ep; - - template - bool await_suspend(std::coroutine_handle h -#if defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING) - , const boost::source_location & loc = BOOST_CURRENT_LOCATION -#endif - ) noexcept - { - try - { - completed_immediately = detail::completed_immediately_t::initiating; - -#if defined(BOOST_ASIO_ENABLE_HANDLER_TRACKING) - op_.initiate(completion_handler{h, result, &resource, &completed_immediately, loc}); -#else - op_.initiate(completion_handler{h, result, &resource, &completed_immediately}); -#endif - if (completed_immediately == detail::completed_immediately_t::initiating) - completed_immediately = detail::completed_immediately_t::no; - return completed_immediately != detail::completed_immediately_t::yes; - } - catch(...) - { - init_ep = std::current_exception(); - return false; - } - } - - auto await_resume(const boost::source_location & loc = BOOST_CURRENT_LOCATION) - { - if (init_ep) - std::rethrow_exception(init_ep); - return await_resume(as_result_tag{}).value(loc); - } - - auto await_resume(const struct as_tuple_tag &) - { - if (init_ep) - std::rethrow_exception(init_ep); - return *std::move(result); - } - - auto await_resume(const struct as_result_tag &) - { - if (init_ep) - std::rethrow_exception(init_ep); - return interpret_as_result(*std::move(result)); - } - - - - }; - - awaitable operator co_await() && - { - return awaitable{this}; - } -}; - -struct use_op_t -{ - /// Default constructor. - constexpr use_op_t() - { - } - - /// Adapts an executor to add the @c use_op_t completion token as the - /// default. - template - struct executor_with_default : InnerExecutor - { - /// Specify @c use_op_t as the default completion token type. - typedef use_op_t default_completion_token_type; - - executor_with_default(const InnerExecutor& ex) noexcept - : InnerExecutor(ex) - { - } - - /// Construct the adapted executor from the inner executor type. - template - executor_with_default(const InnerExecutor1& ex, - typename std::enable_if< - std::conditional< - !std::is_same::value, - std::is_convertible, - std::false_type - >::type::value>::type = 0) noexcept - : InnerExecutor(ex) - { - } - }; - - /// Type alias to adapt an I/O object to use @c use_op_t as its - /// default completion token type. - template - using as_default_on_t = typename T::template rebind_executor< - executor_with_default >::other; - - /// Function helper to adapt an I/O object to use @c use_op_t as its - /// default completion token type. - template - static typename std::decay_t::template rebind_executor< - executor_with_default::executor_type> - >::other - as_default_on(T && object) - { - return typename std::decay_t::template rebind_executor< - executor_with_default::executor_type> - >::other(std::forward(object)); - } - -}; - -constexpr use_op_t use_op{}; - -} - -namespace boost::asio -{ - -template -struct async_result -{ - using return_type = boost::cobalt::op; - - template - struct op_impl final : boost::cobalt::op - { - Initiation initiation; - std::tuple args; - template - op_impl(Initiation_ initiation, - InitArgs_ && ... args) - : initiation(std::forward(initiation)) - , args(std::forward(args)...) {} - - void initiate(cobalt::completion_handler complete) final override - { - std::apply( - [&](InitArgs && ... args) - { - std::move(initiation)(std::move(complete), - std::move(args)...); - }, std::move(args)); - } - }; - - template - static auto initiate(Initiation && initiation, - boost::cobalt::use_op_t, - InitArgs &&... args) - -> op_impl, std::decay_t...> - { - return op_impl, std::decay_t...>( - std::forward(initiation), - std::forward(args)...); - } -}; -} -#endif //BOOST_COBALT_OP_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/promise.hpp b/lib/boost_1.84.0/boost/cobalt/promise.hpp deleted file mode 100644 index 0094f2dd9ab..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/promise.hpp +++ /dev/null @@ -1,138 +0,0 @@ -// -// Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef BOOST_COBALT_PROMISE_HPP -#define BOOST_COBALT_PROMISE_HPP - -#include - -namespace boost::cobalt -{ - -// tag::outline[] -template -struct [[nodiscard]] promise -{ - promise(promise &&lhs) noexcept; - promise& operator=(promise && lhs) noexcept; - - // enable `co_await`. <1> - auto operator co_await (); - - // Ignore the return value, i.e. detach it. <2> - void operator +() &&; - - // Cancel the promise. - void cancel(asio::cancellation_type ct = asio::cancellation_type::all); - - // Check if the result is ready - bool ready() const; - // Check if the promise can be awaited. - explicit operator bool () const; // <3> - - // Detach or attach - bool attached() const; - void detach(); - void attach(); - // end::outline[] - - /* tag::outline[] - // Get the return value. If !ready() this function has undefined behaviour. - Return get(); - end::outline[] */ - - Return get(const boost::source_location & loc = BOOST_CURRENT_LOCATION) - { - BOOST_ASSERT(ready()); - return receiver_.get_result().value(loc); - } - - using promise_type = detail::cobalt_promise; - promise(const promise &) = delete; - promise& operator=(const promise &) = delete; - - ~promise() - { - if (attached_) - cancel(); - } - private: - template - friend struct detail::cobalt_promise; - - promise(detail::cobalt_promise * promise) : receiver_(promise->receiver, promise->signal), attached_{true} - { - } - - detail::promise_receiver receiver_; - bool attached_; - - friend struct detached; - //tag::outline[] -}; -// end::outline[] - -template -inline -promise::promise(promise &&lhs) noexcept - : receiver_(std::move(lhs.receiver_)), attached_(std::exchange(lhs.attached_, false)) -{ -} - -template -inline -promise& promise::operator=(promise && lhs) noexcept -{ - if (attached_) - cancel(); - receiver_ = std::move(lhs.receiver_); - attached_ = std::exchange(lhs.attached_, false); -} - -template -inline -auto promise::operator co_await () {return receiver_.get_awaitable();} - -// Ignore the returns value -template -inline -void promise::operator +() && {detach();} - -template -inline -void promise::cancel(asio::cancellation_type ct) -{ - if (!receiver_.done && receiver_.reference == &receiver_) - receiver_.cancel_signal.emit(ct); -} - -template -inline -bool promise::ready() const { return receiver_.done; } - -template -inline -promise::operator bool () const -{ - return !receiver_.done || !receiver_.result_taken; -} - -template -inline -bool promise::attached() const {return attached_;} - -template -inline -void promise::detach() {attached_ = false;} -template -inline -void promise::attach() {attached_ = true;} - - -} - -#endif //BOOST_COBALT_PROMISE_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/result.hpp b/lib/boost_1.84.0/boost/cobalt/result.hpp deleted file mode 100644 index a1300440ebc..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/result.hpp +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright (c) 2023 Klemens D. Morgenstern -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_COBALT_RESULT_HPP -#define BOOST_COBALT_RESULT_HPP - -#include - -#include - -namespace boost::cobalt -{ - - -namespace detail -{ - -template -concept result_error = - requires (const T & t, const source_location & loc) - { - system::throw_exception_from_error(t, loc); - } - || // ADL - requires (const T & t, const source_location & loc) - { - throw_exception_from_error(t, loc); - } -; - -} - -inline constexpr auto interpret_as_result(std::tuple<> &&) -{ - return system::result(); -} - -template -auto interpret_as_result(std::tuple && args) -{ - if constexpr (detail::result_error) - { - if (std::get<0>(args)) - return system::result(system::in_place_error, std::get<0>(args)); - else - return system::result(system::in_place_value); - } - - else - return system::result(std::move(std::get<0>(args))); -} - -template - requires (!detail::result_error && sizeof...(Args) > 0u) -auto interpret_as_result(std::tuple && args) -> system::result> -{ - return std::move(args); -} - -template - requires (sizeof...(Args) > 1u) -auto interpret_as_result(std::tuple && args) -> system::result, Error> -{ - if (std::get<0>(args)) - return {system::in_place_error, std::move(std::get<0>(args))}; - return { - system::in_place_value, - std::apply([](auto, auto && ... rest) {return std::make_tuple(std::move(rest)...);}) - }; -} - -template -auto interpret_as_result(std::tuple && args) -> system::result -{ - if (std::get<0>(args)) - return {system::in_place_error, std::get<0>(args)}; - - return {system::in_place_value, std::get<1>(std::move(args))}; -} - -struct as_result_tag {}; -struct as_tuple_tag {}; - -template -struct as_result_t -{ - as_result_t(Aw && aw) : aw_(std::forward(aw)) {} - - bool await_ready() { return aw_.await_ready();} - template - auto await_suspend(std::coroutine_handle h) { return aw_.await_suspend(h);} - - auto await_resume() - { - if constexpr (requires {aw_.await_resume(as_result_tag{});}) - return aw_.await_resume(as_result_tag{}); - else - { - using type = decltype(aw_.await_resume()); - if constexpr (std::is_void_v) - { - using res_t = system::result; - try - { - aw_.await_resume(); - return res_t{system::in_place_value}; - } - catch (...) - { - return res_t{system::in_place_error, std::current_exception()}; - } - } - else - { - using res_t = system::result; - try - { - return res_t{system::in_place_value, aw_.await_resume()}; - } - catch (...) - { - return res_t{system::in_place_error, std::current_exception()}; - } - } - } - } - private: - Aw aw_; -}; - - -template -as_result_t(Aw &&) -> as_result_t; - -template -auto as_result(Aw && aw) -> as_result_t -{ - return as_result_t(std::forward(aw)); -} - -template - requires requires (Aw && aw) - { - {std::forward(aw).operator co_await()} -> awaitable_type; - } -auto as_result(Aw && aw) -{ - struct lazy_tuple - { - Aw aw; - auto operator co_await () - { - return as_result(std::forward(aw).operator co_await()); - } - }; - return lazy_tuple{std::forward(aw)}; -} - -template - requires requires (Aw && aw) - { - {operator co_await(std::forward(aw))} -> awaitable_type; - } -auto as_result(Aw && aw) -{ - struct lazy_tuple - { - Aw aw; - auto operator co_await () - { - return as_result(operator co_await(std::forward(aw))); - } - }; - return lazy_tuple{std::forward(aw)}; -} - - - -template -struct as_tuple_t -{ - as_tuple_t(Aw && aw) : aw_(std::forward(aw)) {} - - bool await_ready() { return aw_.await_ready();} - template - auto await_suspend(std::coroutine_handle h) { return aw_.await_suspend(h);} - - auto await_resume() - { - if constexpr (requires {aw_.await_resume(as_tuple_tag{});}) - return aw_.await_resume(as_tuple_tag{}); - else - { - using type = decltype(aw_.await_resume()); - if constexpr (std::is_void_v) - { - try - { - aw_.await_resume(); - return std::make_tuple(std::exception_ptr()); - } - catch (...) - { - return make_tuple_(std::current_exception()); - } - } - else - { - try - { - return make_tuple_(std::exception_ptr(), aw_.await_resume()); - } - catch (...) - { - return make_tuple_(std::current_exception(), type()); - } - } - } - } - private: - template - std::tuple make_tuple_(std::exception_ptr ep, std::tuple && tup) - { - return std::apply( - [&](auto ... args) - { - return std::make_tuple(std::move(ep), std::move(args)...); - }, std::move(tup)); - } - - template - std::tuple make_tuple_(std::exception_ptr ep, Arg && arg) - { - return std::make_tuple(std::move(ep), std::move(arg)); - } - -private: - - Aw aw_; -}; - - -template -as_tuple_t(Aw &&) -> as_tuple_t; - - -template -auto as_tuple(Aw && aw) -> as_tuple_t -{ - return as_tuple_t(std::forward(aw)); -} - -template - requires requires (Aw && aw) - { - {std::forward(aw).operator co_await()} -> awaitable_type; - } -auto as_tuple(Aw && aw) -{ - struct lazy_tuple - { - Aw aw; - auto operator co_await () - { - return as_tuple(std::forward(aw).operator co_await()); - } - }; - return lazy_tuple{std::forward(aw)}; -} - -template - requires requires (Aw && aw) - { - {operator co_await(std::forward(aw))} -> awaitable_type; - } -auto as_tuple(Aw && aw) -{ - struct lazy_tuple - { - Aw aw; - auto operator co_await () - { - return as_tuple(operator co_await(std::forward(aw))); - } - }; - return lazy_tuple{std::forward(aw)}; -} - - -} - -#endif //BOOST_COBALT_RESULT_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/spawn.hpp b/lib/boost_1.84.0/boost/cobalt/spawn.hpp deleted file mode 100644 index e3dec3dabac..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/spawn.hpp +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef BOOST_COBALT_SPAWN_HPP -#define BOOST_COBALT_SPAWN_HPP - -#include - -namespace boost::cobalt -{ - -template -auto spawn(Context & context, - task && t, - CompletionToken&& token) -{ - return asio::async_initiate( - detail::async_initiate_spawn{}, token, std::move(t), context.get_executor()); -} - -template Executor, typename T, typename CompletionToken> -auto spawn(Executor executor, task && t, - CompletionToken&& token BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(Executor)) -{ - return asio::async_initiate( - detail::async_initiate_spawn{}, token, std::move(t), executor); -} - -template -auto spawn(Context & context, - task && t, - CompletionToken&& token) -{ - return asio::async_initiate( - detail::async_initiate_spawn{}, token, std::move(t), context.get_executor()); -} - -template Executor, typename CompletionToken> -auto spawn(Executor executor, task && t, - CompletionToken&& token BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(Executor)) -{ - return asio::async_initiate( - detail::async_initiate_spawn{}, token, std::move(t), executor); - -} - -} - -#endif //BOOST_COBALT_SPAWN_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/task.hpp b/lib/boost_1.84.0/boost/cobalt/task.hpp deleted file mode 100644 index f24bde869df..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/task.hpp +++ /dev/null @@ -1,140 +0,0 @@ -// -// Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef BOOST_COBALT_TASK_HPP -#define BOOST_COBALT_TASK_HPP - -#include -#include -#include - -#include -#include - -namespace boost::cobalt -{ - -// tag::outline[] -template -struct [[nodiscard]] task -{ - task(task &&lhs) noexcept = default; - task& operator=(task &&) noexcept = default; - - // enable `co_await` - auto operator co_await (); - - // end::outline[] - task(const task &) = delete; - task& operator=(const task &) = delete; - - using promise_type = detail::task_promise; - - private: - template - friend struct detail::task_promise; - - task(detail::task_promise * task) : receiver_(task) - { - } - - detail::task_receiver receiver_; - friend struct detail::async_initiate_spawn; - // tag::outline[] -}; -// end::outline[] - - -struct use_task_t -{ - /// Default constructor. - constexpr use_task_t() - { - } - - /// Adapts an executor to add the @c use_task_t completion token as the - /// default. - template - struct executor_with_default : InnerExecutor - { - /// Specify @c use_task_t as the default completion token type. - typedef use_task_t default_completion_token_type; - - executor_with_default(const InnerExecutor& ex) noexcept - : InnerExecutor(ex) - { - } - - /// Construct the adapted executor from the inner executor type. - template - executor_with_default(const InnerExecutor1& ex, - typename std::enable_if< - std::conditional< - !std::is_same::value, - std::is_convertible, - std::false_type - >::type::value>::type = 0) noexcept - : InnerExecutor(ex) - { - } - }; - - /// Type alias to adapt an I/O object to use @c use_task_t as its - /// default completion token type. - template - using as_default_on_t = typename T::template rebind_executor< - executor_with_default >::other; - - /// Function helper to adapt an I/O object to use @c use_task_t as its - /// default completion token type. - template - static typename std::decay_t::template rebind_executor< - executor_with_default::executor_type> - >::other - as_default_on(T && object) - { - return typename std::decay_t::template rebind_executor< - executor_with_default::executor_type> - >::other(std::forward(object)); - } - -}; - -constexpr use_task_t use_task{}; - -template -inline auto task::operator co_await () {return receiver_.get_awaitable();} - -} - - -namespace boost::asio -{ - -template -struct async_result -{ - using return_type = cobalt::task< - typename decltype(cobalt::interpret_as_result(std::declval>()))::value_type>; - - template - static auto initiate(Initiation initiation, - boost::cobalt::use_task_t, - InitArgs ... args) -> return_type - - { - co_return co_await async_initiate< - const cobalt::use_op_t&, void(Args...)>( - std::move(initiation), - cobalt::use_op, std::move(args)...); - } -}; - -} - - -#endif //BOOST_COBALT_COBALT_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/this_coro.hpp b/lib/boost_1.84.0/boost/cobalt/this_coro.hpp deleted file mode 100644 index 77df24bffb4..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/this_coro.hpp +++ /dev/null @@ -1,446 +0,0 @@ -// Copyright (c) 2022 Klemens D. Morgenstern -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_COBALT_THIS_CORO_HPP -#define BOOST_COBALT_THIS_CORO_HPP - -#include -#include - -#include -#include -#include -#include -#include - - -#include -#include -#include - -namespace boost::cobalt -{ - -namespace this_coro -{ - -/* tag::outline[] - -// Awaitable type that returns the executor of the current coroutine. -struct executor_t {} -constexpr executor_t executor; - -// Awaitable type that returns the cancellation state of the current coroutine. -struct cancellation_state_t {}; -constexpr cancellation_state_t cancellation_state; - -// Reset the cancellation state with custom or default filters. -constexpr __unspecified__ reset_cancellation_state(); -template -constexpr __unspecified__ reset_cancellation_state( - Filter && filter); -template -constexpr __unspecified__ reset_cancellation_state( - InFilter && in_filter, - OutFilter && out_filter); - -// get & set the throw_if_cancelled setting. -__unspecified__ throw_if_cancelled(); -__unspecified__ throw_if_cancelled(bool value); - -// Set the cancellation source in a detached. -__unspecified__ reset_cancellation_source(); -__unspecified__ reset_cancellation_source(asio::cancellation_slot slot); - -end::outline[] - */ - -using namespace asio::this_coro; -//tag::outline[] - -// get the allocator the promise -struct allocator_t {}; -constexpr allocator_t allocator; - -// get the current cancellation state-type -struct cancelled_t {}; -constexpr cancelled_t cancelled; - -// set the over-eager mode of a generator -struct initial_t {}; -constexpr initial_t initial; -//end::outline[] - -template -struct reset_cancellation_source_t -{ - CancellationSlot source; -}; - -template -reset_cancellation_source_t reset_cancellation_source(CancellationSlot slot = {}) -{ - return reset_cancellation_source_t{std::move(slot)}; -} - -} - -template -struct promise_cancellation_base -{ - using cancellation_slot_type = asio::cancellation_slot; - cancellation_slot_type get_cancellation_slot() const {return state_.slot();} - - template - promise_cancellation_base(CancellationSlot slot = {}, InitialFilter filter = {}) - : source_(slot), state_{source_, filter} {} - - - // This await transformation resets the associated cancellation state. - auto await_transform(cobalt::this_coro::cancelled_t) noexcept - { - return cancelled_t_awaitable{state_.cancelled()}; - } - - // This await transformation resets the associated cancellation state. - auto await_transform(asio::this_coro::cancellation_state_t) noexcept - { - return cancellation_state_t_awaitable{state_}; - } - - // This await transformation resets the associated cancellation state. - auto await_transform(asio::this_coro::reset_cancellation_state_0_t) noexcept - { - return reset_cancellation_state_0_t_awaitable{state_, source_}; - } - - // This await transformation resets the associated cancellation state. - template - auto await_transform( - asio::this_coro::reset_cancellation_state_1_t reset) noexcept - { - return reset_cancellation_state_1_t_awaitable{state_, BOOST_ASIO_MOVE_CAST(Filter)(reset.filter), source_}; - } - - // This await transformation resets the associated cancellation state. - template - auto await_transform( - asio::this_coro::reset_cancellation_state_2_t reset) - noexcept - { - return reset_cancellation_state_2_t_awaitable{state_, - BOOST_ASIO_MOVE_CAST(InFilter)(reset.in_filter), - BOOST_ASIO_MOVE_CAST(OutFilter)(reset.out_filter), - source_}; - } - const asio::cancellation_state & cancellation_state() const {return state_;} - asio::cancellation_state & cancellation_state() {return state_;} - asio::cancellation_type cancelled() const - { - return state_.cancelled(); - } - - cancellation_slot_type get_cancellation_slot() {return state_.slot();} - - void reset_cancellation_source(CancellationSlot source = CancellationSlot()) - { - source_ = source; - state_ = asio::cancellation_state{source, DefaultFilter()}; - state_.clear(); - } - - CancellationSlot & source() {return source_;} - const CancellationSlot & source() const {return source_;} - private: - CancellationSlot source_; - asio::cancellation_state state_{source_, DefaultFilter() }; - - struct cancelled_t_awaitable - { - asio::cancellation_type state; - - bool await_ready() const noexcept - { - return true; - } - - void await_suspend(std::coroutine_handle) noexcept - { - } - - auto await_resume() const - { - return state; - } - }; - - struct cancellation_state_t_awaitable - { - asio::cancellation_state &state; - - bool await_ready() const noexcept - { - return true; - } - - void await_suspend(std::coroutine_handle) noexcept - { - } - - auto await_resume() const - { - return state; - } - }; - - struct reset_cancellation_state_0_t_awaitable - { - asio::cancellation_state &state; - CancellationSlot &source; - - bool await_ready() const noexcept - { - return true; - } - - void await_suspend(std::coroutine_handle) noexcept - { - } - - auto await_resume() const - { - state = asio::cancellation_state(source, DefaultFilter()); - } - }; - - template - struct reset_cancellation_state_1_t_awaitable - { - asio::cancellation_state & state; - Filter filter_; - CancellationSlot &source; - - bool await_ready() const noexcept - { - return true; - } - - void await_suspend(std::coroutine_handle) noexcept - { - } - - auto await_resume() - { - state = asio::cancellation_state( - source, - BOOST_ASIO_MOVE_CAST(Filter)(filter_)); - } - }; - - template - struct reset_cancellation_state_2_t_awaitable - { - asio::cancellation_state & state; - InFilter in_filter_; - OutFilter out_filter_; - CancellationSlot &source; - - - bool await_ready() const noexcept - { - return true; - } - - void await_suspend(std::coroutine_handle) noexcept - { - } - - auto await_resume() - { - state = asio::cancellation_state( - source, - BOOST_ASIO_MOVE_CAST(InFilter)(in_filter_), - BOOST_ASIO_MOVE_CAST(OutFilter)(out_filter_)); - } - }; -}; - -struct promise_throw_if_cancelled_base -{ - promise_throw_if_cancelled_base(bool throw_if_cancelled = true) : throw_if_cancelled_(throw_if_cancelled) {} - - // This await transformation determines whether cancellation is propagated as - // an exception. - auto await_transform(this_coro::throw_if_cancelled_0_t) - noexcept - { - return throw_if_cancelled_0_awaitable_{throw_if_cancelled_}; - } - - // This await transformation sets whether cancellation is propagated as an - // exception. - auto await_transform(this_coro::throw_if_cancelled_1_t throw_if_cancelled) - noexcept - { - return throw_if_cancelled_1_awaitable_{this, throw_if_cancelled.value}; - } - bool throw_if_cancelled() const {return throw_if_cancelled_;} - protected: - bool throw_if_cancelled_{true}; - - struct throw_if_cancelled_0_awaitable_ - { - bool value_; - - bool await_ready() const noexcept - { - return true; - } - - void await_suspend(std::coroutine_handle) noexcept - { - } - - auto await_resume() - { - return value_; - } - }; - - struct throw_if_cancelled_1_awaitable_ - { - promise_throw_if_cancelled_base* this_; - bool value_; - - bool await_ready() const noexcept - { - return true; - } - - void await_suspend(std::coroutine_handle) noexcept - { - } - - auto await_resume() - { - this_->throw_if_cancelled_ = value_; - } - }; -}; - -struct promise_memory_resource_base -{ -#if !defined(BOOST_COBALT_NO_PMR) - using allocator_type = pmr::polymorphic_allocator; - allocator_type get_allocator() const {return allocator_type{resource};} - - template - static void * operator new(const std::size_t size, Args & ... args) - { - auto res = detail::get_memory_resource_from_args(args...); - const auto p = res->allocate(size + sizeof(pmr::memory_resource *), alignof(pmr::memory_resource *)); - auto pp = static_cast(p); - *pp = res; - return pp + 1; - } - - static void operator delete(void * raw, const std::size_t size) noexcept - { - const auto p = static_cast(raw) - 1; - pmr::memory_resource * res = *p; - res->deallocate(p, size + sizeof(pmr::memory_resource *), alignof(pmr::memory_resource *)); - } - promise_memory_resource_base(pmr::memory_resource * resource = this_thread::get_default_resource()) : resource(resource) {} - -private: - pmr::memory_resource * resource = this_thread::get_default_resource(); -#endif -}; - -/// Allocate the memory and put the allocator behind the cobalt memory -template -void *allocate_coroutine(const std::size_t size, AllocatorType alloc_) -{ - using alloc_type = typename std::allocator_traits::template rebind_alloc; - alloc_type alloc{alloc_}; - - const std::size_t align_needed = size % alignof(alloc_type); - const std::size_t align_offset = align_needed != 0 ? alignof(alloc_type) - align_needed : 0ull; - const std::size_t alloc_size = size + sizeof(alloc_type) + align_offset; - const auto raw = std::allocator_traits::allocate(alloc, alloc_size); - new(raw + size + align_offset) alloc_type(std::move(alloc)); - - return raw; -} - -/// Deallocate the memory and destroy the allocator in the cobalt memory. -template -void deallocate_coroutine(void *raw_, const std::size_t size) -{ - using alloc_type = typename std::allocator_traits::template rebind_alloc; - const auto raw = static_cast(raw_); - - const std::size_t align_needed = size % alignof(alloc_type); - const std::size_t align_offset = align_needed != 0 ? alignof(alloc_type) - align_needed : 0ull; - const std::size_t alloc_size = size + sizeof(alloc_type) + align_offset; - auto alloc_p = reinterpret_cast(raw + size + align_offset); - - auto alloc = std::move(*alloc_p); - alloc_p->~alloc_type(); - using size_type = typename std::allocator_traits::size_type; - std::allocator_traits::deallocate(alloc, raw, static_cast(alloc_size)); -} - - -template -struct enable_await_allocator -{ - auto await_transform(this_coro::allocator_t) - { - return allocator_awaitable_{static_cast(this)->get_allocator()}; - - } - private: - struct allocator_awaitable_ - { - using allocator_type = typename Promise::allocator_type; - - allocator_type alloc; - constexpr static bool await_ready() { return true; } - - bool await_suspend( std::coroutine_handle ) { return false; } - allocator_type await_resume() - { - return alloc; - } - }; -}; - -template -struct enable_await_executor -{ - auto await_transform(this_coro::executor_t) - { - return executor_awaitable_{static_cast(this)->get_executor()}; - } - private: - struct executor_awaitable_ - { - using executor_type = typename Promise::executor_type; - - executor_type exec; - constexpr static bool await_ready() { return true; } - - bool await_suspend( std::coroutine_handle ) { return false; } - executor_type await_resume() - { - return exec; - } - }; -}; - -} - -#endif //BOOST_COBALT_THIS_CORO_HPP diff --git a/lib/boost_1.84.0/boost/cobalt/with.hpp b/lib/boost_1.84.0/boost/cobalt/with.hpp deleted file mode 100644 index ed8a4f6be27..00000000000 --- a/lib/boost_1.84.0/boost/cobalt/with.hpp +++ /dev/null @@ -1,192 +0,0 @@ -// -// Copyright (c) 2022 Klemens Morgenstern (klemens.morgenstern@gmx.net) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef BOOST_COBALT_WITH_HPP -#define BOOST_COBALT_WITH_HPP - -#include -#include -#include -#include -#include - - -namespace boost::cobalt -{ - -namespace detail -{ - -template -auto invoke_await_exit(T && t, std::exception_ptr & e) -{ - return std::forward(t).await_exit(e); -} - -} - - -template - requires (requires (Func func, Arg & arg, Teardown & teardown, std::exception_ptr ep) - { - {std::move(func)(arg)} -> awaitable::promise_type>; - {std::move(teardown)(std::move(arg), ep)} -> awaitable::promise_type>; - {std::declval>()} -> std::same_as; - }) -auto with(Arg arg, Func func, Teardown teardown) -> detail::with_impl -{ - std::exception_ptr e; - try - { - co_await std::move(func)(arg); - } - catch (...) - { - e = std::current_exception(); - } - - try - { - co_await std::move(teardown)(std::move(arg), e); - } - catch (...) - { - if (!e) - e = std::current_exception(); - } - if (e) - std::rethrow_exception(e); -} - - -template - requires (requires (Func func, Arg & arg, Teardown & teardown, std::exception_ptr e) - { - {std::move(teardown)(std::move(arg), e)} -> awaitable::promise_type>; - {std::move(func)(arg)} -> std::same_as; - } - && (!requires (Func func, Arg & arg) - { - {std::move(func)(arg)} -> awaitable::promise_type>; - })) -auto with(Arg arg, Func func, Teardown teardown) -> detail::with_impl -{ - std::exception_ptr e; - try - { - std::move(func)(arg); - } - catch (...) - { - e = std::current_exception(); - } - - try - { - co_await std::move(teardown)(arg, e); - } - catch (...) - { - if (!e) - e = std::current_exception(); - } - if (e) - std::rethrow_exception(e); -} - - -template - requires (requires (Func func, Arg & arg, Teardown & teardown, std::exception_ptr ep) - { - {std::move(func)(arg)} -> awaitable::promise_type>; - {std::move(teardown)(std::move(arg), ep)} -> awaitable::promise_type>; - {std::declval>()} -> std::move_constructible; - }) -auto with(Arg arg, Func func, Teardown teardown) - -> detail::with_impl> -{ - std::exception_ptr e; - std::optional> res; - - try - { - res = co_await std::move(func)(arg); - } - catch (...) - { - e = std::current_exception(); - } - - try - { - co_await std::move(teardown)(std::move(arg), e); - } - catch (...) - { - if (!e) - e = std::current_exception(); - } - if (e) - std::rethrow_exception(e); - co_return std::move(res); -} - - -template - requires (requires (Func func, Arg & arg, Teardown & teardown, std::exception_ptr e) - { - {std::move(teardown)(std::move(arg), e)} -> awaitable::promise_type>; - {std::move(func)(arg)} -> std::move_constructible; - } - && (!requires (Func func, Arg & arg) - { - {std::move(func)(arg)} -> awaitable::promise_type>; - })) -auto with(Arg arg, Func func, Teardown teardown) -> detail::with_impl -{ - std::exception_ptr e; - std::optional res; - try - { - res = std::move(func)(arg); - } - catch (...) - { - e = std::current_exception(); - } - - try - { - co_await std::move(teardown)(arg, e); - } - catch (...) - { - if (!e) - e = std::current_exception(); - } - if (e) - std::rethrow_exception(e); - - co_return std::move(res); -} - - - -template - requires requires (Arg args, std::exception_ptr ep) - { - {std::move(args).await_exit(ep)} -> awaitable::promise_type>; - } -auto with(Arg && arg, Func && func) -{ - return with(std::forward(arg), std::forward(func), &detail::invoke_await_exit); -} - -} - - -#endif //BOOST_COBALT_WITH_HPP diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cassert b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cassert deleted file mode 100644 index 5bc7329ddef..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cassert +++ /dev/null @@ -1,10 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CASSERT_HEADER -#define __CASSERT_HEADER - -#include - -#endif // CASSERT_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cctype b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cctype deleted file mode 100644 index 1ad03cb5ca8..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cctype +++ /dev/null @@ -1,26 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CCTYPE_HEADER -#define __CCTYPE_HEADER - -#include - -namespace std { - using ::isalnum; - using ::isdigit; - using ::isprint; - using ::isupper; - using ::tolower; - using ::isalpha; - using ::isgraph; - using ::ispunct; - using ::isxdigit; - using ::toupper; - using ::iscntrl; - using ::islower; - using ::isspace; -} - -#endif // CCTYPE_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cerrno b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cerrno deleted file mode 100644 index 4d57b808758..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cerrno +++ /dev/null @@ -1,10 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CERRNO_HEADER -#define __CERRNO_HEADER - -#include - -#endif // CERRNO_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cfloat b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cfloat deleted file mode 100644 index 9d3d53318c6..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cfloat +++ /dev/null @@ -1,10 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CFLOAT_HEADER -#define __CFLOAT_HEADER - -#include - -#endif // CFLOAT_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/climits b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/climits deleted file mode 100644 index b71b7f5eb49..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/climits +++ /dev/null @@ -1,10 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CLIMITS_HEADER -#define __CLIMITS_HEADER - -#include - -#endif // CLIMITS_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/clocale b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/clocale deleted file mode 100644 index b3ba3c859fa..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/clocale +++ /dev/null @@ -1,16 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CLOCALE_HEADER -#define __CLOCALE_HEADER - -#include - -namespace std { - using ::lconv; - using ::localeconv; - using ::setlocale; -} - -#endif // CLOCALE_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cmath b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cmath deleted file mode 100644 index 70dc8843ed2..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cmath +++ /dev/null @@ -1,35 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CMATH_HEADER -#define __CMATH_HEADER - -#include - -namespace std { - using ::acos; - using ::cos; - using ::fmod; - using ::modf; - using ::tan; - using ::asin; - using ::cosh; - using ::frexp; - using ::pow; - using ::tanh; - using ::atan; - using ::exp; - using ::ldexp; - using ::sin; - using ::atan2; - using ::fabs; - using ::log; - using ::sinh; - using ::ceil; - using ::floor; - using ::log10; - using ::sqrt; -} - -#endif // CMATH_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/csetjmp b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/csetjmp deleted file mode 100644 index aa6a019dfe2..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/csetjmp +++ /dev/null @@ -1,15 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CSETJMP_HEADER -#define __CSETJMP_HEADER - -#include - -namespace std { - using ::jmp_buf; - using ::longjmp; -} - -#endif // CSETJMP_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/csignal b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/csignal deleted file mode 100644 index 37e11d9e4a3..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/csignal +++ /dev/null @@ -1,16 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CSIGNAL_HEADER -#define __CSIGNAL_HEADER - -#include - -namespace std { - using ::sig_atomic_t; - using ::raise; - using ::signal; -} - -#endif // CSIGNAL_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstdarg b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstdarg deleted file mode 100644 index 5e1dd749f0c..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstdarg +++ /dev/null @@ -1,14 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CSTDARG_HEADER -#define __CSTDARG_HEADER - -#include - -namespace std { - using ::va_list; -} - -#endif // CSTDARG_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstddef b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstddef deleted file mode 100644 index c00a55c1f30..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstddef +++ /dev/null @@ -1,15 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CSTDDEF_HEADER -#define __CSTDDEF_HEADER - -#include - -namespace std { - using ::ptrdiff_t; - using ::size_t; -} - -#endif // CSTDDEF_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstdio b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstdio deleted file mode 100644 index 8a48077ce3e..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstdio +++ /dev/null @@ -1,57 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CSTDIO_HEADER -#define __CSTDIO_HEADER - -#include - -namespace std { - using ::FILE; - using ::fpos_t; - using ::size_t; - using ::clearerr; - using ::fgets; - using ::fscanf; - using ::gets; - using ::rename; - using ::tmpfile; - using ::fclose; - using ::fopen; - using ::fseek; - using ::perror; - using ::rewind; - using ::tmpnam; - using ::feof; - using ::fprintf; - using ::fsetpos; - using ::printf; - using ::scanf; - using ::ungetc; - using ::ferror; - using ::fputc; - using ::ftell; - using ::putc; - using ::setbuf; - using ::vfprintf; - using ::fflush; - using ::fputs; - using ::fwrite; - using ::putchar; - using ::setvbuf; - using ::vprintf; - using ::fgetc; - using ::fread; - using ::getc; - using ::puts; - using ::sprintf; - using ::vsprintf; - using ::fgetpos; - using ::freopen; - using ::getchar; - using ::remove; - using ::sscanf; -} - -#endif // CSTDIO_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstdlib b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstdlib deleted file mode 100644 index 7592ffcf3dd..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstdlib +++ /dev/null @@ -1,43 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CSTDLIB_HEADER -#define __CSTDLIB_HEADER - -#include - -namespace std { - using ::abort; - using ::atexit; - using ::exit; - using ::getenv; - using ::system; - using ::calloc; - using ::malloc; - using ::free; - using ::realloc; - using ::atol; - using ::mblen; - using ::strtod; - using ::wctomb; - using ::atof; - using ::mbstowcs; - using ::strtol; - using ::wcstombs; - using ::atoi; - using ::mbtowc; - using ::strtoul; - using ::bsearch; - using ::qsort; - using ::div_t; - using ::ldiv_t; - using ::abs; - using ::labs; - using ::srand; - using ::div; - using ::ldiv; - using ::rand; -} - -#endif // CSTDLIB_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstring b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstring deleted file mode 100644 index e913597a64d..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cstring +++ /dev/null @@ -1,36 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CSTRING_HEADER -#define __CSTRING_HEADER - -#include - -namespace std { - using ::size_t; - using ::memchr; - using ::strcat; - using ::strcspn; - using ::strncpy; - using ::strtok; - using ::memcmp; - using ::strchr; - using ::strerror; - using ::strpbrk; - using ::strxfrm; - using ::memcpy; - using ::strcmp; - using ::strlen; - using ::strrchr; - using ::memmove; - using ::strcoll; - using ::strncat; - using ::strspn; - using ::memset; - using ::strcpy; - using ::strncmp; - using ::strstr; -} - -#endif // CSTRING_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/ctime b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/ctime deleted file mode 100644 index 0c8ac9abf29..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/ctime +++ /dev/null @@ -1,26 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CTIME_HEADER -#define __CTIME_HEADER - -#include - -namespace std { - using ::size_t; - using ::clock_t; - using ::time_t; - using ::tm; - using ::asctime; - using ::clock; - using ::difftime; - using ::localtime; - using ::strftime; - using ::ctime; - using ::gmtime; - using ::mktime; - using ::time; -} - -#endif // CTIME_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cwchar b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cwchar deleted file mode 100644 index f9fbd309556..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cwchar +++ /dev/null @@ -1,156 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CWCHAR_HEADER -#define __CWCHAR_HEADER - -#include - -namespace std { - using ::mbstate_t; - using ::wint_t; - using ::size_t; -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::btowc; -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) - using ::getwchar; -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) - using ::ungetwc; -#endif - using ::wcscpy; -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::wcsrtombs; -#endif -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::wmemchr; -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) - using ::fgetwc; -#endif -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::mbrlen; -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::vfwprintf; -#endif -#endif - using ::wcscspn; - using ::wcsspn; -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::wmemcmp; -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) - using ::fgetws; -#endif -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::mbrtowc; -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::vswprintf; -#endif -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) - using ::wcsftime; -#endif - using ::wcsstr; -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::wmemcpy; -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) - using ::fputwc; -#endif -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::mbsinit; -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::vwprintf; -#endif -#endif - using ::wcslen; - using ::wcstod; -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::wmemmove; -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) - using ::fputws; -#endif -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::mbsrtowcs; -#endif -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::wcrtomb; -#endif - using ::wcsncat; - using ::wcstok; -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::wmemset; -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) -#if !(defined(__DECCXX_VER) && __DECCXX_VER <= 60290024) - using ::fwide; -#endif -#endif -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) - using ::putwc; -#endif - using ::wcscat; - using ::wcsncmp; - using ::wcstol; -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::wprintf; -#endif -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::fwprintf; -#endif -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) - using ::putwchar; -#endif - using ::wcschr; - using ::wcsncpy; - using ::wcstoul; -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::wscanf; -#endif -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::fwscanf; -#endif -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::swprintf; -#endif -#endif - using ::wcscmp; - using ::wcspbrk; - using ::wcsxfrm; -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) - using ::getwc; -#endif -#if !(defined(__linux) && defined(__DECCXX_VER) && __DECCXX_VER <= 60390005) -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::swscanf; -#endif -#endif - using ::wcscoll; - using ::wcsrchr; -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::wctob; -#endif -} - -#endif // CWCHAR_HEADER diff --git a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cwctype b/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cwctype deleted file mode 100644 index cf8f07b0748..00000000000 --- a/lib/boost_1.84.0/boost/compatibility/cpp_c_headers/cwctype +++ /dev/null @@ -1,39 +0,0 @@ -// This file is automatically generated. Do not edit. -// ['../../libs/compatibility/generate_cpp_c_headers.py'] -// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST') - -#ifndef __CWCTYPE_HEADER -#define __CWCTYPE_HEADER - -#include - -namespace std { -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::wctrans_t; -#endif - using ::wctype_t; - using ::wint_t; - using ::iswalnum; - using ::iswctype; - using ::iswlower; - using ::iswspace; -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::towctrans; -#endif -#if !(defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 740) - using ::wctrans; -#endif - using ::iswalpha; - using ::iswdigit; - using ::iswprint; - using ::iswupper; - using ::towlower; - using ::wctype; - using ::iswcntrl; - using ::iswgraph; - using ::iswpunct; - using ::iswxdigit; - using ::towupper; -} - -#endif // CWCTYPE_HEADER diff --git a/lib/boost_1.84.0/boost/container/allocator_traits.hpp b/lib/boost_1.84.0/boost/container/allocator_traits.hpp deleted file mode 100644 index f5f73efa502..00000000000 --- a/lib/boost_1.84.0/boost/container/allocator_traits.hpp +++ /dev/null @@ -1,502 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Pablo Halpern 2009. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2011-2013. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP -#define BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// container -#include -#include -#include //is_empty -#include -#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP -#include -#endif -// intrusive -#include -#include -// move -#include -// move/detail -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -// other boost -#include - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-result" -#endif - -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl { -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 2 -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 2 -#include - -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME destroy -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl { -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1 -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 1 -#include - -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME construct -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl { -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1 -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 9 -#include - -#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) -#pragma GCC diagnostic pop -#endif - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -template -class small_vector_allocator; - -namespace allocator_traits_detail { - -BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_max_size, max_size) -BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_select_on_container_copy_construction, select_on_container_copy_construction) - -} //namespace allocator_traits_detail { - -namespace dtl { - -//workaround needed for C++03 compilers with no construct() -//supporting rvalue references -template -struct is_std_allocator -{ static const bool value = false; }; - -template -struct is_std_allocator< std::allocator > -{ static const bool value = true; }; - -template -struct is_std_allocator< small_vector_allocator, Options > > -{ static const bool value = true; }; - -template -struct is_not_std_allocator -{ static const bool value = !is_std_allocator::value; }; - -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(pointer) -BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(const_pointer) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_reference) -BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(void_pointer) -BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(const_void_pointer) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(size_type) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_copy_assignment) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_move_assignment) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_swap) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(is_always_equal) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(is_partially_propagable) - -} //namespace dtl { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! The class template allocator_traits supplies a uniform interface to all allocator types. -//! This class is a C++03-compatible implementation of std::allocator_traits -template -struct allocator_traits -{ - //allocator_type - typedef Allocator allocator_type; - //value_type - typedef typename allocator_type::value_type value_type; - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Allocator::pointer if such a type exists; otherwise, value_type* - //! - typedef unspecified pointer; - //! Allocator::const_pointer if such a type exists ; otherwise, pointer_traits::rebind::rebind. - //! - typedef see_documentation void_pointer; - //! Allocator::const_void_pointer if such a type exists ; otherwise, pointer_traits::rebind::difference_type. - //! - typedef see_documentation difference_type; - //! Allocator::size_type if such a type exists ; otherwise, make_unsigned::type - //! - typedef see_documentation size_type; - //! Allocator::propagate_on_container_copy_assignment if such a type exists, otherwise a type - //! with an internal constant static boolean member value == false. - typedef see_documentation propagate_on_container_copy_assignment; - //! Allocator::propagate_on_container_move_assignment if such a type exists, otherwise a type - //! with an internal constant static boolean member value == false. - typedef see_documentation propagate_on_container_move_assignment; - //! Allocator::propagate_on_container_swap if such a type exists, otherwise a type - //! with an internal constant static boolean member value == false. - typedef see_documentation propagate_on_container_swap; - //! Allocator::is_always_equal if such a type exists, otherwise a type - //! with an internal constant static boolean member value == is_empty::value - typedef see_documentation is_always_equal; - //! Allocator::is_partially_propagable if such a type exists, otherwise a type - //! with an internal constant static boolean member value == false - //! Note: Non-standard extension used to implement `small_vector_allocator`. - typedef see_documentation is_partially_propagable; - //! Defines an allocator: Allocator::rebind::other if such a type exists; otherwise, Allocator - //! if Allocator is a class template instantiation of the form Allocator, where Args is zero or - //! more type arguments ; otherwise, the instantiation of rebind_alloc is ill-formed. - //! - //! In C++03 compilers rebind_alloc is a struct derived from an allocator - //! deduced by previously detailed rules. - template using rebind_alloc = see_documentation; - - //! In C++03 compilers rebind_traits is a struct derived from - //! allocator_traits, where OtherAlloc is - //! the allocator deduced by rules explained in rebind_alloc. - template using rebind_traits = allocator_traits >; - - //! Non-standard extension: Portable allocator rebind for C++03 and C++11 compilers. - //! type is an allocator related to Allocator deduced deduced by rules explained in rebind_alloc. - template - struct portable_rebind_alloc - { typedef see_documentation type; }; - #else - //pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - pointer, value_type*) - pointer; - //const_pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator, - const_pointer, typename boost::intrusive::pointer_traits::template - rebind_pointer) - const_pointer; - //reference - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - reference, typename dtl::unvoid_ref::type) - reference; - //const_reference - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - const_reference, typename dtl::unvoid_ref::type) - const_reference; - //void_pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator, - void_pointer, typename boost::intrusive::pointer_traits::template - rebind_pointer) - void_pointer; - //const_void_pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator, - const_void_pointer, typename boost::intrusive::pointer_traits::template - rebind_pointer) - const_void_pointer; - //difference_type - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - difference_type, std::ptrdiff_t) - difference_type; - //size_type - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - size_type, std::size_t) - size_type; - //propagate_on_container_copy_assignment - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - propagate_on_container_copy_assignment, dtl::false_type) - propagate_on_container_copy_assignment; - //propagate_on_container_move_assignment - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - propagate_on_container_move_assignment, dtl::false_type) - propagate_on_container_move_assignment; - //propagate_on_container_swap - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - propagate_on_container_swap, dtl::false_type) - propagate_on_container_swap; - //is_always_equal - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - is_always_equal, dtl::is_empty) - is_always_equal; - //is_partially_propagable - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, - is_partially_propagable, dtl::false_type) - is_partially_propagable; - - //rebind_alloc & rebind_traits - #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - //C++11 - template using rebind_alloc = typename boost::intrusive::pointer_rebind::type; - template using rebind_traits = allocator_traits< rebind_alloc >; - #else // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - //Some workaround for C++03 or C++11 compilers with no template aliases - template - struct rebind_alloc : boost::intrusive::pointer_rebind::type - { - typedef typename boost::intrusive::pointer_rebind::type Base; - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - template - rebind_alloc(BOOST_FWD_REF(Args)... args) : Base(boost::forward(args)...) {} - #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - #define BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\ - explicit rebind_alloc(BOOST_MOVE_UREF##N) : Base(BOOST_MOVE_FWD##N){}\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC) - #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC - #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - }; - - template - struct rebind_traits - : allocator_traits::type> - {}; - #endif // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - - //portable_rebind_alloc - template - struct portable_rebind_alloc - { typedef typename boost::intrusive::pointer_rebind::type type; }; - #endif //BOOST_CONTAINER_DOXYGEN_INVOKED - - //! Returns: a.allocate(n) - //! - BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n) - { return a.allocate(n); } - - //! Returns: a.deallocate(p, n) - //! - //! Throws: Nothing - BOOST_CONTAINER_FORCEINLINE static void deallocate(Allocator &a, pointer p, size_type n) - { a.deallocate(p, n); } - - //! Effects: calls a.allocate(n, p) if that call is well-formed; - //! otherwise, invokes a.allocate(n) - BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n, const_void_pointer p) - { - const bool value = boost::container::dtl:: - has_member_function_callable_with_allocate - ::value; - dtl::bool_ flag; - return allocator_traits::priv_allocate(flag, a, n, p); - } - - //! Effects: calls a.destroy(p) if that call is well-formed; - //! otherwise, invokes p->~T(). - template - BOOST_CONTAINER_FORCEINLINE static void destroy(Allocator &a, T*p) BOOST_NOEXCEPT_OR_NOTHROW - { - typedef T* destroy_pointer; - const bool value = boost::container::dtl:: - has_member_function_callable_with_destroy - ::value; - dtl::bool_ flag; - allocator_traits::priv_destroy(flag, a, p); - } - - //! Returns: a.max_size() if that expression is well-formed; otherwise, - //! numeric_limits::max(). - BOOST_CONTAINER_FORCEINLINE static size_type max_size(const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW - { - const bool value = allocator_traits_detail::has_max_size::value; - dtl::bool_ flag; - return allocator_traits::priv_max_size(flag, a); - } - - //! Returns: a.select_on_container_copy_construction() if that expression is well-formed; - //! otherwise, a. - BOOST_CONTAINER_FORCEINLINE static BOOST_CONTAINER_DOC1ST(Allocator, - typename dtl::if_c - < allocator_traits_detail::has_select_on_container_copy_construction::value - BOOST_MOVE_I Allocator BOOST_MOVE_I const Allocator & >::type) - select_on_container_copy_construction(const Allocator &a) - { - const bool value = allocator_traits_detail::has_select_on_container_copy_construction - ::value; - dtl::bool_ flag; - return allocator_traits::priv_select_on_container_copy_construction(flag, a); - } - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: calls a.construct(p, std::forward(args)...) if that call is well-formed; - //! otherwise, invokes `placement new` (static_cast(p)) T(std::forward(args)...) - template - BOOST_CONTAINER_FORCEINLINE static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args) - { - static const bool value = ::boost::move_detail::and_ - < dtl::is_not_std_allocator - , boost::container::dtl::has_member_function_callable_with_construct - < Allocator, T*, Args... > - >::value; - dtl::bool_ flag; - allocator_traits::priv_construct(flag, a, p, ::boost::forward(args)...); - } - #endif - - //! Returns: a.storage_is_unpropagable(p) if is_partially_propagable::value is true; otherwise, - //! false. - BOOST_CONTAINER_FORCEINLINE static bool storage_is_unpropagable(const Allocator &a, pointer p) BOOST_NOEXCEPT_OR_NOTHROW - { - dtl::bool_ flag; - return allocator_traits::priv_storage_is_unpropagable(flag, a, p); - } - - //! Returns: true if is_always_equal::value == true, otherwise, - //! a == b. - BOOST_CONTAINER_FORCEINLINE static bool equal(const Allocator &a, const Allocator &b) BOOST_NOEXCEPT_OR_NOTHROW - { - dtl::bool_ flag; - return allocator_traits::priv_equal(flag, a, b); - } - - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - private: - BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(dtl::true_type, Allocator &a, size_type n, const_void_pointer p) - { return a.allocate(n, p); } - - BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(dtl::false_type, Allocator &a, size_type n, const_void_pointer) - { return a.allocate(n); } - - template - BOOST_CONTAINER_FORCEINLINE static void priv_destroy(dtl::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW - { a.destroy(p); } - - template - BOOST_CONTAINER_FORCEINLINE static void priv_destroy(dtl::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW - { p->~T(); (void)p; } - - BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(dtl::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW - { return a.max_size(); } - - BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(dtl::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { return size_type(-1)/sizeof(value_type); } - - BOOST_CONTAINER_FORCEINLINE static Allocator priv_select_on_container_copy_construction(dtl::true_type, const Allocator &a) - { return a.select_on_container_copy_construction(); } - - BOOST_CONTAINER_FORCEINLINE static const Allocator &priv_select_on_container_copy_construction(dtl::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW - { return a; } - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - template - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args) - { a.construct( p, ::boost::forward(args)...); } - - template - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args) - { ::new((void*)p, boost_container_new_t()) T(::boost::forward(args)...); } - #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - public: - - #define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL(N) \ - template\ - BOOST_CONTAINER_FORCEINLINE static void construct(Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - static const bool value = ::boost::move_detail::and_ \ - < dtl::is_not_std_allocator \ - , boost::container::dtl::has_member_function_callable_with_construct \ - < Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_FWD_T##N > \ - >::value; \ - dtl::bool_ flag;\ - (priv_construct)(flag, a, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - }\ - // - BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL) - #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL - - private: - ///////////////////////////////// - // priv_construct - ///////////////////////////////// - #define BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL(N) \ - template\ - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::true_type, Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { a.construct( p BOOST_MOVE_I##N BOOST_MOVE_FWD##N ); }\ - \ - template\ - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { ::new((void*)p, boost_container_new_t()) T(BOOST_MOVE_FWD##N); }\ - // - BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL) - #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL - - #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template - BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p, const ::boost::container::default_init_t&) - { ::new((void*)p, boost_container_new_t()) T; } - - BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(dtl::true_type, const Allocator &a, pointer p) - { return a.storage_is_unpropagable(p); } - - BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(dtl::false_type, const Allocator &, pointer) - { return false; } - - BOOST_CONTAINER_FORCEINLINE static bool priv_equal(dtl::true_type, const Allocator &, const Allocator &) - { return true; } - - BOOST_CONTAINER_FORCEINLINE static bool priv_equal(dtl::false_type, const Allocator &a, const Allocator &b) - { return a == b; } - - #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) -}; - -#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - -template -struct real_allocator -{ - typedef AllocatorOrVoid type; -}; - -template -struct real_allocator -{ - typedef new_allocator type; -}; - -#endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - -} //namespace container { -} //namespace boost { - -#include - -#endif // ! defined(BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP) diff --git a/lib/boost_1.84.0/boost/container/deque.hpp b/lib/boost_1.84.0/boost/container/deque.hpp deleted file mode 100644 index dafcaa0c21b..00000000000 --- a/lib/boost_1.84.0/boost/container/deque.hpp +++ /dev/null @@ -1,2374 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_DEQUE_HPP -#define BOOST_CONTAINER_DEQUE_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -// container -#include -#include -#include //new_allocator -#include -#include -// container/detail -#include -#include //algo_equal(), algo_lexicographical_compare -#include -#include -#include -#include -#include -#include -#include -#include -#include -// move -#include -#include -#include -#include -// move/detail -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -#include -// other -#include -// std -#include - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include -#endif - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -template -class deque; - -template -struct deque_value_traits -{ - typedef T value_type; - static const bool trivial_dctr = dtl::is_trivially_destructible::value; - static const bool trivial_dctr_after_move = ::boost::has_trivial_destructor_after_move::value; -}; - -template -struct deque_block_size -{ - BOOST_STATIC_ASSERT_MSG(!(BlockBytes && BlockSize), "BlockBytes and BlockSize can't be specified at the same time"); - static const std::size_t block_bytes = BlockBytes ? BlockBytes : 512u; - static const std::size_t value = BlockSize ? BlockSize : (sizeof(T) < block_bytes ? (block_bytes/sizeof(T)) : std::size_t(1)); -}; - -namespace dtl { - -// Class invariants: -// For any nonsingular iterator i: -// i.node is the address of an element in the map array. The -// contents of i.node is a pointer to the beginning of a node. -// i.first == //(i.node) -// i.last == i.first + node_size -// i.cur is a pointer in the range [i.first, i.last). NOTE: -// the implication of this is that i.cur is always a dereferenceable -// pointer, even if i is a past-the-end iterator. -// Start and Finish are always nonsingular iterators. NOTE: this means -// that an empty deque must have one node, and that a deque -// with N elements, where N is the buffer size, must have two nodes. -// For every node other than start.node and finish.node, every element -// in the node is an initialized object. If start.node == finish.node, -// then [start.cur, finish.cur) are initialized objects, and -// the elements outside that range are uninitialized storage. Otherwise, -// [start.cur, start.last) and [finish.first, finish.cur) are initialized -// objects, and [start.first, start.cur) and [finish.cur, finish.last) -// are uninitialized storage. -// [map, map + map_size) is a valid, non-empty range. -// [start.node, finish.node] is a valid range contained within -// [map, map + map_size). -// A pointer in the range [map, map + map_size) points to an allocated node -// if and only if the pointer is in the range [start.node, finish.node]. -template -class deque_iterator -{ - public: - typedef std::random_access_iterator_tag iterator_category; - typedef typename boost::intrusive::pointer_traits::element_type value_type; - typedef typename boost::intrusive::pointer_traits::difference_type difference_type; - typedef typename boost::intrusive::pointer_traits::size_type size_type; - typedef typename if_c - < IsConst - , typename boost::intrusive::pointer_traits::template - rebind_pointer::type - , Pointer - >::type pointer; - typedef typename if_c - < IsConst - , const value_type& - , value_type& - >::type reference; - - class nat; - typedef typename dtl::if_c< IsConst - , deque_iterator - , nat>::type nonconst_iterator; - - typedef Pointer val_alloc_ptr; - typedef typename boost::intrusive::pointer_traits:: - template rebind_pointer::type index_pointer; - - Pointer m_cur; - Pointer m_first; - Pointer m_last; - index_pointer m_node; - - public: - - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE Pointer get_cur() const { return m_cur; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE Pointer get_first() const { return m_first; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE Pointer get_last() const { return m_last; } - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE index_pointer get_node() const { return m_node; } - - BOOST_CONTAINER_FORCEINLINE deque_iterator(val_alloc_ptr x, index_pointer y, difference_type block_size) BOOST_NOEXCEPT_OR_NOTHROW - : m_cur(x), m_first(*y), m_last(*y + block_size), m_node(y) - {} - - BOOST_CONTAINER_FORCEINLINE deque_iterator(val_alloc_ptr x, index_pointer y, size_type block_size) BOOST_NOEXCEPT_OR_NOTHROW - : m_cur(x), m_first(*y), m_last(*y + difference_type(block_size)), m_node(y) - {} - - BOOST_CONTAINER_FORCEINLINE deque_iterator() BOOST_NOEXCEPT_OR_NOTHROW - : m_cur(), m_first(), m_last(), m_node() //Value initialization to achieve "null iterators" (N3644) - {} - - BOOST_CONTAINER_FORCEINLINE deque_iterator(const deque_iterator& x) BOOST_NOEXCEPT_OR_NOTHROW - : m_cur(x.get_cur()), m_first(x.get_first()), m_last(x.get_last()), m_node(x.get_node()) - {} - - BOOST_CONTAINER_FORCEINLINE deque_iterator(const nonconst_iterator& x) BOOST_NOEXCEPT_OR_NOTHROW - : m_cur(x.get_cur()), m_first(x.get_first()), m_last(x.get_last()), m_node(x.get_node()) - {} - - BOOST_CONTAINER_FORCEINLINE deque_iterator(Pointer cur, Pointer first, Pointer last, index_pointer node) BOOST_NOEXCEPT_OR_NOTHROW - : m_cur(cur), m_first(first), m_last(last), m_node(node) - {} - - BOOST_CONTAINER_FORCEINLINE deque_iterator& operator=(const deque_iterator& x) BOOST_NOEXCEPT_OR_NOTHROW - { m_cur = x.get_cur(); m_first = x.get_first(); m_last = x.get_last(); m_node = x.get_node(); return *this; } - - BOOST_CONTAINER_FORCEINLINE deque_iterator unconst() const BOOST_NOEXCEPT_OR_NOTHROW - { - return deque_iterator(this->get_cur(), this->get_first(), this->get_last(), this->get_node()); - } - - BOOST_CONTAINER_FORCEINLINE reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW - { return *this->m_cur; } - - BOOST_CONTAINER_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->m_cur; } - - BOOST_CONTAINER_ATTRIBUTE_NODISCARD difference_type operator-(const deque_iterator& x) const BOOST_NOEXCEPT_OR_NOTHROW - { - if(!this->m_cur && !x.m_cur){ - return 0; - } - const difference_type block_size = m_last - m_first; - BOOST_ASSERT(block_size); - return block_size * (this->m_node - x.m_node - 1) + - (this->m_cur - this->m_first) + (x.m_last - x.m_cur); - } - - deque_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!!m_cur); - ++this->m_cur; - if (this->m_cur == this->m_last) { - const difference_type block_size = m_last - m_first; - BOOST_ASSERT(block_size); - this->priv_set_node(this->m_node + 1, block_size); - this->m_cur = this->m_first; - } - return *this; - } - - BOOST_CONTAINER_FORCEINLINE deque_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW - { - deque_iterator tmp(*this); - ++*this; - return tmp; - } - - deque_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!!m_cur); - if (this->m_cur == this->m_first) { - const difference_type block_size = m_last - m_first; - BOOST_ASSERT(block_size); - this->priv_set_node(this->m_node - 1, block_size); - this->m_cur = this->m_last; - } - --this->m_cur; - return *this; - } - - BOOST_CONTAINER_FORCEINLINE deque_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW - { - deque_iterator tmp(*this); - --*this; - return tmp; - } - - deque_iterator& operator+=(difference_type n) BOOST_NOEXCEPT_OR_NOTHROW - { - if (!n) - return *this; - BOOST_ASSERT(!!m_cur); - difference_type offset = n + (this->m_cur - this->m_first); - const difference_type block_size = m_last - m_first; - BOOST_ASSERT(block_size); - if (offset >= 0 && offset < block_size) - this->m_cur += difference_type(n); - else { - difference_type node_offset = - offset > 0 ? (offset / block_size) - : (-difference_type((-offset - 1) / block_size) - 1); - this->priv_set_node(this->m_node + node_offset, size_type(block_size)); - this->m_cur = this->m_first + - (offset - node_offset * block_size); - } - return *this; - } - - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - deque_iterator operator+(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { deque_iterator tmp(*this); return tmp += n; } - - BOOST_CONTAINER_FORCEINLINE - deque_iterator& operator-=(difference_type n) BOOST_NOEXCEPT_OR_NOTHROW - { return *this += -n; } - - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - deque_iterator operator-(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { deque_iterator tmp(*this); return tmp -= n; } - - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - reference operator[](difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { return *(*this + n); } - - //Comparisons - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - friend bool operator==(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return l.m_cur == r.m_cur; } - - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - friend bool operator!=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return l.m_cur != r.m_cur; } - - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - friend bool operator<(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return (l.m_node == r.m_node) ? (l.m_cur < r.m_cur) : (l.m_node < r.m_node); } - - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - friend bool operator>(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return r < l; } - - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - friend bool operator<=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return !(r < l); } - - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - friend bool operator>=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return !(l < r); } - - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - friend deque_iterator operator+(difference_type n, deque_iterator x) BOOST_NOEXCEPT_OR_NOTHROW - { return x += n; } - - BOOST_CONTAINER_FORCEINLINE void priv_set_node(index_pointer new_node, size_type block_size) BOOST_NOEXCEPT_OR_NOTHROW - { return this->priv_set_node(new_node, difference_type(block_size)); } - - BOOST_CONTAINER_FORCEINLINE void priv_set_node(index_pointer new_node, difference_type block_size) BOOST_NOEXCEPT_OR_NOTHROW - { - this->m_node = new_node; - this->m_first = *new_node; - this->m_last = this->m_first + block_size; - } -}; - -} //namespace dtl { - -template -struct get_deque_opt -{ - typedef Options type; -}; - -template<> -struct get_deque_opt -{ - typedef deque_null_opt type; -}; - -// Deque base class. It has two purposes. First, its constructor -// and destructor allocate (but don't initialize) storage. This makes -// exception safety easier. -template -class deque_base -{ - BOOST_COPYABLE_AND_MOVABLE(deque_base) - public: - typedef allocator_traits val_alloc_traits_type; - typedef typename val_alloc_traits_type::value_type val_alloc_val; - typedef typename val_alloc_traits_type::pointer val_alloc_ptr; - typedef typename val_alloc_traits_type::const_pointer val_alloc_cptr; - typedef typename val_alloc_traits_type::reference val_alloc_ref; - typedef typename val_alloc_traits_type::const_reference val_alloc_cref; - typedef typename val_alloc_traits_type::difference_type val_alloc_diff; - typedef typename val_alloc_traits_type::size_type val_alloc_size; - typedef typename val_alloc_traits_type::template - portable_rebind_alloc::type ptr_alloc_t; - typedef allocator_traits ptr_alloc_traits_type; - typedef typename ptr_alloc_traits_type::value_type ptr_alloc_val; - typedef typename ptr_alloc_traits_type::pointer ptr_alloc_ptr; - typedef typename ptr_alloc_traits_type::const_pointer ptr_alloc_cptr; - typedef typename ptr_alloc_traits_type::reference ptr_alloc_ref; - typedef typename ptr_alloc_traits_type::const_reference ptr_alloc_cref; - typedef Allocator allocator_type; - typedef allocator_type stored_allocator_type; - typedef val_alloc_size size_type; - typedef val_alloc_diff difference_type; - - private: - typedef typename get_deque_opt::type options_type; - - protected: - typedef dtl::deque_iterator iterator; - typedef dtl::deque_iterator const_iterator; - - BOOST_CONSTEXPR BOOST_CONTAINER_FORCEINLINE static size_type get_block_size() BOOST_NOEXCEPT_OR_NOTHROW - { return deque_block_size::value; } - - BOOST_CONSTEXPR BOOST_CONTAINER_FORCEINLINE static val_alloc_diff get_block_ssize() BOOST_NOEXCEPT_OR_NOTHROW - { return val_alloc_diff((get_block_size)()); } - - typedef deque_value_traits traits_t; - typedef ptr_alloc_t map_allocator_type; - - BOOST_CONTAINER_FORCEINLINE val_alloc_ptr priv_allocate_node() - { return this->alloc().allocate(get_block_size()); } - - BOOST_CONTAINER_FORCEINLINE void priv_deallocate_node(val_alloc_ptr p) BOOST_NOEXCEPT_OR_NOTHROW - { this->alloc().deallocate(p, get_block_size()); } - - BOOST_CONTAINER_FORCEINLINE ptr_alloc_ptr priv_allocate_map(size_type n) - { return this->ptr_alloc().allocate(n); } - - BOOST_CONTAINER_FORCEINLINE void priv_deallocate_map(ptr_alloc_ptr p, size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { this->ptr_alloc().deallocate(p, n); } - - BOOST_CONTAINER_FORCEINLINE deque_base(size_type num_elements, const allocator_type& a) - : members_(a) - { this->priv_initialize_map(num_elements); } - - BOOST_CONTAINER_FORCEINLINE explicit deque_base(const allocator_type& a) - : members_(a) - {} - - BOOST_CONTAINER_FORCEINLINE deque_base() - : members_() - {} - - BOOST_CONTAINER_FORCEINLINE explicit deque_base(BOOST_RV_REF(deque_base) x) - : members_( boost::move(x.ptr_alloc()) - , boost::move(x.alloc()) ) - {} - - ~deque_base() - { - if (this->members_.m_map) { - this->priv_destroy_nodes(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1); - this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size); - } - } - - private: - deque_base(const deque_base&); - - protected: - - void swap_members(deque_base &x) BOOST_NOEXCEPT_OR_NOTHROW - { - ::boost::adl_move_swap(this->members_.m_start, x.members_.m_start); - ::boost::adl_move_swap(this->members_.m_finish, x.members_.m_finish); - ::boost::adl_move_swap(this->members_.m_map, x.members_.m_map); - ::boost::adl_move_swap(this->members_.m_map_size, x.members_.m_map_size); - } - - void priv_initialize_map(size_type num_elements) - { -// if(num_elements){ - size_type num_nodes = num_elements / get_block_size() + 1; - - this->members_.m_map_size = dtl::max_value((size_type) InitialMapSize, num_nodes + 2); - this->members_.m_map = this->priv_allocate_map(this->members_.m_map_size); - - ptr_alloc_ptr nstart = this->members_.m_map + difference_type(this->members_.m_map_size - num_nodes) / 2; - ptr_alloc_ptr nfinish = nstart + difference_type(num_nodes); - - BOOST_CONTAINER_TRY { - this->priv_create_nodes(nstart, nfinish); - } - BOOST_CONTAINER_CATCH(...){ - this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size); - this->members_.m_map = 0; - this->members_.m_map_size = 0; - BOOST_CONTAINER_RETHROW - } - BOOST_CONTAINER_CATCH_END - - this->members_.m_start.priv_set_node(nstart, get_block_size()); - this->members_.m_finish.priv_set_node(nfinish - 1, get_block_size()); - this->members_.m_start.m_cur = this->members_.m_start.m_first; - this->members_.m_finish.m_cur = this->members_.m_finish.m_first + difference_type(num_elements % get_block_size()); -// } - } - - void priv_create_nodes(ptr_alloc_ptr nstart, ptr_alloc_ptr nfinish) - { - ptr_alloc_ptr cur = nstart; - BOOST_CONTAINER_TRY { - for (; cur < nfinish; ++cur) - *cur = this->priv_allocate_node(); - } - BOOST_CONTAINER_CATCH(...){ - this->priv_destroy_nodes(nstart, cur); - BOOST_CONTAINER_RETHROW - } - BOOST_CONTAINER_CATCH_END - } - - void priv_destroy_nodes(ptr_alloc_ptr nstart, ptr_alloc_ptr nfinish) BOOST_NOEXCEPT_OR_NOTHROW - { - for (ptr_alloc_ptr n = nstart; n < nfinish; ++n) - this->priv_deallocate_node(*n); - } - - void priv_clear_map() BOOST_NOEXCEPT_OR_NOTHROW - { - if (this->members_.m_map) { - this->priv_destroy_nodes(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1); - this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size); - this->members_.m_map = 0; - this->members_.m_map_size = 0; - this->members_.m_start = iterator(); - this->members_.m_finish = this->members_.m_start; - } - } - - enum { InitialMapSize = 8 }; - - protected: - struct members_holder - : public ptr_alloc_t - , public allocator_type - { - members_holder() - : map_allocator_type(), allocator_type() - , m_map(0), m_map_size(0) - , m_start(), m_finish(m_start) - {} - - explicit members_holder(const allocator_type &a) - : map_allocator_type(a), allocator_type(a) - , m_map(0), m_map_size(0) - , m_start(), m_finish(m_start) - {} - - template - members_holder(BOOST_FWD_REF(PtrAllocConvertible) pa, BOOST_FWD_REF(ValAllocConvertible) va) - : map_allocator_type(boost::forward(pa)) - , allocator_type (boost::forward(va)) - , m_map(0), m_map_size(0) - , m_start(), m_finish(m_start) - {} - - ptr_alloc_ptr m_map; - val_alloc_size m_map_size; - iterator m_start; - iterator m_finish; - } members_; - - BOOST_CONTAINER_FORCEINLINE ptr_alloc_t &ptr_alloc() BOOST_NOEXCEPT_OR_NOTHROW - { return members_; } - - BOOST_CONTAINER_FORCEINLINE const ptr_alloc_t &ptr_alloc() const BOOST_NOEXCEPT_OR_NOTHROW - { return members_; } - - BOOST_CONTAINER_FORCEINLINE allocator_type &alloc() BOOST_NOEXCEPT_OR_NOTHROW - { return members_; } - - BOOST_CONTAINER_FORCEINLINE const allocator_type &alloc() const BOOST_NOEXCEPT_OR_NOTHROW - { return members_; } -}; -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED -//! A double-ended queue is a sequence that supports random access to elements, constant time insertion -//! and removal of elements at the end of the sequence, and linear time insertion and removal of elements in the middle. -//! -//! \tparam T The type of object that is stored in the deque -//! \tparam A The allocator used for all internal memory management, use void -//! for the default allocator -//! \tparam Options A type produced from \c boost::container::deque_options. -template -#else -template -#endif -class deque : protected deque_base::type, Options> -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - typedef deque_base::type, Options> Base; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - typedef typename real_allocator::type ValAllocator; - typedef constant_iterator c_it; - - public: - - ////////////////////////////////////////////// - // - // types - // - ////////////////////////////////////////////// - - typedef T value_type; - typedef ValAllocator allocator_type; - typedef typename ::boost::container::allocator_traits::pointer pointer; - typedef typename ::boost::container::allocator_traits::const_pointer const_pointer; - typedef typename ::boost::container::allocator_traits::reference reference; - typedef typename ::boost::container::allocator_traits::const_reference const_reference; - typedef typename ::boost::container::allocator_traits::size_type size_type; - typedef typename ::boost::container::allocator_traits::difference_type difference_type; - typedef BOOST_CONTAINER_IMPDEF(allocator_type) stored_allocator_type; - typedef BOOST_CONTAINER_IMPDEF(typename Base::iterator) iterator; - typedef BOOST_CONTAINER_IMPDEF(typename Base::const_iterator) const_iterator; - typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) reverse_iterator; - typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - private: // Internal typedefs - BOOST_COPYABLE_AND_MOVABLE(deque) - typedef typename Base::ptr_alloc_ptr index_pointer; - typedef allocator_traits allocator_traits_type; - - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - using Base::get_block_ssize; - - public: - - using Base::get_block_size; - - - ////////////////////////////////////////////// - // - // construct/copy/destroy - // - ////////////////////////////////////////////// - - //! Effects: Default constructors a deque. - //! - //! Throws: If allocator_type's default constructor throws. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE deque() - BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible::value) - : Base() - {} - - //! Effects: Constructs a deque taking the allocator as parameter. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit deque(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW - : Base(a) - {} - - //! Effects: Constructs a deque - //! and inserts n value initialized values. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's value initialization throws. - //! - //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE explicit deque(size_type n) - : Base(n, allocator_type()) - { - dtl::insert_value_initialized_n_proxy proxy; - proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n); - //deque_base will deallocate in case of exception... - } - - //! Effects: Constructs a deque - //! and inserts n default initialized values. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default initialization or copy constructor throws. - //! - //! Complexity: Linear to n. - //! - //! Note: Non-standard extension - BOOST_CONTAINER_FORCEINLINE deque(size_type n, default_init_t) - : Base(n, allocator_type()) - { - dtl::insert_default_initialized_n_proxy proxy; - proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n); - //deque_base will deallocate in case of exception... - } - - //! Effects: Constructs a deque that will use a copy of allocator a - //! and inserts n value initialized values. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's value initialization throws. - //! - //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE explicit deque(size_type n, const allocator_type &a) - : Base(n, a) - { - dtl::insert_value_initialized_n_proxy proxy; - proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n); - //deque_base will deallocate in case of exception... - } - - //! Effects: Constructs a deque that will use a copy of allocator a - //! and inserts n default initialized values. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default initialization or copy constructor throws. - //! - //! Complexity: Linear to n. - //! - //! Note: Non-standard extension - BOOST_CONTAINER_FORCEINLINE deque(size_type n, default_init_t, const allocator_type &a) - : Base(n, a) - { - dtl::insert_default_initialized_n_proxy proxy; - proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n); - //deque_base will deallocate in case of exception... - } - - //! Effects: Constructs a deque that will use a copy of allocator a - //! and inserts n copies of value. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's copy constructor throws. - //! - //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE deque(size_type n, const value_type& value) - : Base(n, allocator_type()) - { this->priv_fill_initialize(value); } - - //! Effects: Constructs a deque that will use a copy of allocator a - //! and inserts n copies of value. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's copy constructor throws. - //! - //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE deque(size_type n, const value_type& value, const allocator_type& a) - : Base(n, a) - { this->priv_fill_initialize(value); } - - //! Effects: Constructs a deque that will use a copy of allocator a - //! and inserts a copy of the range [first, last) in the deque. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's constructor taking a dereferenced InIt throws. - //! - //! Complexity: Linear to the range [first, last). - template - BOOST_CONTAINER_FORCEINLINE deque(InIt first, InIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename dtl::disable_if_convertible - ::type * = 0 - #endif - ) - : Base(allocator_type()) - { - this->priv_range_initialize(first, last); - } - - //! Effects: Constructs a deque that will use a copy of allocator a - //! and inserts a copy of the range [first, last) in the deque. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's constructor taking a dereferenced InIt throws. - //! - //! Complexity: Linear to the range [first, last). - template - BOOST_CONTAINER_FORCEINLINE deque(InIt first, InIt last, const allocator_type& a - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename dtl::disable_if_convertible - ::type * = 0 - #endif - ) - : Base(a) - { - this->priv_range_initialize(first, last); - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Constructs a deque that will use a copy of allocator a - //! and inserts a copy of the range [il.begin(), il.end()) in the deque. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's constructor taking a dereferenced std::initializer_list iterator throws. - //! - //! Complexity: Linear to the range [il.begin(), il.end()). - BOOST_CONTAINER_FORCEINLINE deque(std::initializer_list il, const allocator_type& a = allocator_type()) - : Base(a) - { - this->priv_range_initialize(il.begin(), il.end()); - } -#endif - - //! Effects: Copy constructs a deque. - //! - //! Postcondition: x == *this. - //! - //! Complexity: Linear to the elements x contains. - BOOST_CONTAINER_FORCEINLINE deque(const deque& x) - : Base(allocator_traits_type::select_on_container_copy_construction(x.alloc())) - { - if(x.size()){ - this->priv_initialize_map(x.size()); - boost::container::uninitialized_copy_alloc - (this->alloc(), x.begin(), x.end(), this->members_.m_start); - } - } - - //! Effects: Move constructor. Moves x's resources to *this. - //! - //! Throws: If allocator_type's copy constructor throws. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE deque(BOOST_RV_REF(deque) x) BOOST_NOEXCEPT_OR_NOTHROW - : Base(BOOST_MOVE_BASE(Base, x)) - { this->swap_members(x); } - - //! Effects: Copy constructs a vector using the specified allocator. - //! - //! Postcondition: x == *this. - //! - //! Throws: If allocation - //! throws or T's copy constructor throws. - //! - //! Complexity: Linear to the elements x contains. - deque(const deque& x, const allocator_type &a) - : Base(a) - { - if(x.size()){ - this->priv_initialize_map(x.size()); - boost::container::uninitialized_copy_alloc - (this->alloc(), x.begin(), x.end(), this->members_.m_start); - } - } - - //! Effects: Move constructor using the specified allocator. - //! Moves x's resources to *this if a == allocator_type(). - //! Otherwise copies values from x to *this. - //! - //! Throws: If allocation or T's copy constructor throws. - //! - //! Complexity: Constant if a == x.get_allocator(), linear otherwise. - deque(BOOST_RV_REF(deque) x, const allocator_type &a) - : Base(a) - { - if(x.alloc() == a){ - this->swap_members(x); - } - else{ - if(x.size()){ - this->priv_initialize_map(x.size()); - boost::container::uninitialized_copy_alloc - ( this->alloc(), boost::make_move_iterator(x.begin()) - , boost::make_move_iterator(x.end()), this->members_.m_start); - } - } - } - - //! Effects: Destroys the deque. All stored values are destroyed - //! and used memory is deallocated. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of elements. - BOOST_CONTAINER_FORCEINLINE ~deque() BOOST_NOEXCEPT_OR_NOTHROW - { - this->priv_destroy_range(this->members_.m_start, this->members_.m_finish); - } - - //! Effects: Makes *this contain the same elements as x. - //! - //! Postcondition: this->size() == x.size(). *this contains a copy - //! of each of x's elements. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to the number of elements in x. - deque& operator= (BOOST_COPY_ASSIGN_REF(deque) x) - { - if (BOOST_LIKELY(&x != this)){ - allocator_type &this_alloc = this->alloc(); - const allocator_type &x_alloc = x.alloc(); - dtl::bool_ flag; - if(flag && this_alloc != x_alloc){ - this->clear(); - this->shrink_to_fit(); - } - dtl::assign_alloc(this->alloc(), x.alloc(), flag); - dtl::assign_alloc(this->ptr_alloc(), x.ptr_alloc(), flag); - this->assign(x.cbegin(), x.cend()); - } - return *this; - } - - //! Effects: Move assignment. All x's values are transferred to *this. - //! - //! Throws: If allocator_traits_type::propagate_on_container_move_assignment - //! is false and (allocation throws or value_type's move constructor throws) - //! - //! Complexity: Constant if allocator_traits_type:: - //! propagate_on_container_move_assignment is true or - //! this->get>allocator() == x.get_allocator(). Linear otherwise. - deque& operator= (BOOST_RV_REF(deque) x) - BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value - || allocator_traits_type::is_always_equal::value) - { - if (BOOST_LIKELY(this != &x)) { - allocator_type &this_alloc = this->alloc(); - allocator_type &x_alloc = x.alloc(); - const bool propagate_alloc = allocator_traits_type:: - propagate_on_container_move_assignment::value; - dtl::bool_ flag; - const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal; - //Resources can be transferred if both allocators are - //going to be equal after this function (either propagated or already equal) - if(propagate_alloc || allocators_equal){ - //Destroy objects but retain memory in case x reuses it in the future - this->clear(); - //Move allocator if needed - dtl::move_alloc(this_alloc, x_alloc, flag); - dtl::move_alloc(this->ptr_alloc(), x.ptr_alloc(), flag); - //Nothrow swap - this->swap_members(x); - } - //Else do a one by one move - else{ - this->assign( boost::make_move_iterator(x.begin()) - , boost::make_move_iterator(x.end())); - } - } - return *this; - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Makes *this contain the same elements as il. - //! - //! Postcondition: this->size() == il.size(). *this contains a copy - //! of each of x's elements. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to the number of elements in il. - BOOST_CONTAINER_FORCEINLINE deque& operator=(std::initializer_list il) - { - this->assign(il.begin(), il.end()); - return *this; - } -#endif - - //! Effects: Assigns the n copies of val to *this. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE void assign(size_type n, const T& val) - { - this->assign(c_it(val, n), c_it()); - } - - //! Effects: Assigns the the range [first, last) to *this. - //! - //! Throws: If memory allocation throws or - //! T's constructor from dereferencing InIt throws. - //! - //! Complexity: Linear to n. - template - void assign(InIt first, InIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename dtl::disable_if_or - < void - , dtl::is_convertible - , dtl::is_not_input_iterator - >::type * = 0 - #endif - ) - { - iterator cur = this->begin(); - for ( ; first != last && cur != end(); ++cur, ++first){ - *cur = *first; - } - if (first == last){ - this->erase(cur, this->cend()); - } - else{ - this->insert(this->cend(), first, last); - } - } - - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - template - void assign(FwdIt first, FwdIt last - , typename dtl::disable_if_or - < void - , dtl::is_convertible - , dtl::is_input_iterator - >::type * = 0 - ) - { - const size_type len = boost::container::iterator_udistance(first, last); - if (len > size()) { - FwdIt mid = first; - boost::container::iterator_uadvance(mid, this->size()); - boost::container::copy(first, mid, begin()); - this->insert(this->cend(), mid, last); - } - else{ - this->erase(boost::container::copy(first, last, this->begin()), cend()); - } - } - #endif - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Assigns the the range [il.begin(), il.end()) to *this. - //! - //! Throws: If memory allocation throws or - //! T's constructor from dereferencing std::initializer_list iterator throws. - //! - //! Complexity: Linear to il.size(). - BOOST_CONTAINER_FORCEINLINE void assign(std::initializer_list il) - { this->assign(il.begin(), il.end()); } -#endif - - //! Effects: Returns a copy of the internal allocator. - //! - //! Throws: If allocator's copy constructor throws. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return Base::alloc(); } - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return Base::alloc(); } - - ////////////////////////////////////////////// - // - // iterators - // - ////////////////////////////////////////////// - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW - { return Base::alloc(); } - - //! Effects: Returns an iterator to the first element contained in the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - iterator begin() BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_start; } - - //! Effects: Returns a const_iterator to the first element contained in the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_start; } - - //! Effects: Returns an iterator to the end of the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - iterator end() BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_finish; } - - //! Effects: Returns a const_iterator to the end of the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_finish; } - - //! Effects: Returns a reverse_iterator pointing to the beginning - //! of the reversed deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW - { return reverse_iterator(this->members_.m_finish); } - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_reverse_iterator(this->members_.m_finish); } - - //! Effects: Returns a reverse_iterator pointing to the end - //! of the reversed deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW - { return reverse_iterator(this->members_.m_start); } - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_reverse_iterator(this->members_.m_start); } - - //! Effects: Returns a const_iterator to the first element contained in the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_start; } - - //! Effects: Returns a const_iterator to the end of the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_finish; } - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_reverse_iterator(this->members_.m_finish); } - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_reverse_iterator(this->members_.m_start); } - - ////////////////////////////////////////////// - // - // capacity - // - ////////////////////////////////////////////// - - //! Effects: Returns true if the deque contains no elements. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - bool empty() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_finish == this->members_.m_start; } - - //! Effects: Returns the number of the elements contained in the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - size_type size() const BOOST_NOEXCEPT_OR_NOTHROW - { return size_type(this->members_.m_finish - this->members_.m_start); } - - //! Effects: Returns the largest possible size of the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW - { return allocator_traits_type::max_size(this->alloc()); } - - //! Effects: Inserts or erases elements at the end such that - //! the size becomes n. New elements are value initialized. - //! - //! Throws: If memory allocation throws, or T's constructor throws. - //! - //! Complexity: Linear to the difference between size() and new_size. - void resize(size_type new_size) - { - const size_type len = size(); - if (new_size < len) - this->priv_erase_last_n(len - new_size); - else{ - const size_type n = new_size - this->size(); - dtl::insert_value_initialized_n_proxy proxy; - priv_insert_back_aux_impl(n, proxy); - } - } - - //! Effects: Inserts or erases elements at the end such that - //! the size becomes n. New elements are default initialized. - //! - //! Throws: If memory allocation throws, or T's constructor throws. - //! - //! Complexity: Linear to the difference between size() and new_size. - //! - //! Note: Non-standard extension - void resize(size_type new_size, default_init_t) - { - const size_type len = size(); - if (new_size < len) - this->priv_erase_last_n(len - new_size); - else{ - const size_type n = new_size - this->size(); - dtl::insert_default_initialized_n_proxy proxy; - priv_insert_back_aux_impl(n, proxy); - } - } - - //! Effects: Inserts or erases elements at the end such that - //! the size becomes n. New elements are copy constructed from x. - //! - //! Throws: If memory allocation throws, or T's copy constructor throws. - //! - //! Complexity: Linear to the difference between size() and new_size. - void resize(size_type new_size, const value_type& x) - { - const size_type len = size(); - if (new_size < len) - this->erase(this->members_.m_start + difference_type(new_size), this->members_.m_finish); - else - this->insert(this->members_.m_finish, new_size - len, x); - } - - //! Effects: Tries to deallocate the excess of memory created - //! with previous allocations. The size of the deque is unchanged - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: Constant. - void shrink_to_fit() - { - //This deque implementation already - //deallocates excess nodes when erasing - //so there is nothing to do except for - //empty deque - if(this->empty()){ - this->priv_clear_map(); - } - } - - ////////////////////////////////////////////// - // - // element access - // - ////////////////////////////////////////////// - - //! Requires: !empty() - //! - //! Effects: Returns a reference to the first - //! element of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - reference front() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return *this->members_.m_start; - } - - //! Requires: !empty() - //! - //! Effects: Returns a const reference to the first element - //! from the beginning of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return *this->members_.m_start; - } - - //! Requires: !empty() - //! - //! Effects: Returns a reference to the last - //! element of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - reference back() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return *(end()-1); - } - - //! Requires: !empty() - //! - //! Effects: Returns a const reference to the last - //! element of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return *(cend()-1); - } - - //! Requires: size() > n. - //! - //! Effects: Returns a reference to the nth element - //! from the beginning of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->size() > n); - return this->members_.m_start[difference_type(n)]; - } - - //! Requires: size() > n. - //! - //! Effects: Returns a const reference to the nth element - //! from the beginning of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->size() > n); - return this->members_.m_start[difference_type(n)]; - } - - //! Requires: size() >= n. - //! - //! Effects: Returns an iterator to the nth element - //! from the beginning of the container. Returns end() - //! if n == size(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->size() >= n); - return iterator(this->begin()+difference_type(n)); - } - - //! Requires: size() >= n. - //! - //! Effects: Returns a const_iterator to the nth element - //! from the beginning of the container. Returns end() - //! if n == size(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->size() >= n); - return const_iterator(this->cbegin()+difference_type(n)); - } - - //! Requires: begin() <= p <= end(). - //! - //! Effects: Returns the index of the element pointed by p - //! and size() if p == end(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW - { - //Range checked priv_index_of - return this->priv_index_of(p); - } - - //! Requires: begin() <= p <= end(). - //! - //! Effects: Returns the index of the element pointed by p - //! and size() if p == end(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW - { - //Range checked priv_index_of - return this->priv_index_of(p); - } - - //! Requires: size() > n. - //! - //! Effects: Returns a reference to the nth element - //! from the beginning of the container. - //! - //! Throws: range_error if n >= size() - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - reference at(size_type n) - { - this->priv_throw_if_out_of_range(n); - return (*this)[n]; - } - - //! Requires: size() > n. - //! - //! Effects: Returns a const reference to the nth element - //! from the beginning of the container. - //! - //! Throws: range_error if n >= size() - //! - //! Complexity: Constant. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - const_reference at(size_type n) const - { - this->priv_throw_if_out_of_range(n); - return (*this)[n]; - } - - ////////////////////////////////////////////// - // - // modifiers - // - ////////////////////////////////////////////// - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... in the beginning of the deque. - //! - //! Returns: A reference to the created object. - //! - //! Throws: If memory allocation throws or the in-place constructor throws. - //! - //! Complexity: Amortized constant time - template - reference emplace_front(BOOST_FWD_REF(Args)... args) - { - if(this->priv_push_front_simple_available()){ - reference r = *this->priv_push_front_simple_pos(); - allocator_traits_type::construct - ( this->alloc() - , this->priv_push_front_simple_pos() - , boost::forward(args)...); - this->priv_push_front_simple_commit(); - return r; - } - else{ - typedef dtl::insert_nonmovable_emplace_proxy type; - return *this->priv_insert_front_aux_impl(1, type(boost::forward(args)...)); - } - } - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... in the end of the deque. - //! - //! Returns: A reference to the created object. - //! - //! Throws: If memory allocation throws or the in-place constructor throws. - //! - //! Complexity: Amortized constant time - template - reference emplace_back(BOOST_FWD_REF(Args)... args) - { - if(this->priv_push_back_simple_available()){ - reference r = *this->priv_push_back_simple_pos(); - allocator_traits_type::construct - ( this->alloc() - , this->priv_push_back_simple_pos() - , boost::forward(args)...); - this->priv_push_back_simple_commit(); - return r; - } - else{ - typedef dtl::insert_nonmovable_emplace_proxy type; - return *this->priv_insert_back_aux_impl(1, type(boost::forward(args)...)); - } - } - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... before p - //! - //! Throws: If memory allocation throws or the in-place constructor throws. - //! - //! Complexity: If p is end(), amortized constant time - //! Linear time otherwise. - template - iterator emplace(const_iterator p, BOOST_FWD_REF(Args)... args) - { - BOOST_ASSERT(this->priv_in_range_or_end(p)); - if(p == this->cbegin()){ - this->emplace_front(boost::forward(args)...); - return this->begin(); - } - else if(p == this->cend()){ - this->emplace_back(boost::forward(args)...); - return (this->end()-1); - } - else{ - typedef dtl::insert_emplace_proxy type; - return this->priv_insert_aux_impl(p, 1, type(boost::forward(args)...)); - } - } - - #else //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_DEQUE_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\ - reference emplace_front(BOOST_MOVE_UREF##N)\ - {\ - if(priv_push_front_simple_available()){\ - reference r = *this->priv_push_front_simple_pos();\ - allocator_traits_type::construct\ - ( this->alloc(), this->priv_push_front_simple_pos() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - priv_push_front_simple_commit();\ - return r;\ - }\ - else{\ - typedef dtl::insert_nonmovable_emplace_proxy##N\ - type;\ - return *priv_insert_front_aux_impl(1, type(BOOST_MOVE_FWD##N));\ - }\ - }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\ - reference emplace_back(BOOST_MOVE_UREF##N)\ - {\ - if(priv_push_back_simple_available()){\ - reference r = *this->priv_push_back_simple_pos();\ - allocator_traits_type::construct\ - ( this->alloc(), this->priv_push_back_simple_pos() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - priv_push_back_simple_commit();\ - return r;\ - }\ - else{\ - typedef dtl::insert_nonmovable_emplace_proxy##N\ - type;\ - return *priv_insert_back_aux_impl(1, type(BOOST_MOVE_FWD##N));\ - }\ - }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\ - iterator emplace(const_iterator p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - BOOST_ASSERT(this->priv_in_range_or_end(p));\ - if(p == this->cbegin()){\ - this->emplace_front(BOOST_MOVE_FWD##N);\ - return this->begin();\ - }\ - else if(p == cend()){\ - this->emplace_back(BOOST_MOVE_FWD##N);\ - return (--this->end());\ - }\ - else{\ - typedef dtl::insert_emplace_proxy_arg##N\ - type;\ - return this->priv_insert_aux_impl(p, 1, type(BOOST_MOVE_FWD##N));\ - }\ - } - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_DEQUE_EMPLACE_CODE) - #undef BOOST_CONTAINER_DEQUE_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts a copy of x at the front of the deque. - //! - //! Throws: If memory allocation throws or - //! T's copy constructor throws. - //! - //! Complexity: Amortized constant time. - void push_front(const T &x); - - //! Effects: Constructs a new element in the front of the deque - //! and moves the resources of x to this new element. - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: Amortized constant time. - void push_front(T &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH(push_front, T, void, priv_push_front) - #endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts a copy of x at the end of the deque. - //! - //! Throws: If memory allocation throws or - //! T's copy constructor throws. - //! - //! Complexity: Amortized constant time. - void push_back(const T &x); - - //! Effects: Constructs a new element in the end of the deque - //! and moves the resources of x to this new element. - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: Amortized constant time. - void push_back(T &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back) - #endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a copy of x before p. - //! - //! Returns: an iterator to the inserted element. - //! - //! Throws: If memory allocation throws or x's copy constructor throws. - //! - //! Complexity: If p is end(), amortized constant time - //! Linear time otherwise. - iterator insert(const_iterator p, const T &x); - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a new element before p with x's resources. - //! - //! Returns: an iterator to the inserted element. - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: If p is end(), amortized constant time - //! Linear time otherwise. - iterator insert(const_iterator p, T &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator) - #endif - - //! Requires: pos must be a valid iterator of *this. - //! - //! Effects: Insert n copies of x before pos. - //! - //! Returns: an iterator to the first inserted element or pos if n is 0. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to n. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator pos, size_type n, const value_type& x) - { - //Range check of p is done by insert() - return this->insert(pos, c_it(x, n), c_it()); - } - - //! Requires: pos must be a valid iterator of *this. - //! - //! Effects: Insert a copy of the [first, last) range before pos. - //! - //! Returns: an iterator to the first inserted element or pos if first == last. - //! - //! Throws: If memory allocation throws, T's constructor from a - //! dereferenced InIt throws or T's copy constructor throws. - //! - //! Complexity: Linear to distance [first, last). - template - iterator insert(const_iterator pos, InIt first, InIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename dtl::disable_if_or - < void - , dtl::is_convertible - , dtl::is_not_input_iterator - >::type * = 0 - #endif - ) - { - BOOST_ASSERT(this->priv_in_range_or_end(pos)); - size_type n = 0; - iterator it(pos.unconst()); - for(;first != last; ++first, ++n){ - it = this->emplace(it, *first); - ++it; - } - it -= difference_type(n); - return it; - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Requires: pos must be a valid iterator of *this. - //! - //! Effects: Insert a copy of the [il.begin(), il.end()) range before pos. - //! - //! Returns: an iterator to the first inserted element or pos if il.begin() == il.end(). - //! - //! Throws: If memory allocation throws, T's constructor from a - //! dereferenced std::initializer_list throws or T's copy constructor throws. - //! - //! Complexity: Linear to distance [il.begin(), il.end()). - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator pos, std::initializer_list il) - { - //Range check os pos is done in insert() - return insert(pos, il.begin(), il.end()); - } -#endif - - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - template - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, FwdIt first, FwdIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename dtl::disable_if_or - < void - , dtl::is_convertible - , dtl::is_input_iterator - >::type * = 0 - #endif - ) - { - BOOST_ASSERT(this->priv_in_range_or_end(p)); - dtl::insert_range_proxy proxy(first); - return priv_insert_aux_impl(p, boost::container::iterator_udistance(first, last), proxy); - } - #endif - - //! Effects: Removes the first element from the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant time. - void pop_front() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - if (this->members_.m_start.m_cur != this->members_.m_start.m_last - 1) { - allocator_traits_type::destroy - ( this->alloc() - , boost::movelib::to_raw_pointer(this->members_.m_start.m_cur) - ); - ++this->members_.m_start.m_cur; - } - else - this->priv_pop_front_aux(); - } - - //! Effects: Removes the last element from the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant time. - void pop_back() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - if (this->members_.m_finish.m_cur != this->members_.m_finish.m_first) { - --this->members_.m_finish.m_cur; - allocator_traits_type::destroy - ( this->alloc() - , boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur) - ); - } - else - this->priv_pop_back_aux(); - } - - //! Effects: Erases the element at p. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the elements between pos and the - //! last element (if pos is near the end) or the first element - //! if(pos is near the beginning). - //! Constant if pos is the first or the last element. - iterator erase(const_iterator pos) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->priv_in_range(pos)); - iterator next = pos.unconst(); - ++next; - size_type index = size_type(pos - this->members_.m_start); - if (index < (this->size()/2)) { - boost::container::move_backward(this->begin(), pos.unconst(), next); - pop_front(); - } - else { - boost::container::move(next, this->end(), pos.unconst()); - pop_back(); - } - return this->members_.m_start + difference_type(index); - } - - //! Effects: Erases the elements pointed by [first, last). - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the distance between first and - //! last plus the elements between pos and the - //! last element (if pos is near the end) or the first element - //! if(pos is near the beginning). - iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(first == last || - (first < last && this->priv_in_range(first) && this->priv_in_range_or_end(last))); - if (first == this->members_.m_start && last == this->members_.m_finish) { - this->clear(); - return this->members_.m_finish; - } - else { - const size_type n = static_cast(last - first); - const size_type elems_before = static_cast(first - this->members_.m_start); - if (elems_before < (this->size() - n) - elems_before) { - boost::container::move_backward(begin(), first.unconst(), last.unconst()); - iterator new_start = this->members_.m_start + difference_type(n); - this->priv_destroy_range(this->members_.m_start, new_start); - this->priv_destroy_nodes(this->members_.m_start.m_node, new_start.m_node); - this->members_.m_start = new_start; - } - else { - boost::container::move(last.unconst(), end(), first.unconst()); - iterator new_finish = this->members_.m_finish - difference_type(n); - this->priv_destroy_range(new_finish, this->members_.m_finish); - this->priv_destroy_nodes(new_finish.m_node + 1, this->members_.m_finish.m_node + 1); - this->members_.m_finish = new_finish; - } - return this->members_.m_start + difference_type(elems_before); - } - } - - //! Effects: Swaps the contents of *this and x. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE void swap(deque &x) - BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_swap::value - || allocator_traits_type::is_always_equal::value) - { - this->swap_members(x); - dtl::bool_ flag; - dtl::swap_alloc(this->alloc(), x.alloc(), flag); - dtl::swap_alloc(this->ptr_alloc(), x.ptr_alloc(), flag); - } - - //! Effects: Erases all the elements of the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of elements in the deque. - void clear() BOOST_NOEXCEPT_OR_NOTHROW - { - if (this->members_.m_finish != this->members_.m_start) { - - for (index_pointer node = this->members_.m_start.m_node + 1; - node < this->members_.m_finish.m_node; - ++node) { - this->priv_destroy_range(*node, *node + get_block_ssize()); - this->priv_deallocate_node(*node); - } - - if (this->members_.m_start.m_node != this->members_.m_finish.m_node) { - this->priv_destroy_range(this->members_.m_start.m_cur, this->members_.m_start.m_last); - this->priv_destroy_range(this->members_.m_finish.m_first, this->members_.m_finish.m_cur); - this->priv_deallocate_node(this->members_.m_finish.m_first); - } - else - this->priv_destroy_range(this->members_.m_start.m_cur, this->members_.m_finish.m_cur); - - this->members_.m_finish = this->members_.m_start; - } - } - - //! Effects: Returns true if x and y are equal - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - friend bool operator==(const deque& x, const deque& y) - { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } - - //! Effects: Returns true if x and y are unequal - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - friend bool operator!=(const deque& x, const deque& y) - { return !(x == y); } - - //! Effects: Returns true if x is less than y - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - friend bool operator<(const deque& x, const deque& y) - { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } - - //! Effects: Returns true if x is greater than y - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - friend bool operator>(const deque& x, const deque& y) - { return y < x; } - - //! Effects: Returns true if x is equal or less than y - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - friend bool operator<=(const deque& x, const deque& y) - { return !(y < x); } - - //! Effects: Returns true if x is equal or greater than y - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE - friend bool operator>=(const deque& x, const deque& y) - { return !(x < y); } - - //! Effects: x.swap(y) - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE friend void swap(deque& x, deque& y) - BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT(x.swap(y))) - { x.swap(y); } - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - - BOOST_CONTAINER_FORCEINLINE size_type priv_index_of(const_iterator p) const - { - BOOST_ASSERT(this->cbegin() <= p); - BOOST_ASSERT(p <= this->cend()); - return static_cast(p - this->cbegin()); - } - - void priv_erase_last_n(size_type n) - { - if(n == this->size()) { - this->clear(); - } - else { - iterator new_finish = this->members_.m_finish - difference_type(n); - this->priv_destroy_range(new_finish, this->members_.m_finish); - this->priv_destroy_nodes(new_finish.m_node + 1, this->members_.m_finish.m_node + 1); - this->members_.m_finish = new_finish; - } - } - - void priv_throw_if_out_of_range(size_type n) const - { - if (n >= this->size()) - throw_out_of_range("deque::at out of range"); - } - - BOOST_CONTAINER_FORCEINLINE bool priv_in_range(const_iterator pos) const - { - return (this->begin() <= pos) && (pos < this->end()); - } - - BOOST_CONTAINER_FORCEINLINE bool priv_in_range_or_end(const_iterator pos) const - { - return (this->begin() <= pos) && (pos <= this->end()); - } - - template - iterator priv_insert(const_iterator p, BOOST_FWD_REF(U) x) - { - BOOST_ASSERT(this->priv_in_range_or_end(p)); - if (p == cbegin()){ - this->push_front(::boost::forward(x)); - return begin(); - } - else if (p == cend()){ - this->push_back(::boost::forward(x)); - return --end(); - } - else { - return priv_insert_aux_impl - ( p, (size_type)1 - , dtl::get_insert_value_proxy(::boost::forward(x))); - } - } - - template - void priv_push_front(BOOST_FWD_REF(U) x) - { - if(this->priv_push_front_simple_available()){ - allocator_traits_type::construct - ( this->alloc(), this->priv_push_front_simple_pos(), ::boost::forward(x)); - this->priv_push_front_simple_commit(); - } - else{ - priv_insert_aux_impl - ( this->cbegin(), (size_type)1 - , dtl::get_insert_value_proxy(::boost::forward(x))); - } - } - - template - void priv_push_back(BOOST_FWD_REF(U) x) - { - if(this->priv_push_back_simple_available()){ - allocator_traits_type::construct - ( this->alloc(), this->priv_push_back_simple_pos(), ::boost::forward(x)); - this->priv_push_back_simple_commit(); - } - else{ - priv_insert_aux_impl - ( this->cend(), (size_type)1 - , dtl::get_insert_value_proxy(::boost::forward(x))); - } - } - - BOOST_CONTAINER_FORCEINLINE bool priv_push_back_simple_available() const - { - return this->members_.m_map && - (this->members_.m_finish.m_cur != (this->members_.m_finish.m_last - 1)); - } - - BOOST_CONTAINER_FORCEINLINE T *priv_push_back_simple_pos() const - { - return boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur); - } - - BOOST_CONTAINER_FORCEINLINE void priv_push_back_simple_commit() - { - ++this->members_.m_finish.m_cur; - } - - BOOST_CONTAINER_FORCEINLINE bool priv_push_front_simple_available() const - { - return this->members_.m_map && - (this->members_.m_start.m_cur != this->members_.m_start.m_first); - } - - BOOST_CONTAINER_FORCEINLINE T *priv_push_front_simple_pos() const - { return boost::movelib::to_raw_pointer(this->members_.m_start.m_cur) - 1; } - - BOOST_CONTAINER_FORCEINLINE void priv_push_front_simple_commit() - { --this->members_.m_start.m_cur; } - - void priv_destroy_range(iterator p, iterator p2) - { - if(!Base::traits_t::trivial_dctr){ - for(;p != p2; ++p){ - allocator_traits_type::destroy(this->alloc(), boost::movelib::iterator_to_raw_pointer(p)); - } - } - } - - void priv_destroy_range(pointer p, pointer p2) - { - if(!Base::traits_t::trivial_dctr){ - for(;p != p2; ++p){ - allocator_traits_type::destroy(this->alloc(), boost::movelib::iterator_to_raw_pointer(p)); - } - } - } - - template - iterator priv_insert_aux_impl(const_iterator p, size_type n, InsertProxy proxy) - { - iterator pos(p.unconst()); - const size_type pos_n = size_type(p - this->cbegin()); - if(!this->members_.m_map){ - this->priv_initialize_map(0); - pos = this->begin(); - } - - const size_type elemsbefore = static_cast(pos - this->members_.m_start); - const size_type length = this->size(); - if (elemsbefore < length / 2) { - const iterator new_start = this->priv_reserve_elements_at_front(n); - const iterator old_start = this->members_.m_start; - if(!elemsbefore){ - proxy.uninitialized_copy_n_and_update(this->alloc(), new_start, n); - this->members_.m_start = new_start; - } - else{ - pos = this->members_.m_start + difference_type(elemsbefore); - if (elemsbefore >= n) { - const iterator start_n = this->members_.m_start + difference_type(n); - ::boost::container::uninitialized_move_alloc - (this->alloc(), this->members_.m_start, start_n, new_start); - this->members_.m_start = new_start; - boost::container::move(start_n, pos, old_start); - proxy.copy_n_and_update(this->alloc(), pos - difference_type(n), n); - } - else { - const size_type mid_count = n - elemsbefore; - const iterator mid_start = old_start - difference_type(mid_count); - proxy.uninitialized_copy_n_and_update(this->alloc(), mid_start, mid_count); - this->members_.m_start = mid_start; - ::boost::container::uninitialized_move_alloc - (this->alloc(), old_start, pos, new_start); - this->members_.m_start = new_start; - proxy.copy_n_and_update(this->alloc(), old_start, elemsbefore); - } - } - } - else { - const iterator new_finish = this->priv_reserve_elements_at_back(n); - const iterator old_finish = this->members_.m_finish; - const size_type elemsafter = length - elemsbefore; - if(!elemsafter){ - proxy.uninitialized_copy_n_and_update(this->alloc(), old_finish, n); - this->members_.m_finish = new_finish; - } - else{ - pos = old_finish - difference_type(elemsafter); - if (elemsafter >= n) { - iterator finish_n = old_finish - difference_type(n); - ::boost::container::uninitialized_move_alloc - (this->alloc(), finish_n, old_finish, old_finish); - this->members_.m_finish = new_finish; - boost::container::move_backward(pos, finish_n, old_finish); - proxy.copy_n_and_update(this->alloc(), pos, n); - } - else { - const size_type raw_gap = n - elemsafter; - ::boost::container::uninitialized_move_alloc - (this->alloc(), pos, old_finish, old_finish + difference_type(raw_gap)); - BOOST_CONTAINER_TRY{ - proxy.copy_n_and_update(this->alloc(), pos, elemsafter); - proxy.uninitialized_copy_n_and_update(this->alloc(), old_finish, raw_gap); - } - BOOST_CONTAINER_CATCH(...){ - this->priv_destroy_range(old_finish, old_finish + difference_type(elemsafter)); - BOOST_CONTAINER_RETHROW - } - BOOST_CONTAINER_CATCH_END - this->members_.m_finish = new_finish; - } - } - } - return this->begin() + difference_type(pos_n); - } - - template - iterator priv_insert_back_aux_impl(size_type n, InsertProxy proxy) - { - if(!this->members_.m_map){ - this->priv_initialize_map(0); - } - - iterator new_finish = this->priv_reserve_elements_at_back(n); - iterator old_finish = this->members_.m_finish; - proxy.uninitialized_copy_n_and_update(this->alloc(), old_finish, n); - this->members_.m_finish = new_finish; - return iterator(this->members_.m_finish - difference_type(n)); - } - - template - iterator priv_insert_front_aux_impl(size_type n, InsertProxy proxy) - { - if(!this->members_.m_map){ - this->priv_initialize_map(0); - } - - iterator new_start = this->priv_reserve_elements_at_front(n); - proxy.uninitialized_copy_n_and_update(this->alloc(), new_start, n); - this->members_.m_start = new_start; - return new_start; - } - - BOOST_CONTAINER_FORCEINLINE iterator priv_fill_insert(const_iterator pos, size_type n, const value_type& x) - { - return this->insert(pos, c_it(x, n), c_it()); - } - - // Precondition: this->members_.m_start and this->members_.m_finish have already been initialized, - // but none of the deque's elements have yet been constructed. - void priv_fill_initialize(const value_type& value) - { - index_pointer cur = this->members_.m_start.m_node; - BOOST_CONTAINER_TRY { - for ( ; cur < this->members_.m_finish.m_node; ++cur){ - boost::container::uninitialized_fill_alloc - (this->alloc(), *cur, *cur + get_block_ssize(), value); - } - boost::container::uninitialized_fill_alloc - (this->alloc(), this->members_.m_finish.m_first, this->members_.m_finish.m_cur, value); - } - BOOST_CONTAINER_CATCH(...){ - this->priv_destroy_range(this->members_.m_start, iterator(*cur, cur, get_block_size())); - BOOST_CONTAINER_RETHROW - } - BOOST_CONTAINER_CATCH_END - } - - template - void priv_range_initialize(InIt first, InIt last, typename iterator_enable_if_tag::type* =0) - { - this->priv_initialize_map(0); - BOOST_CONTAINER_TRY { - for ( ; first != last; ++first) - this->emplace_back(*first); - } - BOOST_CONTAINER_CATCH(...){ - this->clear(); - BOOST_CONTAINER_RETHROW - } - BOOST_CONTAINER_CATCH_END - } - - template - void priv_range_initialize(FwdIt first, FwdIt last, typename iterator_disable_if_tag::type* =0) - { - size_type n = 0; - n = boost::container::iterator_udistance(first, last); - this->priv_initialize_map(n); - - index_pointer cur_node = this->members_.m_start.m_node; - BOOST_CONTAINER_TRY { - for (; cur_node < this->members_.m_finish.m_node; ++cur_node) { - FwdIt mid = first; - boost::container::iterator_uadvance(mid, get_block_size()); - ::boost::container::uninitialized_copy_alloc(this->alloc(), first, mid, *cur_node); - first = mid; - } - ::boost::container::uninitialized_copy_alloc(this->alloc(), first, last, this->members_.m_finish.m_first); - } - BOOST_CONTAINER_CATCH(...){ - this->priv_destroy_range(this->members_.m_start, iterator(*cur_node, cur_node, get_block_size())); - BOOST_CONTAINER_RETHROW - } - BOOST_CONTAINER_CATCH_END - } - - // Called only if this->members_.m_finish.m_cur == this->members_.m_finish.m_first. - void priv_pop_back_aux() BOOST_NOEXCEPT_OR_NOTHROW - { - this->priv_deallocate_node(this->members_.m_finish.m_first); - this->members_.m_finish.priv_set_node(this->members_.m_finish.m_node - 1, get_block_size()); - this->members_.m_finish.m_cur = this->members_.m_finish.m_last - 1; - allocator_traits_type::destroy - ( this->alloc() - , boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur) - ); - } - - // Called only if this->members_.m_start.m_cur == this->members_.m_start.m_last - 1. Note that - // if the deque has at least one element (a precondition for this member - // function), and if this->members_.m_start.m_cur == this->members_.m_start.m_last, then the deque - // must have at least two nodes. - void priv_pop_front_aux() BOOST_NOEXCEPT_OR_NOTHROW - { - allocator_traits_type::destroy - ( this->alloc() - , boost::movelib::to_raw_pointer(this->members_.m_start.m_cur) - ); - this->priv_deallocate_node(this->members_.m_start.m_first); - this->members_.m_start.priv_set_node(this->members_.m_start.m_node + 1, get_block_size()); - this->members_.m_start.m_cur = this->members_.m_start.m_first; - } - - iterator priv_reserve_elements_at_front(size_type n) - { - size_type vacancies = size_type(this->members_.m_start.m_cur - this->members_.m_start.m_first); - if (n > vacancies){ - size_type new_elems = n-vacancies; - size_type new_nodes = (new_elems + get_block_size() - 1u) / get_block_size(); - size_type s = (size_type)(this->members_.m_start.m_node - this->members_.m_map); - if (new_nodes > s){ - this->priv_reallocate_map(new_nodes, true); - } - size_type i = 1; - BOOST_CONTAINER_TRY { - for (; i <= new_nodes; ++i) - *(this->members_.m_start.m_node - difference_type(i)) = this->priv_allocate_node(); - } - BOOST_CONTAINER_CATCH(...) { - for (size_type j = 1; j < i; ++j) - this->priv_deallocate_node(*(this->members_.m_start.m_node - difference_type(j))); - BOOST_CONTAINER_RETHROW - } - BOOST_CONTAINER_CATCH_END - } - return this->members_.m_start - difference_type(n); - } - - iterator priv_reserve_elements_at_back(size_type n) - { - size_type vacancies = size_type(this->members_.m_finish.m_last - this->members_.m_finish.m_cur - 1); - if (n > vacancies){ - size_type new_elems = size_type(n - vacancies); - size_type new_nodes = size_type(new_elems + get_block_size() - 1u)/get_block_size(); - size_type s = (size_type)(this->members_.m_map_size - size_type(this->members_.m_finish.m_node - this->members_.m_map)); - if (new_nodes + 1 > s){ - this->priv_reallocate_map(new_nodes, false); - } - size_type i = 1; - BOOST_CONTAINER_TRY { - for (; i <= new_nodes; ++i) - *(this->members_.m_finish.m_node + difference_type(i)) = this->priv_allocate_node(); - } - BOOST_CONTAINER_CATCH(...) { - for (size_type j = 1; j < i; ++j) - this->priv_deallocate_node(*(this->members_.m_finish.m_node + difference_type(j))); - BOOST_CONTAINER_RETHROW - } - BOOST_CONTAINER_CATCH_END - } - return this->members_.m_finish + difference_type(n); - } - - void priv_reallocate_map(size_type nodes_to_add, bool add_at_front) - { - size_type old_num_nodes = size_type(this->members_.m_finish.m_node - this->members_.m_start.m_node + 1); - size_type new_num_nodes = old_num_nodes + nodes_to_add; - - index_pointer new_nstart; - if (this->members_.m_map_size > 2 * new_num_nodes) { - new_nstart = this->members_.m_map + difference_type(this->members_.m_map_size - new_num_nodes) / 2 - + difference_type(add_at_front ? nodes_to_add : 0u); - if (new_nstart < this->members_.m_start.m_node) - boost::container::move(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1, new_nstart); - else - boost::container::move_backward - (this->members_.m_start.m_node, this->members_.m_finish.m_node + 1, new_nstart + difference_type(old_num_nodes)); - } - else { - size_type new_map_size = - this->members_.m_map_size + dtl::max_value(this->members_.m_map_size, nodes_to_add) + 2; - - index_pointer new_map = this->priv_allocate_map(new_map_size); - new_nstart = new_map + difference_type(new_map_size - new_num_nodes) / 2 - + difference_type(add_at_front ? nodes_to_add : 0u); - boost::container::move(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1, new_nstart); - this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size); - - this->members_.m_map = new_map; - this->members_.m_map_size = new_map_size; - } - - this->members_.m_start.priv_set_node(new_nstart, get_block_size()); - this->members_.m_finish.priv_set_node(new_nstart + difference_type(old_num_nodes - 1u), get_block_size()); - } - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -}; - -#ifndef BOOST_CONTAINER_NO_CXX17_CTAD -template -deque(InputIterator, InputIterator) -> deque::value_type>; -template -deque(InputIterator, InputIterator, Allocator const&) -> deque::value_type, Allocator>; -#endif - -}} - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -namespace boost { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move > -{ - typedef typename boost::container::deque::allocator_type allocator_type; - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -} - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -#include - -#endif // #ifndef BOOST_CONTAINER_DEQUE_HPP diff --git a/lib/boost_1.84.0/boost/container/detail/advanced_insert_int.hpp b/lib/boost_1.84.0/boost/container/detail/advanced_insert_int.hpp deleted file mode 100644 index 0238805db26..00000000000 --- a/lib/boost_1.84.0/boost/container/detail/advanced_insert_int.hpp +++ /dev/null @@ -1,542 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2008-2013. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_ADVANCED_INSERT_INT_HPP -#define BOOST_CONTAINER_ADVANCED_INSERT_INT_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// container -#include -// container/detail -#include -#include -#include -#include -#include -#include -#include -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -// move - -#include -#include -// other -#include - -namespace boost { namespace container { namespace dtl { - -template -struct move_insert_range_proxy -{ - typedef typename allocator_traits::value_type value_type; - - BOOST_CONTAINER_FORCEINLINE explicit move_insert_range_proxy(FwdIt first) - : first_(first) - {} - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) - { - this->first_ = ::boost::container::uninitialized_move_alloc_n_source - (a, this->first_, n, p); - } - - template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) - { - this->first_ = ::boost::container::move_n_source(this->first_, n, p); - } - - FwdIt first_; -}; - - -template -struct insert_range_proxy -{ - typedef typename allocator_traits::value_type value_type; - - BOOST_CONTAINER_FORCEINLINE explicit insert_range_proxy(FwdIt first) - : first_(first) - {} - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) - { - this->first_ = ::boost::container::uninitialized_copy_alloc_n_source(a, this->first_, n, p); - } - - template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) - { - this->first_ = ::boost::container::copy_n_source(this->first_, n, p); - } - - FwdIt first_; -}; - - -template -struct insert_n_copies_proxy -{ - typedef typename allocator_traits::value_type value_type; - - BOOST_CONTAINER_FORCEINLINE explicit insert_n_copies_proxy(const value_type &v) - : v_(v) - {} - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const - { boost::container::uninitialized_fill_alloc_n(a, v_, n, p); } - - template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const - { - while (n){ - --n; - *p = v_; - ++p; - } - } - - const value_type &v_; -}; - -template -struct insert_value_initialized_n_proxy -{ - typedef ::boost::container::allocator_traits alloc_traits; - typedef typename allocator_traits::value_type value_type; - typedef typename dtl::aligned_storage::value>::type storage_t; - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const - { boost::container::uninitialized_value_init_alloc_n(a, n, p); } - - template - void copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const - { - while (n){ - --n; - storage_t v; - alloc_traits::construct(a, move_detail::force_ptr(&v)); - value_type *vp = move_detail::force_ptr(&v); - value_destructor on_exit(a, *vp); (void)on_exit; - *p = ::boost::move(*vp); - ++p; - } - } -}; - -template -struct insert_default_initialized_n_proxy -{ - typedef ::boost::container::allocator_traits alloc_traits; - typedef typename allocator_traits::value_type value_type; - typedef typename dtl::aligned_storage::value>::type storage_t; - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const - { boost::container::uninitialized_default_init_alloc_n(a, n, p); } - - template - void copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const - { - if(!is_pod::value){ - while (n){ - --n; - typename dtl::aligned_storage::value>::type v; - alloc_traits::construct(a, move_detail::force_ptr(&v), default_init); - value_type *vp = move_detail::force_ptr(&v); - value_destructor on_exit(a, *vp); (void)on_exit; - *p = ::boost::move(*vp); - ++p; - } - } - } -}; - -template -struct insert_copy_proxy -{ - typedef boost::container::allocator_traits alloc_traits; - typedef typename alloc_traits::value_type value_type; - - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_copy_proxy(const value_type &v) - : v_(v) - {} - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const - { - BOOST_ASSERT(n == 1); (void)n; - alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), v_); - } - - template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const - { - BOOST_ASSERT(n == 1); (void)n; - *p = v_; - } - - const value_type &v_; -}; - - -template -struct insert_move_proxy -{ - typedef boost::container::allocator_traits alloc_traits; - typedef typename alloc_traits::value_type value_type; - - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_move_proxy(value_type &v) - : v_(v) - {} - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const - { - BOOST_ASSERT(n == 1); (void)n; - alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::move(v_) ); - } - - template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const - { - BOOST_ASSERT(n == 1); (void)n; - *p = ::boost::move(v_); - } - - value_type &v_; -}; - -template -BOOST_CONTAINER_FORCEINLINE insert_move_proxy get_insert_value_proxy(BOOST_RV_REF(typename boost::container::iterator_traits::value_type) v) -{ - return insert_move_proxy(v); -} - -template -BOOST_CONTAINER_FORCEINLINE insert_copy_proxy get_insert_value_proxy(const typename boost::container::iterator_traits::value_type &v) -{ - return insert_copy_proxy(v); -} - -}}} //namespace boost { namespace container { namespace dtl { - -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -#include -#include - -namespace boost { -namespace container { -namespace dtl { - -template -struct insert_nonmovable_emplace_proxy -{ - typedef boost::container::allocator_traits alloc_traits; - typedef typename alloc_traits::value_type value_type; - typedef typename build_number_seq::type index_tuple_t; - - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_nonmovable_emplace_proxy(BOOST_FWD_REF(Args)... args) - : args_(args...) - {} - - template - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) - { this->priv_uninitialized_copy_some_and_update(a, index_tuple_t(), p, n); } - - private: - template - BOOST_CONTAINER_FORCEINLINE void priv_uninitialized_copy_some_and_update(Allocator &a, const index_tuple&, Iterator p, std::size_t n) - { - BOOST_ASSERT(n == 1); (void)n; - alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::forward(get(this->args_))... ); - } - - protected: - tuple args_; -}; - -template -struct insert_emplace_proxy - : public insert_nonmovable_emplace_proxy -{ - typedef insert_nonmovable_emplace_proxy base_t; - typedef boost::container::allocator_traits alloc_traits; - typedef typename base_t::value_type value_type; - typedef typename base_t::index_tuple_t index_tuple_t; - - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(BOOST_FWD_REF(Args)... args) - : base_t(::boost::forward(args)...) - {} - - template - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &a, Iterator p, std::size_t n) - { this->priv_copy_some_and_update(a, index_tuple_t(), p, n); } - - private: - - template - BOOST_CONTAINER_FORCEINLINE void priv_copy_some_and_update(Allocator &a, const index_tuple&, Iterator p, std::size_t n) - { - BOOST_ASSERT(n ==1); (void)n; - typename dtl::aligned_storage::value>::type v; - alloc_traits::construct(a, move_detail::force_ptr(&v), ::boost::forward(get(this->args_))...); - value_type *vp = move_detail::force_ptr(&v); - BOOST_CONTAINER_TRY{ - *p = ::boost::move(*vp); - } - BOOST_CONTAINER_CATCH(...){ - alloc_traits::destroy(a, vp); - BOOST_CONTAINER_RETHROW - } - BOOST_CONTAINER_CATCH_END - alloc_traits::destroy(a, vp); - } -}; - -//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type -template -struct insert_emplace_proxy::value_type> - : public insert_move_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(typename boost::container::allocator_traits::value_type &&v) - : insert_move_proxy(v) - {} -}; - -//We use "add_const" here as adding "const" only confuses MSVC12(and maybe later) provoking -//compiler error C2752 ("more than one partial specialization matches"). -//Any problem is solvable with an extra layer of indirection? ;-) -template -struct insert_emplace_proxy::value_type>::type - > - : public insert_copy_proxy -{ - - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -template -struct insert_emplace_proxy::value_type &> - : public insert_copy_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -template -struct insert_emplace_proxy::value_type>::type & - > - : public insert_copy_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -}}} //namespace boost { namespace container { namespace dtl { - -#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -#include - -namespace boost { -namespace container { -namespace dtl { - -#define BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE(N) \ -template< class Allocator BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ -struct insert_nonmovable_emplace_proxy##N\ -{\ - typedef boost::container::allocator_traits alloc_traits;\ - typedef typename alloc_traits::value_type value_type;\ - \ - static const bool single_value = true;\ - \ - BOOST_CONTAINER_FORCEINLINE explicit insert_nonmovable_emplace_proxy##N(BOOST_MOVE_UREF##N)\ - BOOST_MOVE_COLON##N BOOST_MOVE_FWD_INIT##N {}\ - \ - template\ - BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n)\ - {\ - BOOST_ASSERT(n == 1); (void)n;\ - alloc_traits::construct(a, boost::movelib::iterator_to_raw_pointer(p) BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\ - }\ - \ - template\ - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator, std::size_t)\ - { BOOST_ASSERT(false); }\ - \ - protected:\ - BOOST_MOVE_MREF##N\ -};\ -\ -template< class Allocator BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ -struct insert_emplace_proxy_arg##N\ - : insert_nonmovable_emplace_proxy##N< Allocator BOOST_MOVE_I##N BOOST_MOVE_TARG##N >\ -{\ - typedef insert_nonmovable_emplace_proxy##N\ - < Allocator BOOST_MOVE_I##N BOOST_MOVE_TARG##N > base_t;\ - typedef typename base_t::value_type value_type;\ - typedef boost::container::allocator_traits alloc_traits;\ - \ - static const bool single_value = true;\ - \ - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg##N(BOOST_MOVE_UREF##N)\ - : base_t(BOOST_MOVE_FWD##N){}\ - \ - template\ - BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &a, Iterator p, std::size_t n)\ - {\ - BOOST_ASSERT(n == 1); (void)n;\ - typename dtl::aligned_storage::value>::type v;\ - alloc_traits::construct(a, move_detail::force_ptr(&v) BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\ - value_type *vp = move_detail::force_ptr(&v);\ - BOOST_CONTAINER_TRY{\ - *p = ::boost::move(*vp);\ - }\ - BOOST_CONTAINER_CATCH(...){\ - alloc_traits::destroy(a, vp);\ - BOOST_CONTAINER_RETHROW\ - }\ - BOOST_CONTAINER_CATCH_END\ - alloc_traits::destroy(a, vp);\ - }\ -};\ -// -BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE) -#undef BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE - -#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - -//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type -template -struct insert_emplace_proxy_arg1::value_type> > - : public insert_move_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits::value_type &v) - : insert_move_proxy(v) - {} -}; - -template -struct insert_emplace_proxy_arg1::value_type> - : public insert_copy_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -#else //e.g. MSVC10 & MSVC11 - -//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type -template -struct insert_emplace_proxy_arg1::value_type> - : public insert_move_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits::value_type &&v) - : insert_move_proxy(v) - {} -}; - -//We use "add_const" here as adding "const" only confuses MSVC10&11 provoking -//compiler error C2752 ("more than one partial specialization matches"). -//Any problem is solvable with an extra layer of indirection? ;-) -template -struct insert_emplace_proxy_arg1::value_type>::type - > - : public insert_copy_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -template -struct insert_emplace_proxy_arg1::value_type &> - : public insert_copy_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -template -struct insert_emplace_proxy_arg1::value_type>::type & - > - : public insert_copy_proxy -{ - static const bool single_value = true; - - BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -#endif - -}}} //namespace boost { namespace container { namespace dtl { - -#endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -#include - -#endif //#ifndef BOOST_CONTAINER_ADVANCED_INSERT_INT_HPP diff --git a/lib/boost_1.84.0/boost/container/detail/alloc_helpers.hpp b/lib/boost_1.84.0/boost/container/detail/alloc_helpers.hpp deleted file mode 100644 index 5ca2ca727d1..00000000000 --- a/lib/boost_1.84.0/boost/container/detail/alloc_helpers.hpp +++ /dev/null @@ -1,60 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_DETAIL_ALLOC_TRAITS_HPP -#define BOOST_CONTAINER_DETAIL_ALLOC_TRAITS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -// move -#include -#include - -namespace boost { -namespace container { -namespace dtl { - -template -BOOST_CONTAINER_FORCEINLINE void swap_alloc(AllocatorType &, AllocatorType &, dtl::false_type) - BOOST_NOEXCEPT_OR_NOTHROW -{} - -template -BOOST_CONTAINER_FORCEINLINE void swap_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type) -{ boost::adl_move_swap(l, r); } - -template -BOOST_CONTAINER_FORCEINLINE void assign_alloc(AllocatorType &, const AllocatorType &, dtl::false_type) - BOOST_NOEXCEPT_OR_NOTHROW -{} - -template -BOOST_CONTAINER_FORCEINLINE void assign_alloc(AllocatorType &l, const AllocatorType &r, dtl::true_type) -{ l = r; } - -template -BOOST_CONTAINER_FORCEINLINE void move_alloc(AllocatorType &, AllocatorType &, dtl::false_type) - BOOST_NOEXCEPT_OR_NOTHROW -{} - -template -BOOST_CONTAINER_FORCEINLINE void move_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type) -{ l = ::boost::move(r); } - -} //namespace dtl { -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_ALLOC_TRAITS_HPP diff --git a/lib/boost_1.84.0/boost/container/detail/allocation_type.hpp b/lib/boost_1.84.0/boost/container/detail/allocation_type.hpp deleted file mode 100644 index 1e8aa673108..00000000000 --- a/lib/boost_1.84.0/boost/container/detail/allocation_type.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_ALLOCATION_TYPE_HPP -#define BOOST_CONTAINER_ALLOCATION_TYPE_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -enum allocation_type_v -{ - // constants for allocation commands - allocate_new_v = 0x01, - expand_fwd_v = 0x02, - expand_bwd_v = 0x04, -// expand_both = expand_fwd | expand_bwd, -// expand_or_new = allocate_new | expand_both, - shrink_in_place_v = 0x08, - nothrow_allocation_v = 0x10, - zero_memory_v = 0x20, - try_shrink_in_place_v = 0x40 -}; - -typedef unsigned int allocation_type; -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -static const allocation_type allocate_new = (allocation_type)allocate_new_v; -static const allocation_type expand_fwd = (allocation_type)expand_fwd_v; -static const allocation_type expand_bwd = (allocation_type)expand_bwd_v; -static const allocation_type shrink_in_place = (allocation_type)shrink_in_place_v; -static const allocation_type try_shrink_in_place= (allocation_type)try_shrink_in_place_v; -static const allocation_type nothrow_allocation = (allocation_type)nothrow_allocation_v; -static const allocation_type zero_memory = (allocation_type)zero_memory_v; - -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_ALLOCATION_TYPE_HPP diff --git a/lib/boost_1.84.0/boost/container/detail/compare_functors.hpp b/lib/boost_1.84.0/boost/container/detail/compare_functors.hpp deleted file mode 100644 index ae4ffcea9d0..00000000000 --- a/lib/boost_1.84.0/boost/container/detail/compare_functors.hpp +++ /dev/null @@ -1,134 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_COMPARE_FUNCTORS_HPP -#define BOOST_CONTAINER_DETAIL_COMPARE_FUNCTORS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { - -template -class equal_to_value -{ - typedef ValueType value_type; - const value_type &t_; - - public: - BOOST_CONTAINER_FORCEINLINE explicit equal_to_value(const value_type &t) - : t_(t) - {} - - BOOST_CONTAINER_FORCEINLINE bool operator()(const value_type &t)const - { return t_ == t; } -}; - -template -struct value_to_node_compare - : Pred -{ - typedef Pred predicate_type; - typedef Node node_type; - - BOOST_CONTAINER_FORCEINLINE value_to_node_compare() - : Pred() - {} - - BOOST_CONTAINER_FORCEINLINE explicit value_to_node_compare(Pred pred) - : Pred(pred) - {} - - BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a, const Node &b) const - { return static_cast(*this)(a.get_data(), b.get_data()); } - - BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a) const - { return static_cast(*this)(a.get_data()); } - - BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a, const Node &b) - { return static_cast(*this)(a.get_data(), b.get_data()); } - - BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a) - { return static_cast(*this)(a.get_data()); } - - BOOST_CONTAINER_FORCEINLINE predicate_type & predicate() { return static_cast(*this); } - BOOST_CONTAINER_FORCEINLINE const predicate_type & predicate() const { return static_cast(*this); } -}; - -template -struct key_node_pred - : public boost::intrusive::detail::ebo_functor_holder -{ - BOOST_CONTAINER_FORCEINLINE explicit key_node_pred(const KeyPred &comp) - : base_t(comp) - {} - - BOOST_CONTAINER_FORCEINLINE explicit key_node_pred() - {} - - typedef boost::intrusive::detail::ebo_functor_holder base_t; - typedef KeyPred key_predicate; - typedef KeyOfValue key_of_value; - typedef typename KeyOfValue::type key_type; - - - BOOST_CONTAINER_FORCEINLINE static const key_type &key_from(const Node &n) - { - return key_of_value()(n.get_data()); - } - - template - BOOST_CONTAINER_FORCEINLINE static const T & - key_from(const T &t) - { return t; } - - BOOST_CONTAINER_FORCEINLINE const key_predicate &key_pred() const - { return static_cast(*this); } - - BOOST_CONTAINER_FORCEINLINE key_predicate &key_pred() - { return static_cast(*this); } - - BOOST_CONTAINER_FORCEINLINE Ret operator()(const key_type &key) const - { return this->key_pred()(key); } - - template - BOOST_CONTAINER_FORCEINLINE Ret operator()(const U &nonkey) const - { return this->key_pred()(this->key_from(nonkey)); } - - BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const - { return this->key_pred()(key1, key2); } - - template - BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const U &nonkey2) const - { return this->key_pred()(key1, this->key_from(nonkey2)); } - - template - BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2) const - { return this->key_pred()(this->key_from(nonkey1), key2); } - - template - BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const V &nonkey2) const - { return this->key_pred()(this->key_from(nonkey1), this->key_from(nonkey2)); } -}; - - -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_DETAIL_COMPARE_FUNCTORS_HPP diff --git a/lib/boost_1.84.0/boost/container/detail/config_begin.hpp b/lib/boost_1.84.0/boost/container/detail/config_begin.hpp deleted file mode 100644 index e1075d1d5bc..00000000000 --- a/lib/boost_1.84.0/boost/container/detail/config_begin.hpp +++ /dev/null @@ -1,61 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED -#define BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED -#ifndef BOOST_CONFIG_HPP -#include -#endif - -#endif //BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED - -#ifdef BOOST_MSVC - #pragma warning (push) - #pragma warning (disable : 4619) // there is no warning number 'XXXX' - #pragma warning (disable : 4127) // conditional expression is constant - #pragma warning (disable : 4146) // unary minus operator applied to unsigned type, result still unsigned - #pragma warning (disable : 4197) // top-level volatile in cast is ignored - #pragma warning (disable : 4251) // "identifier" : class "type" needs to have dll-interface to be used by clients of class "type2" - #pragma warning (disable : 4275) // non DLL-interface classkey "identifier" used as base for DLL-interface classkey "identifier" - #pragma warning (disable : 4284) // odd return type for operator-> - #pragma warning (disable : 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow) - #pragma warning (disable : 4324) // structure was padded due to __declspec(align( - #pragma warning (disable : 4345) // behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized - #pragma warning (disable : 4355) // "this" : used in base member initializer list - #pragma warning (disable : 4503) // "identifier" : decorated name length exceeded, name was truncated - #pragma warning (disable : 4510) // default constructor could not be generated - #pragma warning (disable : 4511) // copy constructor could not be generated - #pragma warning (disable : 4512) // assignment operator could not be generated - #pragma warning (disable : 4514) // unreferenced inline removed - #pragma warning (disable : 4521) // Disable "multiple copy constructors specified" - #pragma warning (disable : 4522) // "class" : multiple assignment operators specified - #pragma warning (disable : 4541) // 'typeid' used on polymorphic type '' with /GR-; unpredictable behavior may result - #pragma warning (disable : 4584) // X is already a base-class of Y - #pragma warning (disable : 4610) // struct can never be instantiated - user defined constructor required - #pragma warning (disable : 4671) // the copy constructor is inaccessible - #pragma warning (disable : 4673) // throwing '' the following types will not be considered at the catch site - #pragma warning (disable : 4675) // "method" should be declared "static" and have exactly one parameter - #pragma warning (disable : 4706) // assignment within conditional expression - #pragma warning (disable : 4710) // function not inlined - #pragma warning (disable : 4714) // "function": marked as __forceinline not inlined - #pragma warning (disable : 4711) // function selected for automatic inline expansion - #pragma warning (disable : 4786) // identifier truncated in debug info - #pragma warning (disable : 4996) // "function": was declared deprecated - -#endif //BOOST_MSVC - - -#if defined(BOOST_GCC) && (BOOST_GCC >= 40600) -#pragma GCC diagnostic push -//Sign conversion warnings broken before GCC 9.3 -//(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87519) -#if BOOST_GCC < 90300 -#pragma GCC diagnostic ignored "-Wsign-conversion" -#endif -#endif diff --git a/lib/boost_1.84.0/boost/container/detail/construct_in_place.hpp b/lib/boost_1.84.0/boost/container/detail/construct_in_place.hpp deleted file mode 100644 index d824d814afa..00000000000 --- a/lib/boost_1.84.0/boost/container/detail/construct_in_place.hpp +++ /dev/null @@ -1,98 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2014. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_CONSTRUCT_IN_PLACE_HPP -#define BOOST_CONTAINER_DETAIL_CONSTRUCT_IN_PLACE_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include - -namespace boost { -namespace container { - -//In place construction - -struct iterator_arg_t{}; - -template -BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T* dest, InpIt source) -{ boost::container::allocator_traits::construct(a, dest, *source); } - -template -BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, value_init_construct_iterator) -{ - boost::container::allocator_traits::construct(a, dest); -} - -template -class default_init_construct_iterator; - -template -BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, default_init_construct_iterator) -{ - boost::container::allocator_traits::construct(a, dest, default_init); -} - -template -class emplace_iterator; - -template -BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, emplace_iterator ei) -{ - ei.construct_in_place(a, dest); -} - -//Assignment - -template -BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, InpIt source) -{ *dest = *source; } - -template -BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, value_init_construct_iterator) -{ - dtl::value_init val; - *dest = boost::move(val.get()); -} - -template -class default_init_construct_iterator; - -template -BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, default_init_construct_iterator) -{ - U u; - *dest = boost::move(u); -} - -template -class emplace_iterator; - -template -BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, emplace_iterator ei) -{ - ei.assign_in_place(dest); -} - -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_CONSTRUCT_IN_PLACE_HPP diff --git a/lib/boost_1.84.0/boost/container/detail/container_rebind.hpp b/lib/boost_1.84.0/boost/container/detail/container_rebind.hpp deleted file mode 100644 index 854291ae7c9..00000000000 --- a/lib/boost_1.84.0/boost/container/detail/container_rebind.hpp +++ /dev/null @@ -1,163 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2017-2017. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_DETAIL_CONTAINER_REBIND_HPP -#define BOOST_CONTAINER_DETAIL_CONTAINER_REBIND_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - - -namespace boost { -namespace container { -namespace dtl { - - template - struct container_rebind; - -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template