diff --git a/.gitattributes b/.gitattributes index 51c63e295e0232f7095a8ee8e03713837e37f419..3e84d7c704432f6eac30d15558eec8360d130e41 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,15 +1,96 @@ -*.tgz filter=lfs diff=lfs merge=lfs -text -*.trp filter=lfs diff=lfs merge=lfs -text -*.apk filter=lfs diff=lfs merge=lfs -text -*.jar filter=lfs diff=lfs merge=lfs -text -*.mp4 filter=lfs diff=lfs merge=lfs -text -*.zip filter=lfs diff=lfs merge=lfs -text -*.asm filter=lfs diff=lfs merge=lfs -text -*.8svn filter=lfs diff=lfs merge=lfs -text -*.9svn filter=lfs diff=lfs merge=lfs -text -*.dylib filter=lfs diff=lfs merge=lfs -text -*.exe filter=lfs diff=lfs merge=lfs -text -*.a filter=lfs diff=lfs merge=lfs -text -*.so filter=lfs diff=lfs merge=lfs -text -*.bin filter=lfs diff=lfs merge=lfs -text -*.dll filter=lfs diff=lfs merge=lfs -text +* text=auto !eol svneol=native#text/plain +*.gitattributes text svneol=native#text/plain + +# Scriptish formats +*.bat text svneol=native#text/plain +*.bsh text svneol=native#text/x-beanshell +*.cgi text svneol=native#text/plain +*.cmd text svneol=native#text/plain +*.js text svneol=native#text/javascript +*.php text svneol=native#text/x-php +*.pl text svneol=native#text/x-perl +*.pm text svneol=native#text/x-perl +*.py text svneol=native#text/x-python +*.sh eol=lf svneol=LF#text/x-sh +configure eol=lf svneol=LF#text/x-sh + +# Image formats +*.bmp binary svneol=unset#image/bmp +*.gif binary svneol=unset#image/gif +*.ico binary svneol=unset#image/ico +*.jpeg binary svneol=unset#image/jpeg +*.jpg binary svneol=unset#image/jpeg +*.png binary svneol=unset#image/png +*.tif binary svneol=unset#image/tiff +*.tiff binary svneol=unset#image/tiff +*.svg text svneol=native#image/svg%2Bxml + +# Data formats +*.pdf binary svneol=unset#application/pdf +*.avi binary svneol=unset#video/avi +*.doc binary svneol=unset#application/msword +*.dsp text svneol=crlf#text/plain +*.dsw text svneol=crlf#text/plain +*.eps binary svneol=unset#application/postscript +*.gz binary svneol=unset#application/gzip +*.mov binary svneol=unset#video/quicktime +*.mp3 binary svneol=unset#audio/mpeg +*.ppt binary svneol=unset#application/vnd.ms-powerpoint +*.ps binary svneol=unset#application/postscript +*.psd binary svneol=unset#application/photoshop +*.rdf binary svneol=unset#text/rdf +*.rss text svneol=unset#text/xml +*.rtf binary svneol=unset#text/rtf +*.sln text svneol=native#text/plain +*.swf binary svneol=unset#application/x-shockwave-flash +*.tgz binary svneol=unset#application/gzip +*.vcproj text svneol=native#text/xml +*.vcxproj text svneol=native#text/xml +*.vsprops text svneol=native#text/xml +*.wav binary svneol=unset#audio/wav +*.xls binary svneol=unset#application/vnd.ms-excel +*.zip binary svneol=unset#application/zip + +# Text formats +.htaccess text svneol=native#text/plain +*.bbk text svneol=native#text/xml +*.cmake text svneol=native#text/plain +*.css text svneol=native#text/css +*.dtd text svneol=native#text/xml +*.htm text svneol=native#text/html +*.html text svneol=native#text/html +*.ini text svneol=native#text/plain +*.log text svneol=native#text/plain +*.mak text svneol=native#text/plain +*.qbk text svneol=native#text/plain +*.rst text svneol=native#text/plain +*.sql text svneol=native#text/x-sql +*.txt text svneol=native#text/plain +*.xhtml text svneol=native#text/xhtml%2Bxml +*.xml text svneol=native#text/xml +*.xsd text svneol=native#text/xml +*.xsl text svneol=native#text/xml +*.xslt text svneol=native#text/xml +*.xul text svneol=native#text/xul +*.yml text svneol=native#text/plain +boost-no-inspect text svneol=native#text/plain +CHANGES text svneol=native#text/plain +COPYING text svneol=native#text/plain +INSTALL text svneol=native#text/plain +Jamfile text svneol=native#text/plain +Jamroot text svneol=native#text/plain +Jamfile.v2 text svneol=native#text/plain +Jamrules text svneol=native#text/plain +Makefile* text svneol=native#text/plain +README text svneol=native#text/plain +TODO text svneol=native#text/plain + +# Code formats +*.c text svneol=native#text/plain +*.cpp text svneol=native#text/plain +*.h text svneol=native#text/plain +*.hpp text svneol=native#text/plain +*.ipp text svneol=native#text/plain +*.tpp text svneol=native#text/plain +*.jam text svneol=native#text/plain +*.java text svneol=native#text/plain diff --git a/INSTALL b/INSTALL old mode 100755 new mode 100644 diff --git a/Jamroot b/Jamroot old mode 100755 new mode 100644 index 4354f3aeb555a07ffecd9b07e1b7aa04cdafd71d..bf05265f80f255dedb0b9d0df57b66698fcc3773 --- a/Jamroot +++ b/Jamroot @@ -144,9 +144,12 @@ import option ; import tools/boost\_install/boost-install ; path-constant BOOST_ROOT : . ; -constant BOOST_VERSION : 1.74.0 ; +constant BOOST_VERSION : 1.76.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 ; diff --git a/LICENSE_1_0.txt b/LICENSE_1_0.txt old mode 100755 new mode 100644 diff --git a/README.OpenSource b/README.OpenSource index 49ce5f395cf7c2b3a886288210d0018cd939b13c..36dd2a28375c8713e329a7c68ad19c024d3c83ea 100644 --- a/README.OpenSource +++ b/README.OpenSource @@ -3,7 +3,7 @@ "Name": "Boost", "License": "Boost Software License V1.0", "License File": "LICENSE_1_0.txt", - "Version Number": "1.74.0", + "Version Number": "1.76.0", "Owner": "wangyongjun7@huawei.com", "Upstream URL": "http://www.boost.org/", "Description": "Boost provides free portable peer-reviewed C++ libraries. The emphasis is on portable libraries which work well with the C++ Standard Library. See http://www.boost.org" diff --git a/README.md b/README.md old mode 100755 new mode 100644 index d4678952b6beb68b16c4a152d1e05e419358455c..fa9faa1688204eb191fb74db81589d75c4da603f --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The Boost project provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work well with the C++ Standard Library. Boost libraries are intended to be widely useful, and usable across a broad spectrum of applications. The Boost license encourages both commercial and non-commercial use -and does not require attribution for binary use. +and does not require attribution for binary use. The project website is www.boost.org, where you can obtain more information and [download](https://www.boost.org/users/download/) the current release. diff --git a/boost-build.jam b/boost-build.jam old mode 100755 new mode 100644 diff --git a/boost.css b/boost.css old mode 100755 new mode 100644 diff --git a/boost.png b/boost.png old mode 100755 new mode 100644 diff --git a/boost/asio.hpp b/boost/asio.hpp old mode 100755 new mode 100644 index 3c9e3853fc2a6be313f565a5af36b248efec9cea..362f721792d95aec97e1636fe18f09fe2ed25c88 --- a/boost/asio.hpp +++ b/boost/asio.hpp @@ -2,7 +2,7 @@ // asio.hpp // ~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/any_io_executor.hpp b/boost/asio/any_io_executor.hpp index 1be8fb6cc63d8b32773f02fded50e54bd4bba3ba..8eb3d724bd04a7f587a3dfde68c81dfe5c0beee4 100644 --- a/boost/asio/any_io_executor.hpp +++ b/boost/asio/any_io_executor.hpp @@ -2,7 +2,7 @@ // any_io_executor.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -49,19 +49,248 @@ typedef executor any_io_executor; * execution::prefer_only * > @endcode */ +class any_io_executor : #if defined(GENERATING_DOCUMENTATION) -typedef execution::any_executor<...> any_io_executor; + public execution::any_executor<...> #else // defined(GENERATING_DOCUMENTATION) -typedef execution::any_executor< - execution::context_as_t, - execution::blocking_t::never_t, - execution::prefer_only, - execution::prefer_only, - execution::prefer_only, - execution::prefer_only, - execution::prefer_only - > any_io_executor; + public execution::any_executor< + execution::context_as_t, + execution::blocking_t::never_t, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only + > #endif // defined(GENERATING_DOCUMENTATION) +{ +public: +#if !defined(GENERATING_DOCUMENTATION) + typedef execution::any_executor< + execution::context_as_t, + execution::blocking_t::never_t, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only + > base_type; + + typedef void supportable_properties_type( + execution::context_as_t, + execution::blocking_t::never_t, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only, + execution::prefer_only + ); +#endif // !defined(GENERATING_DOCUMENTATION) + + /// Default constructor. + any_io_executor() BOOST_ASIO_NOEXCEPT + : base_type() + { + } + + /// Construct in an empty state. Equivalent effects to default constructor. + any_io_executor(nullptr_t) BOOST_ASIO_NOEXCEPT + : base_type(nullptr_t()) + { + } + + /// Copy constructor. + any_io_executor(const any_io_executor& e) BOOST_ASIO_NOEXCEPT + : base_type(static_cast(e)) + { + } + +#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + /// Move constructor. + any_io_executor(any_io_executor&& e) BOOST_ASIO_NOEXCEPT + : base_type(static_cast(e)) + { + } +#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + + /// Construct to point to the same target as another any_executor. +#if defined(GENERATING_DOCUMENTATION) + template + any_io_executor(execution::any_executor e); +#else // defined(GENERATING_DOCUMENTATION) + template + any_io_executor(OtherAnyExecutor e, + typename constraint< + conditional< + !is_same::value + && is_base_of::value, + typename execution::detail::supportable_properties< + 0, supportable_properties_type>::template + is_valid_target, + false_type + >::type::value + >::type = 0) + : base_type(BOOST_ASIO_MOVE_CAST(OtherAnyExecutor)(e)) + { + } +#endif // defined(GENERATING_DOCUMENTATION) + + /// Construct a polymorphic wrapper for the specified executor. +#if defined(GENERATING_DOCUMENTATION) + template + any_io_executor(Executor e); +#else // defined(GENERATING_DOCUMENTATION) + template + any_io_executor(Executor e, + typename constraint< + conditional< + !is_same::value + && !is_base_of::value, + execution::detail::is_valid_target_executor< + Executor, supportable_properties_type>, + false_type + >::type::value + >::type = 0) + : base_type(BOOST_ASIO_MOVE_CAST(Executor)(e)) + { + } +#endif // defined(GENERATING_DOCUMENTATION) + + /// Assignment operator. + any_io_executor& operator=(const any_io_executor& e) BOOST_ASIO_NOEXCEPT + { + base_type::operator=(static_cast(e)); + return *this; + } + +#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + /// Move assignment operator. + any_io_executor& operator=(any_io_executor&& e) BOOST_ASIO_NOEXCEPT + { + base_type::operator=(static_cast(e)); + return *this; + } +#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) + + /// Assignment operator that sets the polymorphic wrapper to the empty state. + any_io_executor& operator=(nullptr_t) + { + base_type::operator=(nullptr_t()); + return *this; + } + + /// Destructor. + ~any_io_executor() + { + } + + /// Swap targets with another polymorphic wrapper. + void swap(any_io_executor& other) BOOST_ASIO_NOEXCEPT + { + static_cast(*this).swap(static_cast(other)); + } + + /// Obtain a polymorphic wrapper with the specified property. + /** + * Do not call this function directly. It is intended for use with the + * boost::asio::require and boost::asio::prefer customisation points. + * + * For example: + * @code any_io_executor ex = ...; + * auto ex2 = boost::asio::require(ex, execution::blocking.possibly); @endcode + */ + template + any_io_executor require(const Property& p, + typename constraint< + traits::require_member::is_valid + >::type = 0) const + { + return static_cast(*this).require(p); + } + + /// Obtain a polymorphic wrapper with the specified property. + /** + * Do not call this function directly. It is intended for use with the + * boost::asio::prefer customisation point. + * + * For example: + * @code any_io_executor ex = ...; + * auto ex2 = boost::asio::prefer(ex, execution::blocking.possibly); @endcode + */ + template + any_io_executor prefer(const Property& p, + typename constraint< + traits::prefer_member::is_valid + >::type = 0) const + { + return static_cast(*this).prefer(p); + } +}; + +#if !defined(GENERATING_DOCUMENTATION) + +namespace traits { + +#if !defined(BOOST_ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT) + +template <> +struct equality_comparable +{ + static const bool is_valid = true; + static const bool is_noexcept = true; +}; + +#endif // !defined(BOOST_ASIO_HAS_DEDUCED_EQUALITY_COMPARABLE_TRAIT) + +#if !defined(BOOST_ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT) + +template +struct execute_member +{ + static const bool is_valid = true; + static const bool is_noexcept = false; + typedef void result_type; +}; + +#endif // !defined(BOOST_ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT) + +#if !defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + +template +struct query_member : + query_member +{ +}; + +#endif // !defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + +#if !defined(BOOST_ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT) + +template +struct require_member : + require_member +{ + typedef any_io_executor result_type; +}; + +#endif // !defined(BOOST_ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT) + +#if !defined(BOOST_ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT) + +template +struct prefer_member : + prefer_member +{ + typedef any_io_executor result_type; +}; + +#endif // !defined(BOOST_ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT) + +} // namespace traits + +#endif // !defined(GENERATING_DOCUMENTATION) #endif // defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) diff --git a/boost/asio/associated_allocator.hpp b/boost/asio/associated_allocator.hpp old mode 100755 new mode 100644 index 0735bb16198f3b548c503a241322c32e6791225a..76e8a9b88307a8908077253b296afdc8b436b79b --- a/boost/asio/associated_allocator.hpp +++ b/boost/asio/associated_allocator.hpp @@ -2,7 +2,7 @@ // associated_allocator.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/associated_executor.hpp b/boost/asio/associated_executor.hpp old mode 100755 new mode 100644 index 555e46f1840b367a3d23d36951a5ccca329dd09a..6d4ac65f3b0070d41213b7a5118c73de7870c09f --- a/boost/asio/associated_executor.hpp +++ b/boost/asio/associated_executor.hpp @@ -2,7 +2,7 @@ // associated_executor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -109,9 +109,9 @@ get_associated_executor(const T& t) BOOST_ASIO_NOEXCEPT template inline typename associated_executor::type get_associated_executor(const T& t, const Executor& ex, - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type* = 0) BOOST_ASIO_NOEXCEPT + >::type = 0) BOOST_ASIO_NOEXCEPT { return associated_executor::get(t, ex); } @@ -125,8 +125,8 @@ template inline typename associated_executor::type get_associated_executor(const T& t, ExecutionContext& ctx, - typename enable_if::value>::type* = 0) BOOST_ASIO_NOEXCEPT + typename constraint::value>::type = 0) BOOST_ASIO_NOEXCEPT { return associated_executor::get(t, ctx.get_executor()); diff --git a/boost/asio/async_result.hpp b/boost/asio/async_result.hpp old mode 100755 new mode 100644 index 3e76151aa19ad0bdeb35d1c413da839e7432452e..3bcf424619660e21eb1f4a5de7a652d6e890991c --- a/boost/asio/async_result.hpp +++ b/boost/asio/async_result.hpp @@ -2,7 +2,7 @@ // async_result.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -313,7 +313,7 @@ struct async_result_has_initiate_memfn typename ::boost::asio::decay::type, sig>::completion_handler_type #endif -#if defined(GENERATION_DOCUMENTATION) +#if defined(GENERATING_DOCUMENTATION) # define BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ct, sig) \ auto #elif defined(BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION) @@ -324,7 +324,7 @@ struct async_result_has_initiate_memfn BOOST_ASIO_INITFN_RESULT_TYPE(ct, sig) #endif -#if defined(GENERATION_DOCUMENTATION) +#if defined(GENERATING_DOCUMENTATION) # define BOOST_ASIO_INITFN_DEDUCED_RESULT_TYPE(ct, sig, expr) \ void_or_deduced #elif defined(BOOST_ASIO_HAS_DECLTYPE) @@ -350,7 +350,7 @@ void_or_deduced async_initiate( template -inline typename enable_if< +inline typename constraint< detail::async_result_has_initiate_memfn::value, BOOST_ASIO_INITFN_DEDUCED_RESULT_TYPE(CompletionToken, Signature, (async_result::type, @@ -370,7 +370,7 @@ async_initiate(BOOST_ASIO_MOVE_ARG(Initiation) initiation, template -inline typename enable_if< +inline typename constraint< !detail::async_result_has_initiate_memfn::value, BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature)>::type async_initiate(BOOST_ASIO_MOVE_ARG(Initiation) initiation, @@ -392,7 +392,7 @@ async_initiate(BOOST_ASIO_MOVE_ARG(Initiation) initiation, template -inline typename enable_if< +inline typename constraint< detail::async_result_has_initiate_memfn::value, BOOST_ASIO_INITFN_DEDUCED_RESULT_TYPE(CompletionToken, Signature, (async_result::type, @@ -409,7 +409,7 @@ async_initiate(BOOST_ASIO_MOVE_ARG(Initiation) initiation, template -inline typename enable_if< +inline typename constraint< !detail::async_result_has_initiate_memfn::value, BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature)>::type async_initiate(BOOST_ASIO_MOVE_ARG(Initiation) initiation, @@ -428,7 +428,7 @@ async_initiate(BOOST_ASIO_MOVE_ARG(Initiation) initiation, template \ - inline typename enable_if< \ + inline typename constraint< \ detail::async_result_has_initiate_memfn< \ CompletionToken, Signature>::value, \ BOOST_ASIO_INITFN_DEDUCED_RESULT_TYPE(CompletionToken, Signature, \ @@ -449,7 +449,7 @@ async_initiate(BOOST_ASIO_MOVE_ARG(Initiation) initiation, template \ - inline typename enable_if< \ + inline typename constraint< \ !detail::async_result_has_initiate_memfn< \ CompletionToken, Signature>::value, \ BOOST_ASIO_INITFN_RESULT_TYPE(CompletionToken, Signature)>::type \ diff --git a/boost/asio/awaitable.hpp b/boost/asio/awaitable.hpp old mode 100755 new mode 100644 index 6564cfd59dd2d96e690f6d1ff4d637d468b56492..e4177234353ee9148b950d16b297317543c42f3e --- a/boost/asio/awaitable.hpp +++ b/boost/asio/awaitable.hpp @@ -2,7 +2,7 @@ // awaitable.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_datagram_socket.hpp b/boost/asio/basic_datagram_socket.hpp old mode 100755 new mode 100644 index 1e9b6867dcfe2511957d64b41468964d6c427f77..3b6319a3adc7b6908625d350d1dee5623e66e994 --- a/boost/asio/basic_datagram_socket.hpp +++ b/boost/asio/basic_datagram_socket.hpp @@ -2,7 +2,7 @@ // basic_datagram_socket.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -46,6 +46,13 @@ class basic_datagram_socket; * @par Thread Safety * @e Distinct @e objects: Safe.@n * @e Shared @e objects: Unsafe. + * + * Synchronous @c send, @c send_to, @c receive, @c receive_from, and @c connect + * operations are thread safe with respect to each other, if the underlying + * operating system calls are also thread safe. This means that it is permitted + * to perform concurrent calls to these synchronous operations on a single + * socket object. Other synchronous operations, such as @c open or @c close, are + * not thread safe. */ template class basic_datagram_socket @@ -101,9 +108,9 @@ public: */ template explicit basic_datagram_socket(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(context) { } @@ -139,9 +146,10 @@ public: template basic_datagram_socket(ExecutionContext& context, const protocol_type& protocol, - typename enable_if< - is_convertible::value - >::type* = 0) + typename constraint< + is_convertible::value, + defaulted_constraint + >::type = defaulted_constraint()) : basic_socket(context, protocol) { } @@ -185,9 +193,9 @@ public: template basic_datagram_socket(ExecutionContext& context, const endpoint_type& endpoint, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(context, endpoint) { } @@ -230,9 +238,9 @@ public: template basic_datagram_socket(ExecutionContext& context, const protocol_type& protocol, const native_handle_type& native_socket, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(context, protocol, native_socket) { } @@ -286,10 +294,10 @@ public: */ template basic_datagram_socket(basic_datagram_socket&& other, - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(std::move(other)) { } @@ -308,7 +316,7 @@ public: * constructor. */ template - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value, basic_datagram_socket& diff --git a/boost/asio/basic_deadline_timer.hpp b/boost/asio/basic_deadline_timer.hpp old mode 100755 new mode 100644 index 3373036439001ba404822b0deb007f2c4e36a995..cc5ea6b4920c91fede5788bc34cc676c936d3f8d --- a/boost/asio/basic_deadline_timer.hpp +++ b/boost/asio/basic_deadline_timer.hpp @@ -2,7 +2,7 @@ // basic_deadline_timer.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -160,7 +160,7 @@ public: * dispatch handlers for any asynchronous operations performed on the timer. */ explicit basic_deadline_timer(const executor_type& ex) - : impl_(ex) + : impl_(0, ex) { } @@ -176,10 +176,10 @@ public: */ template explicit basic_deadline_timer(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { } @@ -194,7 +194,7 @@ public: * as an absolute time. */ basic_deadline_timer(const executor_type& ex, const time_type& expiry_time) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec); @@ -214,10 +214,10 @@ public: */ template basic_deadline_timer(ExecutionContext& context, const time_type& expiry_time, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec); @@ -236,7 +236,7 @@ public: */ basic_deadline_timer(const executor_type& ex, const duration_type& expiry_time) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().expires_from_now( @@ -258,10 +258,10 @@ public: template basic_deadline_timer(ExecutionContext& context, const duration_type& expiry_time, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().expires_from_now( diff --git a/boost/asio/basic_io_object.hpp b/boost/asio/basic_io_object.hpp old mode 100755 new mode 100644 index 91494cc41addaf0db2d79530b8dccf38cd03c760..97b26b12dce3a01b81fcbbb527e6e3c25a62d50d --- a/boost/asio/basic_io_object.hpp +++ b/boost/asio/basic_io_object.hpp @@ -2,7 +2,7 @@ // basic_io_object.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_raw_socket.hpp b/boost/asio/basic_raw_socket.hpp old mode 100755 new mode 100644 index 6771ae257f673ecfc1aa4d786b11107a9c6fa8e7..861c83aa9df880f20572b576abb38413c7620e27 --- a/boost/asio/basic_raw_socket.hpp +++ b/boost/asio/basic_raw_socket.hpp @@ -2,7 +2,7 @@ // basic_raw_socket.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -46,6 +46,13 @@ class basic_raw_socket; * @par Thread Safety * @e Distinct @e objects: Safe.@n * @e Shared @e objects: Unsafe. + * + * Synchronous @c send, @c send_to, @c receive, @c receive_from, and @c connect + * operations are thread safe with respect to each other, if the underlying + * operating system calls are also thread safe. This means that it is permitted + * to perform concurrent calls to these synchronous operations on a single + * socket object. Other synchronous operations, such as @c open or @c close, are + * not thread safe. */ template class basic_raw_socket @@ -101,9 +108,9 @@ public: */ template explicit basic_raw_socket(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(context) { } @@ -138,9 +145,10 @@ public: */ template basic_raw_socket(ExecutionContext& context, const protocol_type& protocol, - typename enable_if< - is_convertible::value - >::type* = 0) + typename constraint< + is_convertible::value, + defaulted_constraint + >::type = defaulted_constraint()) : basic_socket(context, protocol) { } @@ -183,9 +191,9 @@ public: */ template basic_raw_socket(ExecutionContext& context, const endpoint_type& endpoint, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(context, endpoint) { } @@ -228,9 +236,9 @@ public: template basic_raw_socket(ExecutionContext& context, const protocol_type& protocol, const native_handle_type& native_socket, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(context, protocol, native_socket) { } @@ -283,10 +291,10 @@ public: */ template basic_raw_socket(basic_raw_socket&& other, - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(std::move(other)) { } @@ -303,7 +311,7 @@ public: * constructor. */ template - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value, basic_raw_socket& diff --git a/boost/asio/basic_seq_packet_socket.hpp b/boost/asio/basic_seq_packet_socket.hpp old mode 100755 new mode 100644 index 82e751695e12a0ccf9be4bc1d20189ece3f52113..ee506e05215f87cc219c2d2dc385f570ae231f3c --- a/boost/asio/basic_seq_packet_socket.hpp +++ b/boost/asio/basic_seq_packet_socket.hpp @@ -2,7 +2,7 @@ // basic_seq_packet_socket.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -44,6 +44,12 @@ class basic_seq_packet_socket; * @par Thread Safety * @e Distinct @e objects: Safe.@n * @e Shared @e objects: Unsafe. + * + * Synchronous @c send, @c receive, and @c connect operations are thread safe + * with respect to each other, if the underlying operating system calls are + * also thread safe. This means that it is permitted to perform concurrent + * calls to these synchronous operations on a single socket object. Other + * synchronous operations, such as @c open or @c close, are not thread safe. */ template class basic_seq_packet_socket @@ -101,9 +107,9 @@ public: */ template explicit basic_seq_packet_socket(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(context) { } @@ -144,9 +150,10 @@ public: template basic_seq_packet_socket(ExecutionContext& context, const protocol_type& protocol, - typename enable_if< - is_convertible::value - >::type* = 0) + typename constraint< + is_convertible::value, + defaulted_constraint + >::type = defaulted_constraint()) : basic_socket(context, protocol) { } @@ -191,9 +198,9 @@ public: template basic_seq_packet_socket(ExecutionContext& context, const endpoint_type& endpoint, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(context, endpoint) { } @@ -236,9 +243,9 @@ public: template basic_seq_packet_socket(ExecutionContext& context, const protocol_type& protocol, const native_handle_type& native_socket, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(context, protocol, native_socket) { } @@ -294,10 +301,10 @@ public: */ template basic_seq_packet_socket(basic_seq_packet_socket&& other, - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(std::move(other)) { } @@ -316,7 +323,7 @@ public: * constructor. */ template - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value, basic_seq_packet_socket& diff --git a/boost/asio/basic_serial_port.hpp b/boost/asio/basic_serial_port.hpp old mode 100755 new mode 100644 index 3fd33706a0e08d428bc3536ddfc33f90642b80cd..8db694d87e82cd961502507bd1328290822fd7ca --- a/boost/asio/basic_serial_port.hpp +++ b/boost/asio/basic_serial_port.hpp @@ -2,7 +2,7 @@ // basic_serial_port.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -95,7 +95,7 @@ public: * serial port. */ explicit basic_serial_port(const executor_type& ex) - : impl_(ex) + : impl_(0, ex) { } @@ -109,11 +109,11 @@ public: */ template explicit basic_serial_port(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value, - basic_serial_port - >::type* = 0) - : impl_(context) + defaulted_constraint + >::type = defaulted_constraint()) + : impl_(0, 0, context) { } @@ -130,7 +130,7 @@ public: * port. */ basic_serial_port(const executor_type& ex, const char* device) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().open(impl_.get_implementation(), device, ec); @@ -151,10 +151,10 @@ public: */ template basic_serial_port(ExecutionContext& context, const char* device, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().open(impl_.get_implementation(), device, ec); @@ -174,7 +174,7 @@ public: * port. */ basic_serial_port(const executor_type& ex, const std::string& device) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().open(impl_.get_implementation(), device, ec); @@ -195,10 +195,10 @@ public: */ template basic_serial_port(ExecutionContext& context, const std::string& device, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().open(impl_.get_implementation(), device, ec); @@ -220,7 +220,7 @@ public: */ basic_serial_port(const executor_type& ex, const native_handle_type& native_serial_port) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().assign(impl_.get_implementation(), @@ -244,10 +244,10 @@ public: template basic_serial_port(ExecutionContext& context, const native_handle_type& native_serial_port, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().assign(impl_.get_implementation(), diff --git a/boost/asio/basic_signal_set.hpp b/boost/asio/basic_signal_set.hpp old mode 100755 new mode 100644 index 194d29a994ef4459fe74d6cfe7f9f4f33399f804..20b6f0c0bd6298a6c2302caec9a212b393a8bdc2 --- a/boost/asio/basic_signal_set.hpp +++ b/boost/asio/basic_signal_set.hpp @@ -2,7 +2,7 @@ // basic_signal_set.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -28,6 +28,8 @@ #include #include +#include + namespace boost { namespace asio { @@ -115,7 +117,7 @@ public: * signal set. */ explicit basic_signal_set(const executor_type& ex) - : impl_(ex) + : impl_(0, ex) { } @@ -129,10 +131,11 @@ public: */ template explicit basic_signal_set(ExecutionContext& context, - typename enable_if< - is_convertible::value - >::type* = 0) - : impl_(context) + typename constraint< + is_convertible::value, + defaulted_constraint + >::type = defaulted_constraint()) + : impl_(0, 0, context) { } @@ -151,7 +154,7 @@ public: * signals.add(signal_number_1); @endcode */ basic_signal_set(const executor_type& ex, int signal_number_1) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec); @@ -174,10 +177,11 @@ public: */ template basic_signal_set(ExecutionContext& context, int signal_number_1, - typename enable_if< - is_convertible::value - >::type* = 0) - : impl_(context) + typename constraint< + is_convertible::value, + defaulted_constraint + >::type = defaulted_constraint()) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec); @@ -203,7 +207,7 @@ public: */ basic_signal_set(const executor_type& ex, int signal_number_1, int signal_number_2) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec); @@ -232,10 +236,11 @@ public: template basic_signal_set(ExecutionContext& context, int signal_number_1, int signal_number_2, - typename enable_if< - is_convertible::value - >::type* = 0) - : impl_(context) + typename constraint< + is_convertible::value, + defaulted_constraint + >::type = defaulted_constraint()) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec); @@ -266,7 +271,7 @@ public: */ basic_signal_set(const executor_type& ex, int signal_number_1, int signal_number_2, int signal_number_3) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec); @@ -300,10 +305,11 @@ public: template basic_signal_set(ExecutionContext& context, int signal_number_1, int signal_number_2, int signal_number_3, - typename enable_if< - is_convertible::value - >::type* = 0) - : impl_(context) + typename constraint< + is_convertible::value, + defaulted_constraint + >::type = defaulted_constraint()) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().add(impl_.get_implementation(), signal_number_1, ec); @@ -567,4 +573,6 @@ private: } // namespace asio } // namespace boost +#include + #endif // BOOST_ASIO_BASIC_SIGNAL_SET_HPP diff --git a/boost/asio/basic_socket.hpp b/boost/asio/basic_socket.hpp old mode 100755 new mode 100644 index 1a349e496c9363fe8246bd89e46885f9b2b47095..dedbe15445d824354eb7784d1df7e28d2111a046 --- a/boost/asio/basic_socket.hpp +++ b/boost/asio/basic_socket.hpp @@ -2,7 +2,7 @@ // basic_socket.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -112,7 +112,7 @@ public: * dispatch handlers for any asynchronous operations performed on the socket. */ explicit basic_socket(const executor_type& ex) - : impl_(ex) + : impl_(0, ex) { } @@ -126,10 +126,10 @@ public: */ template explicit basic_socket(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { } @@ -145,7 +145,7 @@ public: * @throws boost::system::system_error Thrown on failure. */ basic_socket(const executor_type& ex, const protocol_type& protocol) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().open(impl_.get_implementation(), protocol, ec); @@ -166,10 +166,11 @@ public: */ template basic_socket(ExecutionContext& context, const protocol_type& protocol, - typename enable_if< - is_convertible::value - >::type* = 0) - : impl_(context) + typename constraint< + is_convertible::value, + defaulted_constraint + >::type = defaulted_constraint()) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().open(impl_.get_implementation(), protocol, ec); @@ -192,7 +193,7 @@ public: * @throws boost::system::system_error Thrown on failure. */ basic_socket(const executor_type& ex, const endpoint_type& endpoint) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; const protocol_type protocol = endpoint.protocol(); @@ -220,10 +221,10 @@ public: */ template basic_socket(ExecutionContext& context, const endpoint_type& endpoint, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { boost::system::error_code ec; const protocol_type protocol = endpoint.protocol(); @@ -248,7 +249,7 @@ public: */ basic_socket(const executor_type& ex, const protocol_type& protocol, const native_handle_type& native_socket) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().assign(impl_.get_implementation(), @@ -273,10 +274,10 @@ public: template basic_socket(ExecutionContext& context, const protocol_type& protocol, const native_handle_type& native_socket, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().assign(impl_.get_implementation(), @@ -332,10 +333,10 @@ public: */ template basic_socket(basic_socket&& other, - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value - >::type* = 0) + >::type = 0) : impl_(std::move(other.impl_)) { } @@ -351,7 +352,7 @@ public: * constructed using the @c basic_socket(const executor_type&) constructor. */ template - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value, basic_socket& diff --git a/boost/asio/basic_socket_acceptor.hpp b/boost/asio/basic_socket_acceptor.hpp old mode 100755 new mode 100644 index e01cc275c3c3ed3c1f741779d3d178cb3a40d43e..918b9fe70da4d877a24dc4dea730bc6575118cbc --- a/boost/asio/basic_socket_acceptor.hpp +++ b/boost/asio/basic_socket_acceptor.hpp @@ -2,7 +2,7 @@ // basic_socket_acceptor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -62,6 +62,12 @@ class basic_socket_acceptor; * @e Distinct @e objects: Safe.@n * @e Shared @e objects: Unsafe. * + * Synchronous @c accept operations are thread safe, if the underlying + * operating system calls are also thread safe. This means that it is permitted + * to perform concurrent calls to synchronous @c accept operations on a single + * socket object. Other synchronous operations, such as @c open or @c close, are + * not thread safe. + * * @par Example * Opening a socket acceptor with the SO_REUSEADDR option enabled: * @code @@ -120,7 +126,7 @@ public: * acceptor. */ explicit basic_socket_acceptor(const executor_type& ex) - : impl_(ex) + : impl_(0, ex) { } @@ -136,10 +142,10 @@ public: */ template explicit basic_socket_acceptor(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { } @@ -156,7 +162,7 @@ public: * @throws boost::system::system_error Thrown on failure. */ basic_socket_acceptor(const executor_type& ex, const protocol_type& protocol) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().open(impl_.get_implementation(), protocol, ec); @@ -178,10 +184,11 @@ public: template basic_socket_acceptor(ExecutionContext& context, const protocol_type& protocol, - typename enable_if< - is_convertible::value - >::type* = 0) - : impl_(context) + typename constraint< + is_convertible::value, + defaulted_constraint + >::type = defaulted_constraint()) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().open(impl_.get_implementation(), protocol, ec); @@ -217,7 +224,7 @@ public: */ basic_socket_acceptor(const executor_type& ex, const endpoint_type& endpoint, bool reuse_addr = true) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; const protocol_type protocol = endpoint.protocol(); @@ -266,10 +273,10 @@ public: template basic_socket_acceptor(ExecutionContext& context, const endpoint_type& endpoint, bool reuse_addr = true, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { boost::system::error_code ec; const protocol_type protocol = endpoint.protocol(); @@ -305,7 +312,7 @@ public: */ basic_socket_acceptor(const executor_type& ex, const protocol_type& protocol, const native_handle_type& native_acceptor) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().assign(impl_.get_implementation(), @@ -331,10 +338,10 @@ public: template basic_socket_acceptor(ExecutionContext& context, const protocol_type& protocol, const native_handle_type& native_acceptor, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().assign(impl_.get_implementation(), @@ -394,10 +401,10 @@ public: */ template basic_socket_acceptor(basic_socket_acceptor&& other, - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value - >::type* = 0) + >::type = 0) : impl_(std::move(other.impl_)) { } @@ -415,7 +422,7 @@ public: * constructor. */ template - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value, basic_socket_acceptor& @@ -1253,9 +1260,9 @@ public: */ template void accept(basic_socket& peer, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) { boost::system::error_code ec; impl_.get_service().accept(impl_.get_implementation(), @@ -1289,9 +1296,9 @@ public: template BOOST_ASIO_SYNC_OP_VOID accept( basic_socket& peer, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) { impl_.get_service().accept(impl_.get_implementation(), peer, static_cast(0), ec); @@ -1344,9 +1351,9 @@ public: async_accept(basic_socket& peer, BOOST_ASIO_MOVE_ARG(AcceptHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(executor_type), - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) { return async_initiate( initiate_async_accept(this), handler, @@ -1619,10 +1626,10 @@ public: template typename Protocol::socket::template rebind_executor::other accept(const Executor1& ex, - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type* = 0) + >::type = 0) { boost::system::error_code ec; typename Protocol::socket::template @@ -1659,9 +1666,9 @@ public: typename Protocol::socket::template rebind_executor< typename ExecutionContext::executor_type>::other accept(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) { boost::system::error_code ec; typename Protocol::socket::template rebind_executor< @@ -1702,10 +1709,10 @@ public: template typename Protocol::socket::template rebind_executor::other accept(const Executor1& ex, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type* = 0) + >::type = 0) { typename Protocol::socket::template rebind_executor::other peer(ex); @@ -1745,9 +1752,9 @@ public: typename Protocol::socket::template rebind_executor< typename ExecutionContext::executor_type>::other accept(ExecutionContext& context, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) { typename Protocol::socket::template rebind_executor< typename ExecutionContext::executor_type>::other peer(context); @@ -1809,10 +1816,10 @@ public: async_accept(const Executor1& ex, BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(executor_type), - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type* = 0) + >::type = 0) { typedef typename Protocol::socket::template rebind_executor< Executor1>::other other_socket_type; @@ -1879,9 +1886,9 @@ public: async_accept(ExecutionContext& context, BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(executor_type), - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) { typedef typename Protocol::socket::template rebind_executor< typename ExecutionContext::executor_type>::other other_socket_type; @@ -2068,10 +2075,10 @@ public: template typename Protocol::socket::template rebind_executor::other accept(const Executor1& ex, endpoint_type& peer_endpoint, - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type* = 0) + >::type = 0) { boost::system::error_code ec; typename Protocol::socket::template @@ -2114,9 +2121,9 @@ public: typename Protocol::socket::template rebind_executor< typename ExecutionContext::executor_type>::other accept(ExecutionContext& context, endpoint_type& peer_endpoint, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) { boost::system::error_code ec; typename Protocol::socket::template rebind_executor< @@ -2164,10 +2171,10 @@ public: typename Protocol::socket::template rebind_executor::other accept(const executor_type& ex, endpoint_type& peer_endpoint, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type* = 0) + >::type = 0) { typename Protocol::socket::template rebind_executor::other peer(ex); @@ -2214,9 +2221,9 @@ public: typename ExecutionContext::executor_type>::other accept(ExecutionContext& context, endpoint_type& peer_endpoint, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) { typename Protocol::socket::template rebind_executor< typename ExecutionContext::executor_type>::other peer(context); @@ -2285,10 +2292,10 @@ public: async_accept(const Executor1& ex, endpoint_type& peer_endpoint, BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(executor_type), - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type* = 0) + >::type = 0) { typedef typename Protocol::socket::template rebind_executor< Executor1>::other other_socket_type; @@ -2362,9 +2369,9 @@ public: endpoint_type& peer_endpoint, BOOST_ASIO_MOVE_ARG(MoveAcceptHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(executor_type), - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) { typedef typename Protocol::socket::template rebind_executor< typename ExecutionContext::executor_type>::other other_socket_type; diff --git a/boost/asio/basic_socket_iostream.hpp b/boost/asio/basic_socket_iostream.hpp old mode 100755 new mode 100644 index a318ac39c1340308841c7f1a7fa9a28242219188..51d1103d7fca01147dda1beb6e218a2c758ec9f7 --- a/boost/asio/basic_socket_iostream.hpp +++ b/boost/asio/basic_socket_iostream.hpp @@ -2,7 +2,7 @@ // basic_socket_iostream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_socket_streambuf.hpp b/boost/asio/basic_socket_streambuf.hpp old mode 100755 new mode 100644 index 128a50d3e1a9b68defd89a11b9de3b6fe7baf041..bd9c8d8d5a0a2938ea9c20aad2ae0715e4003abe --- a/boost/asio/basic_socket_streambuf.hpp +++ b/boost/asio/basic_socket_streambuf.hpp @@ -2,7 +2,7 @@ // basic_socket_streambuf.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_stream_socket.hpp b/boost/asio/basic_stream_socket.hpp old mode 100755 new mode 100644 index fe7fa2d62c57f46738d7178108294dab97724a1c..73de1699e44debc514e2796fe8af4751a2dcffb1 --- a/boost/asio/basic_stream_socket.hpp +++ b/boost/asio/basic_stream_socket.hpp @@ -2,7 +2,7 @@ // basic_stream_socket.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -47,6 +47,12 @@ class basic_stream_socket; * @e Distinct @e objects: Safe.@n * @e Shared @e objects: Unsafe. * + * Synchronous @c send, @c receive, and @c connect operations are thread safe + * with respect to each other, if the underlying operating system calls are + * also thread safe. This means that it is permitted to perform concurrent + * calls to these synchronous operations on a single socket object. Other + * synchronous operations, such as @c open or @c close, are not thread safe. + * * @par Concepts: * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream. */ @@ -106,9 +112,9 @@ public: */ template explicit basic_stream_socket(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(context) { } @@ -145,9 +151,10 @@ public: */ template basic_stream_socket(ExecutionContext& context, const protocol_type& protocol, - typename enable_if< - is_convertible::value - >::type* = 0) + typename constraint< + is_convertible::value, + defaulted_constraint + >::type = defaulted_constraint()) : basic_socket(context, protocol) { } @@ -190,9 +197,9 @@ public: */ template basic_stream_socket(ExecutionContext& context, const endpoint_type& endpoint, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(context, endpoint) { } @@ -235,9 +242,9 @@ public: template basic_stream_socket(ExecutionContext& context, const protocol_type& protocol, const native_handle_type& native_socket, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(context, protocol, native_socket) { } @@ -290,10 +297,10 @@ public: */ template basic_stream_socket(basic_stream_socket&& other, - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value - >::type* = 0) + >::type = 0) : basic_socket(std::move(other)) { } @@ -310,7 +317,7 @@ public: * constructor. */ template - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value, basic_stream_socket& diff --git a/boost/asio/basic_streambuf.hpp b/boost/asio/basic_streambuf.hpp old mode 100755 new mode 100644 index 27992262a0ea53b6f7663b5ce4d42f2a4e959584..897d13367d353d94460f40526fcc60d1521b2708 --- a/boost/asio/basic_streambuf.hpp +++ b/boost/asio/basic_streambuf.hpp @@ -2,7 +2,7 @@ // basic_streambuf.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_streambuf_fwd.hpp b/boost/asio/basic_streambuf_fwd.hpp old mode 100755 new mode 100644 index 426acaf2b0df89848f38d3026eada27b24c3c56b..3f88d36693272d771db6e92496a42093fedd0795 --- a/boost/asio/basic_streambuf_fwd.hpp +++ b/boost/asio/basic_streambuf_fwd.hpp @@ -2,7 +2,7 @@ // basic_streambuf_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/basic_waitable_timer.hpp b/boost/asio/basic_waitable_timer.hpp old mode 100755 new mode 100644 index 2bab21929cda796b04660f77992a3ed921304874..f1bcca9929933eb5948515f27061e6cd818717fa --- a/boost/asio/basic_waitable_timer.hpp +++ b/boost/asio/basic_waitable_timer.hpp @@ -2,7 +2,7 @@ // basic_waitable_timer.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -176,7 +176,7 @@ public: * dispatch handlers for any asynchronous operations performed on the timer. */ explicit basic_waitable_timer(const executor_type& ex) - : impl_(ex) + : impl_(0, ex) { } @@ -192,10 +192,10 @@ public: */ template explicit basic_waitable_timer(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { } @@ -210,7 +210,7 @@ public: * as an absolute time. */ basic_waitable_timer(const executor_type& ex, const time_point& expiry_time) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec); @@ -231,10 +231,10 @@ public: template explicit basic_waitable_timer(ExecutionContext& context, const time_point& expiry_time, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().expires_at(impl_.get_implementation(), expiry_time, ec); @@ -252,7 +252,7 @@ public: * now. */ basic_waitable_timer(const executor_type& ex, const duration& expiry_time) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().expires_after( @@ -274,10 +274,10 @@ public: template explicit basic_waitable_timer(ExecutionContext& context, const duration& expiry_time, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().expires_after( @@ -338,9 +338,9 @@ public: template basic_waitable_timer( basic_waitable_timer&& other, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : impl_(std::move(other.impl_)) { } @@ -358,7 +358,7 @@ public: * constructor. */ template - typename enable_if< + typename constraint< is_convertible::value, basic_waitable_timer& >::type operator=(basic_waitable_timer&& other) diff --git a/boost/asio/bind_executor.hpp b/boost/asio/bind_executor.hpp old mode 100755 new mode 100644 index 06544f01ce127b21cab53670719b008c7271ead9..28b11667dca5b0e548a9c5056a50b0de145ec628 --- a/boost/asio/bind_executor.hpp +++ b/boost/asio/bind_executor.hpp @@ -2,7 +2,7 @@ // bind_executor.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -489,9 +489,9 @@ private: template inline executor_binder::type, Executor> bind_executor(const Executor& ex, BOOST_ASIO_MOVE_ARG(T) t, - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type* = 0) + >::type = 0) { return executor_binder::type, Executor>( executor_arg_t(), ex, BOOST_ASIO_MOVE_CAST(T)(t)); @@ -502,8 +502,8 @@ template inline executor_binder::type, typename ExecutionContext::executor_type> bind_executor(ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(T) t, - typename enable_if::value>::type* = 0) + typename constraint::value>::type = 0) { return executor_binder::type, typename ExecutionContext::executor_type>( diff --git a/boost/asio/buffer.hpp b/boost/asio/buffer.hpp old mode 100755 new mode 100644 index 59418f2622804aab34582db1997f7cc82a3bb6d6..409a668909279c0da277935f4019a85df69145f8 --- a/boost/asio/buffer.hpp +++ b/boost/asio/buffer.hpp @@ -2,7 +2,7 @@ // buffer.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -387,9 +387,9 @@ private: /// Get an iterator to the first element in a buffer sequence. template inline const mutable_buffer* buffer_sequence_begin(const MutableBuffer& b, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) BOOST_ASIO_NOEXCEPT + >::type = 0) BOOST_ASIO_NOEXCEPT { return static_cast(detail::addressof(b)); } @@ -397,9 +397,9 @@ inline const mutable_buffer* buffer_sequence_begin(const MutableBuffer& b, /// Get an iterator to the first element in a buffer sequence. template inline const const_buffer* buffer_sequence_begin(const ConstBuffer& b, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) BOOST_ASIO_NOEXCEPT + >::type = 0) BOOST_ASIO_NOEXCEPT { return static_cast(detail::addressof(b)); } @@ -409,10 +409,10 @@ inline const const_buffer* buffer_sequence_begin(const ConstBuffer& b, /// Get an iterator to the first element in a buffer sequence. template inline auto buffer_sequence_begin(C& c, - typename enable_if< + typename constraint< !is_convertible::value && !is_convertible::value - >::type* = 0) BOOST_ASIO_NOEXCEPT -> decltype(c.begin()) + >::type = 0) BOOST_ASIO_NOEXCEPT -> decltype(c.begin()) { return c.begin(); } @@ -420,10 +420,10 @@ inline auto buffer_sequence_begin(C& c, /// Get an iterator to the first element in a buffer sequence. template inline auto buffer_sequence_begin(const C& c, - typename enable_if< + typename constraint< !is_convertible::value && !is_convertible::value - >::type* = 0) BOOST_ASIO_NOEXCEPT -> decltype(c.begin()) + >::type = 0) BOOST_ASIO_NOEXCEPT -> decltype(c.begin()) { return c.begin(); } @@ -432,20 +432,20 @@ inline auto buffer_sequence_begin(const C& c, template inline typename C::iterator buffer_sequence_begin(C& c, - typename enable_if< + typename constraint< !is_convertible::value && !is_convertible::value - >::type* = 0) BOOST_ASIO_NOEXCEPT + >::type = 0) BOOST_ASIO_NOEXCEPT { return c.begin(); } template inline typename C::const_iterator buffer_sequence_begin(const C& c, - typename enable_if< + typename constraint< !is_convertible::value && !is_convertible::value - >::type* = 0) BOOST_ASIO_NOEXCEPT + >::type = 0) BOOST_ASIO_NOEXCEPT { return c.begin(); } @@ -464,9 +464,9 @@ inline typename C::const_iterator buffer_sequence_begin(const C& c, /// Get an iterator to one past the end element in a buffer sequence. template inline const mutable_buffer* buffer_sequence_end(const MutableBuffer& b, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) BOOST_ASIO_NOEXCEPT + >::type = 0) BOOST_ASIO_NOEXCEPT { return static_cast(detail::addressof(b)) + 1; } @@ -474,9 +474,9 @@ inline const mutable_buffer* buffer_sequence_end(const MutableBuffer& b, /// Get an iterator to one past the end element in a buffer sequence. template inline const const_buffer* buffer_sequence_end(const ConstBuffer& b, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) BOOST_ASIO_NOEXCEPT + >::type = 0) BOOST_ASIO_NOEXCEPT { return static_cast(detail::addressof(b)) + 1; } @@ -486,10 +486,10 @@ inline const const_buffer* buffer_sequence_end(const ConstBuffer& b, /// Get an iterator to one past the end element in a buffer sequence. template inline auto buffer_sequence_end(C& c, - typename enable_if< + typename constraint< !is_convertible::value && !is_convertible::value - >::type* = 0) BOOST_ASIO_NOEXCEPT -> decltype(c.end()) + >::type = 0) BOOST_ASIO_NOEXCEPT -> decltype(c.end()) { return c.end(); } @@ -497,10 +497,10 @@ inline auto buffer_sequence_end(C& c, /// Get an iterator to one past the end element in a buffer sequence. template inline auto buffer_sequence_end(const C& c, - typename enable_if< + typename constraint< !is_convertible::value && !is_convertible::value - >::type* = 0) BOOST_ASIO_NOEXCEPT -> decltype(c.end()) + >::type = 0) BOOST_ASIO_NOEXCEPT -> decltype(c.end()) { return c.end(); } @@ -509,20 +509,20 @@ inline auto buffer_sequence_end(const C& c, template inline typename C::iterator buffer_sequence_end(C& c, - typename enable_if< + typename constraint< !is_convertible::value && !is_convertible::value - >::type* = 0) BOOST_ASIO_NOEXCEPT + >::type = 0) BOOST_ASIO_NOEXCEPT { return c.end(); } template inline typename C::const_iterator buffer_sequence_end(const C& c, - typename enable_if< + typename constraint< !is_convertible::value && !is_convertible::value - >::type* = 0) BOOST_ASIO_NOEXCEPT + >::type = 0) BOOST_ASIO_NOEXCEPT { return c.end(); } diff --git a/boost/asio/buffered_read_stream.hpp b/boost/asio/buffered_read_stream.hpp old mode 100755 new mode 100644 index 24255ed330bf226bfa2229f892f9a39426acc72f..85ff59cc005169cdc52031251d65941e33b49bc4 --- a/boost/asio/buffered_read_stream.hpp +++ b/boost/asio/buffered_read_stream.hpp @@ -2,7 +2,7 @@ // buffered_read_stream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/buffered_read_stream_fwd.hpp b/boost/asio/buffered_read_stream_fwd.hpp old mode 100755 new mode 100644 index 90a902e4dea5bc6fb2ab9f6a1a21544288ba17d0..cf6eb77b25bc5306f964256dda0b10435a82bf28 --- a/boost/asio/buffered_read_stream_fwd.hpp +++ b/boost/asio/buffered_read_stream_fwd.hpp @@ -2,7 +2,7 @@ // buffered_read_stream_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/buffered_stream.hpp b/boost/asio/buffered_stream.hpp old mode 100755 new mode 100644 index a302fa52944f4d20da8f173f5523b28a2a374c56..b89a5fdabc23d196bb419c02c9303df2e0cdb673 --- a/boost/asio/buffered_stream.hpp +++ b/boost/asio/buffered_stream.hpp @@ -2,7 +2,7 @@ // buffered_stream.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/buffered_stream_fwd.hpp b/boost/asio/buffered_stream_fwd.hpp old mode 100755 new mode 100644 index ae2991cb791bde61a5708522e87639bcf8ec77be..c72ce1f533303224d58ceef8950d25dedff5e4e6 --- a/boost/asio/buffered_stream_fwd.hpp +++ b/boost/asio/buffered_stream_fwd.hpp @@ -2,7 +2,7 @@ // buffered_stream_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/buffered_write_stream.hpp b/boost/asio/buffered_write_stream.hpp old mode 100755 new mode 100644 index 59717142ddfbda318d7d6334433a8efbe8435f97..2571a1f88578f8d776c229eac2d3265b889db004 --- a/boost/asio/buffered_write_stream.hpp +++ b/boost/asio/buffered_write_stream.hpp @@ -2,7 +2,7 @@ // buffered_write_stream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/buffered_write_stream_fwd.hpp b/boost/asio/buffered_write_stream_fwd.hpp old mode 100755 new mode 100644 index feccaefd149cf8f92262df5c7a0cb50e85804803..22ee54ed972a21050f28f88987ca36cf33de8228 --- a/boost/asio/buffered_write_stream_fwd.hpp +++ b/boost/asio/buffered_write_stream_fwd.hpp @@ -2,7 +2,7 @@ // buffered_write_stream_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/buffers_iterator.hpp b/boost/asio/buffers_iterator.hpp old mode 100755 new mode 100644 index 10ef91f5982191bf31d762cfd0d3d7a8c999ac63..c53c5fc3e4610bdbe66577750e048bda4ed025fb --- a/boost/asio/buffers_iterator.hpp +++ b/boost/asio/buffers_iterator.hpp @@ -2,7 +2,7 @@ // buffers_iterator.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/co_spawn.hpp b/boost/asio/co_spawn.hpp old mode 100755 new mode 100644 index a055342138f2d5c4a1d3d0664ac753d9d3fb916e..d061c85763029111385cdc8ac1f16960fbc30a93 --- a/boost/asio/co_spawn.hpp +++ b/boost/asio/co_spawn.hpp @@ -2,7 +2,7 @@ // co_spawn.hpp // ~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -106,10 +106,10 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE( co_spawn(const Executor& ex, awaitable a, CompletionToken&& token BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(Executor), - typename enable_if< + typename constraint< (is_executor::value || execution::is_executor::value) && is_convertible::value - >::type* = 0); + >::type = 0); /// Spawn a new coroutined-based thread of execution. /** @@ -162,10 +162,10 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE( co_spawn(const Executor& ex, awaitable a, CompletionToken&& token BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(Executor), - typename enable_if< + typename constraint< (is_executor::value || execution::is_executor::value) && is_convertible::value - >::type* = 0); + >::type = 0); /// Spawn a new coroutined-based thread of execution. /** @@ -228,11 +228,11 @@ co_spawn(ExecutionContext& ctx, awaitable a, CompletionToken&& token BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename ExecutionContext::executor_type), - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value - >::type* = 0); + >::type = 0); /// Spawn a new coroutined-based thread of execution. /** @@ -287,11 +287,11 @@ co_spawn(ExecutionContext& ctx, awaitable a, CompletionToken&& token BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename ExecutionContext::executor_type), - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value - >::type* = 0); + >::type = 0); /// Spawn a new coroutined-based thread of execution. /** @@ -372,9 +372,9 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, co_spawn(const Executor& ex, F&& f, CompletionToken&& token BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(Executor), - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type* = 0); + >::type = 0); /// Spawn a new coroutined-based thread of execution. /** @@ -457,9 +457,9 @@ co_spawn(ExecutionContext& ctx, F&& f, CompletionToken&& token BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename ExecutionContext::executor_type), - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0); + >::type = 0); } // namespace asio } // namespace boost diff --git a/boost/asio/completion_condition.hpp b/boost/asio/completion_condition.hpp old mode 100755 new mode 100644 index 587ef5c7f34eea4cede6e7f07e4eb7f29a98d43b..56414a20c512ad8f82c2e226ae54cb1cd7fe3315 --- a/boost/asio/completion_condition.hpp +++ b/boost/asio/completion_condition.hpp @@ -2,7 +2,7 @@ // completion_condition.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/compose.hpp b/boost/asio/compose.hpp old mode 100755 new mode 100644 index cdb13950f73a62901e89d4bc6f8c6e37a1b18c88..024b893b75e57c95837ee678399828c2376bd1f0 --- a/boost/asio/compose.hpp +++ b/boost/asio/compose.hpp @@ -2,7 +2,7 @@ // compose.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/connect.hpp b/boost/asio/connect.hpp old mode 100755 new mode 100644 index 607f31f81d861564b53d5dbf63d3f833e1257999..a6253875ae69565784235d6704d310b4180adda0 --- a/boost/asio/connect.hpp +++ b/boost/asio/connect.hpp @@ -2,7 +2,7 @@ // connect.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -91,8 +91,8 @@ struct is_endpoint_sequence template typename Protocol::endpoint connect(basic_socket& s, const EndpointSequence& endpoints, - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); /// Establishes a socket connection by trying each endpoint in a sequence. /** @@ -127,8 +127,8 @@ typename Protocol::endpoint connect(basic_socket& s, template typename Protocol::endpoint connect(basic_socket& s, const EndpointSequence& endpoints, boost::system::error_code& ec, - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); #if !defined(BOOST_ASIO_NO_DEPRECATED) /// (Deprecated: Use range overload.) Establishes a socket connection by trying @@ -157,7 +157,7 @@ typename Protocol::endpoint connect(basic_socket& s, */ template Iterator connect(basic_socket& s, Iterator begin, - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); /// (Deprecated: Use range overload.) Establishes a socket connection by trying /// each endpoint in a sequence. @@ -186,7 +186,7 @@ Iterator connect(basic_socket& s, Iterator begin, template Iterator connect(basic_socket& s, Iterator begin, boost::system::error_code& ec, - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); #endif // !defined(BOOST_ASIO_NO_DEPRECATED) /// Establishes a socket connection by trying each endpoint in a sequence. @@ -312,8 +312,8 @@ template typename Protocol::endpoint connect(basic_socket& s, const EndpointSequence& endpoints, ConnectCondition connect_condition, - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); /// Establishes a socket connection by trying each endpoint in a sequence. /** @@ -380,8 +380,8 @@ template & s, const EndpointSequence& endpoints, ConnectCondition connect_condition, boost::system::error_code& ec, - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); #if !defined(BOOST_ASIO_NO_DEPRECATED) /// (Deprecated: Use range overload.) Establishes a socket connection by trying @@ -423,7 +423,7 @@ template Iterator connect(basic_socket& s, Iterator begin, ConnectCondition connect_condition, - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); /// (Deprecated: Use range overload.) Establishes a socket connection by trying /// each endpoint in a sequence. @@ -464,7 +464,7 @@ template Iterator connect(basic_socket& s, Iterator begin, ConnectCondition connect_condition, boost::system::error_code& ec, - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); #endif // !defined(BOOST_ASIO_NO_DEPRECATED) /// Establishes a socket connection by trying each endpoint in a sequence. @@ -676,8 +676,8 @@ async_connect(basic_socket& s, const EndpointSequence& endpoints, BOOST_ASIO_MOVE_ARG(RangeConnectHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(Executor), - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); #if !defined(BOOST_ASIO_NO_DEPRECATED) /// (Deprecated: Use range overload.) Asynchronously establishes a socket @@ -724,7 +724,7 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler, async_connect(basic_socket& s, Iterator begin, BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(Executor), - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); #endif // !defined(BOOST_ASIO_NO_DEPRECATED) /// Asynchronously establishes a socket connection by trying each endpoint in a @@ -892,8 +892,8 @@ async_connect(basic_socket& s, const EndpointSequence& endpoints, ConnectCondition connect_condition, BOOST_ASIO_MOVE_ARG(RangeConnectHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(Executor), - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); #if !defined(BOOST_ASIO_NO_DEPRECATED) /// (Deprecated: Use range overload.) Asynchronously establishes a socket @@ -953,7 +953,7 @@ async_connect(basic_socket& s, Iterator begin, ConnectCondition connect_condition, BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(Executor), - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); #endif // !defined(BOOST_ASIO_NO_DEPRECATED) /// Asynchronously establishes a socket connection by trying each endpoint in a diff --git a/boost/asio/coroutine.hpp b/boost/asio/coroutine.hpp old mode 100755 new mode 100644 index c5ed11b251c507a612dd5c11c090fc6bbcb12996..3be129a4c4526a8d9f47699ed16176e0ce6cdae4 --- a/boost/asio/coroutine.hpp +++ b/boost/asio/coroutine.hpp @@ -2,7 +2,7 @@ // coroutine.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/deadline_timer.hpp b/boost/asio/deadline_timer.hpp old mode 100755 new mode 100644 index 2805717f17f6a2cd2fa7b365b5a1e9ada8428707..f764e51471972059b64cac47561abb8f89cf2b3b --- a/boost/asio/deadline_timer.hpp +++ b/boost/asio/deadline_timer.hpp @@ -2,7 +2,7 @@ // deadline_timer.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/defer.hpp b/boost/asio/defer.hpp old mode 100755 new mode 100644 index 7967f9dc637d25964cb6917bb73efcde8bc17600..b9537d5b5eb1076ecda403334bce7f6f899364ef --- a/boost/asio/defer.hpp +++ b/boost/asio/defer.hpp @@ -2,7 +2,7 @@ // defer.hpp // ~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -102,9 +102,9 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) defer( const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(Executor), - typename enable_if< + typename constraint< execution::is_executor::value || is_executor::value - >::type* = 0); + >::type = 0); /// Submits a completion token or function object for execution. /** @@ -119,8 +119,8 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) defer( BOOST_ASIO_MOVE_ARG(CompletionToken) token BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename ExecutionContext::executor_type), - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); } // namespace asio } // namespace boost diff --git a/boost/asio/detached.hpp b/boost/asio/detached.hpp old mode 100755 new mode 100644 index 7f384a4e997a0d76d46fde3dc42c4db480ecc8b8..0447a45c639e67c01fcee0cd8669a3b88486acf6 --- a/boost/asio/detached.hpp +++ b/boost/asio/detached.hpp @@ -2,7 +2,7 @@ // detached.hpp // ~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -62,9 +62,9 @@ public: /// that to construct the adapted executor. template executor_with_default(const OtherExecutor& ex, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) BOOST_ASIO_NOEXCEPT + >::type = 0) BOOST_ASIO_NOEXCEPT : InnerExecutor(ex) { } diff --git a/boost/asio/detail/array.hpp b/boost/asio/detail/array.hpp old mode 100755 new mode 100644 index 2cd7f4a65ad12fdfdf2a1f036a9796164b9a9571..4763f427dce96ff1624124c9501129fb66e7bf96 --- a/boost/asio/detail/array.hpp +++ b/boost/asio/detail/array.hpp @@ -2,7 +2,7 @@ // detail/array.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/array_fwd.hpp b/boost/asio/detail/array_fwd.hpp old mode 100755 new mode 100644 index ac2dd3ff7ec7abf2ba7f4b6093ecf938eab0f8b4..3ba0b2675c5ed17e36e2bb4710047a87faf76054 --- a/boost/asio/detail/array_fwd.hpp +++ b/boost/asio/detail/array_fwd.hpp @@ -2,7 +2,7 @@ // detail/array_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/assert.hpp b/boost/asio/detail/assert.hpp old mode 100755 new mode 100644 index 1c935754c2ffd4ff33283766b5b9283431644662..0a3add07ea1f10aa5dfa56223bfdf2cf33087d9a --- a/boost/asio/detail/assert.hpp +++ b/boost/asio/detail/assert.hpp @@ -2,7 +2,7 @@ // detail/assert.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/atomic_count.hpp b/boost/asio/detail/atomic_count.hpp old mode 100755 new mode 100644 index bd6643b5881c7e1724a5fb8ec86ba0b2e2b99b7f..1cd6f9d151989f8693812bc82bbb3f1e1f55e6ea --- a/boost/asio/detail/atomic_count.hpp +++ b/boost/asio/detail/atomic_count.hpp @@ -2,7 +2,7 @@ // detail/atomic_count.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/base_from_completion_cond.hpp b/boost/asio/detail/base_from_completion_cond.hpp old mode 100755 new mode 100644 index c16491a68bf82ffd27e55b6c160ebe30e99e62f0..cf4a1b768b8e8578e8d244e89fb81e6143367ef7 --- a/boost/asio/detail/base_from_completion_cond.hpp +++ b/boost/asio/detail/base_from_completion_cond.hpp @@ -2,7 +2,7 @@ // detail/base_from_completion_cond.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/bind_handler.hpp b/boost/asio/detail/bind_handler.hpp old mode 100755 new mode 100644 index bc28d7b9f0507be6afb6b90f8497ccc9313571a8..dcf2cc1b1371a2228d84bdcffe01230910b829ad --- a/boost/asio/detail/bind_handler.hpp +++ b/boost/asio/detail/bind_handler.hpp @@ -2,7 +2,7 @@ // detail/bind_handler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -853,6 +853,7 @@ struct associated_allocator, Allocator> template struct associated_executor, Executor> + : detail::associated_executor_forwarding_base { typedef typename associated_executor::type type; @@ -865,6 +866,7 @@ struct associated_executor, Executor> template struct associated_executor, Executor> + : detail::associated_executor_forwarding_base { typedef typename associated_executor::type type; @@ -904,6 +906,7 @@ struct associated_allocator< template struct associated_executor, Executor> + : detail::associated_executor_forwarding_base { typedef typename associated_executor::type type; @@ -916,6 +919,7 @@ struct associated_executor, Executor> template struct associated_executor, Executor> + : detail::associated_executor_forwarding_base { typedef typename associated_executor::type type; diff --git a/boost/asio/detail/blocking_executor_op.hpp b/boost/asio/detail/blocking_executor_op.hpp index 7ca1cfffb794e1eb6596a9a1291045d2560dfff1..e36bb989752bc3ff17f3b45d611a69fd9e582f44 100644 --- a/boost/asio/detail/blocking_executor_op.hpp +++ b/boost/asio/detail/blocking_executor_op.hpp @@ -2,7 +2,7 @@ // detail/blocking_executor_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/buffer_resize_guard.hpp b/boost/asio/detail/buffer_resize_guard.hpp old mode 100755 new mode 100644 index 3a7996f8a4698c5f62113bcb67ae5360af653ea6..45da2db28d5dcf15c65555ef30fa72cfe809f7b4 --- a/boost/asio/detail/buffer_resize_guard.hpp +++ b/boost/asio/detail/buffer_resize_guard.hpp @@ -2,7 +2,7 @@ // detail/buffer_resize_guard.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/buffer_sequence_adapter.hpp b/boost/asio/detail/buffer_sequence_adapter.hpp old mode 100755 new mode 100644 index 38276c05d7a582d8d28a708d2d38460d0e83baa7..ad07bd9a292331bbfd96b0e9ab97ec752e83a9f1 --- a/boost/asio/detail/buffer_sequence_adapter.hpp +++ b/boost/asio/detail/buffer_sequence_adapter.hpp @@ -2,7 +2,7 @@ // detail/buffer_sequence_adapter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/buffered_stream_storage.hpp b/boost/asio/detail/buffered_stream_storage.hpp old mode 100755 new mode 100644 index d3a74e558b4ea550cb2cc2995c41f72cd0f58522..eefccee336f0eadbdf14282e8d0cfe4f3c5eb878 --- a/boost/asio/detail/buffered_stream_storage.hpp +++ b/boost/asio/detail/buffered_stream_storage.hpp @@ -2,7 +2,7 @@ // detail/buffered_stream_storage.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/bulk_executor_op.hpp b/boost/asio/detail/bulk_executor_op.hpp index a6bc6ef8c0431adfbf8df16d98c349960f352517..866aaf864a05e5d430637b72895991e38395c42e 100644 --- a/boost/asio/detail/bulk_executor_op.hpp +++ b/boost/asio/detail/bulk_executor_op.hpp @@ -2,7 +2,7 @@ // detail/bulk_executor_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/call_stack.hpp b/boost/asio/detail/call_stack.hpp old mode 100755 new mode 100644 index abb8f1598e871861163f33368b58f4fd9b727812..e1860ed4890e7594c3f64e91fdf2c0f1d292338e --- a/boost/asio/detail/call_stack.hpp +++ b/boost/asio/detail/call_stack.hpp @@ -2,7 +2,7 @@ // detail/call_stack.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/chrono.hpp b/boost/asio/detail/chrono.hpp old mode 100755 new mode 100644 index 6ba6982bdde3055b7822e6dfa56aef20d9f8e49b..548910c5ffa1b8a64e1d823f0432ccf3d14cbb86 --- a/boost/asio/detail/chrono.hpp +++ b/boost/asio/detail/chrono.hpp @@ -2,7 +2,7 @@ // detail/chrono.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/chrono_time_traits.hpp b/boost/asio/detail/chrono_time_traits.hpp old mode 100755 new mode 100644 index acdd39452513b2e9d6a0cbbbb87dee2782addf07..11325657d674e9d3be83aa9c12748a89d17ca9fa --- a/boost/asio/detail/chrono_time_traits.hpp +++ b/boost/asio/detail/chrono_time_traits.hpp @@ -2,7 +2,7 @@ // detail/chrono_time_traits.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/completion_handler.hpp b/boost/asio/detail/completion_handler.hpp old mode 100755 new mode 100644 index 4d7ac23a3c071934ae6d4d725e75a3615ef14105..d641c9ffa89ae137c95e25b21c1b323ccd5b1851 --- a/boost/asio/detail/completion_handler.hpp +++ b/boost/asio/detail/completion_handler.hpp @@ -2,7 +2,7 @@ // detail/completion_handler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/concurrency_hint.hpp b/boost/asio/detail/concurrency_hint.hpp old mode 100755 new mode 100644 index c49a367fd645660fc518ae5a51549575fcbbea5a..f27112c48c1b0af47e570b7ff340163010ff6e2e --- a/boost/asio/detail/concurrency_hint.hpp +++ b/boost/asio/detail/concurrency_hint.hpp @@ -2,7 +2,7 @@ // detail/concurrency_hint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/conditionally_enabled_event.hpp b/boost/asio/detail/conditionally_enabled_event.hpp old mode 100755 new mode 100644 index 4fb3071ee89778bd50983608d53b3df824f87155..f3025365545a5326526a3a8bc0b6f252463eff27 --- a/boost/asio/detail/conditionally_enabled_event.hpp +++ b/boost/asio/detail/conditionally_enabled_event.hpp @@ -2,7 +2,7 @@ // detail/conditionally_enabled_event.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/conditionally_enabled_mutex.hpp b/boost/asio/detail/conditionally_enabled_mutex.hpp old mode 100755 new mode 100644 index 072fece6fcc91b53ff6059a1d6cd099883cf99ad..fa712dfadd1f3b72b20dd15bb27c64c87c63813a --- a/boost/asio/detail/conditionally_enabled_mutex.hpp +++ b/boost/asio/detail/conditionally_enabled_mutex.hpp @@ -2,7 +2,7 @@ // detail/conditionally_enabled_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/config.hpp b/boost/asio/detail/config.hpp old mode 100755 new mode 100644 index f502213309f28451ca004e91beeea05710be7ab3..aa33a359a6f5f8c51ee578ebbea24d1c7779113e --- a/boost/asio/detail/config.hpp +++ b/boost/asio/detail/config.hpp @@ -2,7 +2,7 @@ // detail/config.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -401,7 +401,11 @@ # if !defined(BOOST_ASIO_DISABLE_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS) # if (__cplusplus >= 201103) # define BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS 1 -# endif // (__cplusplus >= 201103) +# elif defined(BOOST_ASIO_MSVC) +# if (_MSC_VER >= 1900 && _MSVC_LANG >= 201103) +# define BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS 1 +# endif // (_MSC_VER >= 1900 && _MSVC_LANG >= 201103) +# endif // defined(BOOST_ASIO_MSVC) # endif // !defined(BOOST_ASIO_DISABLE_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS) #endif // !defined(BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS) @@ -429,13 +433,13 @@ # endif // __has_feature(__cxx_variable_templates__) # endif // (__cplusplus >= 201402) # endif // defined(__clang__) -# if defined(__GNUC__) +# if defined(__GNUC__) && !defined(__INTEL_COMPILER) # if (__GNUC__ >= 6) # if (__cplusplus >= 201402) # define BOOST_ASIO_HAS_VARIABLE_TEMPLATES 1 # endif // (__cplusplus >= 201402) # endif // (__GNUC__ >= 6) -# endif // defined(__GNUC__) +# endif // defined(__GNUC__) && !defined(__INTEL_COMPILER) # if defined(BOOST_ASIO_MSVC) # if (_MSC_VER >= 1901) # define BOOST_ASIO_HAS_VARIABLE_TEMPLATES 1 @@ -477,13 +481,13 @@ # define BOOST_ASIO_HAS_CONSTANT_EXPRESSION_SFINAE 1 # endif // (__cplusplus >= 201402) # endif // defined(__clang__) -# if defined(__GNUC__) +# if defined(__GNUC__) && !defined(__INTEL_COMPILER) # if (__GNUC__ >= 7) # if (__cplusplus >= 201402) # define BOOST_ASIO_HAS_CONSTANT_EXPRESSION_SFINAE 1 # endif // (__cplusplus >= 201402) # endif // (__GNUC__ >= 7) -# endif // defined(__GNUC__) +# endif // defined(__GNUC__) && !defined(__INTEL_COMPILER) # if defined(BOOST_ASIO_MSVC) # if (_MSC_VER >= 1901) # define BOOST_ASIO_HAS_CONSTANT_EXPRESSION_SFINAE 1 @@ -495,11 +499,11 @@ // Enable workarounds for lack of working expression SFINAE. #if !defined(BOOST_ASIO_HAS_WORKING_EXPRESSION_SFINAE) # if !defined(BOOST_ASIO_DISABLE_WORKING_EXPRESSION_SFINAE) -# if !defined(BOOST_ASIO_MSVC) +# if !defined(BOOST_ASIO_MSVC) && !defined(__INTEL_COMPILER) # if (__cplusplus >= 201103) # define BOOST_ASIO_HAS_WORKING_EXPRESSION_SFINAE 1 # endif // (__cplusplus >= 201103) -# endif // !defined(BOOST_ASIO_MSVC) +# endif // !defined(BOOST_ASIO_MSVC) && !defined(__INTEL_COMPILER) # endif // !defined(BOOST_ASIO_DISABLE_WORKING_EXPRESSION_SFINAE) #endif // !defined(BOOST_ASIO_HAS_WORKING_EXPRESSION_SFINAE) @@ -1473,13 +1477,9 @@ // UNIX domain sockets. #if !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS) # if !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS) -# if !defined(BOOST_ASIO_WINDOWS) \ - && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \ - && !defined(__CYGWIN__) +# if !defined(BOOST_ASIO_WINDOWS_RUNTIME) # define BOOST_ASIO_HAS_LOCAL_SOCKETS 1 -# endif // !defined(BOOST_ASIO_WINDOWS) - // && !defined(BOOST_ASIO_WINDOWS_RUNTIME) - // && !defined(__CYGWIN__) +# endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME) # endif // !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS) #endif // !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS) @@ -1754,7 +1754,9 @@ #if !defined(BOOST_ASIO_HAS_CO_AWAIT) # if !defined(BOOST_ASIO_DISABLE_CO_AWAIT) # if defined(BOOST_ASIO_MSVC) -# if (_MSC_FULL_VER >= 190023506) +# if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) +# define BOOST_ASIO_HAS_CO_AWAIT 1 +# elif (_MSC_FULL_VER >= 190023506) # if defined(_RESUMABLE_FUNCTIONS_SUPPORTED) # define BOOST_ASIO_HAS_CO_AWAIT 1 # endif // defined(_RESUMABLE_FUNCTIONS_SUPPORTED) @@ -1779,6 +1781,11 @@ // Standard library support for coroutines. #if !defined(BOOST_ASIO_HAS_STD_COROUTINE) # if !defined(BOOST_ASIO_DISABLE_STD_COROUTINE) +# if defined(BOOST_ASIO_MSVC) +# if (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) +# define BOOST_ASIO_HAS_STD_COROUTINE 1 +# endif // (_MSC_VER >= 1928) && (_MSVC_LANG >= 201705) +# endif // defined(BOOST_ASIO_MSVC) # if defined(__GNUC__) # if (__cplusplus >= 201709) && (__cpp_impl_coroutine >= 201902) # if __has_include() @@ -1803,4 +1810,40 @@ # define BOOST_ASIO_NODISCARD #endif // !defined(BOOST_ASIO_NODISCARD) +// Kernel support for MSG_NOSIGNAL. +#if !defined(BOOST_ASIO_HAS_MSG_NOSIGNAL) +# if defined(__linux__) +# define BOOST_ASIO_HAS_MSG_NOSIGNAL 1 +# elif defined(_POSIX_VERSION) +# if (_POSIX_VERSION >= 200809L) +# define BOOST_ASIO_HAS_MSG_NOSIGNAL 1 +# endif // _POSIX_VERSION >= 200809L +# endif // defined(_POSIX_VERSION) +#endif // !defined(BOOST_ASIO_HAS_MSG_NOSIGNAL) + +// Standard library support for std::hash. +#if !defined(BOOST_ASIO_HAS_STD_HASH) +# if !defined(BOOST_ASIO_DISABLE_STD_HASH) +# if defined(__clang__) +# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX) +# define BOOST_ASIO_HAS_STD_HASH 1 +# elif (__cplusplus >= 201103) +# define BOOST_ASIO_HAS_STD_HASH 1 +# endif // (__cplusplus >= 201103) +# endif // defined(__clang__) +# if defined(__GNUC__) +# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) +# if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) +# define BOOST_ASIO_HAS_STD_HASH 1 +# endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__) +# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) +# endif // defined(__GNUC__) +# if defined(BOOST_ASIO_MSVC) +# if (_MSC_VER >= 1700) +# define BOOST_ASIO_HAS_STD_HASH 1 +# endif // (_MSC_VER >= 1700) +# endif // defined(BOOST_ASIO_MSVC) +# endif // !defined(BOOST_ASIO_DISABLE_STD_HASH) +#endif // !defined(BOOST_ASIO_HAS_STD_HASH) + #endif // BOOST_ASIO_DETAIL_CONFIG_HPP diff --git a/boost/asio/detail/consuming_buffers.hpp b/boost/asio/detail/consuming_buffers.hpp old mode 100755 new mode 100644 index f341d8829f7f0ca4358acd45baf4180a85925581..3a091808d0848bfa64446f0ec11c30d812eb1fc0 --- a/boost/asio/detail/consuming_buffers.hpp +++ b/boost/asio/detail/consuming_buffers.hpp @@ -2,7 +2,7 @@ // detail/consuming_buffers.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/cstddef.hpp b/boost/asio/detail/cstddef.hpp old mode 100755 new mode 100644 index 7a8c875a173ab0f96a2016e3dd74513f8cf86deb..0d16e3c7b5212009955ba6e1d0200b7a9cc0b132 --- a/boost/asio/detail/cstddef.hpp +++ b/boost/asio/detail/cstddef.hpp @@ -2,7 +2,7 @@ // detail/cstddef.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/cstdint.hpp b/boost/asio/detail/cstdint.hpp old mode 100755 new mode 100644 index 44bb33a1087789004deb1d96f4a93eb5dd654a82..f309bf8b42f3a824d47df76fb1ea74d5269257cf --- a/boost/asio/detail/cstdint.hpp +++ b/boost/asio/detail/cstdint.hpp @@ -2,7 +2,7 @@ // detail/cstdint.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/date_time_fwd.hpp b/boost/asio/detail/date_time_fwd.hpp old mode 100755 new mode 100644 index 03e241bb024601208249488ba48784b5a86dded7..b32ab3b55c9d558369ba025f008e17a3e1ad804b --- a/boost/asio/detail/date_time_fwd.hpp +++ b/boost/asio/detail/date_time_fwd.hpp @@ -2,7 +2,7 @@ // detail/date_time_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/deadline_timer_service.hpp b/boost/asio/detail/deadline_timer_service.hpp old mode 100755 new mode 100644 index 02bf13acb2e7b38120635c163e71d57d71ca14b4..78087a720418c68f908d079fb7c5b6118a11a851 --- a/boost/asio/detail/deadline_timer_service.hpp +++ b/boost/asio/detail/deadline_timer_service.hpp @@ -2,7 +2,7 @@ // detail/deadline_timer_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/dependent_type.hpp b/boost/asio/detail/dependent_type.hpp old mode 100755 new mode 100644 index 4a9a2f524b2cc38edb2ab5262e86911547d3edc6..ec5ab7254488a34f1e446fee7d656d6dd02a0261 --- a/boost/asio/detail/dependent_type.hpp +++ b/boost/asio/detail/dependent_type.hpp @@ -2,7 +2,7 @@ // detail/dependent_type.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/descriptor_ops.hpp b/boost/asio/detail/descriptor_ops.hpp old mode 100755 new mode 100644 index 7efbf822974ee25ee67e2ca450a8fbf50bef2f1d..e1981b346e54560f959edfd1cd1995b3ef047a9b --- a/boost/asio/detail/descriptor_ops.hpp +++ b/boost/asio/detail/descriptor_ops.hpp @@ -2,7 +2,7 @@ // detail/descriptor_ops.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/descriptor_read_op.hpp b/boost/asio/detail/descriptor_read_op.hpp old mode 100755 new mode 100644 index f3bfe952cd00c4a7069be983458c2fa24b3651b4..9d0805bbf51b6aae780c3676589e67f207f811cb --- a/boost/asio/detail/descriptor_read_op.hpp +++ b/boost/asio/detail/descriptor_read_op.hpp @@ -2,7 +2,7 @@ // detail/descriptor_read_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/descriptor_write_op.hpp b/boost/asio/detail/descriptor_write_op.hpp old mode 100755 new mode 100644 index 776466492e064ccf115879ffdfa4d7d0bca225cb..b06390932126c629354ed220ccadd262d14446ba --- a/boost/asio/detail/descriptor_write_op.hpp +++ b/boost/asio/detail/descriptor_write_op.hpp @@ -2,7 +2,7 @@ // detail/descriptor_write_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/dev_poll_reactor.hpp b/boost/asio/detail/dev_poll_reactor.hpp old mode 100755 new mode 100644 index 097e342a6125848082c722f802ad403791fd934a..6f775e59e6309b98baf99d3a4731d64aa3519a8b --- a/boost/asio/detail/dev_poll_reactor.hpp +++ b/boost/asio/detail/dev_poll_reactor.hpp @@ -2,7 +2,7 @@ // detail/dev_poll_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/epoll_reactor.hpp b/boost/asio/detail/epoll_reactor.hpp old mode 100755 new mode 100644 index 8531c6b80826f21e985ea74ad92c387957817dba..61da05271752b4847bba6ff8a66ee06192cc3de6 --- a/boost/asio/detail/epoll_reactor.hpp +++ b/boost/asio/detail/epoll_reactor.hpp @@ -2,7 +2,7 @@ // detail/epoll_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/event.hpp b/boost/asio/detail/event.hpp old mode 100755 new mode 100644 index 90364a36ec6c5a219aa3cd7b830c5dcbcc460bb9..02049e359115cdeb4a5a3a6f81cea306e63e1ac7 --- a/boost/asio/detail/event.hpp +++ b/boost/asio/detail/event.hpp @@ -2,7 +2,7 @@ // detail/event.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/eventfd_select_interrupter.hpp b/boost/asio/detail/eventfd_select_interrupter.hpp old mode 100755 new mode 100644 index 55a295216e8939c5d5b5f6fd859e0ea81239687a..7f18389d6e1593d7f0b94c065adcc5731ced4dac --- a/boost/asio/detail/eventfd_select_interrupter.hpp +++ b/boost/asio/detail/eventfd_select_interrupter.hpp @@ -2,7 +2,7 @@ // detail/eventfd_select_interrupter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Roelof Naude (roelof.naude at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/executor_function.hpp b/boost/asio/detail/executor_function.hpp old mode 100755 new mode 100644 index 14e0440e66d4865cc473fb5817266f564523e4f4..bf6c9c1063943af802790b6d809e7565a2b3168a --- a/boost/asio/detail/executor_function.hpp +++ b/boost/asio/detail/executor_function.hpp @@ -2,7 +2,7 @@ // detail/executor_function.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -112,7 +113,7 @@ private: // Make the upcall if required. if (call) { - function(); + boost_asio_handler_invoke_helpers::invoke(function, function); } } diff --git a/boost/asio/detail/executor_op.hpp b/boost/asio/detail/executor_op.hpp old mode 100755 new mode 100644 index cb12023cf0f9d712d4a15c1da9f0724186efc5ba..6a6c9761e10665f4cca117566ccaa298b4526ba1 --- a/boost/asio/detail/executor_op.hpp +++ b/boost/asio/detail/executor_op.hpp @@ -2,7 +2,7 @@ // detail/executor_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/fd_set_adapter.hpp b/boost/asio/detail/fd_set_adapter.hpp old mode 100755 new mode 100644 index f5373306ee4cae7cda5bf90e453757e8c98c1005..2764caf600352f57bf391a5fb02cd8645ffde593 --- a/boost/asio/detail/fd_set_adapter.hpp +++ b/boost/asio/detail/fd_set_adapter.hpp @@ -2,7 +2,7 @@ // detail/fd_set_adapter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/fenced_block.hpp b/boost/asio/detail/fenced_block.hpp old mode 100755 new mode 100644 index 4b9afdac5c31435826d3fd9b2f9dbd27d8e5c59d..462be5e9fab0c0730a77b889b106b06c7b3c6115 --- a/boost/asio/detail/fenced_block.hpp +++ b/boost/asio/detail/fenced_block.hpp @@ -2,7 +2,7 @@ // detail/fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/functional.hpp b/boost/asio/detail/functional.hpp old mode 100755 new mode 100644 index 55657d9baeb29794979c3c36b6d36b9fa0203df0..e2996f72118048d746ef5e51aecf48a7c2266c2e --- a/boost/asio/detail/functional.hpp +++ b/boost/asio/detail/functional.hpp @@ -2,7 +2,7 @@ // detail/functional.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/future.hpp b/boost/asio/detail/future.hpp old mode 100755 new mode 100644 index 046d417b25e8ed6b65d30cdfb9a3512c8f023d13..ac3d33f6dba1d9e1674f34f11599b7253e0a20da --- a/boost/asio/detail/future.hpp +++ b/boost/asio/detail/future.hpp @@ -2,7 +2,7 @@ // detail/future.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/gcc_arm_fenced_block.hpp b/boost/asio/detail/gcc_arm_fenced_block.hpp old mode 100755 new mode 100644 index 4f146ce3657dbb1cc19bc682109309ea4cc9ab30..256b6aa047e59dcaad87b8879b0ed07d7e3fa99d --- a/boost/asio/detail/gcc_arm_fenced_block.hpp +++ b/boost/asio/detail/gcc_arm_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/gcc_arm_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/gcc_hppa_fenced_block.hpp b/boost/asio/detail/gcc_hppa_fenced_block.hpp old mode 100755 new mode 100644 index 4c4e779770254781039acd91a6f21421acc9f30a..ef7a7b789eb67a71d2e833bded964b8dd542c553 --- a/boost/asio/detail/gcc_hppa_fenced_block.hpp +++ b/boost/asio/detail/gcc_hppa_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/gcc_hppa_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/gcc_sync_fenced_block.hpp b/boost/asio/detail/gcc_sync_fenced_block.hpp old mode 100755 new mode 100644 index 23827448d07e4e88903e97075b1e4913649f2857..16f87f6092c986bf0a3ed513d4e84596e9b0ee9c --- a/boost/asio/detail/gcc_sync_fenced_block.hpp +++ b/boost/asio/detail/gcc_sync_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/gcc_sync_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/gcc_x86_fenced_block.hpp b/boost/asio/detail/gcc_x86_fenced_block.hpp old mode 100755 new mode 100644 index 7fcbddd28e4035e67e2bcfdb687227771e6f744d..5b55c7f99f73f6de817bd93832ca641abe9ee88c --- a/boost/asio/detail/gcc_x86_fenced_block.hpp +++ b/boost/asio/detail/gcc_x86_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/gcc_x86_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/global.hpp b/boost/asio/detail/global.hpp old mode 100755 new mode 100644 index c750068dae7ba0050b3584dc43f3c385fbae8528..5fd53cce206859f8cc6a915a665f5ceb5846d435 --- a/boost/asio/detail/global.hpp +++ b/boost/asio/detail/global.hpp @@ -2,7 +2,7 @@ // detail/global.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/handler_alloc_helpers.hpp b/boost/asio/detail/handler_alloc_helpers.hpp old mode 100755 new mode 100644 index 4d713940afce96e5e23aa569b8bebbefea365508..8dd7ee4a43ea7a77eb7e1973ba8a278064dd1c29 --- a/boost/asio/detail/handler_alloc_helpers.hpp +++ b/boost/asio/detail/handler_alloc_helpers.hpp @@ -2,7 +2,7 @@ // detail/handler_alloc_helpers.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -61,7 +61,7 @@ inline void* allocate(std::size_t s, Handler& h) (void)h; #if !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) return boost::asio::detail::thread_info_base::allocate( - boost::asio::detail::thread_context::thread_call_stack::top(), s); + boost::asio::detail::thread_context::top_of_thread_call_stack(), s); #else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) return ::operator new(size); #endif // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) @@ -82,7 +82,7 @@ inline void deallocate(void* p, std::size_t s, Handler& h) (void)h; #if !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) boost::asio::detail::thread_info_base::deallocate( - boost::asio::detail::thread_context::thread_call_stack::top(), p, s); + boost::asio::detail::thread_context::top_of_thread_call_stack(), p, s); #else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) (void)s; ::operator delete(p); diff --git a/boost/asio/detail/handler_cont_helpers.hpp b/boost/asio/detail/handler_cont_helpers.hpp old mode 100755 new mode 100644 index b69712ad8b45b716f7fc7d727b0647c10d7788e7..ce0093657b6c4b5887682ffbe7c2b0fc07bd092c --- a/boost/asio/detail/handler_cont_helpers.hpp +++ b/boost/asio/detail/handler_cont_helpers.hpp @@ -2,7 +2,7 @@ // detail/handler_cont_helpers.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/handler_invoke_helpers.hpp b/boost/asio/detail/handler_invoke_helpers.hpp old mode 100755 new mode 100644 index 35007e45cf783a604f6d44e2089de42538f01cf1..8c9acce4a58ab6dcb134c8b14d85de93700b4b83 --- a/boost/asio/detail/handler_invoke_helpers.hpp +++ b/boost/asio/detail/handler_invoke_helpers.hpp @@ -2,7 +2,7 @@ // detail/handler_invoke_helpers.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/handler_tracking.hpp b/boost/asio/detail/handler_tracking.hpp old mode 100755 new mode 100644 index 78730412431931fca4ff394a5c4c34c5782b341e..a0cfde52f72ffbf9e388c61156fb8c3d68eaca1d --- a/boost/asio/detail/handler_tracking.hpp +++ b/boost/asio/detail/handler_tracking.hpp @@ -2,7 +2,7 @@ // detail/handler_tracking.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/handler_type_requirements.hpp b/boost/asio/detail/handler_type_requirements.hpp old mode 100755 new mode 100644 index 89197126b98c154a55f4392a8887b16191fd5e88..c593b86870627a053cfc8bc9e1edb8a19a8508d0 --- a/boost/asio/detail/handler_type_requirements.hpp +++ b/boost/asio/detail/handler_type_requirements.hpp @@ -2,7 +2,7 @@ // detail/handler_type_requirements.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/handler_work.hpp b/boost/asio/detail/handler_work.hpp old mode 100755 new mode 100644 index b40b7ffe8781e407cbb785ed3feba7408c239979..83eaa444eb25ff8ddbe033aee0198bfa267a0037 --- a/boost/asio/detail/handler_work.hpp +++ b/boost/asio/detail/handler_work.hpp @@ -2,7 +2,7 @@ // detail/handler_work.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -35,6 +35,12 @@ namespace asio { class executor; class io_context; +#if !defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) + +class any_io_executor; + +#endif // !defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) + namespace execution { #if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) @@ -57,7 +63,7 @@ template ::type> { public: - explicit handler_work_base(const Executor& ex) BOOST_ASIO_NOEXCEPT + explicit handler_work_base(int, int, const Executor& ex) BOOST_ASIO_NOEXCEPT : executor_(ex), owns_work_(true) { @@ -192,7 +198,7 @@ class handler_work_base::type> { public: - explicit handler_work_base(const Executor&) + explicit handler_work_base(int, int, const Executor&) { } @@ -215,7 +221,7 @@ template class handler_work_base { public: - explicit handler_work_base(const Executor& ex) BOOST_ASIO_NOEXCEPT + explicit handler_work_base(int, int, const Executor& ex) BOOST_ASIO_NOEXCEPT #if !defined(BOOST_ASIO_NO_TYPEID) : executor_( ex.target_type() == typeid(typename IoContext::executor_type) @@ -305,7 +311,8 @@ public: #endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) executor_type; - explicit handler_work_base(const executor_type& ex) BOOST_ASIO_NOEXCEPT + explicit handler_work_base(int, int, + const executor_type& ex) BOOST_ASIO_NOEXCEPT #if !defined(BOOST_ASIO_NO_TYPEID) : executor_( ex.target_type() == typeid(typename IoContext::executor_type) @@ -348,12 +355,79 @@ public: } template - void dispatch(Function& function, Handler& handler) + void dispatch(Function& function, Handler&) { execution::execute( - boost::asio::prefer(executor_, - execution::blocking.possibly, - execution::allocator((get_associated_allocator)(handler))), + boost::asio::prefer(executor_, execution::blocking.possibly), + BOOST_ASIO_MOVE_CAST(Function)(function)); + } + +private: + executor_type executor_; +}; + +#if !defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) + +template +class handler_work_base::value + >::type> +{ +public: + typedef Executor executor_type; + + explicit handler_work_base(int, int, + const executor_type& ex) BOOST_ASIO_NOEXCEPT +#if !defined(BOOST_ASIO_NO_TYPEID) + : executor_( + ex.target_type() == typeid(typename IoContext::executor_type) + ? executor_type() + : boost::asio::prefer(ex, execution::outstanding_work.tracked)) +#else // !defined(BOOST_ASIO_NO_TYPEID) + : executor_(boost::asio::prefer(ex, execution::outstanding_work.tracked)) +#endif // !defined(BOOST_ASIO_NO_TYPEID) + { + } + + handler_work_base(const executor_type& ex, + const executor_type& candidate) BOOST_ASIO_NOEXCEPT + : executor_(ex != candidate ? ex : executor_type()) + { + } + + template + handler_work_base(const executor_type& ex, + const OtherExecutor&) BOOST_ASIO_NOEXCEPT + : executor_(boost::asio::prefer(ex, execution::outstanding_work.tracked)) + { + } + + handler_work_base(const handler_work_base& other) BOOST_ASIO_NOEXCEPT + : executor_(other.executor_) + { + } + +#if defined(BOOST_ASIO_HAS_MOVE) + handler_work_base(handler_work_base&& other) BOOST_ASIO_NOEXCEPT + : executor_(BOOST_ASIO_MOVE_CAST(executor_type)(other.executor_)) + { + } +#endif // defined(BOOST_ASIO_HAS_MOVE) + + bool owns_work() const BOOST_ASIO_NOEXCEPT + { + return !!executor_; + } + + template + void dispatch(Function& function, Handler&) + { + execution::execute( + boost::asio::prefer(executor_, execution::blocking.possibly), BOOST_ASIO_MOVE_CAST(Function)(function)); } @@ -361,6 +435,8 @@ private: executor_type executor_; }; +#endif // !defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) + template class handler_work : handler_work_base, @@ -373,7 +449,7 @@ public: Handler, IoExecutor>::type, IoExecutor> base2_type; handler_work(Handler& handler, const IoExecutor& io_ex) BOOST_ASIO_NOEXCEPT - : base1_type(io_ex), + : base1_type(0, 0, io_ex), base2_type(boost::asio::get_associated_executor(handler, io_ex), io_ex) { } @@ -410,7 +486,7 @@ public: typedef handler_work_base base1_type; handler_work(Handler&, const IoExecutor& io_ex) BOOST_ASIO_NOEXCEPT - : base1_type(io_ex) + : base1_type(0, 0, io_ex) { } diff --git a/boost/asio/detail/hash_map.hpp b/boost/asio/detail/hash_map.hpp old mode 100755 new mode 100644 index 57a2929787e56eb38ea40524492661e441c4da18..a5d5f7ae4aa9fb1abf1408aa602f5c4567f1f661 --- a/boost/asio/detail/hash_map.hpp +++ b/boost/asio/detail/hash_map.hpp @@ -2,7 +2,7 @@ // detail/hash_map.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/buffer_sequence_adapter.ipp b/boost/asio/detail/impl/buffer_sequence_adapter.ipp old mode 100755 new mode 100644 index 4b640ba7c785fa807268a36aaf27ab20c1398999..c0a878b00496879f27c97fa35a1ef9d121aab7e4 --- a/boost/asio/detail/impl/buffer_sequence_adapter.ipp +++ b/boost/asio/detail/impl/buffer_sequence_adapter.ipp @@ -2,7 +2,7 @@ // detail/impl/buffer_sequence_adapter.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/descriptor_ops.ipp b/boost/asio/detail/impl/descriptor_ops.ipp old mode 100755 new mode 100644 index 16c04f3eb8aba7646441a655c6ada209c1cc64e8..4701286dcbc323237b7d9d293d68f428c87bbb00 --- a/boost/asio/detail/impl/descriptor_ops.ipp +++ b/boost/asio/detail/impl/descriptor_ops.ipp @@ -2,7 +2,7 @@ // detail/impl/descriptor_ops.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/dev_poll_reactor.hpp b/boost/asio/detail/impl/dev_poll_reactor.hpp old mode 100755 new mode 100644 index e0dfb0692a7b7f2e1b88be87df46ce0d81fee4f1..87ed83edf45a5cdf04793f3345affee5e05fdcec --- a/boost/asio/detail/impl/dev_poll_reactor.hpp +++ b/boost/asio/detail/impl/dev_poll_reactor.hpp @@ -2,7 +2,7 @@ // detail/impl/dev_poll_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/dev_poll_reactor.ipp b/boost/asio/detail/impl/dev_poll_reactor.ipp old mode 100755 new mode 100644 index 86d84c63e972f91107c0e7359e325119e10ae904..abd8bab1706e169d6de7fa07c9885e327077d3d5 --- a/boost/asio/detail/impl/dev_poll_reactor.ipp +++ b/boost/asio/detail/impl/dev_poll_reactor.ipp @@ -2,7 +2,7 @@ // detail/impl/dev_poll_reactor.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/epoll_reactor.hpp b/boost/asio/detail/impl/epoll_reactor.hpp old mode 100755 new mode 100644 index 0f1d7d4f79dc1270cce15e420e778a5c46ea5e05..70791c461701a0493f4f029e5cfcdaee4f7fcd99 --- a/boost/asio/detail/impl/epoll_reactor.hpp +++ b/boost/asio/detail/impl/epoll_reactor.hpp @@ -2,7 +2,7 @@ // detail/impl/epoll_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/epoll_reactor.ipp b/boost/asio/detail/impl/epoll_reactor.ipp old mode 100755 new mode 100644 index 651b2d704fec8a67de655c1dfabc6456dfec92e5..b57da8581f8c8c939665dbba6a7e35c5c328b12f --- a/boost/asio/detail/impl/epoll_reactor.ipp +++ b/boost/asio/detail/impl/epoll_reactor.ipp @@ -2,7 +2,7 @@ // detail/impl/epoll_reactor.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/eventfd_select_interrupter.ipp b/boost/asio/detail/impl/eventfd_select_interrupter.ipp old mode 100755 new mode 100644 index f4c9e25979a0162c550a0cc0dd1019fa5facf4bb..6c499781fc4533896a042a08ef1d426224f1f8d4 --- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp +++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp @@ -2,7 +2,7 @@ // detail/impl/eventfd_select_interrupter.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Roelof Naude (roelof.naude at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -23,11 +23,11 @@ #include #include #include -#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 +#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__) # include -#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 +#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__) # include -#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 +#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__) #include #include #include @@ -46,14 +46,14 @@ eventfd_select_interrupter::eventfd_select_interrupter() void eventfd_select_interrupter::open_descriptors() { -#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 +#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__) write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0); if (read_descriptor_ != -1) { ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK); ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC); } -#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 +#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__) # if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK) write_descriptor_ = read_descriptor_ = ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK); @@ -70,7 +70,7 @@ void eventfd_select_interrupter::open_descriptors() ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC); } } -#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 +#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__) if (read_descriptor_ == -1) { @@ -153,7 +153,9 @@ bool eventfd_select_interrupter::reset() return false; if (errno == EINTR) continue; - if (errno == EWOULDBLOCK || errno == EAGAIN) + if (errno == EWOULDBLOCK) + return true; + if (errno == EAGAIN) return true; return false; } diff --git a/boost/asio/detail/impl/handler_tracking.ipp b/boost/asio/detail/impl/handler_tracking.ipp old mode 100755 new mode 100644 index f87924c6c36b0e752eb3c695c1dad6931e48f681..b23f1a78aa2fe3ef9c520ff9b914bcb74fd3e5ea --- a/boost/asio/detail/impl/handler_tracking.ipp +++ b/boost/asio/detail/impl/handler_tracking.ipp @@ -2,7 +2,7 @@ // detail/impl/handler_tracking.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/kqueue_reactor.hpp b/boost/asio/detail/impl/kqueue_reactor.hpp old mode 100755 new mode 100644 index bc29b84b5abfd0b883a753b0febe3b3d3b618de5..fa6db9b9f7e7f5b5a8123d10cbca38248f596ef7 --- a/boost/asio/detail/impl/kqueue_reactor.hpp +++ b/boost/asio/detail/impl/kqueue_reactor.hpp @@ -2,7 +2,7 @@ // detail/impl/kqueue_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/impl/kqueue_reactor.ipp b/boost/asio/detail/impl/kqueue_reactor.ipp old mode 100755 new mode 100644 index 8807e0b12d6eee941509c102d8b0384803df486b..fe24cf8f71f7d31dd55df925c486153a875fed9e --- a/boost/asio/detail/impl/kqueue_reactor.ipp +++ b/boost/asio/detail/impl/kqueue_reactor.ipp @@ -2,7 +2,7 @@ // detail/impl/kqueue_reactor.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/impl/null_event.ipp b/boost/asio/detail/impl/null_event.ipp old mode 100755 new mode 100644 index 516b2bed124f2fc5ff842bc8e133724ffab971e7..e36344d5d3ca76f4f5a240c7b8596fba8681cce5 --- a/boost/asio/detail/impl/null_event.ipp +++ b/boost/asio/detail/impl/null_event.ipp @@ -2,7 +2,7 @@ // detail/impl/null_event.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/pipe_select_interrupter.ipp b/boost/asio/detail/impl/pipe_select_interrupter.ipp old mode 100755 new mode 100644 index dfa461ba43859b01e7985c39221e816c8a193591..f11af1a9deb3a58d040ae783bf85e77a7c599e8d --- a/boost/asio/detail/impl/pipe_select_interrupter.ipp +++ b/boost/asio/detail/impl/pipe_select_interrupter.ipp @@ -2,7 +2,7 @@ // detail/impl/pipe_select_interrupter.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/posix_event.ipp b/boost/asio/detail/impl/posix_event.ipp old mode 100755 new mode 100644 index 66d05aa66d34c601f42740507ce49a83097e621d..fc6c86d527d6be2f216b0e73af57409b7e37317c --- a/boost/asio/detail/impl/posix_event.ipp +++ b/boost/asio/detail/impl/posix_event.ipp @@ -2,7 +2,7 @@ // detail/impl/posix_event.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -38,10 +38,14 @@ posix_event::posix_event() #else // (defined(__MACH__) && defined(__APPLE__)) // || (defined(__ANDROID__) && (__ANDROID_API__ < 21)) ::pthread_condattr_t attr; - ::pthread_condattr_init(&attr); - int error = ::pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); + int error = ::pthread_condattr_init(&attr); if (error == 0) - error = ::pthread_cond_init(&cond_, &attr); + { + error = ::pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); + if (error == 0) + error = ::pthread_cond_init(&cond_, &attr); + ::pthread_condattr_destroy(&attr); + } #endif // (defined(__MACH__) && defined(__APPLE__)) // || (defined(__ANDROID__) && (__ANDROID_API__ < 21)) diff --git a/boost/asio/detail/impl/posix_mutex.ipp b/boost/asio/detail/impl/posix_mutex.ipp old mode 100755 new mode 100644 index 08f2fe4f87d3261e9f5e92eb3d6e32aca4f5b5e6..82429aee9446b8d24b7c444775998406ef91e7ae --- a/boost/asio/detail/impl/posix_mutex.ipp +++ b/boost/asio/detail/impl/posix_mutex.ipp @@ -2,7 +2,7 @@ // detail/impl/posix_mutex.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/posix_thread.ipp b/boost/asio/detail/impl/posix_thread.ipp old mode 100755 new mode 100644 index 2b7c097b28cccafe1c5d5718db39c55e64545fbc..4193302dcb4e55d2c18a7d3cef99385471af4174 --- a/boost/asio/detail/impl/posix_thread.ipp +++ b/boost/asio/detail/impl/posix_thread.ipp @@ -2,7 +2,7 @@ // detail/impl/posix_thread.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/posix_tss_ptr.ipp b/boost/asio/detail/impl/posix_tss_ptr.ipp old mode 100755 new mode 100644 index 63eacee9ac7e8b0d812dbf38c6f401d438e8f0b4..1d94dc15d2d6b3ed95765d37060473ad5440d7d5 --- a/boost/asio/detail/impl/posix_tss_ptr.ipp +++ b/boost/asio/detail/impl/posix_tss_ptr.ipp @@ -2,7 +2,7 @@ // detail/impl/posix_tss_ptr.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/reactive_descriptor_service.ipp b/boost/asio/detail/impl/reactive_descriptor_service.ipp old mode 100755 new mode 100644 index 8f1a29ce3e66dd558808b2381b18cc12ec1dcaf4..d46a92bb8d01de9f2427e7aa06d14c413f6da0c0 --- a/boost/asio/detail/impl/reactive_descriptor_service.ipp +++ b/boost/asio/detail/impl/reactive_descriptor_service.ipp @@ -2,7 +2,7 @@ // detail/impl/reactive_descriptor_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/reactive_serial_port_service.ipp b/boost/asio/detail/impl/reactive_serial_port_service.ipp old mode 100755 new mode 100644 index 32f749f3f31086cc97a52d6d0ed1b100bcd50236..bed768605297eee76bb511fb747ef2fba4fb2509 --- a/boost/asio/detail/impl/reactive_serial_port_service.ipp +++ b/boost/asio/detail/impl/reactive_serial_port_service.ipp @@ -2,7 +2,7 @@ // detail/impl/reactive_serial_port_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/impl/reactive_socket_service_base.ipp b/boost/asio/detail/impl/reactive_socket_service_base.ipp old mode 100755 new mode 100644 index 4cf2eb1ab0da041b123bd04b77ff692b0d72b2a1..19e1049c498cc7609a15e7eae975496f8f6fdca2 --- a/boost/asio/detail/impl/reactive_socket_service_base.ipp +++ b/boost/asio/detail/impl/reactive_socket_service_base.ipp @@ -2,7 +2,7 @@ // detail/reactive_socket_service_base.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/resolver_service_base.ipp b/boost/asio/detail/impl/resolver_service_base.ipp old mode 100755 new mode 100644 index 6bdb167de81c4620afdc7519092d6db763483e8b..daf3fb0addbb2f5b45c8fcddc9151211ec8810f3 --- a/boost/asio/detail/impl/resolver_service_base.ipp +++ b/boost/asio/detail/impl/resolver_service_base.ipp @@ -2,7 +2,7 @@ // detail/impl/resolver_service_base.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/scheduler.ipp b/boost/asio/detail/impl/scheduler.ipp old mode 100755 new mode 100644 index 44828f560dd2b3cf00cc9c2a5364e5f45c0b033f..089e36e8e84d2a88e39e1968a6bce5b9b792c2ca --- a/boost/asio/detail/impl/scheduler.ipp +++ b/boost/asio/detail/impl/scheduler.ipp @@ -2,7 +2,7 @@ // detail/impl/scheduler.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -325,6 +325,11 @@ void scheduler::compensating_work_started() ++static_cast(this_thread)->private_outstanding_work; } +bool scheduler::can_dispatch() +{ + return thread_call_stack::contains(this) != 0; +} + void scheduler::capture_current_exception() { if (thread_info_base* this_thread = thread_call_stack::contains(this)) diff --git a/boost/asio/detail/impl/select_reactor.hpp b/boost/asio/detail/impl/select_reactor.hpp old mode 100755 new mode 100644 index 290d5e548842a84de3db6d2a5ef6650447ea9fe1..57c8137a4241a52636b1f045a7be07a0c8c8456b --- a/boost/asio/detail/impl/select_reactor.hpp +++ b/boost/asio/detail/impl/select_reactor.hpp @@ -2,7 +2,7 @@ // detail/impl/select_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/select_reactor.ipp b/boost/asio/detail/impl/select_reactor.ipp old mode 100755 new mode 100644 index 00b0fb579137e1a002ca6f4e2470ec64193db6d0..1e2fff4abf49179d98bdb1653cf77f33226fe895 --- a/boost/asio/detail/impl/select_reactor.ipp +++ b/boost/asio/detail/impl/select_reactor.ipp @@ -2,7 +2,7 @@ // detail/impl/select_reactor.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/service_registry.hpp b/boost/asio/detail/impl/service_registry.hpp old mode 100755 new mode 100644 index 808ff2ffac8e4514106770e5b950f43b55ca97ed..305786bdf7fb601c68aa34c6a8a5bd797f94b74f --- a/boost/asio/detail/impl/service_registry.hpp +++ b/boost/asio/detail/impl/service_registry.hpp @@ -2,7 +2,7 @@ // detail/impl/service_registry.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/service_registry.ipp b/boost/asio/detail/impl/service_registry.ipp old mode 100755 new mode 100644 index bbff0f98cd3e524f3c49549e38145fc859a1b9f7..f5f1b4406410fe13742b23dfd05be95009228430 --- a/boost/asio/detail/impl/service_registry.ipp +++ b/boost/asio/detail/impl/service_registry.ipp @@ -2,7 +2,7 @@ // detail/impl/service_registry.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/signal_set_service.ipp b/boost/asio/detail/impl/signal_set_service.ipp old mode 100755 new mode 100644 index 421f83870544b53f683ffc46c34f4174af678369..f9f6d4594054068cad6b9b74acee1a5246a05110 --- a/boost/asio/detail/impl/signal_set_service.ipp +++ b/boost/asio/detail/impl/signal_set_service.ipp @@ -2,7 +2,7 @@ // detail/impl/signal_set_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/socket_ops.ipp b/boost/asio/detail/impl/socket_ops.ipp old mode 100755 new mode 100644 index ef4462e5abf3b284df6de19993e2a0c820752008..83bf30f62bf7adfb7e8d78fedd18be419e464ba0 --- a/boost/asio/detail/impl/socket_ops.ipp +++ b/boost/asio/detail/impl/socket_ops.ipp @@ -2,7 +2,7 @@ // detail/impl/socket_ops.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -1388,9 +1388,9 @@ signed_size_type send(socket_type s, const buf* bufs, size_t count, msghdr msg = msghdr(); msg.msg_iov = const_cast(bufs); msg.msg_iovlen = static_cast(count); -#if defined(__linux__) +#if defined(BOOST_ASIO_HAS_MSG_NOSIGNAL) flags |= MSG_NOSIGNAL; -#endif // defined(__linux__) +#endif // defined(BOOST_ASIO_HAS_MSG_NOSIGNAL) signed_size_type result = ::sendmsg(s, &msg, flags); get_last_error(ec, result < 0); return result; @@ -1419,9 +1419,9 @@ signed_size_type send1(socket_type s, const void* data, size_t size, ec.assign(0, ec.category()); return bytes_transferred; #else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) -#if defined(__linux__) +#if defined(BOOST_ASIO_HAS_MSG_NOSIGNAL) flags |= MSG_NOSIGNAL; -#endif // defined(__linux__) +#endif // defined(BOOST_ASIO_HAS_MSG_NOSIGNAL) signed_size_type result = ::send(s, static_cast(data), size, flags); get_last_error(ec, result < 0); @@ -1617,9 +1617,9 @@ signed_size_type sendto(socket_type s, const buf* bufs, size_t count, msg.msg_namelen = static_cast(addrlen); msg.msg_iov = const_cast(bufs); msg.msg_iovlen = static_cast(count); -#if defined(__linux__) +#if defined(BOOST_ASIO_HAS_MSG_NOSIGNAL) flags |= MSG_NOSIGNAL; -#endif // defined(__linux__) +#endif // defined(BOOST_ASIO_HAS_MSG_NOSIGNAL) signed_size_type result = ::sendmsg(s, &msg, flags); get_last_error(ec, result < 0); return result; @@ -1657,9 +1657,9 @@ signed_size_type sendto1(socket_type s, const void* data, size_t size, ec.assign(0, ec.category()); return bytes_transferred; #else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) -#if defined(__linux__) +#if defined(BOOST_ASIO_HAS_MSG_NOSIGNAL) flags |= MSG_NOSIGNAL; -#endif // defined(__linux__) +#endif // defined(BOOST_ASIO_HAS_MSG_NOSIGNAL) signed_size_type result = call_sendto(&msghdr::msg_namelen, s, data, size, flags, addr, addrlen); get_last_error(ec, result < 0); @@ -1825,7 +1825,9 @@ socket_type socket(int af, int type, int protocol, return s; #elif defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__) socket_type s = ::socket(af, type, protocol); - get_last_error(ec, s < 0); + get_last_error(ec, s == invalid_socket); + if (s == invalid_socket) + return s; int optval = 1; int result = ::setsockopt(s, SOL_SOCKET, @@ -2544,7 +2546,7 @@ int inet_pton(int af, const char* src, void* dest, bytes[1] = static_cast(b1); bytes[2] = static_cast(b2); bytes[3] = static_cast(b3); - ec.assign(), ec.category()); + ec.assign(0, ec.category()); return 1; } else if (af == BOOST_ASIO_OS_DEF(AF_INET6)) diff --git a/boost/asio/detail/impl/socket_select_interrupter.ipp b/boost/asio/detail/impl/socket_select_interrupter.ipp old mode 100755 new mode 100644 index ef9c1c1659d44be9f189294294da96dcf8cf5972..d79df6519ae12ec157ed504e2a3b9769741aecb1 --- a/boost/asio/detail/impl/socket_select_interrupter.ipp +++ b/boost/asio/detail/impl/socket_select_interrupter.ipp @@ -2,7 +2,7 @@ // detail/impl/socket_select_interrupter.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/strand_executor_service.hpp b/boost/asio/detail/impl/strand_executor_service.hpp old mode 100755 new mode 100644 index 494282cd90f4194293a4065925b96e3657e8b285..3fdee1646e82f67fea0a5e16db04518a94555258 --- a/boost/asio/detail/impl/strand_executor_service.hpp +++ b/boost/asio/detail/impl/strand_executor_service.hpp @@ -2,7 +2,7 @@ // detail/impl/strand_executor_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -15,7 +15,6 @@ # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) -#include #include #include #include @@ -104,13 +103,7 @@ public: ~on_invoker_exit() { - this_->impl_->mutex_->lock(); - this_->impl_->ready_queue_.push(this_->impl_->waiting_queue_); - bool more_handlers = this_->impl_->locked_ = - !this_->impl_->ready_queue_.empty(); - this_->impl_->mutex_->unlock(); - - if (more_handlers) + if (push_waiting_to_ready(this_->impl_)) { recycling_allocator allocator; execution::execute( @@ -125,21 +118,11 @@ public: void operator()() { - // Indicate that this strand is executing on the current thread. - call_stack::context ctx(impl_.get()); - // Ensure the next handler, if any, is scheduled on block exit. on_invoker_exit on_exit = { this }; (void)on_exit; - // Run all ready handlers. No lock is required since the ready queue is - // accessed only within the strand. - boost::system::error_code ec; - while (scheduler_operation* o = impl_->ready_queue_.front()) - { - impl_->ready_queue_.pop(); - o->complete(impl_.get(), ec, 0); - } + run_ready_handlers(impl_); } private: @@ -189,13 +172,7 @@ public: ~on_invoker_exit() { - this_->impl_->mutex_->lock(); - this_->impl_->ready_queue_.push(this_->impl_->waiting_queue_); - bool more_handlers = this_->impl_->locked_ = - !this_->impl_->ready_queue_.empty(); - this_->impl_->mutex_->unlock(); - - if (more_handlers) + if (push_waiting_to_ready(this_->impl_)) { Executor ex(this_->work_.get_executor()); recycling_allocator allocator; @@ -206,21 +183,11 @@ public: void operator()() { - // Indicate that this strand is executing on the current thread. - call_stack::context ctx(impl_.get()); - // Ensure the next handler, if any, is scheduled on block exit. on_invoker_exit on_exit = { this }; (void)on_exit; - // Run all ready handlers. No lock is required since the ready queue is - // accessed only within the strand. - boost::system::error_code ec; - while (scheduler_operation* o = impl_->ready_queue_.front()) - { - impl_->ready_queue_.pop(); - o->complete(impl_.get(), ec, 0); - } + run_ready_handlers(impl_); } private: @@ -263,7 +230,7 @@ void strand_executor_service::do_execute(const implementation_type& impl, // If the executor is not never-blocking, and we are already in the strand, // then the function can run immediately. if (boost::asio::query(ex, execution::blocking) != execution::blocking.never - && call_stack::contains(impl.get())) + && running_in_this_thread(impl)) { // Make a local, non-const copy of the function. function_type tmp(BOOST_ASIO_MOVE_CAST(Function)(function)); @@ -297,7 +264,7 @@ void strand_executor_service::dispatch(const implementation_type& impl, typedef typename decay::type function_type; // If we are already in the strand then the function can run immediately. - if (call_stack::contains(impl.get())) + if (running_in_this_thread(impl)) { // Make a local, non-const copy of the function. function_type tmp(BOOST_ASIO_MOVE_CAST(Function)(function)); diff --git a/boost/asio/detail/impl/strand_executor_service.ipp b/boost/asio/detail/impl/strand_executor_service.ipp old mode 100755 new mode 100644 index ae27352569b29b4b0e6f0cec63a16cd5aceccad5..bc5b16b077ccb99938c6219153ab633d8b8da19a --- a/boost/asio/detail/impl/strand_executor_service.ipp +++ b/boost/asio/detail/impl/strand_executor_service.ipp @@ -2,7 +2,7 @@ // detail/impl/strand_executor_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -127,6 +127,30 @@ bool strand_executor_service::running_in_this_thread( return !!call_stack::contains(impl.get()); } +bool strand_executor_service::push_waiting_to_ready(implementation_type& impl) +{ + impl->mutex_->lock(); + impl->ready_queue_.push(impl->waiting_queue_); + bool more_handlers = impl->locked_ = !impl->ready_queue_.empty(); + impl->mutex_->unlock(); + return more_handlers; +} + +void strand_executor_service::run_ready_handlers(implementation_type& impl) +{ + // Indicate that this strand is executing on the current thread. + call_stack::context ctx(impl.get()); + + // Run all ready handlers. No lock is required since the ready queue is + // accessed only within the strand. + boost::system::error_code ec; + while (scheduler_operation* o = impl->ready_queue_.front()) + { + impl->ready_queue_.pop(); + o->complete(impl.get(), ec, 0); + } +} + } // namespace detail } // namespace asio } // namespace boost diff --git a/boost/asio/detail/impl/strand_service.hpp b/boost/asio/detail/impl/strand_service.hpp old mode 100755 new mode 100644 index fe95d630ae382bcd6943cf7f031ddff00caf7431..6fcc3bd0708253e5ab28d4e1c768e7ab7a610cae --- a/boost/asio/detail/impl/strand_service.hpp +++ b/boost/asio/detail/impl/strand_service.hpp @@ -2,7 +2,7 @@ // detail/impl/strand_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -15,7 +15,6 @@ # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) -#include #include #include #include @@ -34,29 +33,12 @@ inline strand_service::strand_impl::strand_impl() { } -struct strand_service::on_dispatch_exit -{ - io_context_impl* io_context_impl_; - strand_impl* impl_; - - ~on_dispatch_exit() - { - impl_->mutex_.lock(); - impl_->ready_queue_.push(impl_->waiting_queue_); - bool more_handlers = impl_->locked_ = !impl_->ready_queue_.empty(); - impl_->mutex_.unlock(); - - if (more_handlers) - io_context_impl_->post_immediate_completion(impl_, false); - } -}; - template void strand_service::dispatch(strand_service::implementation_type& impl, Handler& handler) { // If we are already in the strand then the handler can run immediately. - if (call_stack::contains(impl)) + if (running_in_this_thread(impl)) { fenced_block b(fenced_block::full); boost_asio_handler_invoke_helpers::invoke(handler, handler); @@ -72,21 +54,9 @@ void strand_service::dispatch(strand_service::implementation_type& impl, BOOST_ASIO_HANDLER_CREATION((this->context(), *p.p, "strand", impl, 0, "dispatch")); - bool dispatch_immediately = do_dispatch(impl, p.p); operation* o = p.p; p.v = p.p = 0; - - if (dispatch_immediately) - { - // Indicate that this strand is executing on the current thread. - call_stack::context ctx(impl); - - // Ensure the next handler, if any, is scheduled on block exit. - on_dispatch_exit on_exit = { &io_context_impl_, impl }; - (void)on_exit; - - op::do_complete(&io_context_impl_, o, boost::system::error_code(), 0); - } + do_dispatch(impl, o); } // Request the io_context to invoke the given handler and return immediately. diff --git a/boost/asio/detail/impl/strand_service.ipp b/boost/asio/detail/impl/strand_service.ipp old mode 100755 new mode 100644 index 885bb0aa94fc308f025f17865266eb68e31819a2..8ab70c2ddf1756db540fda30e069250268118126 --- a/boost/asio/detail/impl/strand_service.ipp +++ b/boost/asio/detail/impl/strand_service.ipp @@ -2,7 +2,7 @@ // detail/impl/strand_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -92,7 +92,24 @@ bool strand_service::running_in_this_thread( return call_stack::contains(impl) != 0; } -bool strand_service::do_dispatch(implementation_type& impl, operation* op) +struct strand_service::on_dispatch_exit +{ + io_context_impl* io_context_impl_; + strand_impl* impl_; + + ~on_dispatch_exit() + { + impl_->mutex_.lock(); + impl_->ready_queue_.push(impl_->waiting_queue_); + bool more_handlers = impl_->locked_ = !impl_->ready_queue_.empty(); + impl_->mutex_.unlock(); + + if (more_handlers) + io_context_impl_->post_immediate_completion(impl_, false); + } +}; + +void strand_service::do_dispatch(implementation_type& impl, operation* op) { // If we are running inside the io_context, and no other handler already // holds the strand lock, then the handler can run immediately. @@ -103,7 +120,16 @@ bool strand_service::do_dispatch(implementation_type& impl, operation* op) // Immediate invocation is allowed. impl->locked_ = true; impl->mutex_.unlock(); - return true; + + // Indicate that this strand is executing on the current thread. + call_stack::context ctx(impl); + + // Ensure the next handler, if any, is scheduled on block exit. + on_dispatch_exit on_exit = { &io_context_impl_, impl }; + (void)on_exit; + + op->complete(&io_context_impl_, boost::system::error_code(), 0); + return; } if (impl->locked_) @@ -121,8 +147,6 @@ bool strand_service::do_dispatch(implementation_type& impl, operation* op) impl->ready_queue_.push(op); io_context_impl_.post_immediate_completion(impl, false); } - - return false; } void strand_service::do_post(implementation_type& impl, diff --git a/boost/asio/detail/impl/thread_context.ipp b/boost/asio/detail/impl/thread_context.ipp new file mode 100644 index 0000000000000000000000000000000000000000..88c49da113bfa054726cd27d8535ca73a0b4c17b --- /dev/null +++ b/boost/asio/detail/impl/thread_context.ipp @@ -0,0 +1,37 @@ +// +// detail/impl/thread_context.ipp +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// +// 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_ASIO_DETAIL_IMPL_THREAD_CONTEXT_IPP +#define BOOST_ASIO_DETAIL_IMPL_THREAD_CONTEXT_IPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include + +#include + +namespace boost { +namespace asio { +namespace detail { + +thread_info_base* thread_context::top_of_thread_call_stack() +{ + return thread_call_stack::top(); +} + +} // namespace detail +} // namespace asio +} // namespace boost + +#include + +#endif // BOOST_ASIO_DETAIL_IMPL_THREAD_CONTEXT_IPP diff --git a/boost/asio/detail/impl/throw_error.ipp b/boost/asio/detail/impl/throw_error.ipp old mode 100755 new mode 100644 index 06d30ffd1773fc25c50eba5446d1e001b29ca60e..7bdfd8b56b30b4024a4882bf06117205d9323a0b --- a/boost/asio/detail/impl/throw_error.ipp +++ b/boost/asio/detail/impl/throw_error.ipp @@ -2,7 +2,7 @@ // detail/impl/throw_error.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/timer_queue_ptime.ipp b/boost/asio/detail/impl/timer_queue_ptime.ipp old mode 100755 new mode 100644 index d2ae2f4306ef01f1fb01e9eb5bb3a357064eedd2..31297ffcc081665c1bf88003441edc31682fcdf9 --- a/boost/asio/detail/impl/timer_queue_ptime.ipp +++ b/boost/asio/detail/impl/timer_queue_ptime.ipp @@ -2,7 +2,7 @@ // detail/impl/timer_queue_ptime.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/timer_queue_set.ipp b/boost/asio/detail/impl/timer_queue_set.ipp old mode 100755 new mode 100644 index adc300f4484e3503c25349136503c5110dfe5740..afd3506b7ebafbc502b32da9a46d1df38f6794ca --- a/boost/asio/detail/impl/timer_queue_set.ipp +++ b/boost/asio/detail/impl/timer_queue_set.ipp @@ -2,7 +2,7 @@ // detail/impl/timer_queue_set.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/win_event.ipp b/boost/asio/detail/impl/win_event.ipp old mode 100755 new mode 100644 index 2fb7ca4d274550e0648a570a7472abd4db2100db..67a6ffb3d5f6f169ef20d72b66d7749672e285ca --- a/boost/asio/detail/impl/win_event.ipp +++ b/boost/asio/detail/impl/win_event.ipp @@ -2,7 +2,7 @@ // detail/win_event.ipp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/win_iocp_handle_service.ipp b/boost/asio/detail/impl/win_iocp_handle_service.ipp old mode 100755 new mode 100644 index 8dba0afe61b9508eed32e3046513362dbbc5ec73..4d65ed9ad39121c3b58e8cacb6bccc8c76b1d2b5 --- a/boost/asio/detail/impl/win_iocp_handle_service.ipp +++ b/boost/asio/detail/impl/win_iocp_handle_service.ipp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_handle_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/impl/win_iocp_io_context.hpp b/boost/asio/detail/impl/win_iocp_io_context.hpp old mode 100755 new mode 100644 index ef82848ac5baff2a297a2ba019db8a75c12c1b96..44e9ac4cd7df14e12131991943db20553dea77d1 --- a/boost/asio/detail/impl/win_iocp_io_context.hpp +++ b/boost/asio/detail/impl/win_iocp_io_context.hpp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_io_context.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -77,6 +77,7 @@ std::size_t win_iocp_io_context::cancel_timer(timer_queue& queue, mutex::scoped_lock lock(dispatch_mutex_); op_queue ops; std::size_t n = queue.cancel_timer(timer, ops, max_cancelled); + lock.unlock(); post_deferred_completions(ops); return n; } diff --git a/boost/asio/detail/impl/win_iocp_io_context.ipp b/boost/asio/detail/impl/win_iocp_io_context.ipp old mode 100755 new mode 100644 index bc9c1d2b2808ca8c37539d7ae63e3812a5f5a49a..4abce6c4cb3ec365dae89aef34eff0d4dc3717bc --- a/boost/asio/detail/impl/win_iocp_io_context.ipp +++ b/boost/asio/detail/impl/win_iocp_io_context.ipp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_io_context.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -288,6 +288,11 @@ void win_iocp_io_context::stop() } } +bool win_iocp_io_context::can_dispatch() +{ + return thread_call_stack::contains(this) != 0; +} + void win_iocp_io_context::capture_current_exception() { if (thread_info_base* this_thread = thread_call_stack::contains(this)) diff --git a/boost/asio/detail/impl/win_iocp_serial_port_service.ipp b/boost/asio/detail/impl/win_iocp_serial_port_service.ipp old mode 100755 new mode 100644 index aa1ac8a1bb4210dcdc748db50bd18b3e00bd253d..269abea8ee55fb59c41761393918647350ed4829 --- a/boost/asio/detail/impl/win_iocp_serial_port_service.ipp +++ b/boost/asio/detail/impl/win_iocp_serial_port_service.ipp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_serial_port_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/impl/win_iocp_socket_service_base.ipp b/boost/asio/detail/impl/win_iocp_socket_service_base.ipp old mode 100755 new mode 100644 index 4e76a522c13e82abbd5c6fe3f3f1df6e16c526ea..c4c0dff1dd6d13745cce574adf949a05af55ab0a --- a/boost/asio/detail/impl/win_iocp_socket_service_base.ipp +++ b/boost/asio/detail/impl/win_iocp_socket_service_base.ipp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_socket_service_base.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/win_mutex.ipp b/boost/asio/detail/impl/win_mutex.ipp old mode 100755 new mode 100644 index 0982286db7ed92e9c1e3cfb549561a218b7c5987..72ddef8a84a2868ad66c517d6e4f9b2d0b430087 --- a/boost/asio/detail/impl/win_mutex.ipp +++ b/boost/asio/detail/impl/win_mutex.ipp @@ -2,7 +2,7 @@ // detail/impl/win_mutex.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/win_object_handle_service.ipp b/boost/asio/detail/impl/win_object_handle_service.ipp old mode 100755 new mode 100644 index 68b9f2f7ca7006e8248a72e5e838a633f98643a9..b4e066c8ee1251bf5f4bdcc82c3ff5991f1a1251 --- a/boost/asio/detail/impl/win_object_handle_service.ipp +++ b/boost/asio/detail/impl/win_object_handle_service.ipp @@ -2,7 +2,7 @@ // detail/impl/win_object_handle_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2011 Boris Schaeling (boris@highscore.de) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/impl/win_static_mutex.ipp b/boost/asio/detail/impl/win_static_mutex.ipp old mode 100755 new mode 100644 index 8d161f4d5c0e1b1073dab2d1702c07ae01b79e33..88a54b99beda798c80a17c63789a949ce4cc0815 --- a/boost/asio/detail/impl/win_static_mutex.ipp +++ b/boost/asio/detail/impl/win_static_mutex.ipp @@ -2,7 +2,7 @@ // detail/impl/win_static_mutex.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/win_thread.ipp b/boost/asio/detail/impl/win_thread.ipp old mode 100755 new mode 100644 index 400aa93a8de1d5206b80f43be4b2352e0e5a80ad..b901e49afc2bfc4bf0bb4938bc14d86ec93bf687 --- a/boost/asio/detail/impl/win_thread.ipp +++ b/boost/asio/detail/impl/win_thread.ipp @@ -2,7 +2,7 @@ // detail/impl/win_thread.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/win_tss_ptr.ipp b/boost/asio/detail/impl/win_tss_ptr.ipp old mode 100755 new mode 100644 index dce2a22a8b00a84a043ad4cfb2ad68a07efc1c06..c7a82a15d5d65b715538f11c3365fae2f585d498 --- a/boost/asio/detail/impl/win_tss_ptr.ipp +++ b/boost/asio/detail/impl/win_tss_ptr.ipp @@ -2,7 +2,7 @@ // detail/impl/win_tss_ptr.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/winrt_ssocket_service_base.ipp b/boost/asio/detail/impl/winrt_ssocket_service_base.ipp old mode 100755 new mode 100644 index 0aa427db2995b6645848ca372c3b460a0288fc68..cecb16ceb88d27cefdcab30c4387611430a7ee67 --- a/boost/asio/detail/impl/winrt_ssocket_service_base.ipp +++ b/boost/asio/detail/impl/winrt_ssocket_service_base.ipp @@ -2,7 +2,7 @@ // detail/impl/winrt_ssocket_service_base.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/winrt_timer_scheduler.hpp b/boost/asio/detail/impl/winrt_timer_scheduler.hpp old mode 100755 new mode 100644 index 908d6eb793809c1162bb42a4a374fedfe6984d4d..8cc5d3c6ade169a4b0536736ee3b6becb55013f5 --- a/boost/asio/detail/impl/winrt_timer_scheduler.hpp +++ b/boost/asio/detail/impl/winrt_timer_scheduler.hpp @@ -2,7 +2,7 @@ // detail/impl/winrt_timer_scheduler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/winrt_timer_scheduler.ipp b/boost/asio/detail/impl/winrt_timer_scheduler.ipp old mode 100755 new mode 100644 index 03101cdbde63bdc856521cf18c5bb839fc54f6e3..a8ee666d154904ef34a6892e6ca2e9d4193529fe --- a/boost/asio/detail/impl/winrt_timer_scheduler.ipp +++ b/boost/asio/detail/impl/winrt_timer_scheduler.ipp @@ -2,7 +2,7 @@ // detail/impl/winrt_timer_scheduler.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/impl/winsock_init.ipp b/boost/asio/detail/impl/winsock_init.ipp old mode 100755 new mode 100644 index 4e3c5b77821c47722fe3d662aaf9be4b99a1b054..a7e3ac9e8175c5351cc9a58c8ba38ccc4e560e35 --- a/boost/asio/detail/impl/winsock_init.ipp +++ b/boost/asio/detail/impl/winsock_init.ipp @@ -2,7 +2,7 @@ // detail/impl/winsock_init.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/io_control.hpp b/boost/asio/detail/io_control.hpp old mode 100755 new mode 100644 index 6f39b02f4f5a4a3e913192c8caebc79565ecb350..cbf6d45d19b791b29599e81b6382580ffe37fade --- a/boost/asio/detail/io_control.hpp +++ b/boost/asio/detail/io_control.hpp @@ -2,7 +2,7 @@ // detail/io_control.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/io_object_impl.hpp b/boost/asio/detail/io_object_impl.hpp old mode 100755 new mode 100644 index 54a622d6a9dc4d21684d016d9382d1c97ab3352e..cb4cc896738c610ec0171153ed9099e3ca111f13 --- a/boost/asio/detail/io_object_impl.hpp +++ b/boost/asio/detail/io_object_impl.hpp @@ -2,7 +2,7 @@ // io_object_impl.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -44,7 +44,7 @@ public: typedef Executor executor_type; // Construct an I/O object using an executor. - explicit io_object_impl(const executor_type& ex) + explicit io_object_impl(int, const executor_type& ex) : service_(&boost::asio::use_service( io_object_impl::get_context(ex))), executor_(ex) @@ -54,9 +54,7 @@ public: // Construct an I/O object using an execution context. template - explicit io_object_impl(ExecutionContext& context, - typename enable_if::value>::type* = 0) + explicit io_object_impl(int, int, ExecutionContext& context) : service_(&boost::asio::use_service(context)), executor_(context.get_executor()) { @@ -99,8 +97,7 @@ public: service_->move_assign(implementation_, *other.service_, other.implementation_); executor_.~executor_type(); - new (&executor_) executor_type( - std::move(other.executor_)); + new (&executor_) executor_type(other.executor_); service_ = other.service_; } return *this; diff --git a/boost/asio/detail/is_buffer_sequence.hpp b/boost/asio/detail/is_buffer_sequence.hpp old mode 100755 new mode 100644 index efe067baed72830c937f0c0c64ea3f6de7f102c5..53d33ad445a0d1d8da29fdc07f1d6bff42d3a297 --- a/boost/asio/detail/is_buffer_sequence.hpp +++ b/boost/asio/detail/is_buffer_sequence.hpp @@ -2,7 +2,7 @@ // detail/is_buffer_sequence.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/is_executor.hpp b/boost/asio/detail/is_executor.hpp old mode 100755 new mode 100644 index e51cd1448725680c66c5ac4066a437ba38a5672c..abd80dd27f371f272f373b965a23732a69d8a0f6 --- a/boost/asio/detail/is_executor.hpp +++ b/boost/asio/detail/is_executor.hpp @@ -2,7 +2,7 @@ // detail/is_executor.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/keyword_tss_ptr.hpp b/boost/asio/detail/keyword_tss_ptr.hpp old mode 100755 new mode 100644 index 3e2c5af09160d5f5e0286c657d5ef700249c1692..68f296c9b1070d678f487dc8bdb9579e0c91dde6 --- a/boost/asio/detail/keyword_tss_ptr.hpp +++ b/boost/asio/detail/keyword_tss_ptr.hpp @@ -2,7 +2,7 @@ // detail/keyword_tss_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/kqueue_reactor.hpp b/boost/asio/detail/kqueue_reactor.hpp old mode 100755 new mode 100644 index 309b92646c4c15740724aa10156ed415e3829f1e..0823a5e576197f2d41c3ed64d6cb7ab1fa451930 --- a/boost/asio/detail/kqueue_reactor.hpp +++ b/boost/asio/detail/kqueue_reactor.hpp @@ -2,7 +2,7 @@ // detail/kqueue_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/limits.hpp b/boost/asio/detail/limits.hpp old mode 100755 new mode 100644 diff --git a/boost/asio/detail/local_free_on_block_exit.hpp b/boost/asio/detail/local_free_on_block_exit.hpp old mode 100755 new mode 100644 index aec003c3afe158cea32693b3c5454251e286bee0..e9e86fe45c6721f227756e6f836339999f5f25bb --- a/boost/asio/detail/local_free_on_block_exit.hpp +++ b/boost/asio/detail/local_free_on_block_exit.hpp @@ -2,7 +2,7 @@ // detail/local_free_on_block_exit.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/macos_fenced_block.hpp b/boost/asio/detail/macos_fenced_block.hpp old mode 100755 new mode 100644 index b80780311793cef8d8b66f65a8c5f656853f02bf..7dcd267adb9514a4b95ef1bd86975a1de2146abf --- a/boost/asio/detail/macos_fenced_block.hpp +++ b/boost/asio/detail/macos_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/macos_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/memory.hpp b/boost/asio/detail/memory.hpp old mode 100755 new mode 100644 index 438abceb673320f1d4a5470b826a7a3ba0d6a65c..2d2e3a6f8dc85a3e67e6c4c90094bedde628a0d1 --- a/boost/asio/detail/memory.hpp +++ b/boost/asio/detail/memory.hpp @@ -2,7 +2,7 @@ // detail/memory.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/mutex.hpp b/boost/asio/detail/mutex.hpp old mode 100755 new mode 100644 index 0d59719636d29e04d1498e0b4dac826488e1ca1d..c5159dbe8be88567a846c21853aa0c9e2721aa8e --- a/boost/asio/detail/mutex.hpp +++ b/boost/asio/detail/mutex.hpp @@ -2,7 +2,7 @@ // detail/mutex.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/non_const_lvalue.hpp b/boost/asio/detail/non_const_lvalue.hpp old mode 100755 new mode 100644 index 067624b1c5803a9d58cfe4ad80e4c86d7572c1ce..5dad50ffb4ea51f3cb54cb56c45333feb6f15213 --- a/boost/asio/detail/non_const_lvalue.hpp +++ b/boost/asio/detail/non_const_lvalue.hpp @@ -2,7 +2,7 @@ // detail/non_const_lvalue.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/noncopyable.hpp b/boost/asio/detail/noncopyable.hpp old mode 100755 new mode 100644 index ed1e542aca8ab497bb3299ebd9dd4ecfe3dadbda..df955009567213221318c4c4bf3b1e67bf7d5ef4 --- a/boost/asio/detail/noncopyable.hpp +++ b/boost/asio/detail/noncopyable.hpp @@ -2,7 +2,7 @@ // detail/noncopyable.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_event.hpp b/boost/asio/detail/null_event.hpp old mode 100755 new mode 100644 index fa52981aa9a0851e1d04e6cd8c46fccaa8206ae6..131fb3c9afeca01617d5db58dfe9faa784babc63 --- a/boost/asio/detail/null_event.hpp +++ b/boost/asio/detail/null_event.hpp @@ -2,7 +2,7 @@ // detail/null_event.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_fenced_block.hpp b/boost/asio/detail/null_fenced_block.hpp old mode 100755 new mode 100644 index 162e0f02b529e646c0e1a6f42eae0695e0248db2..6406bdcd452e696d5e7e61efc6412831bbc817ea --- a/boost/asio/detail/null_fenced_block.hpp +++ b/boost/asio/detail/null_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/null_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_global.hpp b/boost/asio/detail/null_global.hpp old mode 100755 new mode 100644 index c1de48534e2fcc4e71f93a71642bfd23309af8a3..6a38b52865e69ab218b2d095e654df9da1e2fc5d --- a/boost/asio/detail/null_global.hpp +++ b/boost/asio/detail/null_global.hpp @@ -2,7 +2,7 @@ // detail/null_global.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_mutex.hpp b/boost/asio/detail/null_mutex.hpp old mode 100755 new mode 100644 index 0030e0cd7173e0b701f022bd8200875334e8c15b..81a5d27fa8257734335bf87e3760ed74c9391293 --- a/boost/asio/detail/null_mutex.hpp +++ b/boost/asio/detail/null_mutex.hpp @@ -2,7 +2,7 @@ // detail/null_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_reactor.hpp b/boost/asio/detail/null_reactor.hpp old mode 100755 new mode 100644 index 7a09610adefa781b0ef7e2c4805bf74d5a61f48e..0511731b56e2594f3742eb10c8ea9f0dcf9eec4c --- a/boost/asio/detail/null_reactor.hpp +++ b/boost/asio/detail/null_reactor.hpp @@ -2,7 +2,7 @@ // detail/null_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_signal_blocker.hpp b/boost/asio/detail/null_signal_blocker.hpp old mode 100755 new mode 100644 index db545a0318c94c7d13cb7ee87cf0a6d8161ba394..561ad6cf9817d2d6fbd575377f6cd7b8202bc580 --- a/boost/asio/detail/null_signal_blocker.hpp +++ b/boost/asio/detail/null_signal_blocker.hpp @@ -2,7 +2,7 @@ // detail/null_signal_blocker.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_socket_service.hpp b/boost/asio/detail/null_socket_service.hpp old mode 100755 new mode 100644 index 6b13e080a5e6a045db8fbf864f1920516034bd3f..545a99cc232c0e773a5fad07206ab90a3abb0e72 --- a/boost/asio/detail/null_socket_service.hpp +++ b/boost/asio/detail/null_socket_service.hpp @@ -2,7 +2,7 @@ // detail/null_socket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_static_mutex.hpp b/boost/asio/detail/null_static_mutex.hpp old mode 100755 new mode 100644 index 20841b8175a6764398555b7edeb16a70185d1eee..9ebac46aea64d658a645f7cba6e3008fab72fbc0 --- a/boost/asio/detail/null_static_mutex.hpp +++ b/boost/asio/detail/null_static_mutex.hpp @@ -2,7 +2,7 @@ // detail/null_static_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_thread.hpp b/boost/asio/detail/null_thread.hpp old mode 100755 new mode 100644 index 4fe58415210265b2df11916c14fc8ed059c56781..d0695516b3af23f23bdb079681cb7a17802caf5c --- a/boost/asio/detail/null_thread.hpp +++ b/boost/asio/detail/null_thread.hpp @@ -2,7 +2,7 @@ // detail/null_thread.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/null_tss_ptr.hpp b/boost/asio/detail/null_tss_ptr.hpp old mode 100755 new mode 100644 index 04f5883d7d3d3c63de4d1de0a0defa3c8d9604ce..f2980c882da8cd7b2d727ad694e256355772f23a --- a/boost/asio/detail/null_tss_ptr.hpp +++ b/boost/asio/detail/null_tss_ptr.hpp @@ -2,7 +2,7 @@ // detail/null_tss_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/object_pool.hpp b/boost/asio/detail/object_pool.hpp old mode 100755 new mode 100644 index 26a2bb8bb3fca31d6a4dc91c68121af6f81464d1..1ee2b7379b634eaf139b479fcb1aa70414e154cd --- a/boost/asio/detail/object_pool.hpp +++ b/boost/asio/detail/object_pool.hpp @@ -2,7 +2,7 @@ // detail/object_pool.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/old_win_sdk_compat.hpp b/boost/asio/detail/old_win_sdk_compat.hpp old mode 100755 new mode 100644 index 0329fb827f69887733915c90a356f2e68abe2c43..7c9019cbf1af401c1a4f66528ecf948bb8b93005 --- a/boost/asio/detail/old_win_sdk_compat.hpp +++ b/boost/asio/detail/old_win_sdk_compat.hpp @@ -2,7 +2,7 @@ // detail/old_win_sdk_compat.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/op_queue.hpp b/boost/asio/detail/op_queue.hpp old mode 100755 new mode 100644 index 9465853d1ffbb03457f4b48fc7fa25504ea188cb..1b1557d571b73111f83f34a251f8d278cf7db303 --- a/boost/asio/detail/op_queue.hpp +++ b/boost/asio/detail/op_queue.hpp @@ -2,7 +2,7 @@ // detail/op_queue.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/operation.hpp b/boost/asio/detail/operation.hpp old mode 100755 new mode 100644 index de7a0186814c5adb3578c0001a7f2e03a8e79fba..40eff5114393bd7865ca24acec3bc56a32942d2b --- a/boost/asio/detail/operation.hpp +++ b/boost/asio/detail/operation.hpp @@ -2,7 +2,7 @@ // detail/operation.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/pipe_select_interrupter.hpp b/boost/asio/detail/pipe_select_interrupter.hpp old mode 100755 new mode 100644 index c45235ad5982cc4fc7aeac148991f8bf0c2f0439..d1420b72713184c40a32b66e4bf0a24946b3701e --- a/boost/asio/detail/pipe_select_interrupter.hpp +++ b/boost/asio/detail/pipe_select_interrupter.hpp @@ -2,7 +2,7 @@ // detail/pipe_select_interrupter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/pop_options.hpp b/boost/asio/detail/pop_options.hpp old mode 100755 new mode 100644 index 982c42e4fe4e8a9e579a0c18418b098db0f03c20..5192967b76caf7614fd95b368d0aaf47bbaf58ff --- a/boost/asio/detail/pop_options.hpp +++ b/boost/asio/detail/pop_options.hpp @@ -2,7 +2,7 @@ // detail/pop_options.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/posix_event.hpp b/boost/asio/detail/posix_event.hpp old mode 100755 new mode 100644 index 10c920dbf3c7813829e68b60fa23a20dd25ace34..c153643f928a34f14b73b6b15b9b5a8d2a58e63c --- a/boost/asio/detail/posix_event.hpp +++ b/boost/asio/detail/posix_event.hpp @@ -2,7 +2,7 @@ // detail/posix_event.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/posix_fd_set_adapter.hpp b/boost/asio/detail/posix_fd_set_adapter.hpp old mode 100755 new mode 100644 index 3f66d98c169f434632738c190fc7a7a0f198ea1f..89302ab6894206538089767fda53358ecc98dad7 --- a/boost/asio/detail/posix_fd_set_adapter.hpp +++ b/boost/asio/detail/posix_fd_set_adapter.hpp @@ -2,7 +2,7 @@ // detail/posix_fd_set_adapter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/posix_global.hpp b/boost/asio/detail/posix_global.hpp old mode 100755 new mode 100644 index 284300127e17df62a50fdc28840fc7a85d08826c..a9ac379d7ba54ff6bf9ff7986e790dff64c9042b --- a/boost/asio/detail/posix_global.hpp +++ b/boost/asio/detail/posix_global.hpp @@ -2,7 +2,7 @@ // detail/posix_global.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/posix_mutex.hpp b/boost/asio/detail/posix_mutex.hpp old mode 100755 new mode 100644 index 4c1cf158190589ab4b28e350226e7b2547393d9d..be66370063607f34cb266ee8a43a677f055f5688 --- a/boost/asio/detail/posix_mutex.hpp +++ b/boost/asio/detail/posix_mutex.hpp @@ -2,7 +2,7 @@ // detail/posix_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/posix_signal_blocker.hpp b/boost/asio/detail/posix_signal_blocker.hpp old mode 100755 new mode 100644 index 0780bc8d8d4124a84da3d58fab56a79d43b3dfef..abd126e01e5452e896b54c103e7f4f3d26c3a2c7 --- a/boost/asio/detail/posix_signal_blocker.hpp +++ b/boost/asio/detail/posix_signal_blocker.hpp @@ -2,7 +2,7 @@ // detail/posix_signal_blocker.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/posix_static_mutex.hpp b/boost/asio/detail/posix_static_mutex.hpp old mode 100755 new mode 100644 index 0a0d47b20b8a8725ea24cfda80306842097f8666..d2d1187445ec892bfcff2ce49b9b78a26ff81278 --- a/boost/asio/detail/posix_static_mutex.hpp +++ b/boost/asio/detail/posix_static_mutex.hpp @@ -2,7 +2,7 @@ // detail/posix_static_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/posix_thread.hpp b/boost/asio/detail/posix_thread.hpp old mode 100755 new mode 100644 index ea5212cda774c36e2fdf5fa6dd20a7d5caaae047..8b52c8a38ac8c673c42e1bce1e8cb9872b4d899b --- a/boost/asio/detail/posix_thread.hpp +++ b/boost/asio/detail/posix_thread.hpp @@ -2,7 +2,7 @@ // detail/posix_thread.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/posix_tss_ptr.hpp b/boost/asio/detail/posix_tss_ptr.hpp old mode 100755 new mode 100644 index 813ff2495b9e71d4b00b6dfe759462d30123e32d..f014bfba76439e3bacd4bd017fd3efc8ffa78f46 --- a/boost/asio/detail/posix_tss_ptr.hpp +++ b/boost/asio/detail/posix_tss_ptr.hpp @@ -2,7 +2,7 @@ // detail/posix_tss_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/push_options.hpp b/boost/asio/detail/push_options.hpp old mode 100755 new mode 100644 index 201f18a0422e1663d3e745617fe12a00907dfd64..d658413223fcccf96b6aa4f037e09b2b7ce24da1 --- a/boost/asio/detail/push_options.hpp +++ b/boost/asio/detail/push_options.hpp @@ -2,7 +2,7 @@ // detail/push_options.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -53,6 +53,9 @@ # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wnon-virtual-dtor" +# if (__clang_major__ >= 6) +# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" +# endif // (__clang_major__ >= 6) #elif defined(__GNUC__) @@ -82,6 +85,9 @@ # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wnon-virtual-dtor" +# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4) +# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" +# endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4) # if (__GNUC__ >= 7) # pragma GCC diagnostic ignored "-Wimplicit-fallthrough" # endif // (__GNUC__ >= 7) diff --git a/boost/asio/detail/reactive_descriptor_service.hpp b/boost/asio/detail/reactive_descriptor_service.hpp old mode 100755 new mode 100644 index 4ed42a26e4afb331b15f75a01e5848c5f7781053..b6cf08a7835d5d879a55ca0b9b4d083fd4c3a592 --- a/boost/asio/detail/reactive_descriptor_service.hpp +++ b/boost/asio/detail/reactive_descriptor_service.hpp @@ -2,7 +2,7 @@ // detail/reactive_descriptor_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactive_null_buffers_op.hpp b/boost/asio/detail/reactive_null_buffers_op.hpp old mode 100755 new mode 100644 index 87de33bb47eb7bf43727bde3fe360ca463600b5a..d591acbfa3256587b076807d4d3e4e0d30929970 --- a/boost/asio/detail/reactive_null_buffers_op.hpp +++ b/boost/asio/detail/reactive_null_buffers_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_null_buffers_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactive_serial_port_service.hpp b/boost/asio/detail/reactive_serial_port_service.hpp old mode 100755 new mode 100644 index 776762fc39350b94855c116ab98a9a3da70c5dfa..cf9a77baf7b94eb3213139b383fd647f184441ae --- a/boost/asio/detail/reactive_serial_port_service.hpp +++ b/boost/asio/detail/reactive_serial_port_service.hpp @@ -2,7 +2,7 @@ // detail/reactive_serial_port_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/reactive_socket_accept_op.hpp b/boost/asio/detail/reactive_socket_accept_op.hpp old mode 100755 new mode 100644 index 878ffc7e81ce80d06fbc221bc69c07f25262c6c7..e60111c28812715d20c1d5c1e195c8d24655c565 --- a/boost/asio/detail/reactive_socket_accept_op.hpp +++ b/boost/asio/detail/reactive_socket_accept_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_accept_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactive_socket_connect_op.hpp b/boost/asio/detail/reactive_socket_connect_op.hpp old mode 100755 new mode 100644 index 81091b72c659c80183a9503f31d4072086715a64..36a48a1d90ac23fb9d3fc29bc9609e0c231893c5 --- a/boost/asio/detail/reactive_socket_connect_op.hpp +++ b/boost/asio/detail/reactive_socket_connect_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_connect_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactive_socket_recv_op.hpp b/boost/asio/detail/reactive_socket_recv_op.hpp old mode 100755 new mode 100644 index f58de9ad044e5eac2ce3d3390198ffe8dc3e8f34..afee8ab5aefa2ddb949de6f7f9f8090043d53efc --- a/boost/asio/detail/reactive_socket_recv_op.hpp +++ b/boost/asio/detail/reactive_socket_recv_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_recv_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactive_socket_recvfrom_op.hpp b/boost/asio/detail/reactive_socket_recvfrom_op.hpp old mode 100755 new mode 100644 index b91dd02a65f580582721bd207124fbb93ed851b3..41d57e720626f000544ee87b24c57c68dcf100c2 --- a/boost/asio/detail/reactive_socket_recvfrom_op.hpp +++ b/boost/asio/detail/reactive_socket_recvfrom_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_recvfrom_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactive_socket_recvmsg_op.hpp b/boost/asio/detail/reactive_socket_recvmsg_op.hpp old mode 100755 new mode 100644 index 15d5c7eacd6b1a2f8dfc623d45c5f6d77660e2f0..798feda7b1a3c3e89132dad15b3f7bdb20c3c141 --- a/boost/asio/detail/reactive_socket_recvmsg_op.hpp +++ b/boost/asio/detail/reactive_socket_recvmsg_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_recvmsg_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactive_socket_send_op.hpp b/boost/asio/detail/reactive_socket_send_op.hpp old mode 100755 new mode 100644 index 9840e4c431d9d0c09eb288d47e5d89bb63bb2862..03ff0e88e530bbf177b31a2165c6b96b658b8346 --- a/boost/asio/detail/reactive_socket_send_op.hpp +++ b/boost/asio/detail/reactive_socket_send_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_send_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactive_socket_sendto_op.hpp b/boost/asio/detail/reactive_socket_sendto_op.hpp old mode 100755 new mode 100644 index 834fe555d651e17f611f2b88055a116041cce222..f6e8b33b866408333cc18bba918522458f4859b4 --- a/boost/asio/detail/reactive_socket_sendto_op.hpp +++ b/boost/asio/detail/reactive_socket_sendto_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_sendto_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactive_socket_service.hpp b/boost/asio/detail/reactive_socket_service.hpp old mode 100755 new mode 100644 index 74ca8ae00be9aac18fbe33252f028d5245fb33bc..6f030f00a94dfde8fc275d5bf08fbca09dde7ec1 --- a/boost/asio/detail/reactive_socket_service.hpp +++ b/boost/asio/detail/reactive_socket_service.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactive_socket_service_base.hpp b/boost/asio/detail/reactive_socket_service_base.hpp old mode 100755 new mode 100644 index 29b379f013bbdfc5dac678e72643e59d46d6bbb7..fbe5dc390ec1d0772b0cd5a0536e9e39d35cfa2a --- a/boost/asio/detail/reactive_socket_service_base.hpp +++ b/boost/asio/detail/reactive_socket_service_base.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_service_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactive_wait_op.hpp b/boost/asio/detail/reactive_wait_op.hpp old mode 100755 new mode 100644 index 424c28a1b97c0cee30b89961450dd5a172506f12..b9fdace49db5b5c240577919511bf2753ac47aed --- a/boost/asio/detail/reactive_wait_op.hpp +++ b/boost/asio/detail/reactive_wait_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_wait_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactor.hpp b/boost/asio/detail/reactor.hpp old mode 100755 new mode 100644 index be08911ffa1702e178f529fd58bc01fff8ea6bc1..b6bc3c245c85e5da7bee39fd1a2d38736a32f4a7 --- a/boost/asio/detail/reactor.hpp +++ b/boost/asio/detail/reactor.hpp @@ -2,7 +2,7 @@ // detail/reactor.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactor_fwd.hpp b/boost/asio/detail/reactor_fwd.hpp old mode 100755 new mode 100644 index ae5f1609e86c28344d0e36162cd349c39bb5e712..41f144986bf8cdbc1d61f87ef20e372e73c9a25d --- a/boost/asio/detail/reactor_fwd.hpp +++ b/boost/asio/detail/reactor_fwd.hpp @@ -2,7 +2,7 @@ // detail/reactor_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactor_op.hpp b/boost/asio/detail/reactor_op.hpp old mode 100755 new mode 100644 index 5985e9351b0e3f31f5bfd618a2e22afc9d4587b2..eed3236eb983c837fa1c606b2e3b7ace3390c67a --- a/boost/asio/detail/reactor_op.hpp +++ b/boost/asio/detail/reactor_op.hpp @@ -2,7 +2,7 @@ // detail/reactor_op.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/reactor_op_queue.hpp b/boost/asio/detail/reactor_op_queue.hpp old mode 100755 new mode 100644 index c85f98cf4f08bad971cfbb1193ca7b3445760e08..51e29229272ea8d7d10df6eed7b2ce3a1f7374db --- a/boost/asio/detail/reactor_op_queue.hpp +++ b/boost/asio/detail/reactor_op_queue.hpp @@ -2,7 +2,7 @@ // detail/reactor_op_queue.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/recycling_allocator.hpp b/boost/asio/detail/recycling_allocator.hpp old mode 100755 new mode 100644 index 3fa927857743c9e7c76c3996fd71c02219ed86d0..b185d88c01ce6b3164222176458c2d8f40f1f676 --- a/boost/asio/detail/recycling_allocator.hpp +++ b/boost/asio/detail/recycling_allocator.hpp @@ -2,7 +2,7 @@ // detail/recycling_allocator.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -49,17 +49,15 @@ public: T* allocate(std::size_t n) { - typedef thread_context::thread_call_stack call_stack; void* p = thread_info_base::allocate(Purpose(), - call_stack::top(), sizeof(T) * n); + thread_context::top_of_thread_call_stack(), sizeof(T) * n); return static_cast(p); } void deallocate(T* p, std::size_t n) { - typedef thread_context::thread_call_stack call_stack; thread_info_base::deallocate(Purpose(), - call_stack::top(), p, sizeof(T) * n); + thread_context::top_of_thread_call_stack(), p, sizeof(T) * n); } }; diff --git a/boost/asio/detail/regex_fwd.hpp b/boost/asio/detail/regex_fwd.hpp old mode 100755 new mode 100644 index 64ff2ad7cccf49001d950540e28146de52737306..fc0160c4bb224e6374994f38cc063eafb7ee1cf7 --- a/boost/asio/detail/regex_fwd.hpp +++ b/boost/asio/detail/regex_fwd.hpp @@ -2,7 +2,7 @@ // detail/regex_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -18,7 +18,16 @@ #if defined(BOOST_ASIO_HAS_BOOST_REGEX) #include -#include +#include +#if BOOST_VERSION >= 107600 +# if defined(BOOST_REGEX_CXX03) +# include +# else // defined(BOOST_REGEX_CXX03) +# include +# endif // defined(BOOST_REGEX_CXX03) +#else // BOOST_VERSION >= 107600 +# include +#endif // BOOST_VERSION >= 107600 namespace boost { diff --git a/boost/asio/detail/resolve_endpoint_op.hpp b/boost/asio/detail/resolve_endpoint_op.hpp old mode 100755 new mode 100644 index 6d6e37cc205b2edb7987619e2ae280f34d0c3d82..1947642a79b238233ebb13fcc7eddd2bd3b5e800 --- a/boost/asio/detail/resolve_endpoint_op.hpp +++ b/boost/asio/detail/resolve_endpoint_op.hpp @@ -2,7 +2,7 @@ // detail/resolve_endpoint_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/resolve_op.hpp b/boost/asio/detail/resolve_op.hpp old mode 100755 new mode 100644 index 682c8f0080d246cafc9db230bc6d787ccbad3955..123a580b3a3688d10f10abbef179018734d8d46e --- a/boost/asio/detail/resolve_op.hpp +++ b/boost/asio/detail/resolve_op.hpp @@ -2,7 +2,7 @@ // detail/resolve_op.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/resolve_query_op.hpp b/boost/asio/detail/resolve_query_op.hpp old mode 100755 new mode 100644 index 2b2ca2d973bf024198053658a1ecf86587f6f66f..4191c391663af1b18a72ddbd508cd727915d5fcc --- a/boost/asio/detail/resolve_query_op.hpp +++ b/boost/asio/detail/resolve_query_op.hpp @@ -2,7 +2,7 @@ // detail/resolve_query_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -56,11 +56,11 @@ public: #endif resolve_query_op(socket_ops::weak_cancel_token_type cancel_token, - const query_type& query, scheduler_impl& sched, + const query_type& qry, scheduler_impl& sched, Handler& handler, const IoExecutor& io_ex) : resolve_op(&resolve_query_op::do_complete), cancel_token_(cancel_token), - query_(query), + query_(qry), scheduler_(sched), handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)), work_(handler_, io_ex), diff --git a/boost/asio/detail/resolver_service.hpp b/boost/asio/detail/resolver_service.hpp old mode 100755 new mode 100644 index dfde7011d081824c1dcea26e3fc4fb3e284a5a05..46b01ecbae5a4fb1bb1d4c897c69cea3061e8447 --- a/boost/asio/detail/resolver_service.hpp +++ b/boost/asio/detail/resolver_service.hpp @@ -2,7 +2,7 @@ // detail/resolver_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -72,29 +72,29 @@ public: } // Resolve a query to a list of entries. - results_type resolve(implementation_type&, const query_type& query, + results_type resolve(implementation_type&, const query_type& qry, boost::system::error_code& ec) { boost::asio::detail::addrinfo_type* address_info = 0; - socket_ops::getaddrinfo(query.host_name().c_str(), - query.service_name().c_str(), query.hints(), &address_info, ec); + socket_ops::getaddrinfo(qry.host_name().c_str(), + qry.service_name().c_str(), qry.hints(), &address_info, ec); auto_addrinfo auto_address_info(address_info); return ec ? results_type() : results_type::create( - address_info, query.host_name(), query.service_name()); + address_info, qry.host_name(), qry.service_name()); } // Asynchronously resolve a query to a list of entries. template - void async_resolve(implementation_type& impl, const query_type& query, + void async_resolve(implementation_type& impl, const query_type& qry, Handler& handler, const IoExecutor& io_ex) { // Allocate and construct an operation to wrap the handler. typedef resolve_query_op op; typename op::ptr p = { boost::asio::detail::addressof(handler), op::ptr::allocate(handler), 0 }; - p.p = new (p.v) op(impl, query, scheduler_, handler, io_ex); + p.p = new (p.v) op(impl, qry, scheduler_, handler, io_ex); BOOST_ASIO_HANDLER_CREATION((scheduler_.context(), *p.p, "resolver", &impl, 0, "async_resolve")); diff --git a/boost/asio/detail/resolver_service_base.hpp b/boost/asio/detail/resolver_service_base.hpp old mode 100755 new mode 100644 index 5c3fe5b49c9ee33b50499bfdded8481b8a38ba2d..0d43bef91fcf25698b70c85945d06ffb307a4eae --- a/boost/asio/detail/resolver_service_base.hpp +++ b/boost/asio/detail/resolver_service_base.hpp @@ -2,7 +2,7 @@ // detail/resolver_service_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -73,6 +73,21 @@ public: resolver_service_base& other_service, implementation_type& other_impl); + // Move-construct a new timer implementation. + void converting_move_construct(implementation_type& impl, + resolver_service_base&, implementation_type& other_impl) + { + move_construct(impl, other_impl); + } + + // Move-assign from another timer implementation. + void converting_move_assign(implementation_type& impl, + resolver_service_base& other_service, + implementation_type& other_impl) + { + move_assign(impl, other_service, other_impl); + } + // Cancel pending asynchronous operations. BOOST_ASIO_DECL void cancel(implementation_type& impl); diff --git a/boost/asio/detail/scheduler.hpp b/boost/asio/detail/scheduler.hpp old mode 100755 new mode 100644 index a71279bc754869219c9a7cba47ae1a57126b4d7e..dfff09e93e78c9066ebf5b0de078409793d01264 --- a/boost/asio/detail/scheduler.hpp +++ b/boost/asio/detail/scheduler.hpp @@ -2,7 +2,7 @@ // detail/scheduler.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -100,10 +100,7 @@ public: } // Return whether a handler can be dispatched immediately. - bool can_dispatch() - { - return thread_call_stack::contains(this) != 0; - } + BOOST_ASIO_DECL bool can_dispatch(); /// Capture the current exception so it can be rethrown from a run function. BOOST_ASIO_DECL void capture_current_exception(); diff --git a/boost/asio/detail/scheduler_operation.hpp b/boost/asio/detail/scheduler_operation.hpp old mode 100755 new mode 100644 index 3a37b767756e8a1da4fb9e19139dd295de0699f6..bbe231f1d2780eb95a83b8445a78416a202024b0 --- a/boost/asio/detail/scheduler_operation.hpp +++ b/boost/asio/detail/scheduler_operation.hpp @@ -2,7 +2,7 @@ // detail/scheduler_operation.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/scheduler_thread_info.hpp b/boost/asio/detail/scheduler_thread_info.hpp old mode 100755 new mode 100644 index 272a63d9554d8730032898444c593e05fc162f45..9202fbaed6b728ad82a336fe2257da7e458fb560 --- a/boost/asio/detail/scheduler_thread_info.hpp +++ b/boost/asio/detail/scheduler_thread_info.hpp @@ -2,7 +2,7 @@ // detail/scheduler_thread_info.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/scoped_lock.hpp b/boost/asio/detail/scoped_lock.hpp old mode 100755 new mode 100644 index bbf75887f0d519fb2f6098329c7a92120a03332e..71e072bf60b207b24995ac25115049444903c5c8 --- a/boost/asio/detail/scoped_lock.hpp +++ b/boost/asio/detail/scoped_lock.hpp @@ -2,7 +2,7 @@ // detail/scoped_lock.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/scoped_ptr.hpp b/boost/asio/detail/scoped_ptr.hpp old mode 100755 new mode 100644 index 39cbff11e6ec2ed71fc36b8070877de6d7848d18..f465890d1149d58b6d08e660f9dec6235f72e8e1 --- a/boost/asio/detail/scoped_ptr.hpp +++ b/boost/asio/detail/scoped_ptr.hpp @@ -2,7 +2,7 @@ // detail/scoped_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/select_interrupter.hpp b/boost/asio/detail/select_interrupter.hpp old mode 100755 new mode 100644 index 7f58f07a0b847be573f02af5dc849c00806c249a..485a66b949d3965c5026e69f2156743006f18b8e --- a/boost/asio/detail/select_interrupter.hpp +++ b/boost/asio/detail/select_interrupter.hpp @@ -2,7 +2,7 @@ // detail/select_interrupter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/select_reactor.hpp b/boost/asio/detail/select_reactor.hpp old mode 100755 new mode 100644 index afcb77544eef14a9eb892d41fac25e001f97deb8..b5f0b782f5555725f6501f88615102004170e11d --- a/boost/asio/detail/select_reactor.hpp +++ b/boost/asio/detail/select_reactor.hpp @@ -2,7 +2,7 @@ // detail/select_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/service_registry.hpp b/boost/asio/detail/service_registry.hpp old mode 100755 new mode 100644 index 589ecef6387d90c9e76ea01b686a1c9f9c142266..68aac83032de58ca3c29340c43d776334891a2c3 --- a/boost/asio/detail/service_registry.hpp +++ b/boost/asio/detail/service_registry.hpp @@ -2,7 +2,7 @@ // detail/service_registry.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/signal_blocker.hpp b/boost/asio/detail/signal_blocker.hpp old mode 100755 new mode 100644 index 29d96c99fbaf872c0d6d0d2cddcac771cd126f42..d9aebc7d7762ae58c99304b7bd143f3fb9f49936 --- a/boost/asio/detail/signal_blocker.hpp +++ b/boost/asio/detail/signal_blocker.hpp @@ -2,7 +2,7 @@ // detail/signal_blocker.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/signal_handler.hpp b/boost/asio/detail/signal_handler.hpp old mode 100755 new mode 100644 index 459b81ab6e5336ffac114b27d7643dba596763d5..8928c90af912886968411d6060bfd5d0c02cf9e1 --- a/boost/asio/detail/signal_handler.hpp +++ b/boost/asio/detail/signal_handler.hpp @@ -2,7 +2,7 @@ // detail/signal_handler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/signal_init.hpp b/boost/asio/detail/signal_init.hpp old mode 100755 new mode 100644 index d60bcdd8481648bafe25c77e79cbf7e3c746b84d..72d252b8075deccb52c9b1ef9d2e2dc6b7dd3b6d --- a/boost/asio/detail/signal_init.hpp +++ b/boost/asio/detail/signal_init.hpp @@ -2,7 +2,7 @@ // detail/signal_init.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/signal_op.hpp b/boost/asio/detail/signal_op.hpp old mode 100755 new mode 100644 index 2bc1fb57f98189686ab1fe32d7698416f623a3c1..ad05dd78f7af1e0b03d6ad9bb8f351df69d8a115 --- a/boost/asio/detail/signal_op.hpp +++ b/boost/asio/detail/signal_op.hpp @@ -2,7 +2,7 @@ // detail/signal_op.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/signal_set_service.hpp b/boost/asio/detail/signal_set_service.hpp old mode 100755 new mode 100644 index fe9b5bb3cf9a8cf70b92c692e635dca765fb6747..8dfecb19f2b3e78c69dedd48819d4614e36bdb16 --- a/boost/asio/detail/signal_set_service.hpp +++ b/boost/asio/detail/signal_set_service.hpp @@ -2,7 +2,7 @@ // detail/signal_set_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/socket_holder.hpp b/boost/asio/detail/socket_holder.hpp old mode 100755 new mode 100644 index 978b39cb38d9fff5f952c0cd1e3c00eb1740d629..e941fc554edf9d542342976518aba7fe5c252cf7 --- a/boost/asio/detail/socket_holder.hpp +++ b/boost/asio/detail/socket_holder.hpp @@ -2,7 +2,7 @@ // detail/socket_holder.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/socket_ops.hpp b/boost/asio/detail/socket_ops.hpp old mode 100755 new mode 100644 index 6f10188816ad0b450e2a1a6a297a580ced30026a..0bb20d66956609eeb753b6d5a275f048c22cbc68 --- a/boost/asio/detail/socket_ops.hpp +++ b/boost/asio/detail/socket_ops.hpp @@ -2,7 +2,7 @@ // detail/socket_ops.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/socket_option.hpp b/boost/asio/detail/socket_option.hpp old mode 100755 new mode 100644 index 1607bb385bf6d72a98281a025207b4b7fe2f362b..5eba4776d5fc31d8332ec2f8afe757f76ed745b9 --- a/boost/asio/detail/socket_option.hpp +++ b/boost/asio/detail/socket_option.hpp @@ -2,7 +2,7 @@ // detail/socket_option.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/socket_select_interrupter.hpp b/boost/asio/detail/socket_select_interrupter.hpp old mode 100755 new mode 100644 index 9dc2b7bcf8b09601bd67475b38234488be9dcc51..382fb34619895b4246316147ea76f60d052ebc0b --- a/boost/asio/detail/socket_select_interrupter.hpp +++ b/boost/asio/detail/socket_select_interrupter.hpp @@ -2,7 +2,7 @@ // detail/socket_select_interrupter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/socket_types.hpp b/boost/asio/detail/socket_types.hpp old mode 100755 new mode 100644 index 115e2ad54034c66ec64e1d6cf822fd6cdc78d8ec..4099deec3728f08db55afe85ff918eee281b248a --- a/boost/asio/detail/socket_types.hpp +++ b/boost/asio/detail/socket_types.hpp @@ -2,7 +2,7 @@ // detail/socket_types.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -207,6 +207,7 @@ typedef unsigned long ioctl_arg_type; typedef u_long u_long_type; typedef u_short u_short_type; typedef int signed_size_type; +struct sockaddr_un_type { u_short sun_family; char sun_path[108]; }; # define BOOST_ASIO_OS_DEF(c) BOOST_ASIO_OS_DEF_##c # define BOOST_ASIO_OS_DEF_AF_UNSPEC AF_UNSPEC # define BOOST_ASIO_OS_DEF_AF_INET AF_INET diff --git a/boost/asio/detail/solaris_fenced_block.hpp b/boost/asio/detail/solaris_fenced_block.hpp old mode 100755 new mode 100644 index 56b7ba88e854f8d57dee7949789aedf338030cb8..e87432ba73e9dd727dd35abb24e6c1246616f7d3 --- a/boost/asio/detail/solaris_fenced_block.hpp +++ b/boost/asio/detail/solaris_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/solaris_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/source_location.hpp b/boost/asio/detail/source_location.hpp index e36ef8c60e9a47271e63d6097ff1682f68dc934f..094bed3b8599c7ef7e367d52e3f471a793674dfe 100644 --- a/boost/asio/detail/source_location.hpp +++ b/boost/asio/detail/source_location.hpp @@ -2,7 +2,7 @@ // detail/source_location.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/static_mutex.hpp b/boost/asio/detail/static_mutex.hpp old mode 100755 new mode 100644 index e763104ac4dced431dec02d6d7243347d341f90b..5851bd7b457f59f3eae1ae1a3ee7117e59257e16 --- a/boost/asio/detail/static_mutex.hpp +++ b/boost/asio/detail/static_mutex.hpp @@ -2,7 +2,7 @@ // detail/static_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/std_event.hpp b/boost/asio/detail/std_event.hpp old mode 100755 new mode 100644 index 32ad0441dd5c683b79e9ba2440a52ddc81c1877b..68c8c8fe0374f31ed463d325f1e42df347f492b0 --- a/boost/asio/detail/std_event.hpp +++ b/boost/asio/detail/std_event.hpp @@ -2,7 +2,7 @@ // detail/std_event.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -76,7 +76,7 @@ public: // Unlock the mutex and signal one waiter who may destroy us. template - void unlock_and_signal_one(Lock& lock) + void unlock_and_signal_one_for_destruction(Lock& lock) { BOOST_ASIO_ASSERT(lock.locked()); state_ |= 1; diff --git a/boost/asio/detail/std_fenced_block.hpp b/boost/asio/detail/std_fenced_block.hpp old mode 100755 new mode 100644 index 40f1a9eeb7f5de9fd4faf4f515792ba4a5ce100b..1617c4f9d7b602194ec9d762cefc927c2323c64b --- a/boost/asio/detail/std_fenced_block.hpp +++ b/boost/asio/detail/std_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/std_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/std_global.hpp b/boost/asio/detail/std_global.hpp old mode 100755 new mode 100644 index 75209fe0b9942792ce1308c051b7918f63e15ac3..f4127e4ef2c1b7da3edd215de39a44a46cc75a6b --- a/boost/asio/detail/std_global.hpp +++ b/boost/asio/detail/std_global.hpp @@ -2,7 +2,7 @@ // detail/std_global.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/std_mutex.hpp b/boost/asio/detail/std_mutex.hpp old mode 100755 new mode 100644 index 3ee7cdfd8a039afc457e439ba6ec368f8a8a3492..cb2b0bd401c4876e4c2fe4256b011caeeabdbf2c --- a/boost/asio/detail/std_mutex.hpp +++ b/boost/asio/detail/std_mutex.hpp @@ -2,7 +2,7 @@ // detail/std_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/std_static_mutex.hpp b/boost/asio/detail/std_static_mutex.hpp old mode 100755 new mode 100644 index ee34afcf5cb1c61b97488befbc9ee36b91271ab2..c87296262593631b5638241fd9619501ea85dc15 --- a/boost/asio/detail/std_static_mutex.hpp +++ b/boost/asio/detail/std_static_mutex.hpp @@ -2,7 +2,7 @@ // detail/std_static_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/std_thread.hpp b/boost/asio/detail/std_thread.hpp old mode 100755 new mode 100644 index 784655cc624a9b11942544c06d7cca223f964e5a..3d1d3d496963ddbcbc02446f3b4433809b0f3dc6 --- a/boost/asio/detail/std_thread.hpp +++ b/boost/asio/detail/std_thread.hpp @@ -2,7 +2,7 @@ // detail/std_thread.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/strand_executor_service.hpp b/boost/asio/detail/strand_executor_service.hpp old mode 100755 new mode 100644 index 2ec7be0243a73eb8ca3e02325ddfb57567dd60ad..bb84f884de01d9d4333fe75ea6ee75efa0504a0a --- a/boost/asio/detail/strand_executor_service.hpp +++ b/boost/asio/detail/strand_executor_service.hpp @@ -2,7 +2,7 @@ // detail/strand_executor_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -132,6 +132,13 @@ private: BOOST_ASIO_DECL static bool enqueue(const implementation_type& impl, scheduler_operation* op); + // Transfers waiting handlers to the ready queue. Returns true if one or more + // handlers were transferred. + BOOST_ASIO_DECL static bool push_waiting_to_ready(implementation_type& impl); + + // Invokes all ready-to-run handlers. + BOOST_ASIO_DECL static void run_ready_handlers(implementation_type& impl); + // Helper function to request invocation of the given function. template static void do_execute(const implementation_type& impl, Executor& ex, diff --git a/boost/asio/detail/strand_service.hpp b/boost/asio/detail/strand_service.hpp old mode 100755 new mode 100644 index 17fdb749d97b1f6f938cade2e552300b0c9d5b36..bff9322416bf189759faa725a1e1720d720b7a2e --- a/boost/asio/detail/strand_service.hpp +++ b/boost/asio/detail/strand_service.hpp @@ -2,7 +2,7 @@ // detail/strand_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -97,11 +97,10 @@ public: const implementation_type& impl) const; private: - // Helper function to dispatch a handler. Returns true if the handler should - // be dispatched immediately. - BOOST_ASIO_DECL bool do_dispatch(implementation_type& impl, operation* op); + // Helper function to dispatch a handler. + BOOST_ASIO_DECL void do_dispatch(implementation_type& impl, operation* op); - // Helper fiunction to post a handler. + // Helper function to post a handler. BOOST_ASIO_DECL void do_post(implementation_type& impl, operation* op, bool is_continuation); diff --git a/boost/asio/detail/string_view.hpp b/boost/asio/detail/string_view.hpp old mode 100755 new mode 100644 index 7b2853c5d84de699ede5e205dbf87d9e98663dc1..0a505a0ad4fbb9e8074913c61d2b6ccc0bff4c76 --- a/boost/asio/detail/string_view.hpp +++ b/boost/asio/detail/string_view.hpp @@ -2,7 +2,7 @@ // detail/string_view.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/thread.hpp b/boost/asio/detail/thread.hpp old mode 100755 new mode 100644 index 6df93f9a71f15620e377ea82eb06f01344b865f6..42e23d361415dbf3b1667d6e1e74ed7dc90d453e --- a/boost/asio/detail/thread.hpp +++ b/boost/asio/detail/thread.hpp @@ -2,7 +2,7 @@ // detail/thread.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -19,6 +19,8 @@ #if !defined(BOOST_ASIO_HAS_THREADS) # include +#elif defined(BOOST_ASIO_HAS_PTHREADS) +# include #elif defined(BOOST_ASIO_WINDOWS) # if defined(UNDER_CE) # include @@ -27,8 +29,6 @@ # else # include # endif -#elif defined(BOOST_ASIO_HAS_PTHREADS) -# include #elif defined(BOOST_ASIO_HAS_STD_THREAD) # include #else @@ -41,6 +41,8 @@ namespace detail { #if !defined(BOOST_ASIO_HAS_THREADS) typedef null_thread thread; +#elif defined(BOOST_ASIO_HAS_PTHREADS) +typedef posix_thread thread; #elif defined(BOOST_ASIO_WINDOWS) # if defined(UNDER_CE) typedef wince_thread thread; @@ -49,8 +51,6 @@ typedef winapp_thread thread; # else typedef win_thread thread; # endif -#elif defined(BOOST_ASIO_HAS_PTHREADS) -typedef posix_thread thread; #elif defined(BOOST_ASIO_HAS_STD_THREAD) typedef std_thread thread; #endif diff --git a/boost/asio/detail/thread_context.hpp b/boost/asio/detail/thread_context.hpp old mode 100755 new mode 100644 index 74605348099323b58231b947b3309296a057f340..6bfed361d1acc497c5acdbb916404a837f4dda8d --- a/boost/asio/detail/thread_context.hpp +++ b/boost/asio/detail/thread_context.hpp @@ -2,7 +2,7 @@ // detail/thread_context.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -31,6 +31,11 @@ class thread_info_base; class thread_context { public: + // Obtain a pointer to the top of the thread call stack. Returns null when + // not running inside a thread context. + BOOST_ASIO_DECL static thread_info_base* top_of_thread_call_stack(); + +protected: // Per-thread call stack to track the state of each thread in the context. typedef call_stack thread_call_stack; }; @@ -41,4 +46,8 @@ public: #include +#if defined(BOOST_ASIO_HEADER_ONLY) +# include +#endif // defined(BOOST_ASIO_HEADER_ONLY) + #endif // BOOST_ASIO_DETAIL_THREAD_CONTEXT_HPP diff --git a/boost/asio/detail/thread_group.hpp b/boost/asio/detail/thread_group.hpp old mode 100755 new mode 100644 index e3b50e6a72204e1614eadd5013db5cf28fb0363b..0acaf6c4d8e815da89a281e531a2d2427760cce1 --- a/boost/asio/detail/thread_group.hpp +++ b/boost/asio/detail/thread_group.hpp @@ -2,7 +2,7 @@ // detail/thread_group.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -19,6 +19,8 @@ #include #include +#include + namespace boost { namespace asio { namespace detail { @@ -94,4 +96,6 @@ private: } // namespace asio } // namespace boost +#include + #endif // BOOST_ASIO_DETAIL_THREAD_GROUP_HPP diff --git a/boost/asio/detail/thread_info_base.hpp b/boost/asio/detail/thread_info_base.hpp old mode 100755 new mode 100644 index 091be1394a92ca94d6df726c0ee57153a6f1a00e..0bd70416ad4bfeb1654fac051d284882dfdbffbf --- a/boost/asio/detail/thread_info_base.hpp +++ b/boost/asio/detail/thread_info_base.hpp @@ -2,7 +2,7 @@ // detail/thread_info_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -66,7 +66,13 @@ public: ~thread_info_base() { for (int i = 0; i < max_mem_index; ++i) - ::operator delete(reusable_memory_[i]); + { + // The following test for non-null pointers is technically redundant, but + // it is significantly faster when using a tight io_context::poll() loop + // in latency sensitive applications. + if (reusable_memory_[i]) + ::operator delete(reusable_memory_[i]); + } } static void* allocate(thread_info_base* this_thread, std::size_t size) @@ -140,6 +146,7 @@ public: pending_exception_ = std::make_exception_ptr( multiple_exceptions(pending_exception_)); + break; default: break; } diff --git a/boost/asio/detail/throw_error.hpp b/boost/asio/detail/throw_error.hpp old mode 100755 new mode 100644 index 315a2f4d62105d9f33c24ec9e6f415d97e3ef7dd..aa8aaf1133b47a5b2947139e279121d2e03e714b --- a/boost/asio/detail/throw_error.hpp +++ b/boost/asio/detail/throw_error.hpp @@ -2,7 +2,7 @@ // detail/throw_error.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/throw_exception.hpp b/boost/asio/detail/throw_exception.hpp old mode 100755 new mode 100644 index df27ee685b8e977be5caee213281c7a7876337e7..2dae79b207ad94af599330848b3a98044a1f5b07 --- a/boost/asio/detail/throw_exception.hpp +++ b/boost/asio/detail/throw_exception.hpp @@ -2,7 +2,7 @@ // detail/throw_exception.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/timer_queue.hpp b/boost/asio/detail/timer_queue.hpp old mode 100755 new mode 100644 index 773332f7e842c803e7c3a9a28a8d2939196b5833..c8d573b99ac9a5f921da96ecd0f10b50ca8750c8 --- a/boost/asio/detail/timer_queue.hpp +++ b/boost/asio/detail/timer_queue.hpp @@ -2,7 +2,7 @@ // detail/timer_queue.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/timer_queue_base.hpp b/boost/asio/detail/timer_queue_base.hpp old mode 100755 new mode 100644 index fdbd910193c0e285715fae41b76285edd73d6ddd..0330579f102a284594a6cdc11632537cd2e4cf7c --- a/boost/asio/detail/timer_queue_base.hpp +++ b/boost/asio/detail/timer_queue_base.hpp @@ -2,7 +2,7 @@ // detail/timer_queue_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/timer_queue_ptime.hpp b/boost/asio/detail/timer_queue_ptime.hpp old mode 100755 new mode 100644 index e058a1e916441b0ce71f9e37d9a8aabf83b65e29..2e4980d6527e78afe9165c67fbe71c31472b0433 --- a/boost/asio/detail/timer_queue_ptime.hpp +++ b/boost/asio/detail/timer_queue_ptime.hpp @@ -2,7 +2,7 @@ // detail/timer_queue_ptime.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/timer_queue_set.hpp b/boost/asio/detail/timer_queue_set.hpp old mode 100755 new mode 100644 index a073b8fccba44a3747f81355a191349103d02e99..53ad1a8d345ca30262d099ee0ec0f599f54dab67 --- a/boost/asio/detail/timer_queue_set.hpp +++ b/boost/asio/detail/timer_queue_set.hpp @@ -2,7 +2,7 @@ // detail/timer_queue_set.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/timer_scheduler.hpp b/boost/asio/detail/timer_scheduler.hpp old mode 100755 new mode 100644 index 7125044b83a29cdd0ff7290c7d17ce87ade43419..0522043e6b73d36d2e9ae1031b3f4c52229c15e1 --- a/boost/asio/detail/timer_scheduler.hpp +++ b/boost/asio/detail/timer_scheduler.hpp @@ -2,7 +2,7 @@ // detail/timer_scheduler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/timer_scheduler_fwd.hpp b/boost/asio/detail/timer_scheduler_fwd.hpp old mode 100755 new mode 100644 index 465f4e962a08298fad913b7542528076a746a350..e10bacc37da3fa1aa10774f396d47d8a63a4005a --- a/boost/asio/detail/timer_scheduler_fwd.hpp +++ b/boost/asio/detail/timer_scheduler_fwd.hpp @@ -2,7 +2,7 @@ // detail/timer_scheduler_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/tss_ptr.hpp b/boost/asio/detail/tss_ptr.hpp old mode 100755 new mode 100644 index d569961e60d7ddad350907b4d76715d497f3c18f..a32c2f106a6711d96129150a93152d64fd9caf81 --- a/boost/asio/detail/tss_ptr.hpp +++ b/boost/asio/detail/tss_ptr.hpp @@ -2,7 +2,7 @@ // detail/tss_ptr.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/type_traits.hpp b/boost/asio/detail/type_traits.hpp old mode 100755 new mode 100644 index ba1a4d1486d2b026da287c78b6b68d0ca0b302c5..e477d38043fac87c8e415e6fe78b397128351c04 --- a/boost/asio/detail/type_traits.hpp +++ b/boost/asio/detail/type_traits.hpp @@ -2,7 +2,7 @@ // detail/type_traits.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -144,6 +144,14 @@ template struct conjunction : #endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) +struct defaulted_constraint +{ + BOOST_ASIO_CONSTEXPR defaulted_constraint() {} +}; + +template +struct constraint : enable_if {}; + } // namespace asio } // namespace boost diff --git a/boost/asio/detail/variadic_templates.hpp b/boost/asio/detail/variadic_templates.hpp old mode 100755 new mode 100644 index 9522c2978ad1797a459a5b6247206eedb94dbc1a..5fbe3e39bb3ba7341bd603ee6e14b7a2d405a652 --- a/boost/asio/detail/variadic_templates.hpp +++ b/boost/asio/detail/variadic_templates.hpp @@ -2,7 +2,7 @@ // detail/variadic_templates.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/wait_handler.hpp b/boost/asio/detail/wait_handler.hpp old mode 100755 new mode 100644 index 3f732640b4364b010884b2741f2460925b474a3c..4075543e10d4a5fef0ab47c341b51c60857858da --- a/boost/asio/detail/wait_handler.hpp +++ b/boost/asio/detail/wait_handler.hpp @@ -2,7 +2,7 @@ // detail/wait_handler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/wait_op.hpp b/boost/asio/detail/wait_op.hpp old mode 100755 new mode 100644 index 9a75af96f9c77fa40ead9018179ef01dec1c7e7e..23ab8f0bbc4008e983f36c99d211998205d51dfa --- a/boost/asio/detail/wait_op.hpp +++ b/boost/asio/detail/wait_op.hpp @@ -2,7 +2,7 @@ // detail/wait_op.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_event.hpp b/boost/asio/detail/win_event.hpp old mode 100755 new mode 100644 index 74e2f89dbfeca48ef15e76d1273dec3e2f49c7d2..9928bd2cc6ab77b5a147ceb0651c5a6ece1d0468 --- a/boost/asio/detail/win_event.hpp +++ b/boost/asio/detail/win_event.hpp @@ -2,7 +2,7 @@ // detail/win_event.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_fd_set_adapter.hpp b/boost/asio/detail/win_fd_set_adapter.hpp old mode 100755 new mode 100644 index 609c7d96308d9c905e87ad47e437eb902be8be5e..3ace61360fd3469e4fbac0b57e8b4d6c95d4d229 --- a/boost/asio/detail/win_fd_set_adapter.hpp +++ b/boost/asio/detail/win_fd_set_adapter.hpp @@ -2,7 +2,7 @@ // detail/win_fd_set_adapter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_fenced_block.hpp b/boost/asio/detail/win_fenced_block.hpp old mode 100755 new mode 100644 index 14177eac76d6674d8bc219056de58cf5c5b4cce2..ff556e4957ced17668aa2b969ae02a8812b8ae30 --- a/boost/asio/detail/win_fenced_block.hpp +++ b/boost/asio/detail/win_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/win_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_global.hpp b/boost/asio/detail/win_global.hpp old mode 100755 new mode 100644 index dad5ed03b2a8e14784d8ec07c2915feb99df5224..a58013691ebbb81ed44d23da95b4add327302ecf --- a/boost/asio/detail/win_global.hpp +++ b/boost/asio/detail/win_global.hpp @@ -2,7 +2,7 @@ // detail/win_global.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_iocp_handle_read_op.hpp b/boost/asio/detail/win_iocp_handle_read_op.hpp old mode 100755 new mode 100644 index 13369f730133cebf74af165899420fec7682c912..82e96238d67b87ae6225975b2ff043575d10b57e --- a/boost/asio/detail/win_iocp_handle_read_op.hpp +++ b/boost/asio/detail/win_iocp_handle_read_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_handle_read_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/win_iocp_handle_service.hpp b/boost/asio/detail/win_iocp_handle_service.hpp old mode 100755 new mode 100644 index 945ef2c4a01245fa8f1f6d72c901b61f50b35140..93abb752a7495eae136f902211697f87bdc96c53 --- a/boost/asio/detail/win_iocp_handle_service.hpp +++ b/boost/asio/detail/win_iocp_handle_service.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_handle_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/win_iocp_handle_write_op.hpp b/boost/asio/detail/win_iocp_handle_write_op.hpp old mode 100755 new mode 100644 index e1706f16093151d9e86b19915784c4477e242ed1..9dd34417fedb7e878439fd9c15a9cc94d2362ba7 --- a/boost/asio/detail/win_iocp_handle_write_op.hpp +++ b/boost/asio/detail/win_iocp_handle_write_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_handle_write_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/win_iocp_io_context.hpp b/boost/asio/detail/win_iocp_io_context.hpp old mode 100755 new mode 100644 index 049cdbcf2c7381583264a080a898cdbb8f5609b7..517dbd5f707fbbd6752017e272af329fc3daedf7 --- a/boost/asio/detail/win_iocp_io_context.hpp +++ b/boost/asio/detail/win_iocp_io_context.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_io_context.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -110,10 +110,7 @@ public: } // Return whether a handler can be dispatched immediately. - bool can_dispatch() - { - return thread_call_stack::contains(this) != 0; - } + BOOST_ASIO_DECL bool can_dispatch(); /// Capture the current exception so it can be rethrown from a run function. BOOST_ASIO_DECL void capture_current_exception(); diff --git a/boost/asio/detail/win_iocp_null_buffers_op.hpp b/boost/asio/detail/win_iocp_null_buffers_op.hpp old mode 100755 new mode 100644 index ec636dbd41757c1ae2132def9d0cc6824d6fbe3c..5980568cac4827d955a9e4e26ab09e5c27951e6e --- a/boost/asio/detail/win_iocp_null_buffers_op.hpp +++ b/boost/asio/detail/win_iocp_null_buffers_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_null_buffers_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_iocp_operation.hpp b/boost/asio/detail/win_iocp_operation.hpp old mode 100755 new mode 100644 index c35336a3e5485278c924e1ebb5535d77350c798a..910e962de49ace6fc980734468f1e100fa3f40ed --- a/boost/asio/detail/win_iocp_operation.hpp +++ b/boost/asio/detail/win_iocp_operation.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_operation.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_iocp_overlapped_op.hpp b/boost/asio/detail/win_iocp_overlapped_op.hpp old mode 100755 new mode 100644 index be3f29297e8cce1b150e6d7421f4ad5e6c2a6ce9..eaf228390f33f3e1c23fd4bbb3c2d28541be3bba --- a/boost/asio/detail/win_iocp_overlapped_op.hpp +++ b/boost/asio/detail/win_iocp_overlapped_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_overlapped_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_iocp_overlapped_ptr.hpp b/boost/asio/detail/win_iocp_overlapped_ptr.hpp old mode 100755 new mode 100644 index dfadaa977674b8f1c2927dc6e2ae1b5f37ce3790..250e6d4774a244f45aa9c94c574e2a1dc6e01db9 --- a/boost/asio/detail/win_iocp_overlapped_ptr.hpp +++ b/boost/asio/detail/win_iocp_overlapped_ptr.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_overlapped_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_iocp_serial_port_service.hpp b/boost/asio/detail/win_iocp_serial_port_service.hpp old mode 100755 new mode 100644 index 5b54b0db5209df1d078ca81965615282933a0bd1..6d9b3a0b6f0954e1527726df8554d509761a92b7 --- a/boost/asio/detail/win_iocp_serial_port_service.hpp +++ b/boost/asio/detail/win_iocp_serial_port_service.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_serial_port_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/win_iocp_socket_accept_op.hpp b/boost/asio/detail/win_iocp_socket_accept_op.hpp old mode 100755 new mode 100644 index eac8f77d27263e7e40d597170249a97d1efcaf56..46f81504cfbd746e5f2d88be9b2a2e3d509d4dd8 --- a/boost/asio/detail/win_iocp_socket_accept_op.hpp +++ b/boost/asio/detail/win_iocp_socket_accept_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_socket_accept_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_iocp_socket_connect_op.hpp b/boost/asio/detail/win_iocp_socket_connect_op.hpp old mode 100755 new mode 100644 index 67d94b7c709703926a49df0707bab8248b7b22e4..ba85c93cf41a28e9f2544dfdf06844441228d412 --- a/boost/asio/detail/win_iocp_socket_connect_op.hpp +++ b/boost/asio/detail/win_iocp_socket_connect_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_socket_connect_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_iocp_socket_recv_op.hpp b/boost/asio/detail/win_iocp_socket_recv_op.hpp old mode 100755 new mode 100644 index 520678cb5f5a755e983826595a209b6aef416c01..0e29b34d39092a87b183ea80999e521900413cca --- a/boost/asio/detail/win_iocp_socket_recv_op.hpp +++ b/boost/asio/detail/win_iocp_socket_recv_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_socket_recv_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp b/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp old mode 100755 new mode 100644 index 27524f7ca8c368979855dddac2a902d3a8a8407a..df36fc0329eef34ce877159ca543f416d70e8e23 --- a/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp +++ b/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_socket_recvfrom_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp b/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp old mode 100755 new mode 100644 index 62dee6b8aa069bd17d1f29d702072b5b5c93d08d..9dfad9b006261808da441a13b52d1a9d30e04ba7 --- a/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp +++ b/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_socket_recvmsg_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_iocp_socket_send_op.hpp b/boost/asio/detail/win_iocp_socket_send_op.hpp old mode 100755 new mode 100644 index 6d20d7414868e45f27da8607ef9788cc948af3cc..f54aeb8a12d6eb0236cb51d0773c42be9ff21844 --- a/boost/asio/detail/win_iocp_socket_send_op.hpp +++ b/boost/asio/detail/win_iocp_socket_send_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_socket_send_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_iocp_socket_service.hpp b/boost/asio/detail/win_iocp_socket_service.hpp old mode 100755 new mode 100644 index 7d17de207b2bd0c4d7d80948831dc4318a740e47..16335a510f5d1415cbea25e3852fb18481ee6633 --- a/boost/asio/detail/win_iocp_socket_service.hpp +++ b/boost/asio/detail/win_iocp_socket_service.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_socket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_iocp_socket_service_base.hpp b/boost/asio/detail/win_iocp_socket_service_base.hpp old mode 100755 new mode 100644 index b771d3f361fea44c28a5f2d97d5f4da7040d1230..6cfb30af7a947c2bf264b954bd034b5ff9d872c7 --- a/boost/asio/detail/win_iocp_socket_service_base.hpp +++ b/boost/asio/detail/win_iocp_socket_service_base.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_socket_service_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_iocp_thread_info.hpp b/boost/asio/detail/win_iocp_thread_info.hpp old mode 100755 new mode 100644 index eaa25dcd70e85f17f94c2b885c385643c5b6e16d..3bab06c25678bb3ba2419d1901301a1577ce8089 --- a/boost/asio/detail/win_iocp_thread_info.hpp +++ b/boost/asio/detail/win_iocp_thread_info.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_thread_info.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_iocp_wait_op.hpp b/boost/asio/detail/win_iocp_wait_op.hpp old mode 100755 new mode 100644 index 54d4220613923b3711b1151628554a78fb64cc8d..f08092a7dd41974608d0052a6b82fc91b20d97cc --- a/boost/asio/detail/win_iocp_wait_op.hpp +++ b/boost/asio/detail/win_iocp_wait_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_wait_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_mutex.hpp b/boost/asio/detail/win_mutex.hpp old mode 100755 new mode 100644 index 707598fe7fa94c9526353a91381a84a1275a7b67..e4ac87df4934370c31430d968bf5772a912c04ef --- a/boost/asio/detail/win_mutex.hpp +++ b/boost/asio/detail/win_mutex.hpp @@ -2,7 +2,7 @@ // detail/win_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_object_handle_service.hpp b/boost/asio/detail/win_object_handle_service.hpp old mode 100755 new mode 100644 index f1d4805d66a6d078ca0e5c06a3d001a7baceadbe..678bb85329d3fe0ded1b7ee679e44e0f8726c534 --- a/boost/asio/detail/win_object_handle_service.hpp +++ b/boost/asio/detail/win_object_handle_service.hpp @@ -2,7 +2,7 @@ // detail/win_object_handle_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2011 Boris Schaeling (boris@highscore.de) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/detail/win_static_mutex.hpp b/boost/asio/detail/win_static_mutex.hpp old mode 100755 new mode 100644 index c999bcd31bb7a0d808dc9bcf0990f0a48a2fbb30..e2af539c6a3741760968ce8cb047b2091156bae2 --- a/boost/asio/detail/win_static_mutex.hpp +++ b/boost/asio/detail/win_static_mutex.hpp @@ -2,7 +2,7 @@ // detail/win_static_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_thread.hpp b/boost/asio/detail/win_thread.hpp old mode 100755 new mode 100644 index 28a808504d13ec92047023016c50cd0f34a94820..83e34cc18d03722bfd21e63a479d6f00ee7d1434 --- a/boost/asio/detail/win_thread.hpp +++ b/boost/asio/detail/win_thread.hpp @@ -2,7 +2,7 @@ // detail/win_thread.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/win_tss_ptr.hpp b/boost/asio/detail/win_tss_ptr.hpp old mode 100755 new mode 100644 index 83693bc1288d213dd2659307ebbcf1b5ca01748d..ad9030eedf751018ecf641868200e91bdf1010f6 --- a/boost/asio/detail/win_tss_ptr.hpp +++ b/boost/asio/detail/win_tss_ptr.hpp @@ -2,7 +2,7 @@ // detail/win_tss_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/winapp_thread.hpp b/boost/asio/detail/winapp_thread.hpp old mode 100755 new mode 100644 index 804b681c818ca46f994c06a04e9580262701de2d..416ade7829481c6120d97e3ea66056c5443959e4 --- a/boost/asio/detail/winapp_thread.hpp +++ b/boost/asio/detail/winapp_thread.hpp @@ -2,7 +2,7 @@ // detail/winapp_thread.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/wince_thread.hpp b/boost/asio/detail/wince_thread.hpp old mode 100755 new mode 100644 index 37c543dc8b916a28336758d96aa3a570d32330aa..38541f219b6400b712e18b43600bbad0484085d6 --- a/boost/asio/detail/wince_thread.hpp +++ b/boost/asio/detail/wince_thread.hpp @@ -2,7 +2,7 @@ // detail/wince_thread.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/winrt_async_manager.hpp b/boost/asio/detail/winrt_async_manager.hpp old mode 100755 new mode 100644 index 5ef6406e62c08833e6cd9fba0dfe66abd80673de..fd4e4c74980d510ce5b1cbaf2cae2c9de1a27c1b --- a/boost/asio/detail/winrt_async_manager.hpp +++ b/boost/asio/detail/winrt_async_manager.hpp @@ -2,7 +2,7 @@ // detail/winrt_async_manager.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/winrt_async_op.hpp b/boost/asio/detail/winrt_async_op.hpp old mode 100755 new mode 100644 index 5c1ad262b0705fa30aedf174425495442dfb09f2..7e158675e900bd5af8ecd7d6545aac621886a9e9 --- a/boost/asio/detail/winrt_async_op.hpp +++ b/boost/asio/detail/winrt_async_op.hpp @@ -2,7 +2,7 @@ // detail/winrt_async_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/winrt_resolve_op.hpp b/boost/asio/detail/winrt_resolve_op.hpp old mode 100755 new mode 100644 index d75fbefd36ba22c0ccb3c6290af0ceab987d1eff..ea5c0e21eb6f50ae0d90b376a959425056862b30 --- a/boost/asio/detail/winrt_resolve_op.hpp +++ b/boost/asio/detail/winrt_resolve_op.hpp @@ -2,7 +2,7 @@ // detail/winrt_resolve_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/winrt_resolver_service.hpp b/boost/asio/detail/winrt_resolver_service.hpp old mode 100755 new mode 100644 index cc5a59eb19db041552e57008fbddb21a4f9a72ba..f5c422df1b4580e112294989b874e6130d1e70f7 --- a/boost/asio/detail/winrt_resolver_service.hpp +++ b/boost/asio/detail/winrt_resolver_service.hpp @@ -2,7 +2,7 @@ // detail/winrt_resolver_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/winrt_socket_connect_op.hpp b/boost/asio/detail/winrt_socket_connect_op.hpp old mode 100755 new mode 100644 index 7cd6e8e88f311255714207fc50ac21b6c6313068..cd4d69bf560bccc0d9232b9187140738fe4ec1b0 --- a/boost/asio/detail/winrt_socket_connect_op.hpp +++ b/boost/asio/detail/winrt_socket_connect_op.hpp @@ -2,7 +2,7 @@ // detail/winrt_socket_connect_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/winrt_socket_recv_op.hpp b/boost/asio/detail/winrt_socket_recv_op.hpp old mode 100755 new mode 100644 index 80cb056bd9deae8edc7a3d26f5a8a3a0b220409a..291087bfbfedc6126148e7811e52e887ec73a90a --- a/boost/asio/detail/winrt_socket_recv_op.hpp +++ b/boost/asio/detail/winrt_socket_recv_op.hpp @@ -2,7 +2,7 @@ // detail/winrt_socket_recv_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/winrt_socket_send_op.hpp b/boost/asio/detail/winrt_socket_send_op.hpp old mode 100755 new mode 100644 index f9624d04a563fc9bb3e4418a85d5d32a14094d88..d2deee3aa20ee9ac44ecd0429464df784762d713 --- a/boost/asio/detail/winrt_socket_send_op.hpp +++ b/boost/asio/detail/winrt_socket_send_op.hpp @@ -2,7 +2,7 @@ // detail/winrt_socket_send_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/winrt_ssocket_service.hpp b/boost/asio/detail/winrt_ssocket_service.hpp old mode 100755 new mode 100644 index c34021108c8ca2d953bf91a12aacd193bd002b06..ffae16408d11a2053c579610bc52ed5b4cc06eb0 --- a/boost/asio/detail/winrt_ssocket_service.hpp +++ b/boost/asio/detail/winrt_ssocket_service.hpp @@ -2,7 +2,7 @@ // detail/winrt_ssocket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/winrt_ssocket_service_base.hpp b/boost/asio/detail/winrt_ssocket_service_base.hpp old mode 100755 new mode 100644 index 55265e50c0cfe933d8fd5ccc091e46ea6b40f064..e6b000f3dbb0d674b73643ef90673c3e696c8586 --- a/boost/asio/detail/winrt_ssocket_service_base.hpp +++ b/boost/asio/detail/winrt_ssocket_service_base.hpp @@ -2,7 +2,7 @@ // detail/winrt_ssocket_service_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/winrt_timer_scheduler.hpp b/boost/asio/detail/winrt_timer_scheduler.hpp old mode 100755 new mode 100644 index 8ef2f35c83bac519afcfdb572625e0d5ab9ef059..71a6874c1944c6e151d527c29f46e60e78c00eb3 --- a/boost/asio/detail/winrt_timer_scheduler.hpp +++ b/boost/asio/detail/winrt_timer_scheduler.hpp @@ -2,7 +2,7 @@ // detail/winrt_timer_scheduler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/winrt_utils.hpp b/boost/asio/detail/winrt_utils.hpp old mode 100755 new mode 100644 index 71c59c435306c96e42ddb9cb33127777453fc895..0d6667860cea2e2cc1f8ef0d4159164a4df9d941 --- a/boost/asio/detail/winrt_utils.hpp +++ b/boost/asio/detail/winrt_utils.hpp @@ -2,7 +2,7 @@ // detail/winrt_utils.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/winsock_init.hpp b/boost/asio/detail/winsock_init.hpp old mode 100755 new mode 100644 index 750ee3714e9418e133d597c8fefc58e9384c451a..75dab5e52a256cd196acad32c02318008fc26a6d --- a/boost/asio/detail/winsock_init.hpp +++ b/boost/asio/detail/winsock_init.hpp @@ -2,7 +2,7 @@ // detail/winsock_init.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/work_dispatcher.hpp b/boost/asio/detail/work_dispatcher.hpp old mode 100755 new mode 100644 index f45a16e4fe0b0703be699bf51a5f23eaa558629f..6dba3caf332c3a5fd54a1f71d11e8145120937ff --- a/boost/asio/detail/work_dispatcher.hpp +++ b/boost/asio/detail/work_dispatcher.hpp @@ -2,7 +2,7 @@ // detail/work_dispatcher.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/detail/wrapped_handler.hpp b/boost/asio/detail/wrapped_handler.hpp old mode 100755 new mode 100644 index 3441223e380cca8d719228e1c723757b2792e045..ece3a5df0bf0d5d42674242673daae742844f30a --- a/boost/asio/detail/wrapped_handler.hpp +++ b/boost/asio/detail/wrapped_handler.hpp @@ -2,7 +2,7 @@ // detail/wrapped_handler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/dispatch.hpp b/boost/asio/dispatch.hpp old mode 100755 new mode 100644 index bf278f13033b63fa5e6a43b089506149552585e8..315199037623f92ff7f3e3a84baa050f5bdc2e57 --- a/boost/asio/dispatch.hpp +++ b/boost/asio/dispatch.hpp @@ -2,7 +2,7 @@ // dispatch.hpp // ~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -92,9 +92,9 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) dispatch( const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(Executor), - typename enable_if< + typename constraint< execution::is_executor::value || is_executor::value - >::type* = 0); + >::type = 0); /// Submits a completion token or function object for execution. /** @@ -110,8 +110,8 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) dispatch( BOOST_ASIO_MOVE_ARG(CompletionToken) token BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename ExecutionContext::executor_type), - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); } // namespace asio } // namespace boost diff --git a/boost/asio/error.hpp b/boost/asio/error.hpp old mode 100755 new mode 100644 index 2d2b3395bb5372e5040044214e0c96d18c0f10bc..7481c731633797db96cb0eb01a0abd666ca91dbc --- a/boost/asio/error.hpp +++ b/boost/asio/error.hpp @@ -2,7 +2,7 @@ // error.hpp // ~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution.hpp b/boost/asio/execution.hpp index bbef767a84989c56b87aa5bbc0ab475fd47bd3be..b44182728d059e586734a5f8b0e885566ce39f84 100644 --- a/boost/asio/execution.hpp +++ b/boost/asio/execution.hpp @@ -2,7 +2,7 @@ // execution.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/allocator.hpp b/boost/asio/execution/allocator.hpp index e07214f9b14a623846aae2ead49b48be7a402b2b..fe1c6f8198efa83876c0af50db62dc47fdca3736 100644 --- a/boost/asio/execution/allocator.hpp +++ b/boost/asio/execution/allocator.hpp @@ -2,7 +2,7 @@ // execution/allocator.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -81,23 +81,63 @@ struct allocator_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_preferable = true); + template + struct static_proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + struct type + { + template + static constexpr auto query(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + { + return T::query(BOOST_ASIO_MOVE_CAST(P)(p)); + } + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + }; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename static_proxy::type, allocator_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template ())> @@ -135,8 +175,18 @@ struct allocator_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -146,16 +196,46 @@ struct allocator_t { } + template + struct static_proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + struct type + { + template + static constexpr auto query(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + { + return T::query(BOOST_ASIO_MOVE_CAST(P)(p)); + } + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + }; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename static_proxy::type, allocator_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template ())> @@ -204,8 +284,16 @@ template struct is_applicable_property > : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -219,20 +307,20 @@ namespace traits { template struct static_query, typename enable_if< - traits::query_static_constexpr_member >::is_valid + execution::allocator_t::template + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member >::result_type result_type; + typedef typename execution::allocator_t::template + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member >::value(); + return execution::allocator_t::template + query_static_constexpr_member::value(); } }; diff --git a/boost/asio/execution/any_executor.hpp b/boost/asio/execution/any_executor.hpp index 9c7018c8830c40ccb16d0b139732292b4591300d..da5991a81b181dd32bf1237bc0f7ae7045392a29 100644 --- a/boost/asio/execution/any_executor.hpp +++ b/boost/asio/execution/any_executor.hpp @@ -2,7 +2,7 @@ // execution/any_executor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -620,7 +620,11 @@ public: return static_cast(target_); } +#if !defined(BOOST_ASIO_NO_TYPEID) const std::type_info& target_type() const +#else // !defined(BOOST_ASIO_NO_TYPEID) + const void* target_type() const +#endif // !defined(BOOST_ASIO_NO_TYPEID) { return target_fns_->target_type(); } @@ -800,16 +804,27 @@ protected: struct target_fns { +#if !defined(BOOST_ASIO_NO_TYPEID) const std::type_info& (*target_type)(); +#else // !defined(BOOST_ASIO_NO_TYPEID) + const void* (*target_type)(); +#endif // !defined(BOOST_ASIO_NO_TYPEID) bool (*equal)(const any_executor_base&, const any_executor_base&); void (*execute)(const any_executor_base&, BOOST_ASIO_MOVE_ARG(function)); void (*blocking_execute)(const any_executor_base&, function_view); }; +#if !defined(BOOST_ASIO_NO_TYPEID) static const std::type_info& target_type_void() { return typeid(void); } +#else // !defined(BOOST_ASIO_NO_TYPEID) + static const void* target_type_void() + { + return 0; + } +#endif // !defined(BOOST_ASIO_NO_TYPEID) static bool equal_void(const any_executor_base&, const any_executor_base&) { @@ -845,11 +860,20 @@ protected: return &fns; } +#if !defined(BOOST_ASIO_NO_TYPEID) template static const std::type_info& target_type_ex() { return typeid(Ex); } +#else // !defined(BOOST_ASIO_NO_TYPEID) + template + static const void* target_type_ex() + { + static int unique_id; + return &unique_id; + } +#endif // !defined(BOOST_ASIO_NO_TYPEID) template static bool equal_ex(const any_executor_base& ex1, @@ -1280,39 +1304,65 @@ public: { return any_executor_base::equality_helper(other); } -}; -inline bool operator==(const any_executor<>& a, - const any_executor<>& b) BOOST_ASIO_NOEXCEPT -{ - return a.equality_helper(b); -} + template + friend typename enable_if< + is_same::value + || is_same::value, + bool + >::type operator==(const AnyExecutor1& a, + const AnyExecutor2& b) BOOST_ASIO_NOEXCEPT + { + return static_cast(a).equality_helper(b); + } -inline bool operator==(const any_executor<>& a, nullptr_t) BOOST_ASIO_NOEXCEPT -{ - return !a; -} + template + friend typename enable_if< + is_same::value, + bool + >::type operator==(const AnyExecutor& a, nullptr_t) BOOST_ASIO_NOEXCEPT + { + return !a; + } -inline bool operator==(nullptr_t, const any_executor<>& b) BOOST_ASIO_NOEXCEPT -{ - return !b; -} + template + friend typename enable_if< + is_same::value, + bool + >::type operator==(nullptr_t, const AnyExecutor& b) BOOST_ASIO_NOEXCEPT + { + return !b; + } -inline bool operator!=(const any_executor<>& a, - const any_executor<>& b) BOOST_ASIO_NOEXCEPT -{ - return !a.equality_helper(b); -} + template + friend typename enable_if< + is_same::value + || is_same::value, + bool + >::type operator!=(const AnyExecutor1& a, + const AnyExecutor2& b) BOOST_ASIO_NOEXCEPT + { + return !static_cast(a).equality_helper(b); + } -inline bool operator!=(const any_executor<>& a, nullptr_t) BOOST_ASIO_NOEXCEPT -{ - return !!a; -} + template + friend typename enable_if< + is_same::value, + bool + >::type operator!=(const AnyExecutor& a, nullptr_t) BOOST_ASIO_NOEXCEPT + { + return !!a; + } -inline bool operator!=(nullptr_t, const any_executor<>& b) BOOST_ASIO_NOEXCEPT -{ - return !!b; -} + template + friend typename enable_if< + is_same::value, + bool + >::type operator!=(nullptr_t, const AnyExecutor& b) BOOST_ASIO_NOEXCEPT + { + return !!b; + } +}; inline void swap(any_executor<>& a, any_executor<>& b) BOOST_ASIO_NOEXCEPT { @@ -1452,6 +1502,64 @@ public: return any_executor_base::equality_helper(other); } + template + friend typename enable_if< + is_same::value + || is_same::value, + bool + >::type operator==(const AnyExecutor1& a, + const AnyExecutor2& b) BOOST_ASIO_NOEXCEPT + { + return static_cast(a).equality_helper(b); + } + + template + friend typename enable_if< + is_same::value, + bool + >::type operator==(const AnyExecutor& a, nullptr_t) BOOST_ASIO_NOEXCEPT + { + return !a; + } + + template + friend typename enable_if< + is_same::value, + bool + >::type operator==(nullptr_t, const AnyExecutor& b) BOOST_ASIO_NOEXCEPT + { + return !b; + } + + template + friend typename enable_if< + is_same::value + || is_same::value, + bool + >::type operator!=(const AnyExecutor1& a, + const AnyExecutor2& b) BOOST_ASIO_NOEXCEPT + { + return !static_cast(a).equality_helper(b); + } + + template + friend typename enable_if< + is_same::value, + bool + >::type operator!=(const AnyExecutor& a, nullptr_t) BOOST_ASIO_NOEXCEPT + { + return !!a; + } + + template + friend typename enable_if< + is_same::value, + bool + >::type operator!=(nullptr_t, const AnyExecutor& b) BOOST_ASIO_NOEXCEPT + { + return !!b; + } + template struct find_convertible_property : detail::supportable_properties< @@ -1596,48 +1704,6 @@ public: const prop_fns* prop_fns_; }; -template -inline bool operator==(const any_executor& a, - const any_executor& b) BOOST_ASIO_NOEXCEPT -{ - return a.equality_helper(b); -} - -template -inline bool operator==(const any_executor& a, - nullptr_t) BOOST_ASIO_NOEXCEPT -{ - return !a; -} - -template -inline bool operator==(nullptr_t, - const any_executor& b) BOOST_ASIO_NOEXCEPT -{ - return !b; -} - -template -inline bool operator!=(const any_executor& a, - const any_executor& b) BOOST_ASIO_NOEXCEPT -{ - return !a.equality_helper(b); -} - -template -inline bool operator!=(const any_executor& a, - nullptr_t) BOOST_ASIO_NOEXCEPT -{ - return !!a; -} - -template -inline bool operator!=(nullptr_t, - const any_executor& b) BOOST_ASIO_NOEXCEPT -{ - return !!b; -} - template inline void swap(any_executor& a, any_executor& b) BOOST_ASIO_NOEXCEPT @@ -1851,6 +1917,64 @@ inline void swap(any_executor& a, return any_executor_base::equality_helper(other); \ } \ \ + template \ + friend typename enable_if< \ + is_same::value \ + || is_same::value, \ + bool \ + >::type operator==(const AnyExecutor1& a, \ + const AnyExecutor2& b) BOOST_ASIO_NOEXCEPT \ + { \ + return static_cast(a).equality_helper(b); \ + } \ + \ + template \ + friend typename enable_if< \ + is_same::value, \ + bool \ + >::type operator==(const AnyExecutor& a, nullptr_t) BOOST_ASIO_NOEXCEPT \ + { \ + return !a; \ + } \ + \ + template \ + friend typename enable_if< \ + is_same::value, \ + bool \ + >::type operator==(nullptr_t, const AnyExecutor& b) BOOST_ASIO_NOEXCEPT \ + { \ + return !b; \ + } \ + \ + template \ + friend typename enable_if< \ + is_same::value \ + || is_same::value, \ + bool \ + >::type operator!=(const AnyExecutor1& a, \ + const AnyExecutor2& b) BOOST_ASIO_NOEXCEPT \ + { \ + return !static_cast(a).equality_helper(b); \ + } \ + \ + template \ + friend typename enable_if< \ + is_same::value, \ + bool \ + >::type operator!=(const AnyExecutor& a, nullptr_t) BOOST_ASIO_NOEXCEPT \ + { \ + return !!a; \ + } \ + \ + template \ + friend typename enable_if< \ + is_same::value, \ + bool \ + >::type operator!=(nullptr_t, const AnyExecutor& b) BOOST_ASIO_NOEXCEPT \ + { \ + return !!b; \ + } \ + \ template \ struct find_convertible_property : \ detail::supportable_properties< \ @@ -1990,48 +2114,6 @@ inline void swap(any_executor& a, }; \ \ template \ - inline bool operator==(const any_executor& a, \ - const any_executor& b) BOOST_ASIO_NOEXCEPT \ - { \ - return a.equality_helper(b); \ - } \ - \ - template \ - inline bool operator==(const any_executor& a, \ - nullptr_t) BOOST_ASIO_NOEXCEPT \ - { \ - return !a; \ - } \ - \ - template \ - inline bool operator==(nullptr_t, \ - const any_executor& b) BOOST_ASIO_NOEXCEPT \ - { \ - return !b; \ - } \ - \ - template \ - inline bool operator!=(const any_executor& a, \ - const any_executor& b) BOOST_ASIO_NOEXCEPT \ - { \ - return !a.equality_helper(b); \ - } \ - \ - template \ - inline bool operator!=(const any_executor& a, \ - nullptr_t) BOOST_ASIO_NOEXCEPT \ - { \ - return !!a; \ - } \ - \ - template \ - inline bool operator!=(nullptr_t, \ - const any_executor& b) BOOST_ASIO_NOEXCEPT \ - { \ - return !!b; \ - } \ - \ - template \ inline void swap(any_executor& a, \ any_executor& b) BOOST_ASIO_NOEXCEPT \ { \ diff --git a/boost/asio/execution/bad_executor.hpp b/boost/asio/execution/bad_executor.hpp index c73d8763f8e697454a69bd6986f3aae289ce29a5..9fa399091ac9688f2c861369e3c7c3443e1727da 100644 --- a/boost/asio/execution/bad_executor.hpp +++ b/boost/asio/execution/bad_executor.hpp @@ -2,7 +2,7 @@ // execution/bad_executor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/blocking.hpp b/boost/asio/execution/blocking.hpp index a14b493ef1a1c99dbe3e50c8e0beaa4139ac7128..b261937c74f5b3bb27122f2783ab5a922a72825a 100644 --- a/boost/asio/execution/blocking.hpp +++ b/boost/asio/execution/blocking.hpp @@ -2,7 +2,7 @@ // execution/blocking.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -211,8 +211,18 @@ struct blocking_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = false); @@ -243,16 +253,74 @@ struct blocking_t { } + template + struct proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + struct type + { + template + auto query(BOOST_ASIO_MOVE_ARG(P) p) const + noexcept( + noexcept( + declval::type>().query( + BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + declval::type>().query( + BOOST_ASIO_MOVE_CAST(P)(p)) + ); + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + }; + + template + struct static_proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + struct type + { + template + static constexpr auto query(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + { + return T::query(BOOST_ASIO_MOVE_CAST(P)(p)); + } + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + }; + + template + struct query_member : + traits::query_member::type, blocking_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename static_proxy::type, blocking_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template @@ -260,9 +328,13 @@ struct blocking_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -273,10 +345,16 @@ struct blocking_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && !traits::static_query::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::static_query::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -287,11 +365,19 @@ struct blocking_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && !traits::static_query::is_valid - && !traits::static_query::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::static_query::is_valid + >::type* = 0, + typename enable_if< + !traits::static_query::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -344,7 +430,9 @@ struct blocking_t const Executor& ex, convertible_from_blocking_t, typename enable_if< !can_query::value - && can_query::value + >::type* = 0, + typename enable_if< + can_query::value >::type* = 0) #if !defined(__clang__) // Clang crashes if noexcept is used here. #if defined(BOOST_ASIO_MSVC) // Visual C++ wants the type to be qualified. @@ -364,8 +452,12 @@ struct blocking_t const Executor& ex, convertible_from_blocking_t, typename enable_if< !can_query::value - && !can_query::value - && can_query::value + >::type* = 0, + typename enable_if< + !can_query::value + >::type* = 0, + typename enable_if< + can_query::value >::type* = 0) #if !defined(__clang__) // Clang crashes if noexcept is used here. #if defined(BOOST_ASIO_MSVC) // Visual C++ wants the type to be qualified. @@ -421,8 +513,18 @@ struct possibly_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -433,26 +535,44 @@ struct possibly_t { } + template + struct query_member : + traits::query_member< + typename blocking_t::template proxy::type, possibly_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename blocking_t::template static_proxy::type, possibly_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template static BOOST_ASIO_CONSTEXPR possibly_t static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && !traits::query_free::is_valid - && !can_query >::value - && !can_query >::value + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::query_free::is_valid + >::type* = 0, + typename enable_if< + !can_query >::value + >::type* = 0, + typename enable_if< + !can_query >::value >::type* = 0) BOOST_ASIO_NOEXCEPT { return possibly_t(); @@ -650,8 +770,18 @@ struct always_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -662,16 +792,26 @@ struct always_t { } + template + struct query_member : + traits::query_member< + typename blocking_t::template proxy::type, always_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename blocking_t::template static_proxy::type, always_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template ())> @@ -726,7 +866,9 @@ struct always_t const Executor& e, const always_t&, typename enable_if< is_executor::value - && traits::static_require< + >::type* = 0, + typename enable_if< + traits::static_require< const Executor&, blocking_adaptation::allowed_t<0> >::is_valid @@ -749,8 +891,18 @@ struct never_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -761,16 +913,26 @@ struct never_t { } + template + struct query_member : + traits::query_member< + typename blocking_t::template proxy::type, never_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename blocking_t::template static_proxy::type, never_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template ())> @@ -846,8 +1008,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -855,8 +1025,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -864,8 +1042,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -873,8 +1059,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -934,28 +1128,29 @@ struct query_free_default struct static_query::is_valid + execution::detail::blocking_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::blocking_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::blocking_t::query_static_constexpr_member::value(); } }; template struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::blocking_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::blocking_t<0>:: + query_member::is_valid && traits::static_query::is_valid >::type> { @@ -974,8 +1169,10 @@ struct static_query struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::blocking_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::blocking_t<0>:: + query_member::is_valid && !traits::static_query::is_valid && traits::static_query::is_valid >::type> @@ -995,8 +1192,10 @@ struct static_query struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::blocking_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::blocking_t<0>:: + query_member::is_valid && !traits::static_query::is_valid && !traits::static_query::is_valid && traits::static_query::is_valid @@ -1017,29 +1216,30 @@ struct static_query struct static_query::is_valid + execution::detail::blocking::possibly_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::blocking::possibly_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::blocking::possibly_t<0>:: + query_static_constexpr_member::value(); } }; template struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::blocking::possibly_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::blocking::possibly_t<0>:: + query_member::is_valid && !traits::query_free::is_valid && !can_query::value && !can_query::value @@ -1059,40 +1259,40 @@ struct static_query struct static_query::is_valid + execution::detail::blocking::always_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::blocking::always_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::blocking::always_t<0>:: + query_static_constexpr_member::value(); } }; template struct static_query::is_valid + execution::detail::blocking::never_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::blocking::never_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::blocking::never_t<0>:: + query_static_constexpr_member::value(); } }; diff --git a/boost/asio/execution/blocking_adaptation.hpp b/boost/asio/execution/blocking_adaptation.hpp index 157953e74376855b660c1d9dc7d7acba960552f9..d13f9322b3cd8afe984b4d1ddddb447f15600606 100644 --- a/boost/asio/execution/blocking_adaptation.hpp +++ b/boost/asio/execution/blocking_adaptation.hpp @@ -2,7 +2,7 @@ // execution/blocking_adaptation.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -167,8 +167,18 @@ struct blocking_adaptation_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = false); @@ -193,20 +203,74 @@ struct blocking_adaptation_t { } + template + struct proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + struct type + { + template + auto query(BOOST_ASIO_MOVE_ARG(P) p) const + noexcept( + noexcept( + declval::type>().query( + BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + declval::type>().query( + BOOST_ASIO_MOVE_CAST(P)(p)) + ); + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + }; + + template + struct static_proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + struct type + { + template + static constexpr auto query(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + { + return T::query(BOOST_ASIO_MOVE_CAST(P)(p)); + } + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + }; + + template + struct query_member : + traits::query_member::type, blocking_adaptation_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename static_proxy::type, blocking_adaptation_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member< - T, blocking_adaptation_t>::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member< - T, blocking_adaptation_t - >::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member< - T, blocking_adaptation_t>::value(); + return query_static_constexpr_member::value(); } template @@ -214,10 +278,13 @@ struct blocking_adaptation_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member< - T, blocking_adaptation_t>::is_valid - && !traits::query_member::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -228,11 +295,16 @@ struct blocking_adaptation_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member< - T, blocking_adaptation_t>::is_valid - && !traits::query_member::is_valid - && !traits::static_query::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::static_query::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -290,7 +362,9 @@ struct blocking_adaptation_t const Executor& ex, convertible_from_blocking_adaptation_t, typename enable_if< !can_query::value - && can_query::value + >::type* = 0, + typename enable_if< + can_query::value >::type* = 0) #if !defined(__clang__) // Clang crashes if noexcept is used here. #if defined(BOOST_ASIO_MSVC) // Visual C++ wants the type to be qualified. @@ -345,8 +419,18 @@ struct disallowed_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -357,25 +441,43 @@ struct disallowed_t { } + template + struct query_member : + traits::query_member< + typename blocking_adaptation_t::template proxy::type, + disallowed_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename blocking_adaptation_t::template static_proxy::type, + disallowed_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template static BOOST_ASIO_CONSTEXPR disallowed_t static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && !traits::query_free::is_valid - && !can_query >::value + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::query_free::is_valid + >::type* = 0, + typename enable_if< + !can_query >::value >::type* = 0) BOOST_ASIO_NOEXCEPT { return disallowed_t(); @@ -529,8 +631,18 @@ struct allowed_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -541,16 +653,28 @@ struct allowed_t { } + template + struct query_member : + traits::query_member< + typename blocking_adaptation_t::template proxy::type, + allowed_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename blocking_adaptation_t::template static_proxy::type, + allowed_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template ())> @@ -674,8 +798,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -683,8 +815,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -692,8 +832,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -738,30 +886,30 @@ struct query_free_default struct static_query::is_valid + execution::detail::blocking_adaptation_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::blocking_adaptation_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::blocking_adaptation_t<0>:: + query_static_constexpr_member::value(); } }; template struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::blocking_adaptation_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::blocking_adaptation_t<0>:: + query_member::is_valid && traits::static_query::is_valid >::type> @@ -782,10 +930,10 @@ struct static_query struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::blocking_adaptation_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::blocking_adaptation_t<0>:: + query_member::is_valid && !traits::static_query::is_valid && traits::static_query struct static_query::is_valid + execution::detail::blocking_adaptation::disallowed_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::blocking_adaptation::disallowed_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::blocking_adaptation::disallowed_t<0>:: + query_static_constexpr_member::value(); } }; template struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::blocking_adaptation::disallowed_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::blocking_adaptation::disallowed_t<0>:: + query_member::is_valid && !traits::query_free::is_valid && !can_query::value @@ -851,20 +999,20 @@ struct static_query struct static_query::is_valid + execution::detail::blocking_adaptation::allowed_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::blocking_adaptation::allowed_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::blocking_adaptation::allowed_t<0>:: + query_static_constexpr_member::value(); } }; diff --git a/boost/asio/execution/bulk_execute.hpp b/boost/asio/execution/bulk_execute.hpp index 536c689084e9a4a202be02e6129bf56b8b252600..2979822e25c8fc10e4a121fc5e94555781bbf890 100644 --- a/boost/asio/execution/bulk_execute.hpp +++ b/boost/asio/execution/bulk_execute.hpp @@ -2,7 +2,7 @@ // execution/bulk_execute.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -126,7 +126,8 @@ enum overload_type ill_formed }; -template +template struct call_traits { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed); @@ -137,15 +138,15 @@ struct call_traits template struct call_traits::value - && - bulk_execute_member::is_valid - && - is_sender< - typename bulk_execute_member::result_type - >::value - ) + is_convertible::value + >::type, + typename enable_if< + bulk_execute_member::is_valid + >::type, + typename enable_if< + is_sender< + typename bulk_execute_member::result_type + >::value >::type> : bulk_execute_member { @@ -155,17 +156,18 @@ struct call_traits struct call_traits::value - && - !bulk_execute_member::is_valid - && - bulk_execute_free::is_valid - && - is_sender< - typename bulk_execute_free::result_type - >::value - ) + is_convertible::value + >::type, + typename enable_if< + !bulk_execute_member::is_valid + >::type, + typename enable_if< + bulk_execute_free::is_valid + >::type, + typename enable_if< + is_sender< + typename bulk_execute_free::result_type + >::value >::type> : bulk_execute_free { @@ -175,26 +177,29 @@ struct call_traits struct call_traits::value - && - !bulk_execute_member::is_valid - && - !bulk_execute_free::is_valid - && - is_sender::value - && - is_same< - typename result_of< - F(typename executor_index::type>::type) - >::type, - typename result_of< - F(typename executor_index::type>::type) - >::type - >::value - && - static_require::is_valid - ) + is_convertible::value + >::type, + typename enable_if< + !bulk_execute_member::is_valid + >::type, + typename enable_if< + !bulk_execute_free::is_valid + >::type, + typename enable_if< + is_sender::value + >::type, + typename enable_if< + is_same< + typename result_of< + F(typename executor_index::type>::type) + >::type, + typename result_of< + F(typename executor_index::type>::type) + >::type + >::value + >::type, + typename enable_if< + static_require::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = adapter); diff --git a/boost/asio/execution/bulk_guarantee.hpp b/boost/asio/execution/bulk_guarantee.hpp index f4435a8cb644083c62487787d3f0f53ae75f0819..b5f638ba256201f89b2d82a38c7a490f8dafb878 100644 --- a/boost/asio/execution/bulk_guarantee.hpp +++ b/boost/asio/execution/bulk_guarantee.hpp @@ -2,7 +2,7 @@ // execution/bulk_guarantee.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -199,8 +199,18 @@ struct bulk_guarantee_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = false); @@ -231,17 +241,74 @@ struct bulk_guarantee_t { } + template + struct proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + struct type + { + template + auto query(BOOST_ASIO_MOVE_ARG(P) p) const + noexcept( + noexcept( + declval::type>().query( + BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + declval::type>().query( + BOOST_ASIO_MOVE_CAST(P)(p)) + ); + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + }; + + template + struct static_proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + struct type + { + template + static constexpr auto query(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + { + return T::query(BOOST_ASIO_MOVE_CAST(P)(p)); + } + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + }; + + template + struct query_member : + traits::query_member::type, bulk_guarantee_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename static_proxy::type, bulk_guarantee_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member< - T, bulk_guarantee_t>::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template @@ -249,9 +316,13 @@ struct bulk_guarantee_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -262,10 +333,16 @@ struct bulk_guarantee_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && !traits::static_query::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::static_query::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -276,11 +353,19 @@ struct bulk_guarantee_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && !traits::static_query::is_valid - && !traits::static_query::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::static_query::is_valid + >::type* = 0, + typename enable_if< + !traits::static_query::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -335,7 +420,9 @@ struct bulk_guarantee_t const Executor& ex, convertible_from_bulk_guarantee_t, typename enable_if< !can_query::value - && can_query::value + >::type* = 0, + typename enable_if< + can_query::value >::type* = 0) #if !defined(__clang__) // Clang crashes if noexcept is used here. #if defined(BOOST_ASIO_MSVC) // Visual C++ wants the type to be qualified. @@ -356,8 +443,12 @@ struct bulk_guarantee_t const Executor& ex, convertible_from_bulk_guarantee_t, typename enable_if< !can_query::value - && !can_query::value - && can_query::value + >::type* = 0, + typename enable_if< + !can_query::value + >::type* = 0, + typename enable_if< + can_query::value >::type* = 0) #if !defined(__clang__) // Clang crashes if noexcept is used here. #if defined(BOOST_ASIO_MSVC) // Visual C++ wants the type to be qualified. @@ -416,8 +507,18 @@ struct unsequenced_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -428,26 +529,46 @@ struct unsequenced_t { } + template + struct query_member : + traits::query_member< + typename bulk_guarantee_t::template proxy::type, + unsequenced_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename bulk_guarantee_t::template static_proxy::type, + unsequenced_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template static BOOST_ASIO_CONSTEXPR unsequenced_t static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && !traits::query_free::is_valid - && !can_query >::value - && !can_query >::value + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::query_free::is_valid + >::type* = 0, + typename enable_if< + !can_query >::value + >::type* = 0, + typename enable_if< + !can_query >::value >::type* = 0) BOOST_ASIO_NOEXCEPT { return unsequenced_t(); @@ -514,8 +635,18 @@ struct sequenced_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -526,16 +657,28 @@ struct sequenced_t { } + template + struct query_member : + traits::query_member< + typename bulk_guarantee_t::template proxy::type, + sequenced_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename bulk_guarantee_t::template static_proxy::type, + sequenced_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template ())> @@ -599,8 +742,18 @@ struct parallel_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -611,16 +764,28 @@ struct parallel_t { } + template + struct query_member : + traits::query_member< + typename bulk_guarantee_t::template proxy::type, + parallel_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename bulk_guarantee_t::template static_proxy::type, + parallel_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template ())> @@ -698,8 +863,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -707,8 +880,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -716,8 +897,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -725,8 +914,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -786,30 +983,30 @@ struct query_free_default struct static_query::is_valid + execution::detail::bulk_guarantee_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::bulk_guarantee_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::bulk_guarantee_t<0>:: + query_static_constexpr_member::value(); } }; template struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::bulk_guarantee_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::bulk_guarantee_t<0>:: + query_member::is_valid && traits::static_query::is_valid >::type> @@ -830,10 +1027,10 @@ struct static_query struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::bulk_guarantee_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::bulk_guarantee_t<0>:: + query_member::is_valid && !traits::static_query::is_valid && traits::static_query struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::bulk_guarantee_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::bulk_guarantee_t<0>:: + query_member::is_valid && !traits::static_query::is_valid && !traits::static_query struct static_query::is_valid + execution::detail::bulk_guarantee::unsequenced_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::bulk_guarantee::unsequenced_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::bulk_guarantee::unsequenced_t<0>:: + query_static_constexpr_member::value(); } }; template struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::bulk_guarantee::unsequenced_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::bulk_guarantee::unsequenced_t<0>:: + query_member::is_valid && !traits::query_free::is_valid && !can_query::value @@ -928,40 +1125,40 @@ struct static_query struct static_query::is_valid + execution::detail::bulk_guarantee::sequenced_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::bulk_guarantee::sequenced_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::bulk_guarantee::sequenced_t<0>:: + query_static_constexpr_member::value(); } }; template struct static_query::is_valid + execution::detail::bulk_guarantee::parallel_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::bulk_guarantee::parallel_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::bulk_guarantee::parallel_t<0>:: + query_static_constexpr_member::value(); } }; diff --git a/boost/asio/execution/connect.hpp b/boost/asio/execution/connect.hpp index 47cbe3c03794c6e666d5cef22ba6a295bbaed740..efaabee23954de6a076d1592149efc46cbaf8924 100644 --- a/boost/asio/execution/connect.hpp +++ b/boost/asio/execution/connect.hpp @@ -2,7 +2,7 @@ // execution/connect.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -159,7 +159,8 @@ enum overload_type ill_formed }; -template +template struct call_traits { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed); @@ -170,13 +171,13 @@ struct call_traits template struct call_traits::is_valid - && - is_operation_state::result_type>::value - && - is_sender::type>::value - ) + connect_member::is_valid + >::type, + typename enable_if< + is_operation_state::result_type>::value + >::type, + typename enable_if< + is_sender::type>::value >::type> : connect_member { @@ -186,15 +187,16 @@ struct call_traits struct call_traits::is_valid - && - connect_free::is_valid - && - is_operation_state::result_type>::value - && - is_sender::type>::value - ) + !connect_member::is_valid + >::type, + typename enable_if< + connect_free::is_valid + >::type, + typename enable_if< + is_operation_state::result_type>::value + >::type, + typename enable_if< + is_sender::type>::value >::type> : connect_free { @@ -204,24 +206,25 @@ struct call_traits struct call_traits::is_valid - && - !connect_free::is_valid - && - is_receiver::value - && - conditional< - !is_as_receiver< - typename remove_cvref::type - >::value, - is_executor_of< - typename remove_cvref::type, - as_invocable::type, S> - >, - false_type - >::type::value - ) + !connect_member::is_valid + >::type, + typename enable_if< + !connect_free::is_valid + >::type, + typename enable_if< + is_receiver::value + >::type, + typename enable_if< + conditional< + !is_as_receiver< + typename remove_cvref::type + >::value, + is_executor_of< + typename remove_cvref::type, + as_invocable::type, S> + >, + false_type + >::type::value >::type> { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = adapter); diff --git a/boost/asio/execution/context.hpp b/boost/asio/execution/context.hpp index 1c660786fbd3644b543f1164837843b321a1dac9..e429ebc003e44901c821b4b854d1e4497fd6985b 100644 --- a/boost/asio/execution/context.hpp +++ b/boost/asio/execution/context.hpp @@ -2,7 +2,7 @@ // execution/context.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -72,8 +72,18 @@ struct context_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = false); @@ -87,16 +97,46 @@ struct context_t { } + template + struct static_proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + struct type + { + template + static constexpr auto query(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + { + return T::query(BOOST_ASIO_MOVE_CAST(P)(p)); + } + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + }; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename static_proxy::type, context_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template ())> @@ -140,8 +180,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -155,20 +203,20 @@ namespace traits { template struct static_query::is_valid + execution::detail::context_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::context_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::context_t<0>:: + query_static_constexpr_member::value(); } }; diff --git a/boost/asio/execution/context_as.hpp b/boost/asio/execution/context_as.hpp index b2f11be4aa095cf20c2d0a3d653887bb543481e6..eec57763f65fea6a4168d7c9aec1b6e2c2779263 100644 --- a/boost/asio/execution/context_as.hpp +++ b/boost/asio/execution/context_as.hpp @@ -2,7 +2,7 @@ // execution/context_as.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -71,8 +71,18 @@ struct context_as_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = false); @@ -92,12 +102,12 @@ struct context_as_t && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename context_t::query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + context_t::query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return context_t::query_static_constexpr_member::value(); } template ())> @@ -111,7 +121,9 @@ struct context_as_t const Executor& ex, const context_as_t&, typename enable_if< is_same::value - && can_query::value + >::type* = 0, + typename enable_if< + can_query::value >::type* = 0) #if !defined(__clang__) // Clang crashes if noexcept is used here. #if defined(BOOST_ASIO_MSVC) // Visual C++ wants the type to be qualified. @@ -151,8 +163,16 @@ template struct is_applicable_property > : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; diff --git a/boost/asio/execution/detail/as_invocable.hpp b/boost/asio/execution/detail/as_invocable.hpp index 28ead3f6daf945fd81593e816a3bbbadea8fe40e..b262d5faa0aae6f52941cfddca086779419d4657 100644 --- a/boost/asio/execution/detail/as_invocable.hpp +++ b/boost/asio/execution/detail/as_invocable.hpp @@ -2,7 +2,7 @@ // execution/detail/as_invocable.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/detail/as_operation.hpp b/boost/asio/execution/detail/as_operation.hpp index 0891683146be2a42bc5c4518261771994520330f..7a0796ba61b4363440358ae911bc25b746b1edf3 100644 --- a/boost/asio/execution/detail/as_operation.hpp +++ b/boost/asio/execution/detail/as_operation.hpp @@ -2,7 +2,7 @@ // execution/detail/as_operation.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/detail/as_receiver.hpp b/boost/asio/execution/detail/as_receiver.hpp index 3349eab5f395f16ede23497528fea20f68367cd7..114b2d02e201e35d6a7fe77f688537a2c82cba1f 100644 --- a/boost/asio/execution/detail/as_receiver.hpp +++ b/boost/asio/execution/detail/as_receiver.hpp @@ -2,7 +2,7 @@ // execution/detail/as_receiver.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/detail/bulk_sender.hpp b/boost/asio/execution/detail/bulk_sender.hpp index 4daa8b57898e444c3b7698c6ca71cf11592492e5..104dc9451d326cebdaad054283504d408d068ac6 100644 --- a/boost/asio/execution/detail/bulk_sender.hpp +++ b/boost/asio/execution/detail/bulk_sender.hpp @@ -2,7 +2,7 @@ // execution/detail/bulk_sender.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/detail/submit_receiver.hpp b/boost/asio/execution/detail/submit_receiver.hpp index 94ec9e31cb4f228a5578841b55dfdf52b79354b6..dddac5857f1eb999a78be4486c957357bffcc6e9 100644 --- a/boost/asio/execution/detail/submit_receiver.hpp +++ b/boost/asio/execution/detail/submit_receiver.hpp @@ -2,7 +2,7 @@ // execution/detail/submit_receiver.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/detail/void_receiver.hpp b/boost/asio/execution/detail/void_receiver.hpp index cc54cc350e200ea28bdd9ab9cdf98d0becaf1b45..09581372282f4b844001b555617af82de0c9f3af 100644 --- a/boost/asio/execution/detail/void_receiver.hpp +++ b/boost/asio/execution/detail/void_receiver.hpp @@ -2,7 +2,7 @@ // execution/detail/void_receiver.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/execute.hpp b/boost/asio/execution/execute.hpp index 2730cbf2793012613de13b6ff4b99ddb4deb37da..3c42ce22e01666c260e537a37397ef0d170c3375 100644 --- a/boost/asio/execution/execute.hpp +++ b/boost/asio/execution/execute.hpp @@ -2,7 +2,7 @@ // execution/execute.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -102,6 +102,7 @@ using boost::asio::result_of; using boost::asio::traits::execute_free; using boost::asio::traits::execute_member; using boost::asio::true_type; +using boost::asio::void_type; void execute(); @@ -113,61 +114,52 @@ enum overload_type ill_formed }; -template +template struct call_traits { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed); }; -template -struct call_traits +struct call_traits::is_valid - ) + execute_member::type, F>::is_valid >::type> : - execute_member + execute_member::type, F> { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member); }; -template -struct call_traits +struct call_traits, F>::is_valid + >::type, typename enable_if< - ( - !execute_member::is_valid - && - execute_free::is_valid - ) + execute_free::is_valid >::type> : execute_free { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free); }; -template -struct call_traits +struct call_traits::type, F>::is_valid + >::type, typename enable_if< - ( - !execute_member::is_valid - && - !execute_free::is_valid - && - conditional::type&()>::type - >::type::value - && - conditional< - !is_as_invocable< - typename decay::type - >::value, - is_sender_to< - T, - as_receiver::type, T> - >, - false_type - >::type::value - ) + !execute_free::is_valid + >::type, + typename void_type< + typename result_of::type&()>::type + >::type, + typename enable_if< + !is_as_invocable::type>::value + >::type, + typename enable_if< + is_sender_to::type, T> >::value >::type> { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = adapter); @@ -178,44 +170,68 @@ struct call_traits + struct proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT) + struct type + { + template + auto execute(BOOST_ASIO_MOVE_ARG(F) f) + noexcept( + noexcept( + declval::type>().execute( + BOOST_ASIO_MOVE_CAST(F)(f)) + ) + ) + -> decltype( + declval::type>().execute( + BOOST_ASIO_MOVE_CAST(F)(f)) + ); + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT) + }; + template BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == call_member, - typename call_traits::result_type + call_traits::overload == call_member, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(F) f) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return BOOST_ASIO_MOVE_CAST(T)(t).execute(BOOST_ASIO_MOVE_CAST(F)(f)); } template BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == call_free, - typename call_traits::result_type + call_traits::overload == call_free, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(F) f) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return execute(BOOST_ASIO_MOVE_CAST(T)(t), BOOST_ASIO_MOVE_CAST(F)(f)); } template BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == adapter, - typename call_traits::result_type + call_traits::overload == adapter, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(F) f) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return boost::asio::execution::detail::submit_helper( BOOST_ASIO_MOVE_CAST(T)(t), @@ -244,11 +260,14 @@ static BOOST_ASIO_CONSTEXPR const asio_execution_execute_fn::impl& } // namespace +typedef asio_execution_execute_fn::impl execute_t; + template struct can_execute : integral_constant::overload != - asio_execution_execute_fn::ill_formed> + asio_execution_execute_fn::call_traits< + execute_t, T, void(F)>::overload != + asio_execution_execute_fn::ill_formed> { }; diff --git a/boost/asio/execution/executor.hpp b/boost/asio/execution/executor.hpp index b34c4f69f917d09b122277028e8e36faaba942ce..b1d8bf0ed8ecad2440a02e2bad149497521327d4 100644 --- a/boost/asio/execution/executor.hpp +++ b/boost/asio/execution/executor.hpp @@ -2,7 +2,7 @@ // execution/executor.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -36,34 +36,48 @@ namespace asio { namespace execution { namespace detail { -template -struct is_executor_of_impl_base : - integral_constant::type&()>::type - >::type::value - && is_constructible::type, F>::value - && is_move_constructible::type>::value -#if defined(BOOST_ASIO_HAS_NOEXCEPT) - && is_nothrow_copy_constructible::value - && is_nothrow_destructible::value -#else // defined(BOOST_ASIO_HAS_NOEXCEPT) - && is_copy_constructible::value - && is_destructible::value -#endif // defined(BOOST_ASIO_HAS_NOEXCEPT) - && traits::equality_comparable::is_valid - && traits::equality_comparable::is_noexcept - > +template +struct is_executor_of_impl : false_type { }; template -struct is_executor_of_impl : - conditional< - can_execute::value, - is_executor_of_impl_base, - false_type - >::type +struct is_executor_of_impl::type, F>::value + >::type, + typename void_type< + typename result_of::type&()>::type + >::type, + typename enable_if< + is_constructible::type, F>::value + >::type, + typename enable_if< + is_move_constructible::type>::value + >::type, +#if defined(BOOST_ASIO_HAS_NOEXCEPT) + typename enable_if< + is_nothrow_copy_constructible::value + >::type, + typename enable_if< + is_nothrow_destructible::value + >::type, +#else // defined(BOOST_ASIO_HAS_NOEXCEPT) + typename enable_if< + is_copy_constructible::value + >::type, + typename enable_if< + is_destructible::value + >::type, +#endif // defined(BOOST_ASIO_HAS_NOEXCEPT) + typename enable_if< + traits::equality_comparable::is_valid + >::type, + typename enable_if< + traits::equality_comparable::is_noexcept + >::type> : true_type { }; diff --git a/boost/asio/execution/impl/bad_executor.ipp b/boost/asio/execution/impl/bad_executor.ipp index 4729a64bb1c0d43faae16c1e18282844e5549bee..9b76cc11913af0cc392e75df74fb55e46cd715bf 100644 --- a/boost/asio/execution/impl/bad_executor.ipp +++ b/boost/asio/execution/impl/bad_executor.ipp @@ -2,7 +2,7 @@ // exection/impl/bad_executor.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/impl/receiver_invocation_error.ipp b/boost/asio/execution/impl/receiver_invocation_error.ipp index ea3022bd406ef1d06b59c3947914928338a4a139..c6ebb70d4a1fb3616783c6f617f66c7c0f1a511c 100644 --- a/boost/asio/execution/impl/receiver_invocation_error.ipp +++ b/boost/asio/execution/impl/receiver_invocation_error.ipp @@ -2,7 +2,7 @@ // exection/impl/receiver_invocation_error.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/invocable_archetype.hpp b/boost/asio/execution/invocable_archetype.hpp index 65f90b2715a7da779b286ca1346cfc16a8c8b51b..49edebaec155c2f06a2d8beb78025468125a9d00 100644 --- a/boost/asio/execution/invocable_archetype.hpp +++ b/boost/asio/execution/invocable_archetype.hpp @@ -2,7 +2,7 @@ // execution/invocable_archetype.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/mapping.hpp b/boost/asio/execution/mapping.hpp index 3b9fc1c9c92765fb20a37206861f2f84ac495aa4..2b102401b400e8755e25b37e7b40f595f99c015d 100644 --- a/boost/asio/execution/mapping.hpp +++ b/boost/asio/execution/mapping.hpp @@ -2,7 +2,7 @@ // execution/mapping.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -195,8 +195,18 @@ struct mapping_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = false); @@ -227,16 +237,74 @@ struct mapping_t { } + template + struct proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + struct type + { + template + auto query(BOOST_ASIO_MOVE_ARG(P) p) const + noexcept( + noexcept( + declval::type>().query( + BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + declval::type>().query( + BOOST_ASIO_MOVE_CAST(P)(p)) + ); + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + }; + + template + struct static_proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + struct type + { + template + static constexpr auto query(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + { + return T::query(BOOST_ASIO_MOVE_CAST(P)(p)); + } + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + }; + + template + struct query_member : + traits::query_member::type, mapping_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename static_proxy::type, mapping_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template @@ -244,9 +312,13 @@ struct mapping_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -257,10 +329,16 @@ struct mapping_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && !traits::static_query::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::static_query::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -271,11 +349,19 @@ struct mapping_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && !traits::static_query::is_valid - && !traits::static_query::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::static_query::is_valid + >::type* = 0, + typename enable_if< + !traits::static_query::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -328,7 +414,9 @@ struct mapping_t const Executor& ex, convertible_from_mapping_t, typename enable_if< !can_query::value - && can_query::value + >::type* = 0, + typename enable_if< + can_query::value >::type* = 0) #if !defined(__clang__) // Clang crashes if noexcept is used here. #if defined(BOOST_ASIO_MSVC) // Visual C++ wants the type to be qualified. @@ -348,8 +436,12 @@ struct mapping_t const Executor& ex, convertible_from_mapping_t, typename enable_if< !can_query::value - && !can_query::value - && can_query::value + >::type* = 0, + typename enable_if< + !can_query::value + >::type* = 0, + typename enable_if< + can_query::value >::type* = 0) #if !defined(__clang__) // Clang crashes if noexcept is used here. #if defined(BOOST_ASIO_MSVC) // Visual C++ wants the type to be qualified. @@ -405,8 +497,18 @@ struct thread_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -417,26 +519,44 @@ struct thread_t { } + template + struct query_member : + traits::query_member< + typename mapping_t::template proxy::type, thread_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename mapping_t::template static_proxy::type, thread_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template static BOOST_ASIO_CONSTEXPR thread_t static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && !traits::query_free::is_valid - && !can_query >::value - && !can_query >::value + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::query_free::is_valid + >::type* = 0, + typename enable_if< + !can_query >::value + >::type* = 0, + typename enable_if< + !can_query >::value >::type* = 0) BOOST_ASIO_NOEXCEPT { return thread_t(); @@ -479,8 +599,18 @@ struct new_thread_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -491,16 +621,26 @@ struct new_thread_t { } + template + struct query_member : + traits::query_member< + typename mapping_t::template proxy::type, new_thread_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename mapping_t::template static_proxy::type, new_thread_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template ())> @@ -540,8 +680,18 @@ struct other_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -552,16 +702,26 @@ struct other_t { } + template + struct query_member : + traits::query_member< + typename mapping_t::template proxy::type, other_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename mapping_t::template static_proxy::type, other_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template ())> @@ -614,8 +774,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -623,8 +791,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -632,8 +808,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -641,8 +825,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -702,28 +894,30 @@ struct query_free_default struct static_query::is_valid + execution::detail::mapping_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::mapping_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::mapping_t<0>:: + query_static_constexpr_member::value(); } }; template struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::mapping_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::mapping_t<0>:: + query_member::is_valid && traits::static_query::is_valid >::type> { @@ -742,8 +936,10 @@ struct static_query struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::mapping_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::mapping_t<0>:: + query_member::is_valid && !traits::static_query::is_valid && traits::static_query::is_valid >::type> @@ -763,8 +959,10 @@ struct static_query struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::mapping_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::mapping_t<0>:: + query_member::is_valid && !traits::static_query::is_valid && !traits::static_query::is_valid && traits::static_query::is_valid @@ -785,29 +983,30 @@ struct static_query struct static_query::is_valid + execution::detail::mapping::thread_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::mapping::thread_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::mapping::thread_t<0>:: + query_static_constexpr_member::value(); } }; template struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::mapping::thread_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::mapping::thread_t<0>:: + query_member::is_valid && !traits::query_free::is_valid && !can_query::value && !can_query::value @@ -827,40 +1026,40 @@ struct static_query struct static_query::is_valid + execution::detail::mapping::new_thread_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::mapping::new_thread_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::mapping::new_thread_t<0>:: + query_static_constexpr_member::value(); } }; template struct static_query::is_valid + execution::detail::mapping::other_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::mapping::other_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::mapping::other_t<0>:: + query_static_constexpr_member::value(); } }; diff --git a/boost/asio/execution/occupancy.hpp b/boost/asio/execution/occupancy.hpp index 388decec490b1f3f0226e9ebcb60d460544c5c20..f9b12334d6aac42e231779d6c8143dc4af587dd0 100644 --- a/boost/asio/execution/occupancy.hpp +++ b/boost/asio/execution/occupancy.hpp @@ -2,7 +2,7 @@ // execution/occupancy.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -68,8 +68,18 @@ struct occupancy_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = false); @@ -80,16 +90,46 @@ struct occupancy_t { } + template + struct static_proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + struct type + { + template + static constexpr auto query(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + { + return T::query(BOOST_ASIO_MOVE_CAST(P)(p)); + } + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + }; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename static_proxy::type, occupancy_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template ())> @@ -133,8 +173,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -148,20 +196,20 @@ namespace traits { template struct static_query::is_valid + execution::detail::occupancy_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::occupancy_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::occupancy_t<0>:: + query_static_constexpr_member::value(); } }; diff --git a/boost/asio/execution/operation_state.hpp b/boost/asio/execution/operation_state.hpp index 62fa237e67cf3acef0bb5f07f9342ca33f3de456..26964c479198108263ce20d85fe5480e8c06c44e 100644 --- a/boost/asio/execution/operation_state.hpp +++ b/boost/asio/execution/operation_state.hpp @@ -2,7 +2,7 @@ // execution/operation_state.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/outstanding_work.hpp b/boost/asio/execution/outstanding_work.hpp index 507d5d3f011e4e6c33858f8067ca8f7353e83f6d..ef25c60079fe099e372973363af3dc3923e36bff 100644 --- a/boost/asio/execution/outstanding_work.hpp +++ b/boost/asio/execution/outstanding_work.hpp @@ -2,7 +2,7 @@ // execution/outstanding_work.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -161,8 +161,18 @@ struct outstanding_work_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = false); @@ -187,20 +197,74 @@ struct outstanding_work_t { } + template + struct proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + struct type + { + template + auto query(BOOST_ASIO_MOVE_ARG(P) p) const + noexcept( + noexcept( + declval::type>().query( + BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + declval::type>().query( + BOOST_ASIO_MOVE_CAST(P)(p)) + ); + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + }; + + template + struct static_proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + struct type + { + template + static constexpr auto query(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + { + return T::query(BOOST_ASIO_MOVE_CAST(P)(p)); + } + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + }; + + template + struct query_member : + traits::query_member::type, outstanding_work_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename static_proxy::type, outstanding_work_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member< - T, outstanding_work_t>::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member< - T, outstanding_work_t - >::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member< - T, outstanding_work_t>::value(); + return query_static_constexpr_member::value(); } template @@ -208,10 +272,13 @@ struct outstanding_work_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member< - T, outstanding_work_t>::is_valid - && !traits::query_member::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -222,11 +289,16 @@ struct outstanding_work_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member< - T, outstanding_work_t>::is_valid - && !traits::query_member::is_valid - && !traits::static_query::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::static_query::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -283,7 +355,9 @@ struct outstanding_work_t const Executor& ex, convertible_from_outstanding_work_t, typename enable_if< !can_query::value - && can_query::value + >::type* = 0, + typename enable_if< + can_query::value >::type* = 0) #if !defined(__clang__) // Clang crashes if noexcept is used here. #if defined(BOOST_ASIO_MSVC) // Visual C++ wants the type to be qualified. @@ -338,8 +412,18 @@ struct untracked_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -350,25 +434,42 @@ struct untracked_t { } + template + struct query_member : + traits::query_member< + typename outstanding_work_t::template proxy::type, untracked_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename outstanding_work_t::template static_proxy::type, + untracked_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template static BOOST_ASIO_CONSTEXPR untracked_t static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && !traits::query_free::is_valid - && !can_query >::value + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::query_free::is_valid + >::type* = 0, + typename enable_if< + !can_query >::value >::type* = 0) BOOST_ASIO_NOEXCEPT { return untracked_t(); @@ -411,8 +512,18 @@ struct tracked_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -423,16 +534,27 @@ struct tracked_t { } + template + struct query_member : + traits::query_member< + typename outstanding_work_t::template proxy::type, tracked_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename outstanding_work_t::template static_proxy::type, + tracked_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template ())> @@ -486,8 +608,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -495,8 +625,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -504,8 +642,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -550,30 +696,30 @@ struct query_free_default struct static_query::is_valid + execution::detail::outstanding_work_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::outstanding_work_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::outstanding_work_t<0>:: + query_static_constexpr_member::value(); } }; template struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::outstanding_work_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::outstanding_work_t<0>:: + query_member::is_valid && traits::static_query::is_valid >::type> @@ -594,10 +740,10 @@ struct static_query struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::outstanding_work_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::outstanding_work_t<0>:: + query_member::is_valid && !traits::static_query::is_valid && traits::static_query struct static_query::is_valid + execution::detail::outstanding_work::untracked_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::outstanding_work::untracked_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::outstanding_work::untracked_t<0>:: + query_static_constexpr_member::value(); } }; template struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::outstanding_work::untracked_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::outstanding_work::untracked_t<0>:: + query_member::is_valid && !traits::query_free::is_valid && !can_query::value @@ -663,20 +809,20 @@ struct static_query struct static_query::is_valid + execution::detail::outstanding_work::tracked_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::outstanding_work::tracked_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::outstanding_work::tracked_t<0>:: + query_static_constexpr_member::value(); } }; diff --git a/boost/asio/execution/prefer_only.hpp b/boost/asio/execution/prefer_only.hpp index 8efca06ef3247c8b79dc375381333c4d413e687f..d0e8fc83c7b72c5886428d66e60726c73fff3634 100644 --- a/boost/asio/execution/prefer_only.hpp +++ b/boost/asio/execution/prefer_only.hpp @@ -2,7 +2,7 @@ // execution/prefer_only.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -221,7 +221,9 @@ struct prefer_only : prefer(const Executor& ex, const prefer_only& p, typename enable_if< is_same::value - && can_prefer::value + >::type* = 0, + typename enable_if< + can_prefer::value >::type* = 0) #if !defined(BOOST_ASIO_MSVC) \ && !defined(__clang__) // Clang crashes if noexcept is used here. @@ -239,7 +241,9 @@ struct prefer_only : query(const Executor& ex, const prefer_only& p, typename enable_if< is_same::value - && can_query::value + >::type* = 0, + typename enable_if< + can_query::value >::type* = 0) #if !defined(BOOST_ASIO_MSVC) \ && !defined(__clang__) // Clang crashes if noexcept is used here. diff --git a/boost/asio/execution/receiver.hpp b/boost/asio/execution/receiver.hpp index 22d640050a9f484e61c641dce94af50377cccf06..80d78fc7235f97cff5500093150b1cab262511c1 100644 --- a/boost/asio/execution/receiver.hpp +++ b/boost/asio/execution/receiver.hpp @@ -2,7 +2,7 @@ // execution/receiver.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/receiver_invocation_error.hpp b/boost/asio/execution/receiver_invocation_error.hpp index 576f3b0d2eed7f1199d8325c1e9a1cd06aaa8b07..2d3d6a29ce0fac5052ce1233db155018da2ea37e 100644 --- a/boost/asio/execution/receiver_invocation_error.hpp +++ b/boost/asio/execution/receiver_invocation_error.hpp @@ -2,7 +2,7 @@ // execution/receiver_invocation_error.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/relationship.hpp b/boost/asio/execution/relationship.hpp index 71a7b7f27bd1c6eb5b52935fbc0872af0150d769..bc8d014f1ab9fced6205d61a0b14e62777a9577f 100644 --- a/boost/asio/execution/relationship.hpp +++ b/boost/asio/execution/relationship.hpp @@ -2,7 +2,7 @@ // execution/relationship.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -160,8 +160,18 @@ struct relationship_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = false); @@ -186,20 +196,74 @@ struct relationship_t { } + template + struct proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + struct type + { + template + auto query(BOOST_ASIO_MOVE_ARG(P) p) const + noexcept( + noexcept( + declval::type>().query( + BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + declval::type>().query( + BOOST_ASIO_MOVE_CAST(P)(p)) + ); + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + }; + + template + struct static_proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + struct type + { + template + static constexpr auto query(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + conditional::type::query(BOOST_ASIO_MOVE_CAST(P)(p)) + ) + { + return T::query(BOOST_ASIO_MOVE_CAST(P)(p)); + } + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_STATIC_CONSTEXPR_MEMBER_TRAIT) + }; + + template + struct query_member : + traits::query_member::type, relationship_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename static_proxy::type, relationship_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member< - T, relationship_t>::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member< - T, relationship_t - >::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member< - T, relationship_t>::value(); + return query_static_constexpr_member::value(); } template @@ -207,10 +271,13 @@ struct relationship_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member< - T, relationship_t>::is_valid - && !traits::query_member::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -221,11 +288,16 @@ struct relationship_t typename traits::static_query::result_type static_query( typename enable_if< - !traits::query_static_constexpr_member< - T, relationship_t>::is_valid - && !traits::query_member::is_valid - && !traits::static_query::is_valid - && traits::static_query::is_valid + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::static_query::is_valid + >::type* = 0, + typename enable_if< + traits::static_query::is_valid >::type* = 0) BOOST_ASIO_NOEXCEPT { return traits::static_query::value(); @@ -281,7 +353,9 @@ struct relationship_t const Executor& ex, convertible_from_relationship_t, typename enable_if< !can_query::value - && can_query::value + >::type* = 0, + typename enable_if< + can_query::value >::type* = 0) #if !defined(__clang__) // Clang crashes if noexcept is used here. #if defined(BOOST_ASIO_MSVC) // Visual C++ wants the type to be qualified. @@ -336,8 +410,18 @@ struct fork_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -348,25 +432,41 @@ struct fork_t { } + template + struct query_member : + traits::query_member< + typename relationship_t::template proxy::type, fork_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename relationship_t::template static_proxy::type, fork_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template static BOOST_ASIO_CONSTEXPR fork_t static_query( typename enable_if< - !traits::query_static_constexpr_member::is_valid - && !traits::query_member::is_valid - && !traits::query_free::is_valid - && !can_query >::value + !query_static_constexpr_member::is_valid + >::type* = 0, + typename enable_if< + !query_member::is_valid + >::type* = 0, + typename enable_if< + !traits::query_free::is_valid + >::type* = 0, + typename enable_if< + !can_query >::value >::type* = 0) BOOST_ASIO_NOEXCEPT { return fork_t(); @@ -409,8 +509,18 @@ struct continuation_t #if defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) template BOOST_ASIO_STATIC_CONSTEXPR(bool, - is_applicable_property_v = is_executor::value - || is_sender::value || is_scheduler::value); + is_applicable_property_v = ( + is_executor::value + || conditional< + is_executor::value, + false_type, + is_sender + >::type::value + || conditional< + is_executor::value, + false_type, + is_scheduler + >::type::value)); #endif // defined(BOOST_ASIO_HAS_VARIABLE_TEMPLATES) BOOST_ASIO_STATIC_CONSTEXPR(bool, is_requirable = true); @@ -421,16 +531,27 @@ struct continuation_t { } + template + struct query_member : + traits::query_member< + typename relationship_t::template proxy::type, continuation_t> {}; + + template + struct query_static_constexpr_member : + traits::query_static_constexpr_member< + typename relationship_t::template static_proxy::type, + continuation_t> {}; + #if defined(BOOST_ASIO_HAS_DEDUCED_STATIC_QUERY_TRAIT) \ && defined(BOOST_ASIO_HAS_SFINAE_VARIABLE_TEMPLATES) template static BOOST_ASIO_CONSTEXPR - typename traits::query_static_constexpr_member::result_type + typename query_static_constexpr_member::result_type static_query() BOOST_ASIO_NOEXCEPT_IF(( - traits::query_static_constexpr_member::is_noexcept)) + query_static_constexpr_member::is_noexcept)) { - return traits::query_static_constexpr_member::value(); + return query_static_constexpr_member::value(); } template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -494,8 +623,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -503,8 +640,16 @@ template struct is_applicable_property : integral_constant::value - || execution::is_sender::value - || execution::is_scheduler::value> + || conditional< + execution::is_executor::value, + false_type, + execution::is_sender + >::type::value + || conditional< + execution::is_executor::value, + false_type, + execution::is_scheduler + >::type::value> { }; @@ -549,30 +694,30 @@ struct query_free_default struct static_query::is_valid + execution::detail::relationship_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::relationship_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::relationship_t<0>:: + query_static_constexpr_member::value(); } }; template struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::relationship_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::relationship_t<0>:: + query_member::is_valid && traits::static_query::is_valid >::type> @@ -593,10 +738,10 @@ struct static_query struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::relationship_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::relationship_t<0>:: + query_member::is_valid && !traits::static_query::is_valid && traits::static_query struct static_query::is_valid + execution::detail::relationship::fork_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::relationship::fork_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::relationship::fork_t<0>:: + query_static_constexpr_member::value(); } }; template struct static_query::is_valid - && !traits::query_member::is_valid + !execution::detail::relationship::fork_t<0>:: + query_static_constexpr_member::is_valid + && !execution::detail::relationship::fork_t<0>:: + query_member::is_valid && !traits::query_free::is_valid && !can_query::value @@ -662,20 +807,20 @@ struct static_query struct static_query::is_valid + execution::detail::relationship::continuation_t<0>:: + query_static_constexpr_member::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = true); - typedef typename traits::query_static_constexpr_member::result_type result_type; + typedef typename execution::detail::relationship::continuation_t<0>:: + query_static_constexpr_member::result_type result_type; static BOOST_ASIO_CONSTEXPR result_type value() { - return traits::query_static_constexpr_member::value(); + return execution::detail::relationship::continuation_t<0>:: + query_static_constexpr_member::value(); } }; diff --git a/boost/asio/execution/schedule.hpp b/boost/asio/execution/schedule.hpp index 4eabc5c4eebf0aea3b9770819bcfbeaa79b35685..acb95465b4f086ac4a3ac8742508de21b959d78a 100644 --- a/boost/asio/execution/schedule.hpp +++ b/boost/asio/execution/schedule.hpp @@ -2,7 +2,7 @@ // execution/schedule.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -88,7 +88,7 @@ enum overload_type ill_formed }; -template +template struct call_traits { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed); @@ -99,9 +99,7 @@ struct call_traits template struct call_traits::is_valid - ) + schedule_member::is_valid >::type> : schedule_member { @@ -111,11 +109,10 @@ struct call_traits struct call_traits::is_valid - && - schedule_free::is_valid - ) + !schedule_member::is_valid + >::type, + typename enable_if< + schedule_free::is_valid >::type> : schedule_free { @@ -125,13 +122,13 @@ struct call_traits struct call_traits::is_valid - && - !schedule_free::is_valid - && - is_executor::type>::value - ) + !schedule_member::is_valid + >::type, + typename enable_if< + !schedule_free::is_valid + >::type, + typename enable_if< + is_executor::type>::value >::type> { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = identity); diff --git a/boost/asio/execution/scheduler.hpp b/boost/asio/execution/scheduler.hpp index 70c61505cdda106af584ed725110d2f801e870d7..984b8200d583498459db708e68efef08f7574bd2 100644 --- a/boost/asio/execution/scheduler.hpp +++ b/boost/asio/execution/scheduler.hpp @@ -2,7 +2,7 @@ // execution/scheduler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/sender.hpp b/boost/asio/execution/sender.hpp index 90dd4988906563ed71b1569244839fdadad3577f..ba7f4d2c48e7f4bf0f41af6b15a92f42ee4a4517 100644 --- a/boost/asio/execution/sender.hpp +++ b/boost/asio/execution/sender.hpp @@ -2,7 +2,7 @@ // execution/sender.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/execution/set_done.hpp b/boost/asio/execution/set_done.hpp index afb9e1600e33d56e4f1d856951afddca95f88860..28f2206ed4c21b008cf2c6a9df2a68a20fde272c 100644 --- a/boost/asio/execution/set_done.hpp +++ b/boost/asio/execution/set_done.hpp @@ -2,7 +2,7 @@ // execution/set_done.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -85,7 +85,7 @@ enum overload_type ill_formed }; -template +template struct call_traits { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed); @@ -96,9 +96,7 @@ struct call_traits template struct call_traits::is_valid - ) + set_done_member::is_valid >::type> : set_done_member { @@ -108,11 +106,10 @@ struct call_traits struct call_traits::is_valid - && - set_done_free::is_valid - ) + !set_done_member::is_valid + >::type, + typename enable_if< + set_done_free::is_valid >::type> : set_done_free { diff --git a/boost/asio/execution/set_error.hpp b/boost/asio/execution/set_error.hpp index ecc0d41ca0091091e1e32c1cdf77294f3b5fc9c8..94d0b73c9cd8e9cac335967b1cbe3ff08994edde 100644 --- a/boost/asio/execution/set_error.hpp +++ b/boost/asio/execution/set_error.hpp @@ -2,7 +2,7 @@ // execution/set_error.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -85,7 +85,7 @@ enum overload_type ill_formed }; -template +template struct call_traits { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed); @@ -96,9 +96,7 @@ struct call_traits template struct call_traits::is_valid - ) + set_error_member::is_valid >::type> : set_error_member { @@ -108,11 +106,10 @@ struct call_traits struct call_traits::is_valid - && - set_error_free::is_valid - ) + !set_error_member::is_valid + >::type, + typename enable_if< + set_error_free::is_valid >::type> : set_error_free { diff --git a/boost/asio/execution/set_value.hpp b/boost/asio/execution/set_value.hpp index a1b7ab596b8362c2511ebe3c391bdd1166b31614..b313f075147e8bf3c7174cde2bad86c1ac25ba41 100644 --- a/boost/asio/execution/set_value.hpp +++ b/boost/asio/execution/set_value.hpp @@ -2,7 +2,7 @@ // execution/set_value.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -88,7 +88,7 @@ enum overload_type ill_formed }; -template +template struct call_traits { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed); @@ -99,9 +99,7 @@ struct call_traits template struct call_traits::is_valid - ) + set_value_member::is_valid >::type> : set_value_member { @@ -111,11 +109,10 @@ struct call_traits struct call_traits::is_valid - && - set_value_free::is_valid - ) + !set_value_member::is_valid + >::type, + typename enable_if< + set_value_free::is_valid >::type> : set_value_free { diff --git a/boost/asio/execution/start.hpp b/boost/asio/execution/start.hpp index 7ceea6f8d32cc7163c1342a008d8dc0f65a4abbe..6ea0ee0e8e73d3b23768ae2aee703e42ac4d7cbe 100644 --- a/boost/asio/execution/start.hpp +++ b/boost/asio/execution/start.hpp @@ -2,7 +2,7 @@ // execution/start.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -82,7 +82,7 @@ enum overload_type ill_formed }; -template +template struct call_traits { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed); @@ -93,9 +93,7 @@ struct call_traits template struct call_traits::is_valid - ) + start_member::is_valid >::type> : start_member { @@ -105,11 +103,10 @@ struct call_traits struct call_traits::is_valid - && - start_free::is_valid - ) + !start_member::is_valid + >::type, + typename enable_if< + start_free::is_valid >::type> : start_free { diff --git a/boost/asio/execution/submit.hpp b/boost/asio/execution/submit.hpp index 27329132baed57ecdde0a3d6d52e2a4cecaca29d..da29e71eb537d6aaf92988154b009e63260de6c0 100644 --- a/boost/asio/execution/submit.hpp +++ b/boost/asio/execution/submit.hpp @@ -2,7 +2,7 @@ // execution/submit.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -127,7 +127,8 @@ enum overload_type ill_formed }; -template +template struct call_traits { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed); @@ -138,11 +139,10 @@ struct call_traits template struct call_traits::is_valid - && - is_sender_to::value - ) + submit_member::is_valid + >::type, + typename enable_if< + is_sender_to::value >::type> : submit_member { @@ -152,13 +152,13 @@ struct call_traits struct call_traits::is_valid - && - submit_free::is_valid - && - is_sender_to::value - ) + !submit_member::is_valid + >::type, + typename enable_if< + submit_free::is_valid + >::type, + typename enable_if< + is_sender_to::value >::type> : submit_free { @@ -168,13 +168,13 @@ struct call_traits struct call_traits::is_valid - && - !submit_free::is_valid - && - is_sender_to::value - ) + !submit_member::is_valid + >::type, + typename enable_if< + !submit_free::is_valid + >::type, + typename enable_if< + is_sender_to::value >::type> { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = adapter); diff --git a/boost/asio/execution_context.hpp b/boost/asio/execution_context.hpp old mode 100755 new mode 100644 index ffb1a2a5c54dd1c0e48389193e6409d8b35d4f2f..4e73b6163252ffdf75930e67eac5ba39d5fc0a1e --- a/boost/asio/execution_context.hpp +++ b/boost/asio/execution_context.hpp @@ -2,7 +2,7 @@ // execution_context.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/executor.hpp b/boost/asio/executor.hpp old mode 100755 new mode 100644 index 4f259cef3b23c22b7ee548ba8c3dbd48c7fba66f..77437726d4a7d99731d9a8cdaa672dbcc2945d7b --- a/boost/asio/executor.hpp +++ b/boost/asio/executor.hpp @@ -2,7 +2,7 @@ // executor.hpp // ~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/executor_work_guard.hpp b/boost/asio/executor_work_guard.hpp old mode 100755 new mode 100644 index 7d8ca480b6c3aed944670f04df9b35019a7942df..5811f36934134ab68eeff9bf7dbe59d6ece14dd9 --- a/boost/asio/executor_work_guard.hpp +++ b/boost/asio/executor_work_guard.hpp @@ -2,7 +2,7 @@ // executor_work_guard.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -32,7 +32,7 @@ namespace asio { #if !defined(BOOST_ASIO_EXECUTOR_WORK_GUARD_DECL) #define BOOST_ASIO_EXECUTOR_WORK_GUARD_DECL -template +template class executor_work_guard; #endif // !defined(BOOST_ASIO_EXECUTOR_WORK_GUARD_DECL) @@ -42,7 +42,7 @@ class executor_work_guard; #if defined(GENERATING_DOCUMENTATION) template #else // defined(GENERATING_DOCUMENTATION) -template +template #endif // defined(GENERATING_DOCUMENTATION) class executor_work_guard { @@ -130,7 +130,10 @@ private: template class executor_work_guard::value && execution::is_executor::value + !is_executor::value + >::type, + typename enable_if< + execution::is_executor::value >::type> { public: @@ -218,9 +221,9 @@ private: /// Create an @ref executor_work_guard object. template inline executor_work_guard make_work_guard(const Executor& ex, - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type* = 0) + >::type = 0) { return executor_work_guard(ex); } @@ -229,9 +232,9 @@ inline executor_work_guard make_work_guard(const Executor& ex, template inline executor_work_guard make_work_guard(ExecutionContext& ctx, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) { return executor_work_guard( ctx.get_executor()); @@ -241,10 +244,15 @@ make_work_guard(ExecutionContext& ctx, template inline executor_work_guard::type> make_work_guard(const T& t, - typename enable_if< - !is_executor::value && !execution::is_executor::value - && !is_convertible::value>::type* = 0) + typename constraint< + !is_executor::value + >::type = 0, + typename constraint< + !execution::is_executor::value + >::type = 0, + typename constraint< + !is_convertible::value + >::type = 0) { return executor_work_guard::type>( associated_executor::get(t)); @@ -254,9 +262,9 @@ make_work_guard(const T& t, template inline executor_work_guard::type> make_work_guard(const T& t, const Executor& ex, - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type* = 0) + >::type = 0) { return executor_work_guard::type>( associated_executor::get(t, ex)); @@ -267,11 +275,18 @@ template inline executor_work_guard::type> make_work_guard(const T& t, ExecutionContext& ctx, - typename enable_if< - !is_executor::value && !execution::is_executor::value - && !is_convertible::value - && is_convertible::value - >::type* = 0) + typename constraint< + !is_executor::value + >::type = 0, + typename constraint< + !execution::is_executor::value + >::type = 0, + typename constraint< + !is_convertible::value + >::type = 0, + typename constraint< + is_convertible::value + >::type = 0) { return executor_work_guard::type>( diff --git a/boost/asio/experimental/as_single.hpp b/boost/asio/experimental/as_single.hpp new file mode 100644 index 0000000000000000000000000000000000000000..1bb1cb888c848d69afafc6051421477a97abfa33 --- /dev/null +++ b/boost/asio/experimental/as_single.hpp @@ -0,0 +1,137 @@ +// +// experimental/as_single.hpp +// ~~~~~~~~~~~~~~~~~~~~~~~~~~ +// +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// +// 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_ASIO_EXPERIMENTAL_AS_SINGLE_HPP +#define BOOST_ASIO_EXPERIMENTAL_AS_SINGLE_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include +#include + +#include + +namespace boost { +namespace asio { +namespace experimental { + +/// Completion token type used to specify that the completion handler +/// arguments should be combined into a single argument. +/** + * The as_single_t class is used to indicate that any arguments to the + * completion handler should be combined and passed as a single argument. + * If there is already one argument, that argument is passed as-is. If + * there is more than argument, the arguments are first moved into a + * @c std::tuple and that tuple is then passed to the completion handler. + */ +template +class as_single_t +{ +public: + /// Tag type used to prevent the "default" constructor from being used for + /// conversions. + struct default_constructor_tag {}; + + /// Default constructor. + /** + * This constructor is only valid if the underlying completion token is + * default constructible and move constructible. The underlying completion + * token is itself defaulted as an argument to allow it to capture a source + * location. + */ + BOOST_ASIO_CONSTEXPR as_single_t( + default_constructor_tag = default_constructor_tag(), + CompletionToken token = CompletionToken()) + : token_(BOOST_ASIO_MOVE_CAST(CompletionToken)(token)) + { + } + + /// Constructor. + template + BOOST_ASIO_CONSTEXPR explicit as_single_t( + BOOST_ASIO_MOVE_ARG(T) completion_token) + : token_(BOOST_ASIO_MOVE_CAST(T)(completion_token)) + { + } + + /// Adapts an executor to add the @c as_single_t completion token as the + /// default. + template + struct executor_with_default : InnerExecutor + { + /// Specify @c as_single_t as the default completion token type. + typedef as_single_t default_completion_token_type; + + /// Construct the adapted executor from the inner executor type. + executor_with_default(const InnerExecutor& ex) BOOST_ASIO_NOEXCEPT + : InnerExecutor(ex) + { + } + + /// Convert the specified executor to the inner executor type, then use + /// that to construct the adapted executor. + template + executor_with_default(const OtherExecutor& ex, + typename constraint< + is_convertible::value + >::type = 0) BOOST_ASIO_NOEXCEPT + : InnerExecutor(ex) + { + } + }; + + /// Type alias to adapt an I/O object to use @c as_single_t as its + /// default completion token type. +#if defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES) \ + || defined(GENERATING_DOCUMENTATION) + template + using as_default_on_t = typename T::template rebind_executor< + executor_with_default >::other; +#endif // defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES) + // || defined(GENERATING_DOCUMENTATION) + + /// Function helper to adapt an I/O object to use @c as_single_t as its + /// default completion token type. + template + static typename decay::type::template rebind_executor< + executor_with_default::type::executor_type> + >::other + as_default_on(BOOST_ASIO_MOVE_ARG(T) object) + { + return typename decay::type::template rebind_executor< + executor_with_default::type::executor_type> + >::other(BOOST_ASIO_MOVE_CAST(T)(object)); + } + +//private: + CompletionToken token_; +}; + +/// Create a completion token to specify that the completion handler arguments +/// should be combined into a single argument. +template +inline BOOST_ASIO_CONSTEXPR as_single_t::type> +as_single(BOOST_ASIO_MOVE_ARG(CompletionToken) completion_token) +{ + return as_single_t::type>( + BOOST_ASIO_MOVE_CAST(CompletionToken)(completion_token)); +} + +} // namespace experimental +} // namespace asio +} // namespace boost + +#include + +#include + +#endif // BOOST_ASIO_EXPERIMENTAL_AS_SINGLE_HPP diff --git a/boost/asio/experimental/impl/as_single.hpp b/boost/asio/experimental/impl/as_single.hpp new file mode 100644 index 0000000000000000000000000000000000000000..336e9a19c69c9a58b40e47d4700bf05a7a88ed7f --- /dev/null +++ b/boost/asio/experimental/impl/as_single.hpp @@ -0,0 +1,245 @@ +// +// experimental/impl/as_single.hpp +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// +// 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_ASIO_IMPL_EXPERIMENTAL_AS_SINGLE_HPP +#define BOOST_ASIO_IMPL_EXPERIMENTAL_AS_SINGLE_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace boost { +namespace asio { +namespace experimental { +namespace detail { + +// Class to adapt a as_single_t as a completion handler. +template +class as_single_handler +{ +public: + typedef void result_type; + + template + as_single_handler(as_single_t e) + : handler_(BOOST_ASIO_MOVE_CAST(CompletionToken)(e.token_)) + { + } + + template + as_single_handler(BOOST_ASIO_MOVE_ARG(RedirectedHandler) h) + : handler_(BOOST_ASIO_MOVE_CAST(RedirectedHandler)(h)) + { + } + + void operator()() + { + handler_(); + } + + template + void operator()(BOOST_ASIO_MOVE_ARG(Arg) arg) + { + handler_(BOOST_ASIO_MOVE_CAST(Arg)(arg)); + } + + template + void operator()(BOOST_ASIO_MOVE_ARG(Args)... args) + { + handler_(std::make_tuple(BOOST_ASIO_MOVE_CAST(Args)(args)...)); + } + +//private: + Handler handler_; +}; + +template +inline asio_handler_allocate_is_deprecated +asio_handler_allocate(std::size_t size, + as_single_handler* this_handler) +{ +#if defined(BOOST_ASIO_NO_DEPRECATED) + boost_asio_handler_alloc_helpers::allocate(size, this_handler->handler_); + return asio_handler_allocate_is_no_longer_used(); +#else // defined(BOOST_ASIO_NO_DEPRECATED) + return boost_asio_handler_alloc_helpers::allocate( + size, this_handler->handler_); +#endif // defined(BOOST_ASIO_NO_DEPRECATED) +} + +template +inline asio_handler_deallocate_is_deprecated +asio_handler_deallocate(void* pointer, std::size_t size, + as_single_handler* this_handler) +{ + boost_asio_handler_alloc_helpers::deallocate( + pointer, size, this_handler->handler_); +#if defined(BOOST_ASIO_NO_DEPRECATED) + return asio_handler_deallocate_is_no_longer_used(); +#endif // defined(BOOST_ASIO_NO_DEPRECATED) +} + +template +inline bool asio_handler_is_continuation( + as_single_handler* this_handler) +{ + return boost_asio_handler_cont_helpers::is_continuation( + this_handler->handler_); +} + +template +inline asio_handler_invoke_is_deprecated +asio_handler_invoke(Function& function, + as_single_handler* this_handler) +{ + boost_asio_handler_invoke_helpers::invoke( + function, this_handler->handler_); +#if defined(BOOST_ASIO_NO_DEPRECATED) + return asio_handler_invoke_is_no_longer_used(); +#endif // defined(BOOST_ASIO_NO_DEPRECATED) +} + +template +inline asio_handler_invoke_is_deprecated +asio_handler_invoke(const Function& function, + as_single_handler* this_handler) +{ + boost_asio_handler_invoke_helpers::invoke( + function, this_handler->handler_); +#if defined(BOOST_ASIO_NO_DEPRECATED) + return asio_handler_invoke_is_no_longer_used(); +#endif // defined(BOOST_ASIO_NO_DEPRECATED) +} + +template +struct as_single_signature +{ + typedef Signature type; +}; + +template +struct as_single_signature +{ + typedef R type(); +}; + +template +struct as_single_signature +{ + typedef R type(Arg); +}; + +template +struct as_single_signature +{ + typedef R type(std::tuple::type...>); +}; + +} // namespace detail +} // namespace experimental + +#if !defined(GENERATING_DOCUMENTATION) + +template +struct async_result, Signature> +{ + typedef typename async_result::type> + ::return_type return_type; + + template + struct init_wrapper + { + init_wrapper(Initiation init) + : initiation_(BOOST_ASIO_MOVE_CAST(Initiation)(init)) + { + } + + template + void operator()( + BOOST_ASIO_MOVE_ARG(Handler) handler, + BOOST_ASIO_MOVE_ARG(Args)... args) + { + BOOST_ASIO_MOVE_CAST(Initiation)(initiation_)( + experimental::detail::as_single_handler< + typename decay::type>( + BOOST_ASIO_MOVE_CAST(Handler)(handler)), + BOOST_ASIO_MOVE_CAST(Args)(args)...); + } + + Initiation initiation_; + }; + + template + static return_type initiate( + BOOST_ASIO_MOVE_ARG(Initiation) initiation, + BOOST_ASIO_MOVE_ARG(RawCompletionToken) token, + BOOST_ASIO_MOVE_ARG(Args)... args) + { + return async_initiate::type>( + init_wrapper::type>( + BOOST_ASIO_MOVE_CAST(Initiation)(initiation)), + token.token_, BOOST_ASIO_MOVE_CAST(Args)(args)...); + } +}; + +template +struct associated_executor< + experimental::detail::as_single_handler, Executor> + : detail::associated_executor_forwarding_base +{ + typedef typename associated_executor::type type; + + static type get( + const experimental::detail::as_single_handler& h, + const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT + { + return associated_executor::get(h.handler_, ex); + } +}; + +template +struct associated_allocator< + experimental::detail::as_single_handler, Allocator> +{ + typedef typename associated_allocator::type type; + + static type get( + const experimental::detail::as_single_handler& h, + const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT + { + return associated_allocator::get(h.handler_, a); + } +}; + +#endif // !defined(GENERATING_DOCUMENTATION) + +} // namespace asio +} // namespace boost + +#include + +#endif // BOOST_ASIO_IMPL_EXPERIMENTAL_AS_SINGLE_HPP diff --git a/boost/asio/generic/basic_endpoint.hpp b/boost/asio/generic/basic_endpoint.hpp old mode 100755 new mode 100644 index 01bff52ec5ed9a00565866f21273df6bf3ef4daf..e79f9a6b884182eec238e0011b4dd4e02c210598 --- a/boost/asio/generic/basic_endpoint.hpp +++ b/boost/asio/generic/basic_endpoint.hpp @@ -2,7 +2,7 @@ // generic/basic_endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/generic/datagram_protocol.hpp b/boost/asio/generic/datagram_protocol.hpp old mode 100755 new mode 100644 index ccbaf5df10449a802abab12f3cfbdc29e725f2b3..bb0b0a4d73cc7c7cd78ad6ffa6460b631397993a --- a/boost/asio/generic/datagram_protocol.hpp +++ b/boost/asio/generic/datagram_protocol.hpp @@ -2,7 +2,7 @@ // generic/datagram_protocol.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/generic/detail/endpoint.hpp b/boost/asio/generic/detail/endpoint.hpp old mode 100755 new mode 100644 index 92b510702d29dfaa32f2e84b337bba542f2eb298..893c93fb49dbb7a8fa2d5c7d1523c1e3f358066d --- a/boost/asio/generic/detail/endpoint.hpp +++ b/boost/asio/generic/detail/endpoint.hpp @@ -2,7 +2,7 @@ // generic/detail/endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/generic/detail/impl/endpoint.ipp b/boost/asio/generic/detail/impl/endpoint.ipp old mode 100755 new mode 100644 index f9a02639eba8b62aa74974b41ee0520707d64e7c..e518304f7d369e848ae36caee2fc8f7f58769103 --- a/boost/asio/generic/detail/impl/endpoint.ipp +++ b/boost/asio/generic/detail/impl/endpoint.ipp @@ -2,7 +2,7 @@ // generic/detail/impl/endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/generic/raw_protocol.hpp b/boost/asio/generic/raw_protocol.hpp old mode 100755 new mode 100644 index 253dd4a1971aa4bcde6af3547da5e92d95b33249..e5759f00538cd3eb48327ba9ce3aaec9b7af63b1 --- a/boost/asio/generic/raw_protocol.hpp +++ b/boost/asio/generic/raw_protocol.hpp @@ -2,7 +2,7 @@ // generic/raw_protocol.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/generic/seq_packet_protocol.hpp b/boost/asio/generic/seq_packet_protocol.hpp old mode 100755 new mode 100644 index f648570e9fad0c0c3d7f19c23ea5d8ff980966f7..54106e92e332c9a99b86a2b8e3911251aaa9fcb5 --- a/boost/asio/generic/seq_packet_protocol.hpp +++ b/boost/asio/generic/seq_packet_protocol.hpp @@ -2,7 +2,7 @@ // generic/seq_packet_protocol.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/generic/stream_protocol.hpp b/boost/asio/generic/stream_protocol.hpp old mode 100755 new mode 100644 index d095a403c47dae686f49a35a63b5aad9567c5358..0c3eb8eb5f1304fd0fd7a6c4dd4c3834f143a693 --- a/boost/asio/generic/stream_protocol.hpp +++ b/boost/asio/generic/stream_protocol.hpp @@ -2,7 +2,7 @@ // generic/stream_protocol.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/handler_alloc_hook.hpp b/boost/asio/handler_alloc_hook.hpp old mode 100755 new mode 100644 index c1f53b6e7cbd3d061d20a05373ef1e3d7ce09d85..b311e431324f6ccf5b25324b0c721cffc2fa2e74 --- a/boost/asio/handler_alloc_hook.hpp +++ b/boost/asio/handler_alloc_hook.hpp @@ -2,7 +2,7 @@ // handler_alloc_hook.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/handler_continuation_hook.hpp b/boost/asio/handler_continuation_hook.hpp old mode 100755 new mode 100644 index dc81a62515c3ad8c9fe9339a2affa264910b06dc..02ff4d718e061a1e8416835efee29dfd3c646f5d --- a/boost/asio/handler_continuation_hook.hpp +++ b/boost/asio/handler_continuation_hook.hpp @@ -2,7 +2,7 @@ // handler_continuation_hook.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/handler_invoke_hook.hpp b/boost/asio/handler_invoke_hook.hpp old mode 100755 new mode 100644 index 4b4a4518d7ec4cfd812e189be13105d7f1e39ba8..92a1b4250ce9ab2199d9af2e1758a4fce0d09063 --- a/boost/asio/handler_invoke_hook.hpp +++ b/boost/asio/handler_invoke_hook.hpp @@ -2,7 +2,7 @@ // handler_invoke_hook.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/high_resolution_timer.hpp b/boost/asio/high_resolution_timer.hpp old mode 100755 new mode 100644 index 575c612e7ecfddfa85db3620b4a41a5f9bcf8868..ff221a919e1aac8eeb762d51790c36b37466aa61 --- a/boost/asio/high_resolution_timer.hpp +++ b/boost/asio/high_resolution_timer.hpp @@ -2,7 +2,7 @@ // high_resolution_timer.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/impl/awaitable.hpp b/boost/asio/impl/awaitable.hpp old mode 100755 new mode 100644 index 0823bd56e14bc9e8bf9aac47b7dc5344911b6d14..eeb8f240567c6a7d0cd987c813543e6df0502e03 --- a/boost/asio/impl/awaitable.hpp +++ b/boost/asio/impl/awaitable.hpp @@ -2,7 +2,7 @@ // impl/awaitable.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -78,7 +78,7 @@ public: { return boost::asio::detail::thread_info_base::allocate( boost::asio::detail::thread_info_base::awaitable_frame_tag(), - boost::asio::detail::thread_context::thread_call_stack::top(), + boost::asio::detail::thread_context::top_of_thread_call_stack(), size); } @@ -86,7 +86,7 @@ public: { boost::asio::detail::thread_info_base::deallocate( boost::asio::detail::thread_info_base::awaitable_frame_tag(), - boost::asio::detail::thread_context::thread_call_stack::top(), + boost::asio::detail::thread_context::top_of_thread_call_stack(), pointer, size); } #endif // !defined(BOOST_ASIO_DISABLE_AWAITABLE_FRAME_RECYCLING) @@ -112,7 +112,7 @@ public: void await_suspend(coroutine_handle) noexcept { - this_->pop_frame(); + this->this_->pop_frame(); } void await_resume() const noexcept diff --git a/boost/asio/impl/buffered_read_stream.hpp b/boost/asio/impl/buffered_read_stream.hpp old mode 100755 new mode 100644 index 73f1049b5c39ffcbe89769e74eb392a427966541..2a1362b5fcb8594715ce490d41d37c0ac12a3393 --- a/boost/asio/impl/buffered_read_stream.hpp +++ b/boost/asio/impl/buffered_read_stream.hpp @@ -2,7 +2,7 @@ // impl/buffered_read_stream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -219,6 +219,7 @@ struct associated_allocator< template struct associated_executor< detail::buffered_fill_handler, Executor> + : detail::associated_executor_forwarding_base { typedef typename associated_executor::type type; @@ -470,6 +471,7 @@ template , Executor> + : detail::associated_executor_forwarding_base { typedef typename associated_executor::type type; diff --git a/boost/asio/impl/buffered_write_stream.hpp b/boost/asio/impl/buffered_write_stream.hpp old mode 100755 new mode 100644 index cf33911f038196c0d8583cd74609c278327f527c..e900da196767b2ab8a6a065696ab9ff50824c699 --- a/boost/asio/impl/buffered_write_stream.hpp +++ b/boost/asio/impl/buffered_write_stream.hpp @@ -2,7 +2,7 @@ // impl/buffered_write_stream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -199,6 +199,7 @@ struct associated_allocator< template struct associated_executor< detail::buffered_flush_handler, Executor> + : detail::associated_executor_forwarding_base { typedef typename associated_executor::type type; @@ -456,6 +457,7 @@ template , Executor> + : detail::associated_executor_forwarding_base { typedef typename associated_executor::type type; diff --git a/boost/asio/impl/co_spawn.hpp b/boost/asio/impl/co_spawn.hpp old mode 100755 new mode 100644 index 85bee9a0139e4de321b9c5896536a61b53464012..d678bdf5d1e0711d4a36666b1571b346721dacc0 --- a/boost/asio/impl/co_spawn.hpp +++ b/boost/asio/impl/co_spawn.hpp @@ -2,7 +2,7 @@ // impl/co_spawn.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -199,10 +199,10 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE( CompletionToken, void(std::exception_ptr, T)) co_spawn(const Executor& ex, awaitable a, CompletionToken&& token, - typename enable_if< + typename constraint< (is_executor::value || execution::is_executor::value) && is_convertible::value - >::type*) + >::type) { return async_initiate( detail::initiate_co_spawn(AwaitableExecutor(ex)), @@ -216,10 +216,10 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE( CompletionToken, void(std::exception_ptr)) co_spawn(const Executor& ex, awaitable a, CompletionToken&& token, - typename enable_if< + typename constraint< (is_executor::value || execution::is_executor::value) && is_convertible::value - >::type*) + >::type) { return async_initiate( detail::initiate_co_spawn(AwaitableExecutor(ex)), @@ -234,11 +234,11 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE( CompletionToken, void(std::exception_ptr, T)) co_spawn(ExecutionContext& ctx, awaitable a, CompletionToken&& token, - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value - >::type*) + >::type) { return (co_spawn)(ctx.get_executor(), std::move(a), std::forward(token)); @@ -251,11 +251,11 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE( CompletionToken, void(std::exception_ptr)) co_spawn(ExecutionContext& ctx, awaitable a, CompletionToken&& token, - typename enable_if< + typename constraint< is_convertible::value && is_convertible::value - >::type*) + >::type) { return (co_spawn)(ctx.get_executor(), std::move(a), std::forward(token)); @@ -267,9 +267,9 @@ template ::type>::type) co_spawn(const Executor& ex, F&& f, CompletionToken&& token, - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type*) + >::type) { return async_initiate::type>::type>( @@ -284,9 +284,9 @@ template ::type>::type) co_spawn(ExecutionContext& ctx, F&& f, CompletionToken&& token, - typename enable_if< + typename constraint< is_convertible::value - >::type*) + >::type) { return (co_spawn)(ctx.get_executor(), std::forward(f), std::forward(token)); diff --git a/boost/asio/impl/compose.hpp b/boost/asio/impl/compose.hpp old mode 100755 new mode 100644 index 8b2bbd9da35d3774d949b40fdc27ec6110b0762c..e5559c1785e1882b2af475e71191d84249cf93c2 --- a/boost/asio/impl/compose.hpp +++ b/boost/asio/impl/compose.hpp @@ -2,7 +2,7 @@ // impl/compose.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -501,7 +501,9 @@ namespace detail get_composed_io_executor(IoObject& io_object, typename enable_if< !is_executor::value - && !execution::is_executor::value + >::type* = 0, + typename enable_if< + !execution::is_executor::value >::type* = 0) { return io_object.get_executor(); diff --git a/boost/asio/impl/connect.hpp b/boost/asio/impl/connect.hpp old mode 100755 new mode 100644 index f24a739a46086c2c13cb48446488f1282f4bc133..231ef3d48bf716ac4a6a76f95860b188c430bbee --- a/boost/asio/impl/connect.hpp +++ b/boost/asio/impl/connect.hpp @@ -2,7 +2,7 @@ // impl/connect.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -106,8 +106,8 @@ namespace detail template typename Protocol::endpoint connect(basic_socket& s, const EndpointSequence& endpoints, - typename enable_if::value>::type*) + typename constraint::value>::type) { boost::system::error_code ec; typename Protocol::endpoint result = connect(s, endpoints, ec); @@ -118,8 +118,8 @@ typename Protocol::endpoint connect(basic_socket& s, template typename Protocol::endpoint connect(basic_socket& s, const EndpointSequence& endpoints, boost::system::error_code& ec, - typename enable_if::value>::type*) + typename constraint::value>::type) { return detail::deref_connect_result( connect(s, endpoints.begin(), endpoints.end(), @@ -129,7 +129,7 @@ typename Protocol::endpoint connect(basic_socket& s, #if !defined(BOOST_ASIO_NO_DEPRECATED) template Iterator connect(basic_socket& s, Iterator begin, - typename enable_if::value>::type*) + typename constraint::value>::type) { boost::system::error_code ec; Iterator result = connect(s, begin, ec); @@ -140,7 +140,7 @@ Iterator connect(basic_socket& s, Iterator begin, template inline Iterator connect(basic_socket& s, Iterator begin, boost::system::error_code& ec, - typename enable_if::value>::type*) + typename constraint::value>::type) { return connect(s, begin, Iterator(), detail::default_connect_condition(), ec); } @@ -167,8 +167,8 @@ template typename Protocol::endpoint connect(basic_socket& s, const EndpointSequence& endpoints, ConnectCondition connect_condition, - typename enable_if::value>::type*) + typename constraint::value>::type) { boost::system::error_code ec; typename Protocol::endpoint result = connect( @@ -182,8 +182,8 @@ template & s, const EndpointSequence& endpoints, ConnectCondition connect_condition, boost::system::error_code& ec, - typename enable_if::value>::type*) + typename constraint::value>::type) { return detail::deref_connect_result( connect(s, endpoints.begin(), endpoints.end(), @@ -195,7 +195,7 @@ template Iterator connect(basic_socket& s, Iterator begin, ConnectCondition connect_condition, - typename enable_if::value>::type*) + typename constraint::value>::type) { boost::system::error_code ec; Iterator result = connect(s, begin, connect_condition, ec); @@ -208,7 +208,7 @@ template & s, Iterator begin, ConnectCondition connect_condition, boost::system::error_code& ec, - typename enable_if::value>::type*) + typename constraint::value>::type) { return connect(s, begin, Iterator(), connect_condition, ec); } @@ -817,8 +817,8 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(RangeConnectHandler, async_connect(basic_socket& s, const EndpointSequence& endpoints, BOOST_ASIO_MOVE_ARG(RangeConnectHandler) handler, - typename enable_if::value>::type*) + typename constraint::value>::type) { return async_initiate( @@ -834,7 +834,7 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler, void (boost::system::error_code, Iterator)) async_connect(basic_socket& s, Iterator begin, BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler, - typename enable_if::value>::type*) + typename constraint::value>::type) { return async_initiate( @@ -866,8 +866,8 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(RangeConnectHandler, async_connect(basic_socket& s, const EndpointSequence& endpoints, ConnectCondition connect_condition, BOOST_ASIO_MOVE_ARG(RangeConnectHandler) handler, - typename enable_if::value>::type*) + typename constraint::value>::type) { return async_initiate( @@ -885,7 +885,7 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler, async_connect(basic_socket& s, Iterator begin, ConnectCondition connect_condition, BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler, - typename enable_if::value>::type*) + typename constraint::value>::type) { return async_initiate( diff --git a/boost/asio/impl/defer.hpp b/boost/asio/impl/defer.hpp old mode 100755 new mode 100644 index 71f6a8828ea720427163cf3ece9a486a452f0b04..7537afe29fe5abd046a006ff5579af61ca34bce1 --- a/boost/asio/impl/defer.hpp +++ b/boost/asio/impl/defer.hpp @@ -2,7 +2,7 @@ // impl/defer.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -104,7 +104,8 @@ public: execution::is_executor< typename conditional::type >::value - && + >::type* = 0, + typename enable_if< !detail::is_work_dispatcher_required< typename decay::type, Executor @@ -130,7 +131,8 @@ public: execution::is_executor< typename conditional::type >::value - && + >::type* = 0, + typename enable_if< detail::is_work_dispatcher_required< typename decay::type, Executor @@ -161,7 +163,8 @@ public: !execution::is_executor< typename conditional::type >::value - && + >::type* = 0, + typename enable_if< !detail::is_work_dispatcher_required< typename decay::type, Executor @@ -182,7 +185,8 @@ public: !execution::is_executor< typename conditional::type >::value - && + >::type* = 0, + typename enable_if< detail::is_work_dispatcher_required< typename decay::type, Executor @@ -221,9 +225,9 @@ template BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) defer( const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token, - typename enable_if< + typename constraint< execution::is_executor::value || is_executor::value - >::type*) + >::type) { return async_initiate( detail::initiate_defer_with_executor(ex), token); @@ -233,8 +237,8 @@ template inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) defer( ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token, - typename enable_if::value>::type*) + typename constraint::value>::type) { return async_initiate( detail::initiate_defer_with_executor< diff --git a/boost/asio/impl/detached.hpp b/boost/asio/impl/detached.hpp old mode 100755 new mode 100644 index 3329c05e2cfc14f39d00f8a3c151d9903ce0e99d..38e057cc78cdb25498f4f0b5e09a684803fcddeb --- a/boost/asio/impl/detached.hpp +++ b/boost/asio/impl/detached.hpp @@ -2,7 +2,7 @@ // impl/detached.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/impl/dispatch.hpp b/boost/asio/impl/dispatch.hpp old mode 100755 new mode 100644 index d401aab2e70fefe186f8efb8e5dcee083ced0909..d0357d4d36c4b39eac0f497bd86d11f20d0d46c3 --- a/boost/asio/impl/dispatch.hpp +++ b/boost/asio/impl/dispatch.hpp @@ -2,7 +2,7 @@ // impl/dispatch.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -101,7 +101,8 @@ public: execution::is_executor< typename conditional::type >::value - && + >::type* = 0, + typename enable_if< !detail::is_work_dispatcher_required< typename decay::type, Executor @@ -126,7 +127,8 @@ public: execution::is_executor< typename conditional::type >::value - && + >::type* = 0, + typename enable_if< detail::is_work_dispatcher_required< typename decay::type, Executor @@ -156,7 +158,8 @@ public: !execution::is_executor< typename conditional::type >::value - && + >::type* = 0, + typename enable_if< !detail::is_work_dispatcher_required< typename decay::type, Executor @@ -177,7 +180,8 @@ public: !execution::is_executor< typename conditional::type >::value - && + >::type* = 0, + typename enable_if< detail::is_work_dispatcher_required< typename decay::type, Executor @@ -216,9 +220,9 @@ template BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) dispatch( const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token, - typename enable_if< + typename constraint< execution::is_executor::value || is_executor::value - >::type*) + >::type) { return async_initiate( detail::initiate_dispatch_with_executor(ex), token); @@ -228,8 +232,8 @@ template inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) dispatch( ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token, - typename enable_if::value>::type*) + typename constraint::value>::type) { return async_initiate( detail::initiate_dispatch_with_executor< diff --git a/boost/asio/impl/error.ipp b/boost/asio/impl/error.ipp old mode 100755 new mode 100644 index 5526208aee1b4053c29d75250b2b838097c998af..b357e22126ceec641695544f9a62514819aa6c2f --- a/boost/asio/impl/error.ipp +++ b/boost/asio/impl/error.ipp @@ -2,7 +2,7 @@ // impl/error.ipp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/impl/execution_context.hpp b/boost/asio/impl/execution_context.hpp old mode 100755 new mode 100644 index b8ea6c482724d9e3846bafa2a529fef89024c270..66874c04254bea5b7509e190ada389c1606150ef --- a/boost/asio/impl/execution_context.hpp +++ b/boost/asio/impl/execution_context.hpp @@ -2,7 +2,7 @@ // impl/execution_context.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/impl/execution_context.ipp b/boost/asio/impl/execution_context.ipp old mode 100755 new mode 100644 index 4ce039ae021fdc6fb20369b338ab5cbb8d706995..41a6741b274205538722c7faafbb229aad590e7e --- a/boost/asio/impl/execution_context.ipp +++ b/boost/asio/impl/execution_context.ipp @@ -2,7 +2,7 @@ // impl/execution_context.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/impl/executor.hpp b/boost/asio/impl/executor.hpp old mode 100755 new mode 100644 index 261ca263476c2e33fdfec4b9fa00de1c2c931b2f..964bb53e44857473668ccd4f325c45c42fe74045 --- a/boost/asio/impl/executor.hpp +++ b/boost/asio/impl/executor.hpp @@ -2,7 +2,7 @@ // impl/executor.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/boost/asio/impl/executor.ipp b/boost/asio/impl/executor.ipp old mode 100755 new mode 100644 index 340578d6e628436887d20d8e68d4ea76efe1805f..5083dcb1b898a4dcb62a0042772b82818f3966d3 --- a/boost/asio/impl/executor.ipp +++ b/boost/asio/impl/executor.ipp @@ -2,7 +2,7 @@ // impl/executor.ipp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/impl/handler_alloc_hook.ipp b/boost/asio/impl/handler_alloc_hook.ipp old mode 100755 new mode 100644 index 1e5ca9f81ae7a3edb7cb88438134c43250a32cb4..531769bc9742cc7cf1cda80b67aae22cb6255cd6 --- a/boost/asio/impl/handler_alloc_hook.ipp +++ b/boost/asio/impl/handler_alloc_hook.ipp @@ -2,7 +2,7 @@ // impl/handler_alloc_hook.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -33,7 +33,7 @@ asio_handler_allocate(std::size_t size, ...) return asio_handler_allocate_is_no_longer_used(); #elif !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) return detail::thread_info_base::allocate( - detail::thread_context::thread_call_stack::top(), size); + detail::thread_context::top_of_thread_call_stack(), size); #else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) return ::operator new(size); #endif // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) @@ -48,7 +48,7 @@ asio_handler_deallocate(void* pointer, std::size_t size, ...) return asio_handler_deallocate_is_no_longer_used(); #elif !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) detail::thread_info_base::deallocate( - detail::thread_context::thread_call_stack::top(), pointer, size); + detail::thread_context::top_of_thread_call_stack(), pointer, size); #else // !defined(BOOST_ASIO_DISABLE_SMALL_BLOCK_RECYCLING) (void)size; ::operator delete(pointer); diff --git a/boost/asio/impl/io_context.hpp b/boost/asio/impl/io_context.hpp old mode 100755 new mode 100644 index d5f30d1bd8c349329847b0be21ea256a989e1610..0b4148916e64beea6dcc77e50529b68ac9b2181e --- a/boost/asio/impl/io_context.hpp +++ b/boost/asio/impl/io_context.hpp @@ -2,7 +2,7 @@ // impl/io_context.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -245,11 +244,16 @@ io_context::basic_executor_type::operator=( { if (this != &other) { + io_context* old_io_context = io_context_; io_context_ = other.io_context_; allocator_ = std::move(other.allocator_); bits_ = other.bits_; if (Bits & outstanding_work_tracked) + { other.io_context_ = 0; + if (old_io_context) + old_io_context->impl_.work_finished(); + } } return *this; } diff --git a/boost/asio/impl/io_context.ipp b/boost/asio/impl/io_context.ipp old mode 100755 new mode 100644 index 5668d3968c5856372086459d35392af6e7f0a2f9..02ec0455f28258538ab1db04ddebea3c5d5b4151 --- a/boost/asio/impl/io_context.ipp +++ b/boost/asio/impl/io_context.ipp @@ -2,7 +2,7 @@ // impl/io_context.ipp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/impl/multiple_exceptions.ipp b/boost/asio/impl/multiple_exceptions.ipp index c8530bb912eb2b6ab8d43f1502b00dfe19915438..02d49722164640cbb696457e73664bd3f7cdabd6 100644 --- a/boost/asio/impl/multiple_exceptions.ipp +++ b/boost/asio/impl/multiple_exceptions.ipp @@ -2,7 +2,7 @@ // impl/multiple_exceptions.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/impl/post.hpp b/boost/asio/impl/post.hpp old mode 100755 new mode 100644 index 7b3ec9324890621af919528dd30369f8448d387f..b85965c8b37ea645e1baa0bcbd4aa82bbbdab859 --- a/boost/asio/impl/post.hpp +++ b/boost/asio/impl/post.hpp @@ -2,7 +2,7 @@ // impl/post.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -104,7 +104,8 @@ public: execution::is_executor< typename conditional::type >::value - && + >::type* = 0, + typename enable_if< !detail::is_work_dispatcher_required< typename decay::type, Executor @@ -130,7 +131,8 @@ public: execution::is_executor< typename conditional::type >::value - && + >::type* = 0, + typename enable_if< detail::is_work_dispatcher_required< typename decay::type, Executor @@ -161,7 +163,8 @@ public: !execution::is_executor< typename conditional::type >::value - && + >::type* = 0, + typename enable_if< !detail::is_work_dispatcher_required< typename decay::type, Executor @@ -182,7 +185,8 @@ public: !execution::is_executor< typename conditional::type >::value - && + >::type* = 0, + typename enable_if< detail::is_work_dispatcher_required< typename decay::type, Executor @@ -221,9 +225,9 @@ template BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) post( const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token, - typename enable_if< + typename constraint< execution::is_executor::value || is_executor::value - >::type*) + >::type) { return async_initiate( detail::initiate_post_with_executor(ex), token); @@ -233,8 +237,8 @@ template inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) post( ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(CompletionToken) token, - typename enable_if::value>::type*) + typename constraint::value>::type) { return async_initiate( detail::initiate_post_with_executor< diff --git a/boost/asio/impl/read.hpp b/boost/asio/impl/read.hpp old mode 100755 new mode 100644 index e26f466180bda3631010d7a4690bb5aa6624cbc2..aec2afc5de7f232adc3209d0f7d789cffe0fe08a --- a/boost/asio/impl/read.hpp +++ b/boost/asio/impl/read.hpp @@ -2,7 +2,7 @@ // impl/read.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -58,7 +58,7 @@ namespace detail else break; } - return tmp.total_consumed();; + return tmp.total_consumed(); } } // namespace detail @@ -66,9 +66,9 @@ template std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, CompletionCondition completion_condition, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_mutable_buffer_sequence::value - >::type*) + >::type) { return detail::read_buffer_sequence(s, buffers, boost::asio::buffer_sequence_begin(buffers), @@ -77,9 +77,9 @@ std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, template inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, - typename enable_if< + typename constraint< is_mutable_buffer_sequence::value - >::type*) + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = read(s, buffers, transfer_all(), ec); @@ -90,9 +90,9 @@ inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, template inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_mutable_buffer_sequence::value - >::type*) + >::type) { return read(s, buffers, transfer_all(), ec); } @@ -101,9 +101,9 @@ template inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, CompletionCondition completion_condition, - typename enable_if< + typename constraint< is_mutable_buffer_sequence::value - >::type*) + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = read(s, buffers, @@ -119,10 +119,12 @@ template ::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { typename decay::type b( BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers)); @@ -151,10 +153,12 @@ std::size_t read(SyncReadStream& s, template inline std::size_t read(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = read(s, @@ -167,10 +171,12 @@ template inline std::size_t read(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { return read(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), transfer_all(), ec); @@ -181,10 +187,12 @@ template ::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = read(s, @@ -240,9 +248,9 @@ template std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers, CompletionCondition completion_condition, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { DynamicBuffer_v2& b = buffers; @@ -272,9 +280,9 @@ std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers, template inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = read(s, @@ -286,9 +294,9 @@ inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers, template inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { return read(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), transfer_all(), ec); @@ -298,9 +306,9 @@ template inline std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers, CompletionCondition completion_condition, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = read(s, @@ -565,9 +573,9 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, async_read(AsyncReadStream& s, const MutableBufferSequence& buffers, CompletionCondition completion_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< + typename constraint< is_mutable_buffer_sequence::value - >::type*) + >::type) { return async_initiate( @@ -582,9 +590,9 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, void (boost::system::error_code, std::size_t)) async_read(AsyncReadStream& s, const MutableBufferSequence& buffers, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< + typename constraint< is_mutable_buffer_sequence::value - >::type*) + >::type) { return async_initiate( @@ -845,10 +853,12 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, async_read(AsyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { return async_read(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), @@ -865,10 +875,12 @@ async_read(AsyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, CompletionCondition completion_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { return async_initiate( @@ -1167,9 +1179,9 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, void (boost::system::error_code, std::size_t)) async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { return async_read(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), @@ -1185,9 +1197,9 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers, CompletionCondition completion_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { return async_initiate( diff --git a/boost/asio/impl/read_at.hpp b/boost/asio/impl/read_at.hpp old mode 100755 new mode 100644 index d8d4d99b33392b7dc4b3941d2746f7cf9e9aa9cd..64f19530510781eeb58a5a203df0bb243a87238e --- a/boost/asio/impl/read_at.hpp +++ b/boost/asio/impl/read_at.hpp @@ -2,7 +2,7 @@ // impl/read_at.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -62,7 +62,7 @@ namespace detail else break; } - return tmp.total_consumed();; + return tmp.total_consumed(); } } // namespace detail diff --git a/boost/asio/impl/read_until.hpp b/boost/asio/impl/read_until.hpp old mode 100755 new mode 100644 index b0fc1b636e6f77e07671ed38c64d897042a247cb..2b0185816f7853c965d44193dbc38935f6f365e6 --- a/boost/asio/impl/read_until.hpp +++ b/boost/asio/impl/read_until.hpp @@ -2,7 +2,7 @@ // impl/read_until.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -78,10 +78,12 @@ namespace detail template inline std::size_t read_until(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, char delim, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = read_until(s, @@ -94,10 +96,12 @@ template std::size_t read_until(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, char delim, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { typename decay::type b( BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers)); @@ -148,10 +152,12 @@ template inline std::size_t read_until(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, BOOST_ASIO_STRING_VIEW_PARAM delim, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = read_until(s, @@ -164,10 +170,12 @@ template std::size_t read_until(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { typename decay::type b( BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers)); @@ -230,10 +238,12 @@ template inline std::size_t read_until(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, const boost::regex& expr, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = read_until(s, @@ -246,10 +256,12 @@ template std::size_t read_until(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, const boost::regex& expr, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { typename decay::type b( BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers)); @@ -314,11 +326,15 @@ template ::value - && is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + is_dynamic_buffer_v1::type>::value + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = read_until(s, @@ -333,11 +349,15 @@ template ::value - && is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + is_dynamic_buffer_v1::type>::value + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { typename decay::type b( BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers)); @@ -444,7 +464,7 @@ inline std::size_t read_until(SyncReadStream& s, template inline std::size_t read_until(SyncReadStream& s, boost::asio::basic_streambuf& b, MatchCondition match_condition, - typename enable_if::value>::type*) + typename constraint::value>::type) { return read_until(s, basic_streambuf_ref(b), match_condition); } @@ -453,7 +473,7 @@ template inline std::size_t read_until(SyncReadStream& s, boost::asio::basic_streambuf& b, MatchCondition match_condition, boost::system::error_code& ec, - typename enable_if::value>::type*) + typename constraint::value>::type) { return read_until(s, basic_streambuf_ref(b), match_condition, ec); } @@ -465,9 +485,9 @@ inline std::size_t read_until(SyncReadStream& s, template inline std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, char delim, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = read_until(s, @@ -479,9 +499,9 @@ inline std::size_t read_until(SyncReadStream& s, template std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, char delim, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { DynamicBuffer_v2& b = buffers; @@ -534,9 +554,9 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, template inline std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, BOOST_ASIO_STRING_VIEW_PARAM delim, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = read_until(s, @@ -548,9 +568,9 @@ inline std::size_t read_until(SyncReadStream& s, template std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { DynamicBuffer_v2& b = buffers; @@ -615,9 +635,9 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, template inline std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, const boost::regex& expr, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = read_until(s, @@ -629,9 +649,9 @@ inline std::size_t read_until(SyncReadStream& s, template std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, const boost::regex& expr, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { DynamicBuffer_v2& b = buffers; @@ -698,10 +718,12 @@ template inline std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, MatchCondition match_condition, - typename enable_if< + typename constraint< is_match_condition::value - && is_dynamic_buffer_v2::value - >::type*) + >::type, + typename constraint< + is_dynamic_buffer_v2::value + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = read_until(s, @@ -715,10 +737,12 @@ template std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, MatchCondition match_condition, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_match_condition::value - && is_dynamic_buffer_v2::value - >::type*) + >::type, + typename constraint< + is_dynamic_buffer_v2::value + >::type) { DynamicBuffer_v2& b = buffers; @@ -1062,10 +1086,12 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, async_read_until(AsyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { return async_initiate( @@ -1370,10 +1396,12 @@ async_read_until(AsyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, BOOST_ASIO_STRING_VIEW_PARAM delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { return async_initiate( @@ -1684,10 +1712,12 @@ async_read_until(AsyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, const boost::regex& expr, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { return async_initiate( @@ -1996,11 +2026,15 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, async_read_until(AsyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< + typename constraint< is_match_condition::value - && is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + is_dynamic_buffer_v1::type>::value + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { return async_initiate( @@ -2062,7 +2096,7 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, async_read_until(AsyncReadStream& s, boost::asio::basic_streambuf& b, MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if::value>::type*) + typename constraint::value>::type) { return async_read_until(s, basic_streambuf_ref(b), match_condition, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler)); @@ -2363,9 +2397,9 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, void (boost::system::error_code, std::size_t)) async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers, char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { return async_initiate( @@ -2678,9 +2712,9 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers, BOOST_ASIO_STRING_VIEW_PARAM delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { return async_initiate( @@ -2998,9 +3032,9 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, void (boost::system::error_code, std::size_t)) async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers, const boost::regex& expr, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { return async_initiate( @@ -3316,10 +3350,12 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, void (boost::system::error_code, std::size_t)) async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers, MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, - typename enable_if< + typename constraint< is_match_condition::value - && is_dynamic_buffer_v2::value - >::type*) + >::type, + typename constraint< + is_dynamic_buffer_v2::value + >::type) { return async_initiate( diff --git a/boost/asio/impl/redirect_error.hpp b/boost/asio/impl/redirect_error.hpp old mode 100755 new mode 100644 index a358b47cb55840648bbf606315f3e67ab501c875..d3f3286aec61bf597efc1705782ee187f667e1f0 --- a/boost/asio/impl/redirect_error.hpp +++ b/boost/asio/impl/redirect_error.hpp @@ -2,7 +2,7 @@ // impl/redirect_error.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -358,6 +358,7 @@ struct async_result, Signature> template struct associated_executor, Executor> + : detail::associated_executor_forwarding_base { typedef typename associated_executor::type type; diff --git a/boost/asio/impl/serial_port_base.hpp b/boost/asio/impl/serial_port_base.hpp old mode 100755 new mode 100644 index a2bcc2ea84d58906859a431de9e09c4c9442b780..c42a083ceed07b5f0c4b826749f54872da623a12 --- a/boost/asio/impl/serial_port_base.hpp +++ b/boost/asio/impl/serial_port_base.hpp @@ -2,7 +2,7 @@ // impl/serial_port_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/impl/serial_port_base.ipp b/boost/asio/impl/serial_port_base.ipp old mode 100755 new mode 100644 index cf7e1418f3efd84b7c630711c2a8af345d4ded42..6657c8ace4ba466387dcfe406b0547175534e138 --- a/boost/asio/impl/serial_port_base.ipp +++ b/boost/asio/impl/serial_port_base.ipp @@ -2,7 +2,7 @@ // impl/serial_port_base.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/impl/spawn.hpp b/boost/asio/impl/spawn.hpp old mode 100755 new mode 100644 index f4e81d7f46859df863babcb811a19a16e82f5275..fdbe28d5be37febe2b8f305c777d492230bc0554 --- a/boost/asio/impl/spawn.hpp +++ b/boost/asio/impl/spawn.hpp @@ -2,7 +2,7 @@ // impl/spawn.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -310,6 +310,7 @@ struct associated_allocator, Allocator> template struct associated_executor, Executor> + : detail::associated_executor_forwarding_base { typedef typename associated_executor::type type; @@ -434,10 +435,10 @@ template void spawn(BOOST_ASIO_MOVE_ARG(Handler) handler, BOOST_ASIO_MOVE_ARG(Function) function, const boost::coroutines::attributes& attributes, - typename enable_if< + typename constraint< !is_executor::type>::value && !execution::is_executor::type>::value && - !is_convertible::value>::type*) + !is_convertible::value>::type) { typedef typename decay::type handler_type; typedef typename decay::type function_type; @@ -475,9 +476,9 @@ template inline void spawn(const Executor& ex, BOOST_ASIO_MOVE_ARG(Function) function, const boost::coroutines::attributes& attributes, - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type*) + >::type) { boost::asio::spawn(boost::asio::strand(ex), BOOST_ASIO_MOVE_CAST(Function)(function), attributes); @@ -511,8 +512,8 @@ template inline void spawn(ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(Function) function, const boost::coroutines::attributes& attributes, - typename enable_if::value>::type*) + typename constraint::value>::type) { boost::asio::spawn(ctx.get_executor(), BOOST_ASIO_MOVE_CAST(Function)(function), attributes); diff --git a/boost/asio/impl/src.hpp b/boost/asio/impl/src.hpp old mode 100755 new mode 100644 index 60e8448cdd3aa4462d0f1c08e04096a40d8a1fcf..c7e8e386dd0b310feaf95d7d525d9676789410e7 --- a/boost/asio/impl/src.hpp +++ b/boost/asio/impl/src.hpp @@ -2,7 +2,7 @@ // impl/src.hpp // ~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include diff --git a/boost/asio/impl/system_context.hpp b/boost/asio/impl/system_context.hpp old mode 100755 new mode 100644 index 62527696c5c75c6185fd72572b915ae32792ae43..653113e98588879cd23bab5be2079bdfc3e75c56 --- a/boost/asio/impl/system_context.hpp +++ b/boost/asio/impl/system_context.hpp @@ -2,7 +2,7 @@ // impl/system_context.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/impl/system_context.ipp b/boost/asio/impl/system_context.ipp old mode 100755 new mode 100644 index 8eaba70b1fc05e7d17028c404a25ce9953630b1d..98dd0bfe72da401464cc55687ab24dd6cedf30d2 --- a/boost/asio/impl/system_context.ipp +++ b/boost/asio/impl/system_context.ipp @@ -2,7 +2,7 @@ // impl/system_context.ipp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/impl/system_executor.hpp b/boost/asio/impl/system_executor.hpp old mode 100755 new mode 100644 index 95333966c57b315162e90f1d57e863b24965f911..2cffce741b3ad714eb6ba308f54081c9e3b2482b --- a/boost/asio/impl/system_executor.hpp +++ b/boost/asio/impl/system_executor.hpp @@ -2,7 +2,7 @@ // impl/system_executor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -17,7 +17,6 @@ #include #include -#include #include #include diff --git a/boost/asio/impl/thread_pool.hpp b/boost/asio/impl/thread_pool.hpp old mode 100755 new mode 100644 index d61b2bbd7fefe577fc417e3bb45eaa56954c0b87..fb2a5f3e9ab259cccc563153a85d83391c755ee6 --- a/boost/asio/impl/thread_pool.hpp +++ b/boost/asio/impl/thread_pool.hpp @@ -2,7 +2,7 @@ // impl/thread_pool.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -77,11 +76,16 @@ thread_pool::basic_executor_type::operator=( { if (this != &other) { + thread_pool* old_thread_pool = pool_; pool_ = other.pool_; allocator_ = std::move(other.allocator_); bits_ = other.bits_; if (Bits & outstanding_work_tracked) + { other.pool_ = 0; + if (old_thread_pool) + old_thread_pool->scheduler_.work_finished(); + } } return *this; } diff --git a/boost/asio/impl/thread_pool.ipp b/boost/asio/impl/thread_pool.ipp old mode 100755 new mode 100644 index 95dc5707293c028ae1a3ae7d94a939b40c01e7b4..0fdfdffc5dcf1d7015217d523a3e2a5347796e8e --- a/boost/asio/impl/thread_pool.ipp +++ b/boost/asio/impl/thread_pool.ipp @@ -2,7 +2,7 @@ // impl/thread_pool.ipp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/impl/use_awaitable.hpp b/boost/asio/impl/use_awaitable.hpp old mode 100755 new mode 100644 index 09025182c976f2ad6366fb045e2d823ea5c6fa74..39a91ceae23336dbd537bf0b8074e68ab5ce07de --- a/boost/asio/impl/use_awaitable.hpp +++ b/boost/asio/impl/use_awaitable.hpp @@ -2,7 +2,7 @@ // impl/use_awaitable.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -229,6 +229,19 @@ public: #if !defined(GENERATING_DOCUMENTATION) +#if defined(_MSC_VER) +template +T dummy_return() +{ + return std::move(*static_cast(nullptr)); +} + +template <> +inline void dummy_return() +{ +} +#endif // defined(_MSC_VER) + template class async_result, R(Args...)> { @@ -237,19 +250,6 @@ public: Executor, typename decay::type...> handler_type; typedef typename handler_type::awaitable_type return_type; -#if defined(_MSC_VER) - template - static T dummy_return() - { - return std::move(*static_cast(nullptr)); - } - - template <> - static void dummy_return() - { - } -#endif // defined(_MSC_VER) - template static return_type initiate(Initiation initiation, use_awaitable_t u, InitArgs... args) diff --git a/boost/asio/impl/use_future.hpp b/boost/asio/impl/use_future.hpp old mode 100755 new mode 100644 index ac3751a9c3bbdd6207bb40c8d15e31f7ad842aa1..dc5f0d03e2786cd4baf20b92f209a98bb5f78b4d --- a/boost/asio/impl/use_future.hpp +++ b/boost/asio/impl/use_future.hpp @@ -2,7 +2,7 @@ // impl/use_future.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/impl/write.hpp b/boost/asio/impl/write.hpp old mode 100755 new mode 100644 index e9beef941b24c1940dcb356bedae9ca29244718e..848025b7c19cc1083b5a5f3c765dc4d701b1114c --- a/boost/asio/impl/write.hpp +++ b/boost/asio/impl/write.hpp @@ -2,7 +2,7 @@ // impl/write.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -56,7 +56,7 @@ namespace detail else break; } - return tmp.total_consumed();; + return tmp.total_consumed(); } } // namespace detail @@ -64,9 +64,9 @@ template inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, CompletionCondition completion_condition, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_const_buffer_sequence::value - >::type*) + >::type) { return detail::write_buffer_sequence(s, buffers, boost::asio::buffer_sequence_begin(buffers), @@ -75,9 +75,9 @@ inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, template inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, - typename enable_if< + typename constraint< is_const_buffer_sequence::value - >::type*) + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = write(s, buffers, transfer_all(), ec); @@ -88,9 +88,9 @@ inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, template inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_const_buffer_sequence::value - >::type*) + >::type) { return write(s, buffers, transfer_all(), ec); } @@ -99,9 +99,9 @@ template inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, CompletionCondition completion_condition, - typename enable_if< + typename constraint< is_const_buffer_sequence::value - >::type*) + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = write(s, buffers, @@ -117,10 +117,12 @@ template ::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { typename decay::type b( BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers)); @@ -134,10 +136,12 @@ std::size_t write(SyncWriteStream& s, template inline std::size_t write(SyncWriteStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = write(s, @@ -151,10 +155,12 @@ template inline std::size_t write(SyncWriteStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { return write(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), transfer_all(), ec); @@ -165,10 +171,12 @@ template ::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = write(s, @@ -224,9 +232,9 @@ template std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, CompletionCondition completion_condition, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { std::size_t bytes_transferred = write(s, buffers.data(0, buffers.size()), BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec); @@ -236,9 +244,9 @@ std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, template inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = write(s, @@ -251,9 +259,9 @@ inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, template inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { return write(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), transfer_all(), ec); @@ -263,9 +271,9 @@ template inline std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, CompletionCondition completion_condition, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { boost::system::error_code ec; std::size_t bytes_transferred = write(s, @@ -530,9 +538,9 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler, async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers, CompletionCondition completion_condition, BOOST_ASIO_MOVE_ARG(WriteHandler) handler, - typename enable_if< + typename constraint< is_const_buffer_sequence::value - >::type*) + >::type) { return async_initiate( @@ -548,9 +556,9 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler, void (boost::system::error_code, std::size_t)) async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers, BOOST_ASIO_MOVE_ARG(WriteHandler) handler, - typename enable_if< + typename constraint< is_const_buffer_sequence::value - >::type*) + >::type) { return async_initiate( @@ -781,10 +789,12 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler, async_write(AsyncWriteStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, BOOST_ASIO_MOVE_ARG(WriteHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { return async_write(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), @@ -801,10 +811,12 @@ async_write(AsyncWriteStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, CompletionCondition completion_condition, BOOST_ASIO_MOVE_ARG(WriteHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type*) + >::type, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type) { return async_initiate( @@ -1069,9 +1081,9 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler, void (boost::system::error_code, std::size_t)) async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers, BOOST_ASIO_MOVE_ARG(WriteHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { return async_write(s, BOOST_ASIO_MOVE_CAST(DynamicBuffer_v2)(buffers), @@ -1087,9 +1099,9 @@ inline BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler, async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers, CompletionCondition completion_condition, BOOST_ASIO_MOVE_ARG(WriteHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type*) + >::type) { return async_initiate( diff --git a/boost/asio/impl/write_at.hpp b/boost/asio/impl/write_at.hpp old mode 100755 new mode 100644 index 584684d2a4c39c22cba88a476859d5de44e7a909..32c5ee82da58c83ead6c772ad0c08055aaac202f --- a/boost/asio/impl/write_at.hpp +++ b/boost/asio/impl/write_at.hpp @@ -2,7 +2,7 @@ // impl/write_at.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -60,7 +60,7 @@ namespace detail else break; } - return tmp.total_consumed();; + return tmp.total_consumed(); } } // namespace detail diff --git a/boost/asio/io_context.hpp b/boost/asio/io_context.hpp old mode 100755 new mode 100644 index 6a64ef514a479486a3fc3a3b4217d0f4eb16531f..907da228a24151bc08b25a93ac1a9693ff8bcf38 --- a/boost/asio/io_context.hpp +++ b/boost/asio/io_context.hpp @@ -2,7 +2,7 @@ // io_context.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -714,6 +714,12 @@ public: basic_executor_type&& other) BOOST_ASIO_NOEXCEPT; #endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) +#if !defined(GENERATING_DOCUMENTATION) +private: + friend struct asio_require_fn::impl; + friend struct asio_prefer_fn::impl; +#endif // !defined(GENERATING_DOCUMENTATION) + /// Obtain an executor with the @c blocking.possibly property. /** * Do not call this function directly. It is intended for use with the @@ -853,6 +859,13 @@ public: io_context_, std::allocator(), bits_); } +#if !defined(GENERATING_DOCUMENTATION) +private: + friend struct asio_query_fn::impl; + friend struct boost::asio::execution::detail::mapping_t<0>; + friend struct boost::asio::execution::detail::outstanding_work_t<0>; +#endif // !defined(GENERATING_DOCUMENTATION) + /// Query the current value of the @c mapping property. /** * Do not call this function directly. It is intended for use with the @@ -975,6 +988,7 @@ public: return allocator_; } +public: /// Determine whether the io_context is running in the current thread. /** * @return @c true if the current thread is running the io_context. Otherwise @@ -1006,6 +1020,11 @@ public: || a.bits_ != b.bits_; } +#if !defined(GENERATING_DOCUMENTATION) +private: + friend struct asio_execution_execute_fn::impl; +#endif // !defined(GENERATING_DOCUMENTATION) + /// Execution function. /** * Do not call this function directly. It is intended for use with the @@ -1019,6 +1038,7 @@ public: void execute(BOOST_ASIO_MOVE_ARG(Function) f) const; #if !defined(BOOST_ASIO_NO_TS_EXECUTORS) +public: /// Obtain the underlying execution context. io_context& context() const BOOST_ASIO_NOEXCEPT; diff --git a/boost/asio/io_context_strand.hpp b/boost/asio/io_context_strand.hpp old mode 100755 new mode 100644 index 5480919f68a09e94bce2adecb975df2e4a523672..b03571fe1bb37555f071a765dad0c70a48674da5 --- a/boost/asio/io_context_strand.hpp +++ b/boost/asio/io_context_strand.hpp @@ -2,7 +2,7 @@ // io_context_strand.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/io_service.hpp b/boost/asio/io_service.hpp old mode 100755 new mode 100644 index cf0b3b7b38746393e9ef81e71a440bb048fc4143..aa8af6243971289c6a9ed70ddbc285582c987cf3 --- a/boost/asio/io_service.hpp +++ b/boost/asio/io_service.hpp @@ -2,7 +2,7 @@ // io_service.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/io_service_strand.hpp b/boost/asio/io_service_strand.hpp old mode 100755 new mode 100644 index be2ee7ca53f251a1042428e45986547fbc12950e..2bcf8fbd6edcc45761912f5402abf5e70cb433e9 --- a/boost/asio/io_service_strand.hpp +++ b/boost/asio/io_service_strand.hpp @@ -2,7 +2,7 @@ // io_service_strand.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/address.hpp b/boost/asio/ip/address.hpp old mode 100755 new mode 100644 index 5767450e709729cd50ae04cf96bce6dc24428221..0fcbbf2b0f9295b66c6bb999fca1255ed0cdd51c --- a/boost/asio/ip/address.hpp +++ b/boost/asio/ip/address.hpp @@ -2,7 +2,7 @@ // ip/address.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -25,6 +25,10 @@ #include #include +#if defined(BOOST_ASIO_HAS_STD_HASH) +# include +#endif // defined(BOOST_ASIO_HAS_STD_HASH) + #if !defined(BOOST_ASIO_NO_IOSTREAM) # include #endif // !defined(BOOST_ASIO_NO_IOSTREAM) @@ -260,6 +264,24 @@ std::basic_ostream& operator<<( } // namespace asio } // namespace boost +#if defined(BOOST_ASIO_HAS_STD_HASH) +namespace std { + +template <> +struct hash +{ + std::size_t operator()(const boost::asio::ip::address& addr) + const BOOST_ASIO_NOEXCEPT + { + return addr.is_v4() + ? std::hash()(addr.to_v4()) + : std::hash()(addr.to_v6()); + } +}; + +} // namespace std +#endif // defined(BOOST_ASIO_HAS_STD_HASH) + #include #include diff --git a/boost/asio/ip/address_v4.hpp b/boost/asio/ip/address_v4.hpp old mode 100755 new mode 100644 index 3938dde1a742db69712d8d65b970459507f561dc..19d5b313a83cf932fd10649c9c4b0fcb829f624f --- a/boost/asio/ip/address_v4.hpp +++ b/boost/asio/ip/address_v4.hpp @@ -2,7 +2,7 @@ // ip/address_v4.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -24,6 +24,10 @@ #include #include +#if defined(BOOST_ASIO_HAS_STD_HASH) +# include +#endif // defined(BOOST_ASIO_HAS_STD_HASH) + #if !defined(BOOST_ASIO_NO_IOSTREAM) # include #endif // !defined(BOOST_ASIO_NO_IOSTREAM) @@ -327,6 +331,22 @@ std::basic_ostream& operator<<( } // namespace asio } // namespace boost +#if defined(BOOST_ASIO_HAS_STD_HASH) +namespace std { + +template <> +struct hash +{ + std::size_t operator()(const boost::asio::ip::address_v4& addr) + const BOOST_ASIO_NOEXCEPT + { + return std::hash()(addr.to_uint()); + } +}; + +} // namespace std +#endif // defined(BOOST_ASIO_HAS_STD_HASH) + #include #include diff --git a/boost/asio/ip/address_v4_iterator.hpp b/boost/asio/ip/address_v4_iterator.hpp old mode 100755 new mode 100644 index ec87fd75e22fdf6c527a2e572f4e1913dd67f207..df67a8bd03a2b2d311c76242dc969ad6ac70b47a --- a/boost/asio/ip/address_v4_iterator.hpp +++ b/boost/asio/ip/address_v4_iterator.hpp @@ -2,7 +2,7 @@ // ip/address_v4_iterator.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/address_v4_range.hpp b/boost/asio/ip/address_v4_range.hpp old mode 100755 new mode 100644 index 159288eb5f13b0463a1cfd31b6f5316d1987db04..a939aedc8b8dee7ce61e772e65aaeb4f09819c00 --- a/boost/asio/ip/address_v4_range.hpp +++ b/boost/asio/ip/address_v4_range.hpp @@ -2,7 +2,7 @@ // ip/address_v4_range.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/address_v6.hpp b/boost/asio/ip/address_v6.hpp old mode 100755 new mode 100644 index bdcb9293473c643ced273a796dbf2bff2d67c2d7..4f21d969486ff67c03908e5c1e5768a7b170101c --- a/boost/asio/ip/address_v6.hpp +++ b/boost/asio/ip/address_v6.hpp @@ -2,7 +2,7 @@ // ip/address_v6.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -18,12 +18,17 @@ #include #include #include +#include #include #include #include #include #include +#if defined(BOOST_ASIO_HAS_STD_HASH) +# include +#endif // defined(BOOST_ASIO_HAS_STD_HASH) + #if !defined(BOOST_ASIO_NO_IOSTREAM) # include #endif // !defined(BOOST_ASIO_NO_IOSTREAM) @@ -36,6 +41,9 @@ namespace ip { template class basic_address_iterator; +/// Type used for storing IPv6 scope IDs. +typedef uint_least32_t scope_id_type; + /// Implements IP version 6 style addresses. /** * The boost::asio::ip::address_v6 class provides the ability to use and @@ -64,7 +72,7 @@ public: /// Construct an address from raw bytes and scope ID. BOOST_ASIO_DECL explicit address_v6(const bytes_type& bytes, - unsigned long scope_id = 0); + scope_id_type scope_id = 0); /// Copy constructor. BOOST_ASIO_DECL address_v6(const address_v6& other) BOOST_ASIO_NOEXCEPT; @@ -87,7 +95,7 @@ public: /** * Returns the scope ID associated with the IPv6 address. */ - unsigned long scope_id() const BOOST_ASIO_NOEXCEPT + scope_id_type scope_id() const BOOST_ASIO_NOEXCEPT { return scope_id_; } @@ -96,7 +104,7 @@ public: /** * Modifies the scope ID associated with the IPv6 address. */ - void scope_id(unsigned long id) BOOST_ASIO_NOEXCEPT + void scope_id(scope_id_type id) BOOST_ASIO_NOEXCEPT { scope_id_ = id; } @@ -233,7 +241,7 @@ private: boost::asio::detail::in6_addr_type addr_; // The scope ID associated with the address. - unsigned long scope_id_; + scope_id_type scope_id_; }; /// Create an IPv6 address from raw bytes and scope ID. @@ -241,7 +249,7 @@ private: * @relates address_v6 */ inline address_v6 make_address_v6(const address_v6::bytes_type& bytes, - unsigned long scope_id = 0) + scope_id_type scope_id = 0) { return address_v6(bytes, scope_id); } @@ -333,6 +341,39 @@ std::basic_ostream& operator<<( } // namespace asio } // namespace boost +#if defined(BOOST_ASIO_HAS_STD_HASH) +namespace std { + +template <> +struct hash +{ + std::size_t operator()(const boost::asio::ip::address_v6& addr) + const BOOST_ASIO_NOEXCEPT + { + const boost::asio::ip::address_v6::bytes_type bytes = addr.to_bytes(); + std::size_t result = static_cast(addr.scope_id()); + combine_4_bytes(result, &bytes[0]); + combine_4_bytes(result, &bytes[4]); + combine_4_bytes(result, &bytes[8]); + combine_4_bytes(result, &bytes[12]); + return result; + } + +private: + static void combine_4_bytes(std::size_t& seed, const unsigned char* bytes) + { + const std::size_t bytes_hash = + (static_cast(bytes[0]) << 24) | + (static_cast(bytes[1]) << 16) | + (static_cast(bytes[2]) << 8) | + (static_cast(bytes[3])); + seed ^= bytes_hash + 0x9e3779b9 + (seed << 6) + (seed >> 2); + } +}; + +} // namespace std +#endif // defined(BOOST_ASIO_HAS_STD_HASH) + #include #include diff --git a/boost/asio/ip/address_v6_iterator.hpp b/boost/asio/ip/address_v6_iterator.hpp old mode 100755 new mode 100644 index d3a4d2e834166b79571e4a0bad46188891de20ee..49c9bde8fd6afca085468bd8ec60ff5fc391ecff --- a/boost/asio/ip/address_v6_iterator.hpp +++ b/boost/asio/ip/address_v6_iterator.hpp @@ -2,7 +2,7 @@ // ip/address_v6_iterator.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Oliver Kowalke (oliver dot kowalke at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/ip/address_v6_range.hpp b/boost/asio/ip/address_v6_range.hpp old mode 100755 new mode 100644 index 2edb0ad17568b1abf8d0b3c22e475204d8cd8444..745be4fdf65e0828dfc93a37392639f3f0e934f0 --- a/boost/asio/ip/address_v6_range.hpp +++ b/boost/asio/ip/address_v6_range.hpp @@ -2,7 +2,7 @@ // ip/address_v6_range.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Oliver Kowalke (oliver dot kowalke at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/ip/bad_address_cast.hpp b/boost/asio/ip/bad_address_cast.hpp old mode 100755 new mode 100644 index 34407457db32267e6645be3517dc9fd4075128c7..dd12a9f1d2ef770629e9190729dd57dcc9a2955b --- a/boost/asio/ip/bad_address_cast.hpp +++ b/boost/asio/ip/bad_address_cast.hpp @@ -2,7 +2,7 @@ // ip/bad_address_cast.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/basic_endpoint.hpp b/boost/asio/ip/basic_endpoint.hpp old mode 100755 new mode 100644 index cc43e7e5bd3db521d86344a84298c6f8264b4629..e7b66fc1f6a770ac1213efdb4af3af9d8cf76323 --- a/boost/asio/ip/basic_endpoint.hpp +++ b/boost/asio/ip/basic_endpoint.hpp @@ -2,7 +2,7 @@ // ip/basic_endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -16,9 +16,14 @@ #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include +#include #include #include +#if defined(BOOST_ASIO_HAS_STD_HASH) +# include +#endif // defined(BOOST_ASIO_HAS_STD_HASH) + #if !defined(BOOST_ASIO_NO_IOSTREAM) # include #endif // !defined(BOOST_ASIO_NO_IOSTREAM) @@ -29,6 +34,9 @@ namespace boost { namespace asio { namespace ip { +/// Type used for storing port numbers. +typedef uint_least16_t port_type; + /// Describes an endpoint for a version-independent IP socket. /** * The boost::asio::ip::basic_endpoint class template describes an endpoint that @@ -79,7 +87,7 @@ public: * @endcode */ basic_endpoint(const InternetProtocol& internet_protocol, - unsigned short port_num) BOOST_ASIO_NOEXCEPT + port_type port_num) BOOST_ASIO_NOEXCEPT : impl_(internet_protocol.family(), port_num) { } @@ -88,7 +96,7 @@ public: /// constructor may be used for accepting connections on a specific interface /// or for making a connection to a remote endpoint. basic_endpoint(const boost::asio::ip::address& addr, - unsigned short port_num) BOOST_ASIO_NOEXCEPT + port_type port_num) BOOST_ASIO_NOEXCEPT : impl_(addr, port_num) { } @@ -163,14 +171,14 @@ public: /// Get the port associated with the endpoint. The port number is always in /// the host's byte order. - unsigned short port() const BOOST_ASIO_NOEXCEPT + port_type port() const BOOST_ASIO_NOEXCEPT { return impl_.port(); } /// Set the port associated with the endpoint. The port number is always in /// the host's byte order. - void port(unsigned short port_num) BOOST_ASIO_NOEXCEPT + void port(port_type port_num) BOOST_ASIO_NOEXCEPT { impl_.port(port_num); } @@ -259,6 +267,25 @@ std::basic_ostream& operator<<( } // namespace asio } // namespace boost +#if defined(BOOST_ASIO_HAS_STD_HASH) +namespace std { + +template +struct hash > +{ + std::size_t operator()( + const boost::asio::ip::basic_endpoint& ep) + const BOOST_ASIO_NOEXCEPT + { + std::size_t hash1 = std::hash()(ep.address()); + std::size_t hash2 = std::hash()(ep.port()); + return hash1 ^ (hash2 + 0x9e3779b9 + (hash1 << 6) + (hash1 >> 2)); + } +}; + +} // namespace std +#endif // defined(BOOST_ASIO_HAS_STD_HASH) + #include #include diff --git a/boost/asio/ip/basic_resolver.hpp b/boost/asio/ip/basic_resolver.hpp old mode 100755 new mode 100644 index ce0f9985fd8a599ec18058bd518851b26e8e5f91..66ecfdb7b2862cd5a4e6079f1b138a8bb023854d --- a/boost/asio/ip/basic_resolver.hpp +++ b/boost/asio/ip/basic_resolver.hpp @@ -2,7 +2,7 @@ // ip/basic_resolver.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -106,7 +106,7 @@ public: * resolver. */ explicit basic_resolver(const executor_type& ex) - : impl_(ex) + : impl_(0, ex) { } @@ -120,10 +120,10 @@ public: */ template explicit basic_resolver(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { } @@ -143,6 +143,29 @@ public: { } + // All resolvers have access to each other's implementations. + template + friend class basic_resolver; + + /// Move-construct a basic_resolver from another. + /** + * This constructor moves a resolver from one object to another. + * + * @param other The other basic_resolver object from which the move will + * occur. + * + * @note Following the move, the moved-from object is in the same state as if + * constructed using the @c basic_resolver(const executor_type&) constructor. + */ + template + basic_resolver(basic_resolver&& other, + typename constraint< + is_convertible::value + >::type = 0) + : impl_(std::move(other.impl_)) + { + } + /// Move-assign a basic_resolver from another. /** * This assignment operator moves a resolver from one object to another. @@ -160,6 +183,29 @@ public: impl_ = std::move(other.impl_); return *this; } + + /// Move-assign a basic_resolver from another. + /** + * This assignment operator moves a resolver from one object to another. + * Cancels any outstanding asynchronous operations associated with the target + * object. + * + * @param other The other basic_resolver object from which the move will + * occur. + * + * @note Following the move, the moved-from object is in the same state as if + * constructed using the @c basic_resolver(const executor_type&) constructor. + */ + template + typename constraint< + is_convertible::value, + basic_resolver& + >::type operator=(basic_resolver&& other) + { + basic_resolver tmp(std::move(other)); + impl_ = std::move(tmp.impl_); + return *this; + } #endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Destroys the resolver. diff --git a/boost/asio/ip/basic_resolver_entry.hpp b/boost/asio/ip/basic_resolver_entry.hpp old mode 100755 new mode 100644 index 55606ace5eee5c196806e54fdc0a0caaa9a9f4aa..cb6d46f1b9dcd687c08c30237eb1b5895bb05024 --- a/boost/asio/ip/basic_resolver_entry.hpp +++ b/boost/asio/ip/basic_resolver_entry.hpp @@ -2,7 +2,7 @@ // ip/basic_resolver_entry.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/basic_resolver_iterator.hpp b/boost/asio/ip/basic_resolver_iterator.hpp old mode 100755 new mode 100644 index 25ac47dc4d937f4dde3d32b046db4b2b9a439b6b..db404ae28a4678eea717a1714c8d322e2a5cf478 --- a/boost/asio/ip/basic_resolver_iterator.hpp +++ b/boost/asio/ip/basic_resolver_iterator.hpp @@ -2,7 +2,7 @@ // ip/basic_resolver_iterator.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/basic_resolver_query.hpp b/boost/asio/ip/basic_resolver_query.hpp old mode 100755 new mode 100644 index fe1eefc7bd9fd4b4a6b33d3768d42dccd61e49e4..0eceaae008bb8724705f6bcb7ae4b45c5db1a4be --- a/boost/asio/ip/basic_resolver_query.hpp +++ b/boost/asio/ip/basic_resolver_query.hpp @@ -2,7 +2,7 @@ // ip/basic_resolver_query.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/basic_resolver_results.hpp b/boost/asio/ip/basic_resolver_results.hpp old mode 100755 new mode 100644 index 2e42781880c98e350d273a593ab0cac42d440af4..0989971ce8eae65b5a6f44271d143e08126ae48a --- a/boost/asio/ip/basic_resolver_results.hpp +++ b/boost/asio/ip/basic_resolver_results.hpp @@ -2,7 +2,7 @@ // ip/basic_resolver_results.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/detail/endpoint.hpp b/boost/asio/ip/detail/endpoint.hpp old mode 100755 new mode 100644 index 0121076c201ba1d4efd13e802dc3bb6990af7438..23d4abdc12f3e2dacce77be82cd49aa22431b1a1 --- a/boost/asio/ip/detail/endpoint.hpp +++ b/boost/asio/ip/detail/endpoint.hpp @@ -2,7 +2,7 @@ // ip/detail/endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/detail/impl/endpoint.ipp b/boost/asio/ip/detail/impl/endpoint.ipp old mode 100755 new mode 100644 index 6185f5de14ef4a1fabecd667f0d80bf61db05dd8..0219e14a8281e57232ba08978fbc1a4d22df91fe --- a/boost/asio/ip/detail/impl/endpoint.ipp +++ b/boost/asio/ip/detail/impl/endpoint.ipp @@ -2,7 +2,7 @@ // ip/detail/impl/endpoint.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/detail/socket_option.hpp b/boost/asio/ip/detail/socket_option.hpp old mode 100755 new mode 100644 index 8f0c7e762d3ebb061ef7d88aa57c0b60b412931c..10a6cd2c5cf9a67391f8bb91afa5fdec7618f2c8 --- a/boost/asio/ip/detail/socket_option.hpp +++ b/boost/asio/ip/detail/socket_option.hpp @@ -2,7 +2,7 @@ // detail/socket_option.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/host_name.hpp b/boost/asio/ip/host_name.hpp old mode 100755 new mode 100644 index cb8e05d8e017b5ef680da7c53a7ad8917b522ce1..65fb688a93100d8ba249f6c0f6b1f170f2bf5b70 --- a/boost/asio/ip/host_name.hpp +++ b/boost/asio/ip/host_name.hpp @@ -2,7 +2,7 @@ // ip/host_name.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/icmp.hpp b/boost/asio/ip/icmp.hpp old mode 100755 new mode 100644 index 4066d761791f48b58c75a6243307f7dcc3f08229..d2ea36733166b19642db337107990958f4581c44 --- a/boost/asio/ip/icmp.hpp +++ b/boost/asio/ip/icmp.hpp @@ -2,7 +2,7 @@ // ip/icmp.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/impl/address.hpp b/boost/asio/ip/impl/address.hpp old mode 100755 new mode 100644 index b92dd98c0e6f5544a7c6886d5370abea34121c95..da8a804f44028ec0df60a3ad02eb878b6cbe709e --- a/boost/asio/ip/impl/address.hpp +++ b/boost/asio/ip/impl/address.hpp @@ -2,7 +2,7 @@ // ip/impl/address.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/impl/address.ipp b/boost/asio/ip/impl/address.ipp old mode 100755 new mode 100644 index 92839fac30e8d70e0435892ca668ab7ea9ff6dfb..a35a442a30334e529158a1cae6b2f18cb729d83d --- a/boost/asio/ip/impl/address.ipp +++ b/boost/asio/ip/impl/address.ipp @@ -2,7 +2,7 @@ // ip/impl/address.ipp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/impl/address_v4.hpp b/boost/asio/ip/impl/address_v4.hpp old mode 100755 new mode 100644 index d23b2a838a549e29c882a652f3daa86b09e2270f..d2a26983afe0ea30536f20871c6e81632f6b3d51 --- a/boost/asio/ip/impl/address_v4.hpp +++ b/boost/asio/ip/impl/address_v4.hpp @@ -2,7 +2,7 @@ // ip/impl/address_v4.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/impl/address_v4.ipp b/boost/asio/ip/impl/address_v4.ipp old mode 100755 new mode 100644 index 52970944a21cb9ce7b8ed6074fd79597c7acb424..5f7f35fd34b934e774f8e9a5b010a76d8b2836d1 --- a/boost/asio/ip/impl/address_v4.ipp +++ b/boost/asio/ip/impl/address_v4.ipp @@ -2,7 +2,7 @@ // ip/impl/address_v4.ipp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/impl/address_v6.hpp b/boost/asio/ip/impl/address_v6.hpp old mode 100755 new mode 100644 index f5ed99056ae0c4e77f2fa206541fba76e40cee66..3f15561038a0e29f7b94e918112ff94f54b8f9ca --- a/boost/asio/ip/impl/address_v6.hpp +++ b/boost/asio/ip/impl/address_v6.hpp @@ -2,7 +2,7 @@ // ip/impl/address_v6.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/impl/address_v6.ipp b/boost/asio/ip/impl/address_v6.ipp old mode 100755 new mode 100644 index 60f283f33ba26266d8bc38d282542e401eaa0a8a..2d7b92ea6001183389fd528228a8d66bd09200c9 --- a/boost/asio/ip/impl/address_v6.ipp +++ b/boost/asio/ip/impl/address_v6.ipp @@ -2,7 +2,7 @@ // ip/impl/address_v6.ipp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -39,7 +39,7 @@ address_v6::address_v6() BOOST_ASIO_NOEXCEPT } address_v6::address_v6(const address_v6::bytes_type& bytes, - unsigned long scope) + scope_id_type scope) : scope_id_(scope) { #if UCHAR_MAX > 0xFF diff --git a/boost/asio/ip/impl/basic_endpoint.hpp b/boost/asio/ip/impl/basic_endpoint.hpp old mode 100755 new mode 100644 index fd37631c5e2358cac3c0b24d2573308a6531b154..138184cd6c5ddc987d65cd77010c4c0ef6aa5fa6 --- a/boost/asio/ip/impl/basic_endpoint.hpp +++ b/boost/asio/ip/impl/basic_endpoint.hpp @@ -2,7 +2,7 @@ // ip/impl/basic_endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/impl/host_name.ipp b/boost/asio/ip/impl/host_name.ipp old mode 100755 new mode 100644 index 17a0dd880a40a9ba265504c1fd644c37e5946b68..dcec903954d3b015801811450a8c17ec541e4654 --- a/boost/asio/ip/impl/host_name.ipp +++ b/boost/asio/ip/impl/host_name.ipp @@ -2,7 +2,7 @@ // ip/impl/host_name.ipp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/impl/network_v4.hpp b/boost/asio/ip/impl/network_v4.hpp old mode 100755 new mode 100644 index 8d75ba2cf1b0a0cb208a7de1b54844125f7a8c99..69c5043a3104e87a2a83b7d601fb2cb66ad20d79 --- a/boost/asio/ip/impl/network_v4.hpp +++ b/boost/asio/ip/impl/network_v4.hpp @@ -2,7 +2,7 @@ // ip/impl/network_v4.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/ip/impl/network_v4.ipp b/boost/asio/ip/impl/network_v4.ipp old mode 100755 new mode 100644 index 8d8cb68ed5c297714c124b527189af2a7be04a60..7be2aae25e8d6a0cee179de7e75ec6acd8331aca --- a/boost/asio/ip/impl/network_v4.ipp +++ b/boost/asio/ip/impl/network_v4.ipp @@ -2,7 +2,7 @@ // ip/impl/network_v4.ipp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/ip/impl/network_v6.hpp b/boost/asio/ip/impl/network_v6.hpp old mode 100755 new mode 100644 index 440973864a25dec528cf6e3faa27ce28ff61c7be..db7dde0d6b2a71bdb9c14f116e53c0a186d39ec5 --- a/boost/asio/ip/impl/network_v6.hpp +++ b/boost/asio/ip/impl/network_v6.hpp @@ -2,7 +2,7 @@ // ip/impl/network_v6.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/impl/network_v6.ipp b/boost/asio/ip/impl/network_v6.ipp old mode 100755 new mode 100644 index 23ff91f6e3f1398e9cb8dcc669d309732ce50a89..7ca7e8146a35c7223a39455d404035562e662856 --- a/boost/asio/ip/impl/network_v6.ipp +++ b/boost/asio/ip/impl/network_v6.ipp @@ -2,7 +2,7 @@ // ip/impl/network_v6.ipp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/ip/multicast.hpp b/boost/asio/ip/multicast.hpp old mode 100755 new mode 100644 index 19d8be2d9c87544a54baa21f978f3f42867117b4..62ae40e28bd3a78851f07776d3547edc1f25587e --- a/boost/asio/ip/multicast.hpp +++ b/boost/asio/ip/multicast.hpp @@ -2,7 +2,7 @@ // ip/multicast.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/network_v4.hpp b/boost/asio/ip/network_v4.hpp old mode 100755 new mode 100644 index 134b6e69c3520c4dc1f72f9e42ecb44dbaa33f54..ffe674050c5a654d0c8137ea532ca6ba6b1d747d --- a/boost/asio/ip/network_v4.hpp +++ b/boost/asio/ip/network_v4.hpp @@ -2,7 +2,7 @@ // ip/network_v4.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/ip/network_v6.hpp b/boost/asio/ip/network_v6.hpp old mode 100755 new mode 100644 index 56cf9391d2afe80c368a92125e5f924ca1a72f6f..902bb774d81d04cd2cece2cd4f4d3b82c56e7614 --- a/boost/asio/ip/network_v6.hpp +++ b/boost/asio/ip/network_v6.hpp @@ -2,7 +2,7 @@ // ip/network_v6.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/ip/resolver_base.hpp b/boost/asio/ip/resolver_base.hpp old mode 100755 new mode 100644 index 99c1fa0ccf4bc7c04804a96a8a09b9fa587ff2dc..95f8d90262413c70144da1f8450b84767ce8e1b1 --- a/boost/asio/ip/resolver_base.hpp +++ b/boost/asio/ip/resolver_base.hpp @@ -2,7 +2,7 @@ // ip/resolver_base.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/resolver_query_base.hpp b/boost/asio/ip/resolver_query_base.hpp old mode 100755 new mode 100644 index 790378ca9a2df6d76019d9b587a0c99f4d3915e9..8b799c24a6457868bd90d5276ae52a9205d97dd5 --- a/boost/asio/ip/resolver_query_base.hpp +++ b/boost/asio/ip/resolver_query_base.hpp @@ -2,7 +2,7 @@ // ip/resolver_query_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/tcp.hpp b/boost/asio/ip/tcp.hpp old mode 100755 new mode 100644 index cff1e2440e6964ff359ef20bad216111aaf85f3b..926f2a9ae24d238e4994dba165bf54db8f1b6cc2 --- a/boost/asio/ip/tcp.hpp +++ b/boost/asio/ip/tcp.hpp @@ -2,7 +2,7 @@ // ip/tcp.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/udp.hpp b/boost/asio/ip/udp.hpp old mode 100755 new mode 100644 index 47b2cfae3296377667e57de5c4375469f6568088..f0a72d03a10e42fc6bfbcd2e090fc9a9d6dee5f4 --- a/boost/asio/ip/udp.hpp +++ b/boost/asio/ip/udp.hpp @@ -2,7 +2,7 @@ // ip/udp.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/unicast.hpp b/boost/asio/ip/unicast.hpp old mode 100755 new mode 100644 index afcf352fdcf6ba6c58e87f7e7cb7cce2d0c2b34b..916eebc56e5404558a4b6a56c4fa82fb794c7fcf --- a/boost/asio/ip/unicast.hpp +++ b/boost/asio/ip/unicast.hpp @@ -2,7 +2,7 @@ // ip/unicast.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ip/v6_only.hpp b/boost/asio/ip/v6_only.hpp old mode 100755 new mode 100644 index 490683ae5dea5f2de346c5d622b89efab4cf6021..92dcc83a26be1b55ae658063509f5e2d060323de --- a/boost/asio/ip/v6_only.hpp +++ b/boost/asio/ip/v6_only.hpp @@ -2,7 +2,7 @@ // ip/v6_only.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/is_applicable_property.hpp b/boost/asio/is_applicable_property.hpp index 1d38fa72ab58e77b58e5305d49c694217f09bebb..41bd6745c6d59faac92f3c28dcefb2d92e35c11b 100644 --- a/boost/asio/is_applicable_property.hpp +++ b/boost/asio/is_applicable_property.hpp @@ -2,7 +2,7 @@ // is_applicable_property.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/is_executor.hpp b/boost/asio/is_executor.hpp old mode 100755 new mode 100644 index e5e2dcb1021b498ba0d3c46934b2dfef719b6b71..1ef476f83d162e2277407cf2c18c84828e940798 --- a/boost/asio/is_executor.hpp +++ b/boost/asio/is_executor.hpp @@ -2,7 +2,7 @@ // is_executor.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/is_read_buffered.hpp b/boost/asio/is_read_buffered.hpp old mode 100755 new mode 100644 index a791274044818d4ed87b01852ef1ec97502a77ba..a28eb4055870a2ebfa3064174ca573a889ffb771 --- a/boost/asio/is_read_buffered.hpp +++ b/boost/asio/is_read_buffered.hpp @@ -2,7 +2,7 @@ // is_read_buffered.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/is_write_buffered.hpp b/boost/asio/is_write_buffered.hpp old mode 100755 new mode 100644 index a5169d581fda152b027d115ae817115b9469b565..19dee98df62cceaa4cb147c1dbcbeab42223a9db --- a/boost/asio/is_write_buffered.hpp +++ b/boost/asio/is_write_buffered.hpp @@ -2,7 +2,7 @@ // is_write_buffered.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/local/basic_endpoint.hpp b/boost/asio/local/basic_endpoint.hpp old mode 100755 new mode 100644 index d23aadb3f087686313dbc307dcfe52ad20335618..e622717679ad227a4adc8205f768d597aaf67388 --- a/boost/asio/local/basic_endpoint.hpp +++ b/boost/asio/local/basic_endpoint.hpp @@ -2,7 +2,7 @@ // local/basic_endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Derived from a public domain implementation written by Daniel Casimiro. // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/local/connect_pair.hpp b/boost/asio/local/connect_pair.hpp old mode 100755 new mode 100644 index 38b9ca429efa41435a1c3bd9de8016984e7d18b6..aefc1d76d7d8a9786af56e3ef78c94e52c04078b --- a/boost/asio/local/connect_pair.hpp +++ b/boost/asio/local/connect_pair.hpp @@ -2,7 +2,7 @@ // local/connect_pair.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/local/datagram_protocol.hpp b/boost/asio/local/datagram_protocol.hpp old mode 100755 new mode 100644 index d417fc6ad4e76acadf2432db8e7876aa9bc7bba9..4597836b186eeed3119ac696cefa8a5e2189958b --- a/boost/asio/local/datagram_protocol.hpp +++ b/boost/asio/local/datagram_protocol.hpp @@ -2,7 +2,7 @@ // local/datagram_protocol.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/local/detail/endpoint.hpp b/boost/asio/local/detail/endpoint.hpp old mode 100755 new mode 100644 index a5009657641577605d778ad1117dbd144f47323e..38c0b442c3e7e8843e87c335c919314f44c01c5d --- a/boost/asio/local/detail/endpoint.hpp +++ b/boost/asio/local/detail/endpoint.hpp @@ -2,7 +2,7 @@ // local/detail/endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Derived from a public domain implementation written by Daniel Casimiro. // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/local/detail/impl/endpoint.ipp b/boost/asio/local/detail/impl/endpoint.ipp old mode 100755 new mode 100644 index 5ef6b89089702ae106c7b5160fb25cbb613a208f..1a327eb484a17c3fced0fd75d803b0e1150bcde3 --- a/boost/asio/local/detail/impl/endpoint.ipp +++ b/boost/asio/local/detail/impl/endpoint.ipp @@ -2,7 +2,7 @@ // local/detail/impl/endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Derived from a public domain implementation written by Daniel Casimiro. // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/local/stream_protocol.hpp b/boost/asio/local/stream_protocol.hpp old mode 100755 new mode 100644 index d0bd4fb0c85172d72d1087e49f436781a9354a5a..af1700004810c11d32e0c1659b77132ea4e99730 --- a/boost/asio/local/stream_protocol.hpp +++ b/boost/asio/local/stream_protocol.hpp @@ -2,7 +2,7 @@ // local/stream_protocol.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/multiple_exceptions.hpp b/boost/asio/multiple_exceptions.hpp index 594cbc87d6e0d6df7974d237f3337d2d63fa8d4f..2534c818ad96dc2879cc942b26f0e32ec05f5468 100644 --- a/boost/asio/multiple_exceptions.hpp +++ b/boost/asio/multiple_exceptions.hpp @@ -2,7 +2,7 @@ // multiple_exceptions.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/packaged_task.hpp b/boost/asio/packaged_task.hpp old mode 100755 new mode 100644 index 3c5332f46ab0ee5aa543dc82dbf21f49a9968165..24575888083f30a758aa96aedf3d8c225446948f --- a/boost/asio/packaged_task.hpp +++ b/boost/asio/packaged_task.hpp @@ -2,7 +2,7 @@ // packaged_task.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/placeholders.hpp b/boost/asio/placeholders.hpp old mode 100755 new mode 100644 index 3405a1f91c45e021a1321f205497d1328e22b12a..5b5bcde26a1df6941151f6a7a82121686bca8478 --- a/boost/asio/placeholders.hpp +++ b/boost/asio/placeholders.hpp @@ -2,7 +2,7 @@ // placeholders.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/posix/basic_descriptor.hpp b/boost/asio/posix/basic_descriptor.hpp old mode 100755 new mode 100644 index ad71f90a01a604670b7a13177245229a671aac2b..d9a2d726c5d1e3593de20474c45759efc9539cac --- a/boost/asio/posix/basic_descriptor.hpp +++ b/boost/asio/posix/basic_descriptor.hpp @@ -2,7 +2,7 @@ // posix/basic_descriptor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -86,7 +86,7 @@ public: * descriptor. */ explicit basic_descriptor(const executor_type& ex) - : impl_(ex) + : impl_(0, ex) { } @@ -100,10 +100,11 @@ public: */ template explicit basic_descriptor(ExecutionContext& context, - typename enable_if< - is_convertible::value - >::type* = 0) - : impl_(context) + typename constraint< + is_convertible::value, + defaulted_constraint + >::type = defaulted_constraint()) + : impl_(0, 0, context) { } @@ -122,7 +123,7 @@ public: */ basic_descriptor(const executor_type& ex, const native_handle_type& native_descriptor) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().assign(impl_.get_implementation(), @@ -146,10 +147,10 @@ public: template basic_descriptor(ExecutionContext& context, const native_handle_type& native_descriptor, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().assign(impl_.get_implementation(), diff --git a/boost/asio/posix/basic_stream_descriptor.hpp b/boost/asio/posix/basic_stream_descriptor.hpp old mode 100755 new mode 100644 index cdce1c5dd4f4629019083769d47b5428ac396f76..c603a395548e1f0e045a5e623b1f9d4f7d2f1a34 --- a/boost/asio/posix/basic_stream_descriptor.hpp +++ b/boost/asio/posix/basic_stream_descriptor.hpp @@ -2,7 +2,7 @@ // posix/basic_stream_descriptor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -21,6 +21,8 @@ #if defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR) \ || defined(GENERATING_DOCUMENTATION) +#include + namespace boost { namespace asio { namespace posix { @@ -34,6 +36,12 @@ namespace posix { * @e Distinct @e objects: Safe.@n * @e Shared @e objects: Unsafe. * + * Synchronous @c read_some and @c write_some operations are thread safe with + * respect to each other, if the underlying operating system calls are also + * thread safe. This means that it is permitted to perform concurrent calls to + * these synchronous operations on a single descriptor object. Other synchronous + * operations, such as @c close, are not thread safe. + * * @par Concepts: * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream. */ @@ -84,9 +92,10 @@ public: */ template explicit basic_stream_descriptor(ExecutionContext& context, - typename enable_if< - is_convertible::value - >::type* = 0) + typename constraint< + is_convertible::value, + defaulted_constraint + >::type = defaulted_constraint()) : basic_descriptor(context) { } @@ -126,9 +135,9 @@ public: template basic_stream_descriptor(ExecutionContext& context, const native_handle_type& native_descriptor, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_descriptor(context, native_descriptor) { } @@ -466,6 +475,8 @@ private: } // namespace asio } // namespace boost +#include + #endif // defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR) // || defined(GENERATING_DOCUMENTATION) diff --git a/boost/asio/posix/descriptor.hpp b/boost/asio/posix/descriptor.hpp old mode 100755 new mode 100644 index d06e16c23ab54cb55184950189e28c3417a41c56..6c03f3a7513cfec7cc3000fe602bb0f738b5760e --- a/boost/asio/posix/descriptor.hpp +++ b/boost/asio/posix/descriptor.hpp @@ -2,7 +2,7 @@ // posix/descriptor.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/posix/descriptor_base.hpp b/boost/asio/posix/descriptor_base.hpp old mode 100755 new mode 100644 index 3595fef727e4152806bd3d14eb70e2c32c1e6019..6b74aa083d092538025d94bf3b880e9ddc4aa7ce --- a/boost/asio/posix/descriptor_base.hpp +++ b/boost/asio/posix/descriptor_base.hpp @@ -2,7 +2,7 @@ // posix/descriptor_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/posix/stream_descriptor.hpp b/boost/asio/posix/stream_descriptor.hpp old mode 100755 new mode 100644 index adc9afcdac1e938e41f98244a626f73a11e72890..378b4711fff8df27154bb7e5c7e5819948cee6d8 --- a/boost/asio/posix/stream_descriptor.hpp +++ b/boost/asio/posix/stream_descriptor.hpp @@ -2,7 +2,7 @@ // posix/stream_descriptor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/post.hpp b/boost/asio/post.hpp old mode 100755 new mode 100644 index c409492476ad4ffdebae2b12ba88ed34937653a3..aefe97337e117c5efafecddaa30360ffa439bca2 --- a/boost/asio/post.hpp +++ b/boost/asio/post.hpp @@ -2,7 +2,7 @@ // post.hpp // ~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -98,9 +98,9 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) post( const Executor& ex, BOOST_ASIO_MOVE_ARG(CompletionToken) token BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(Executor), - typename enable_if< + typename constraint< execution::is_executor::value || is_executor::value - >::type* = 0); + >::type = 0); /// Submits a completion token or function object for execution. /** @@ -115,8 +115,8 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(CompletionToken, void()) post( BOOST_ASIO_MOVE_ARG(CompletionToken) token BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename ExecutionContext::executor_type), - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); } // namespace asio } // namespace boost diff --git a/boost/asio/prefer.hpp b/boost/asio/prefer.hpp index a5c51b53480998c31387053d39b6e06348949c4b..80a3589508c4c035e11ba19437bc0af6529fa12c 100644 --- a/boost/asio/prefer.hpp +++ b/boost/asio/prefer.hpp @@ -2,7 +2,7 @@ // prefer.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -120,6 +120,7 @@ struct prefer_result namespace asio_prefer_fn { +using boost::asio::conditional; using boost::asio::decay; using boost::asio::declval; using boost::asio::enable_if; @@ -145,7 +146,9 @@ enum overload_type ill_formed }; -template +template struct call_traits { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed); @@ -153,19 +156,19 @@ struct call_traits typedef void result_type; }; -template -struct call_traits +struct call_traits::type, - typename decay::type - >::value - && - decay::type::is_preferable - && - static_require::is_valid - ) + is_applicable_property< + typename decay::type, + typename decay::type + >::value + >::type, + typename enable_if< + decay::type::is_preferable + >::type, + typename enable_if< + static_require::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = identity); @@ -178,123 +181,137 @@ struct call_traits -struct call_traits +struct call_traits::type, - typename decay::type - >::value - && - decay::type::is_preferable - && - !static_require::is_valid - && - require_member::is_valid - ) + is_applicable_property< + typename decay::type, + typename decay::type + >::value + >::type, + typename enable_if< + decay::type::is_preferable + >::type, + typename enable_if< + !static_require::is_valid + >::type, + typename enable_if< + require_member::type, Property>::is_valid >::type> : - require_member + require_member::type, Property> { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = call_require_member); }; -template -struct call_traits +struct call_traits::type, - typename decay::type - >::value - && - decay::type::is_preferable - && - !static_require::is_valid - && - !require_member::is_valid - && - require_free::is_valid - ) + is_applicable_property< + typename decay::type, + typename decay::type + >::value + >::type, + typename enable_if< + decay::type::is_preferable + >::type, + typename enable_if< + !static_require::is_valid + >::type, + typename enable_if< + !require_member::type, Property>::is_valid + >::type, + typename enable_if< + require_free::is_valid >::type> : require_free { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = call_require_free); }; -template -struct call_traits +struct call_traits::type, - typename decay::type - >::value - && - decay::type::is_preferable - && - !static_require::is_valid - && - !require_member::is_valid - && - !require_free::is_valid - && - prefer_member::is_valid - ) + is_applicable_property< + typename decay::type, + typename decay::type + >::value + >::type, + typename enable_if< + decay::type::is_preferable + >::type, + typename enable_if< + !static_require::is_valid + >::type, + typename enable_if< + !require_member::type, Property>::is_valid + >::type, + typename enable_if< + !require_free::is_valid + >::type, + typename enable_if< + prefer_member::type, Property>::is_valid >::type> : - prefer_member + prefer_member::type, Property> { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = call_prefer_member); }; -template -struct call_traits +struct call_traits::type, - typename decay::type - >::value - && - decay::type::is_preferable - && - !static_require::is_valid - && - !require_member::is_valid - && - !require_free::is_valid - && - !prefer_member::is_valid - && - prefer_free::is_valid - ) + is_applicable_property< + typename decay::type, + typename decay::type + >::value + >::type, + typename enable_if< + decay::type::is_preferable + >::type, + typename enable_if< + !static_require::is_valid + >::type, + typename enable_if< + !require_member::type, Property>::is_valid + >::type, + typename enable_if< + !require_free::is_valid + >::type, + typename enable_if< + !prefer_member::type, Property>::is_valid + >::type, + typename enable_if< + prefer_free::is_valid >::type> : prefer_free { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = call_prefer_free); }; -template -struct call_traits +struct call_traits::type, - typename decay::type - >::value - && - decay::type::is_preferable - && - !static_require::is_valid - && - !require_member::is_valid - && - !require_free::is_valid - && - !prefer_member::is_valid - && - !prefer_free::is_valid - ) + is_applicable_property< + typename decay::type, + typename decay::type + >::value + >::type, + typename enable_if< + decay::type::is_preferable + >::type, + typename enable_if< + !static_require::is_valid + >::type, + typename enable_if< + !require_member::type, Property>::is_valid + >::type, + typename enable_if< + !require_free::is_valid + >::type, + typename enable_if< + !prefer_member::type, Property>::is_valid + >::type, + typename enable_if< + !prefer_free::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = identity); @@ -307,13 +324,15 @@ struct call_traits -struct call_traits +struct call_traits::overload != ill_formed + >::type, typename enable_if< - call_traits::overload != ill_formed - && call_traits< - typename call_traits::result_type, + Impl, + typename call_traits::result_type, void(P1) >::overload != ill_formed >::type> @@ -322,29 +341,34 @@ struct call_traits::is_noexcept + call_traits::is_noexcept && call_traits< - typename call_traits::result_type, + Impl, + typename call_traits::result_type, void(P1) >::is_noexcept )); typedef typename decay< typename call_traits< - typename call_traits::result_type, + Impl, + typename call_traits::result_type, void(P1) >::result_type >::type result_type; }; -template -struct call_traits +struct call_traits::overload != ill_formed + >::type, typename enable_if< - call_traits::overload != ill_formed - && call_traits< - typename call_traits::result_type, + Impl, + typename call_traits::result_type, void(P1, PN BOOST_ASIO_ELLIPSIS) >::overload != ill_formed >::type> @@ -353,17 +377,19 @@ struct call_traits::is_noexcept + call_traits::is_noexcept && call_traits< - typename call_traits::result_type, + Impl, + typename call_traits::result_type, void(P1, PN BOOST_ASIO_ELLIPSIS) >::is_noexcept )); typedef typename decay< typename call_traits< - typename call_traits::result_type, + Impl, + typename call_traits::result_type, void(P1, PN BOOST_ASIO_ELLIPSIS) >::result_type >::type result_type; @@ -371,30 +397,70 @@ struct call_traits + struct proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT) \ + && defined(BOOST_ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT) + struct type + { + template + auto require(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + declval::type>().require( + BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + declval::type>().require( + BOOST_ASIO_MOVE_CAST(P)(p)) + ); + + template + auto prefer(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + declval::type>().prefer( + BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + declval::type>().prefer( + BOOST_ASIO_MOVE_CAST(P)(p)) + ); + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT) + // && defined(BOOST_ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT) + // && defined(BOOST_ASIO_HAS_DEDUCED_PREFER_MEMBER_TRAIT) + }; + template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == identity, - typename call_traits::result_type + call_traits::overload == identity, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(Property)) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return BOOST_ASIO_MOVE_CAST(T)(t); } template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == call_require_member, - typename call_traits::result_type + call_traits::overload == call_require_member, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(Property) p) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return BOOST_ASIO_MOVE_CAST(T)(t).require( BOOST_ASIO_MOVE_CAST(Property)(p)); @@ -402,14 +468,14 @@ struct impl template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == call_require_free, - typename call_traits::result_type + call_traits::overload == call_require_free, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(Property) p) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return require( BOOST_ASIO_MOVE_CAST(T)(t), @@ -418,14 +484,14 @@ struct impl template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == call_prefer_member, - typename call_traits::result_type + call_traits::overload == call_prefer_member, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(Property) p) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return BOOST_ASIO_MOVE_CAST(T)(t).prefer( BOOST_ASIO_MOVE_CAST(Property)(p)); @@ -433,14 +499,14 @@ struct impl template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == call_prefer_free, - typename call_traits::result_type + call_traits::overload == call_prefer_free, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(Property) p) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return prefer( BOOST_ASIO_MOVE_CAST(T)(t), @@ -449,15 +515,15 @@ struct impl template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == two_props, - typename call_traits::result_type + call_traits::overload == two_props, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(P0) p0, BOOST_ASIO_MOVE_ARG(P1) p1) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return (*this)( (*this)( @@ -469,8 +535,10 @@ struct impl template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == n_props, - typename call_traits::result_type + call_traits::overload == n_props, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, @@ -478,7 +546,7 @@ struct impl BOOST_ASIO_MOVE_ARG(P1) p1, BOOST_ASIO_MOVE_ARG(PN) BOOST_ASIO_ELLIPSIS pn) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return (*this)( (*this)( @@ -508,13 +576,16 @@ static BOOST_ASIO_CONSTEXPR const asio_prefer_fn::impl& } // namespace +typedef asio_prefer_fn::impl prefer_t; + #if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) template struct can_prefer : integral_constant::overload - != asio_prefer_fn::ill_formed> + asio_prefer_fn::call_traits< + prefer_t, T, void(Properties...)>::overload + != asio_prefer_fn::ill_formed> { }; @@ -524,24 +595,27 @@ template struct can_prefer : integral_constant::overload - != asio_prefer_fn::ill_formed> + asio_prefer_fn::call_traits< + prefer_t, T, void(P0, P1, P2)>::overload + != asio_prefer_fn::ill_formed> { }; template struct can_prefer : integral_constant::overload - != asio_prefer_fn::ill_formed> + asio_prefer_fn::call_traits< + prefer_t, T, void(P0, P1)>::overload + != asio_prefer_fn::ill_formed> { }; template struct can_prefer : integral_constant::overload - != asio_prefer_fn::ill_formed> + asio_prefer_fn::call_traits< + prefer_t, T, void(P0)>::overload + != asio_prefer_fn::ill_formed> { }; @@ -566,7 +640,8 @@ constexpr bool can_prefer_v template struct is_nothrow_prefer : integral_constant::is_noexcept> + asio_prefer_fn::call_traits< + prefer_t, T, void(Properties...)>::is_noexcept> { }; @@ -576,21 +651,24 @@ template struct is_nothrow_prefer : integral_constant::is_noexcept> + asio_prefer_fn::call_traits< + prefer_t, T, void(P0, P1, P2)>::is_noexcept> { }; template struct is_nothrow_prefer : integral_constant::is_noexcept> + asio_prefer_fn::call_traits< + prefer_t, T, void(P0, P1)>::is_noexcept> { }; template struct is_nothrow_prefer : integral_constant::is_noexcept> + asio_prefer_fn::call_traits< + prefer_t, T, void(P0)>::is_noexcept> { }; @@ -616,7 +694,7 @@ template struct prefer_result { typedef typename asio_prefer_fn::call_traits< - T, void(Properties...)>::result_type type; + prefer_t, T, void(Properties...)>::result_type type; }; #else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) @@ -626,21 +704,21 @@ template ::result_type type; + prefer_t, T, void(P0, P1, P2)>::result_type type; }; template struct prefer_result { typedef typename asio_prefer_fn::call_traits< - T, void(P0, P1)>::result_type type; + prefer_t, T, void(P0, P1)>::result_type type; }; template struct prefer_result { typedef typename asio_prefer_fn::call_traits< - T, void(P0)>::result_type type; + prefer_t, T, void(P0)>::result_type type; }; template diff --git a/boost/asio/query.hpp b/boost/asio/query.hpp index 19cdcaafa6f2f852f8db55ff7b7b45e650ccc444..d742bc2d6f8d0d80ca0322fb5713ab5cdf965eea 100644 --- a/boost/asio/query.hpp +++ b/boost/asio/query.hpp @@ -2,7 +2,7 @@ // query.hpp // ~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -102,6 +102,7 @@ struct query_result namespace asio_query_fn { +using boost::asio::conditional; using boost::asio::decay; using boost::asio::declval; using boost::asio::enable_if; @@ -120,7 +121,8 @@ enum overload_type ill_formed }; -template +template struct call_traits { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed); @@ -128,57 +130,57 @@ struct call_traits typedef void result_type; }; -template -struct call_traits +struct call_traits::type, - typename decay::type - >::value - && - static_query::is_valid - ) + is_applicable_property< + typename decay::type, + typename decay::type + >::value + >::type, + typename enable_if< + static_query::is_valid >::type> : static_query { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = static_value); }; -template -struct call_traits +struct call_traits::type, + typename decay::type + >::value + >::type, + typename enable_if< + !static_query::is_valid + >::type, typename enable_if< - ( - is_applicable_property< - typename decay::type, - typename decay::type - >::value - && - !static_query::is_valid - && - query_member::is_valid - ) + query_member::type, Property>::is_valid >::type> : - query_member + query_member::type, Property> { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member); }; -template -struct call_traits +struct call_traits::type, + typename decay::type + >::value + >::type, + typename enable_if< + !static_query::is_valid + >::type, typename enable_if< - ( - is_applicable_property< - typename decay::type, - typename decay::type - >::value - && - !static_query::is_valid - && - !query_member::is_valid - && - query_free::is_valid - ) + !query_member::type, Property>::is_valid + >::type, + typename enable_if< + query_free::is_valid >::type> : query_free { @@ -187,16 +189,40 @@ struct call_traits + struct proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + struct type + { + template + auto query(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + declval::type>().query( + BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + declval::type>().query( + BOOST_ASIO_MOVE_CAST(P)(p)) + ); + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) + }; + template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == static_value, - typename call_traits::result_type + call_traits::overload == static_value, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T), BOOST_ASIO_MOVE_ARG(Property)) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return static_query< typename decay::type, @@ -206,28 +232,28 @@ struct impl template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == call_member, - typename call_traits::result_type + call_traits::overload == call_member, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(Property) p) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return BOOST_ASIO_MOVE_CAST(T)(t).query(BOOST_ASIO_MOVE_CAST(Property)(p)); } template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == call_free, - typename call_traits::result_type + call_traits::overload == call_free, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(Property) p) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return query(BOOST_ASIO_MOVE_CAST(T)(t), BOOST_ASIO_MOVE_CAST(Property)(p)); } @@ -252,10 +278,12 @@ static BOOST_ASIO_CONSTEXPR const asio_query_fn::impl& } // namespace +typedef asio_query_fn::impl query_t; + template struct can_query : integral_constant::overload != + asio_query_fn::call_traits::overload != asio_query_fn::ill_formed> { }; @@ -271,7 +299,7 @@ constexpr bool can_query_v template struct is_nothrow_query : integral_constant::is_noexcept> + asio_query_fn::call_traits::is_noexcept> { }; @@ -287,7 +315,7 @@ template struct query_result { typedef typename asio_query_fn::call_traits< - T, void(Property)>::result_type type; + query_t, T, void(Property)>::result_type type; }; } // namespace asio diff --git a/boost/asio/read.hpp b/boost/asio/read.hpp old mode 100755 new mode 100644 index 6422a0e8edcaae8b05af575042b318c62f72e0d7..0bd731a7769d4e8293d2635d3d2c89f7cfd1d5a3 --- a/boost/asio/read.hpp +++ b/boost/asio/read.hpp @@ -2,7 +2,7 @@ // read.hpp // ~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -76,9 +76,9 @@ namespace asio { */ template std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, - typename enable_if< + typename constraint< is_mutable_buffer_sequence::value - >::type* = 0); + >::type = 0); /// Attempt to read a certain amount of data from a stream before returning. /** @@ -119,9 +119,9 @@ std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, template std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_mutable_buffer_sequence::value - >::type* = 0); + >::type = 0); /// Attempt to read a certain amount of data from a stream before returning. /** @@ -173,9 +173,9 @@ template std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, CompletionCondition completion_condition, - typename enable_if< + typename constraint< is_mutable_buffer_sequence::value - >::type* = 0); + >::type = 0); /// Attempt to read a certain amount of data from a stream before returning. /** @@ -220,9 +220,9 @@ template std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, CompletionCondition completion_condition, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_mutable_buffer_sequence::value - >::type* = 0); + >::type = 0); #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1) @@ -256,10 +256,12 @@ std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers, template std::size_t read(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); /// Attempt to read a certain amount of data from a stream before returning. /** @@ -291,10 +293,12 @@ template std::size_t read(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); /// Attempt to read a certain amount of data from a stream before returning. /** @@ -337,10 +341,12 @@ template ::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); /// Attempt to read a certain amount of data from a stream before returning. /** @@ -384,10 +390,12 @@ template ::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); #if !defined(BOOST_ASIO_NO_EXTENSIONS) #if !defined(BOOST_ASIO_NO_IOSTREAM) @@ -565,9 +573,9 @@ std::size_t read(SyncReadStream& s, basic_streambuf& b, */ template std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /// Attempt to read a certain amount of data from a stream before returning. /** @@ -598,9 +606,9 @@ std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers, template std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /// Attempt to read a certain amount of data from a stream before returning. /** @@ -642,9 +650,9 @@ template std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers, CompletionCondition completion_condition, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /// Attempt to read a certain amount of data from a stream before returning. /** @@ -687,9 +695,9 @@ template std::size_t read(SyncReadStream& s, DynamicBuffer_v2 buffers, CompletionCondition completion_condition, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /*@}*/ /** @@ -771,9 +779,9 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if< + typename constraint< is_mutable_buffer_sequence::value - >::type* = 0); + >::type = 0); /// Start an asynchronous operation to read a certain amount of data from a /// stream. @@ -851,9 +859,9 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if< + typename constraint< is_mutable_buffer_sequence::value - >::type* = 0); + >::type = 0); #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1) @@ -919,10 +927,12 @@ async_read(AsyncReadStream& s, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); /// Start an asynchronous operation to read a certain amount of data from a /// stream. @@ -996,10 +1006,12 @@ async_read(AsyncReadStream& s, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); #if !defined(BOOST_ASIO_NO_EXTENSIONS) #if !defined(BOOST_ASIO_NO_IOSTREAM) @@ -1199,9 +1211,9 @@ async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /// Start an asynchronous operation to read a certain amount of data from a /// stream. @@ -1274,9 +1286,9 @@ async_read(AsyncReadStream& s, DynamicBuffer_v2 buffers, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /*@}*/ diff --git a/boost/asio/read_at.hpp b/boost/asio/read_at.hpp old mode 100755 new mode 100644 index c003b355afd652b524e539c76313522f030e4b66..920c3c30c0ea34d7df6585e02bd9fd3332889a50 --- a/boost/asio/read_at.hpp +++ b/boost/asio/read_at.hpp @@ -2,7 +2,7 @@ // read_at.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/read_until.hpp b/boost/asio/read_until.hpp old mode 100755 new mode 100644 index 1c204637c2e7564bfac20a7947add720fc7930df..69b7bcfc7aafb231fb911d5eac34e6f32ff8c513 --- a/boost/asio/read_until.hpp +++ b/boost/asio/read_until.hpp @@ -2,7 +2,7 @@ // read_until.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -134,10 +134,12 @@ struct is_match_condition template std::size_t read_until(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, char delim, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); /// Read data into a dynamic buffer sequence until it contains a specified /// delimiter. @@ -177,10 +179,12 @@ template std::size_t read_until(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, char delim, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); /// Read data into a dynamic buffer sequence until it contains a specified /// delimiter. @@ -237,10 +241,12 @@ template std::size_t read_until(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, BOOST_ASIO_STRING_VIEW_PARAM delim, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); /// Read data into a dynamic buffer sequence until it contains a specified /// delimiter. @@ -281,10 +287,12 @@ std::size_t read_until(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); #if !defined(BOOST_ASIO_NO_EXTENSIONS) #if defined(BOOST_ASIO_HAS_BOOST_REGEX) \ @@ -348,10 +356,12 @@ template std::size_t read_until(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, const boost::regex& expr, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); /// Read data into a dynamic buffer sequence until some part of the data it /// contains matches a regular expression. @@ -393,10 +403,12 @@ template std::size_t read_until(SyncReadStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, const boost::regex& expr, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); #endif // defined(BOOST_ASIO_HAS_BOOST_REGEX) // || defined(GENERATING_DOCUMENTATION) @@ -508,11 +520,15 @@ template ::value - && is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + is_dynamic_buffer_v1::type>::value + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); /// Read data into a dynamic buffer sequence until a function object indicates a /// match. @@ -572,11 +588,15 @@ template ::value - && is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + is_dynamic_buffer_v1::type>::value + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); #if !defined(BOOST_ASIO_NO_IOSTREAM) @@ -956,7 +976,7 @@ std::size_t read_until(SyncReadStream& s, template std::size_t read_until(SyncReadStream& s, boost::asio::basic_streambuf& b, MatchCondition match_condition, - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); /// Read data into a streambuf until a function object indicates a match. /** @@ -1013,7 +1033,7 @@ template std::size_t read_until(SyncReadStream& s, boost::asio::basic_streambuf& b, MatchCondition match_condition, boost::system::error_code& ec, - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); #endif // !defined(BOOST_ASIO_NO_IOSTREAM) #endif // !defined(BOOST_ASIO_NO_EXTENSIONS) @@ -1074,9 +1094,9 @@ std::size_t read_until(SyncReadStream& s, */ template std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, char delim, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /// Read data into a dynamic buffer sequence until it contains a specified /// delimiter. @@ -1115,9 +1135,9 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, char delim, template std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, char delim, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /// Read data into a dynamic buffer sequence until it contains a specified /// delimiter. @@ -1173,9 +1193,9 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, template std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, BOOST_ASIO_STRING_VIEW_PARAM delim, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /// Read data into a dynamic buffer sequence until it contains a specified /// delimiter. @@ -1214,9 +1234,9 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, template std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); #if !defined(BOOST_ASIO_NO_EXTENSIONS) #if defined(BOOST_ASIO_HAS_BOOST_REGEX) \ @@ -1279,9 +1299,9 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, template std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, const boost::regex& expr, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /// Read data into a dynamic buffer sequence until some part of the data it /// contains matches a regular expression. @@ -1322,9 +1342,9 @@ std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, template std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, const boost::regex& expr, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); #endif // defined(BOOST_ASIO_HAS_BOOST_REGEX) // || defined(GENERATING_DOCUMENTATION) @@ -1435,10 +1455,12 @@ template std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, MatchCondition match_condition, - typename enable_if< + typename constraint< is_match_condition::value - && is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0, + typename constraint< + is_dynamic_buffer_v2::value + >::type = 0); /// Read data into a dynamic buffer sequence until a function object indicates a /// match. @@ -1497,10 +1519,12 @@ template std::size_t read_until(SyncReadStream& s, DynamicBuffer_v2 buffers, MatchCondition match_condition, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_match_condition::value - && is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0, + typename constraint< + is_dynamic_buffer_v2::value + >::type = 0); #endif // !defined(BOOST_ASIO_NO_EXTENSIONS) @@ -1611,10 +1635,12 @@ async_read_until(AsyncReadStream& s, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); /// Start an asynchronous operation to read data into a dynamic buffer sequence /// until it contains a specified delimiter. @@ -1711,10 +1737,12 @@ async_read_until(AsyncReadStream& s, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); #if !defined(BOOST_ASIO_NO_EXTENSIONS) #if defined(BOOST_ASIO_HAS_BOOST_REGEX) \ @@ -1818,10 +1846,12 @@ async_read_until(AsyncReadStream& s, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); #endif // defined(BOOST_ASIO_HAS_BOOST_REGEX) // || defined(GENERATING_DOCUMENTATION) @@ -1968,11 +1998,15 @@ async_read_until(AsyncReadStream& s, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if< + typename constraint< is_match_condition::value - && is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + is_dynamic_buffer_v1::type>::value + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); #if !defined(BOOST_ASIO_NO_IOSTREAM) @@ -2396,7 +2430,7 @@ async_read_until(AsyncReadStream& s, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); #endif // !defined(BOOST_ASIO_NO_IOSTREAM) #endif // !defined(BOOST_ASIO_NO_EXTENSIONS) @@ -2495,9 +2529,9 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers, char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /// Start an asynchronous operation to read data into a dynamic buffer sequence /// until it contains a specified delimiter. @@ -2593,9 +2627,9 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); #if !defined(BOOST_ASIO_NO_EXTENSIONS) #if defined(BOOST_ASIO_HAS_BOOST_REGEX) \ @@ -2698,9 +2732,9 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); #endif // defined(BOOST_ASIO_HAS_BOOST_REGEX) // || defined(GENERATING_DOCUMENTATION) @@ -2846,10 +2880,12 @@ async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers, BOOST_ASIO_MOVE_ARG(ReadHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncReadStream::executor_type), - typename enable_if< + typename constraint< is_match_condition::value - && is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0, + typename constraint< + is_dynamic_buffer_v2::value + >::type = 0); #endif // !defined(BOOST_ASIO_NO_EXTENSIONS) diff --git a/boost/asio/redirect_error.hpp b/boost/asio/redirect_error.hpp old mode 100755 new mode 100644 index 994ff74285c39103334025e74becb9753f985446..6da181cee58aa7f46e330e26c9c20adaffd7dc1b --- a/boost/asio/redirect_error.hpp +++ b/boost/asio/redirect_error.hpp @@ -2,7 +2,7 @@ // redirect_error.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/require.hpp b/boost/asio/require.hpp index 245d70afb837f99fb63d46a517745d854dedbbeb..cbd56026a7f12c7f3d068dbb5591d0e18f32978b 100644 --- a/boost/asio/require.hpp +++ b/boost/asio/require.hpp @@ -2,7 +2,7 @@ // require.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -109,6 +109,7 @@ struct require_result namespace asio_require_fn { +using boost::asio::conditional; using boost::asio::decay; using boost::asio::declval; using boost::asio::enable_if; @@ -129,7 +130,8 @@ enum overload_type ill_formed }; -template +template struct call_traits { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed); @@ -137,19 +139,19 @@ struct call_traits typedef void result_type; }; -template -struct call_traits +struct call_traits::type, - typename decay::type - >::value - && - decay::type::is_requirable - && - static_require::is_valid - ) + is_applicable_property< + typename decay::type, + typename decay::type + >::value + >::type, + typename enable_if< + decay::type::is_requirable + >::type, + typename enable_if< + static_require::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = identity); @@ -162,57 +164,62 @@ struct call_traits -struct call_traits +struct call_traits::type, - typename decay::type - >::value - && - decay::type::is_requirable - && - !static_require::is_valid - && - require_member::is_valid - ) + is_applicable_property< + typename decay::type, + typename decay::type + >::value + >::type, + typename enable_if< + decay::type::is_requirable + >::type, + typename enable_if< + !static_require::is_valid + >::type, + typename enable_if< + require_member::type, Property>::is_valid >::type> : - require_member + require_member::type, Property> { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member); }; -template -struct call_traits +struct call_traits::type, - typename decay::type - >::value - && - decay::type::is_requirable - && - !static_require::is_valid - && - !require_member::is_valid - && - require_free::is_valid - ) + is_applicable_property< + typename decay::type, + typename decay::type + >::value + >::type, + typename enable_if< + decay::type::is_requirable + >::type, + typename enable_if< + !static_require::is_valid + >::type, + typename enable_if< + !require_member::type, Property>::is_valid + >::type, + typename enable_if< + require_free::is_valid >::type> : require_free { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = call_free); }; -template -struct call_traits +struct call_traits::overload != ill_formed + >::type, typename enable_if< - call_traits::overload != ill_formed - && call_traits< - typename call_traits::result_type, + Impl, + typename call_traits::result_type, void(P1) >::overload != ill_formed >::type> @@ -221,29 +228,34 @@ struct call_traits::is_noexcept + call_traits::is_noexcept && call_traits< - typename call_traits::result_type, + Impl, + typename call_traits::result_type, void(P1) >::is_noexcept )); typedef typename decay< typename call_traits< - typename call_traits::result_type, + Impl, + typename call_traits::result_type, void(P1) >::result_type >::type result_type; }; -template -struct call_traits +struct call_traits::overload != ill_formed + >::type, typename enable_if< - call_traits::overload != ill_formed - && call_traits< - typename call_traits::result_type, + Impl, + typename call_traits::result_type, void(P1, PN BOOST_ASIO_ELLIPSIS) >::overload != ill_formed >::type> @@ -252,17 +264,19 @@ struct call_traits::is_noexcept + call_traits::is_noexcept && call_traits< - typename call_traits::result_type, + Impl, + typename call_traits::result_type, void(P1, PN BOOST_ASIO_ELLIPSIS) >::is_noexcept )); typedef typename decay< typename call_traits< - typename call_traits::result_type, + Impl, + typename call_traits::result_type, void(P1, PN BOOST_ASIO_ELLIPSIS) >::result_type >::type result_type; @@ -270,30 +284,54 @@ struct call_traits + struct proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT) + struct type + { + template + auto require(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + declval::type>().require( + BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + declval::type>().require( + BOOST_ASIO_MOVE_CAST(P)(p)) + ); + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_REQUIRE_MEMBER_TRAIT) + }; + template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == identity, - typename call_traits::result_type + call_traits::overload == identity, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(Property)) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return BOOST_ASIO_MOVE_CAST(T)(t); } template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == call_member, - typename call_traits::result_type + call_traits::overload == call_member, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(Property) p) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return BOOST_ASIO_MOVE_CAST(T)(t).require( BOOST_ASIO_MOVE_CAST(Property)(p)); @@ -301,14 +339,14 @@ struct impl template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == call_free, - typename call_traits::result_type + call_traits::overload == call_free, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(Property) p) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return require( BOOST_ASIO_MOVE_CAST(T)(t), @@ -317,15 +355,15 @@ struct impl template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == two_props, - typename call_traits::result_type + call_traits::overload == two_props, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(P0) p0, BOOST_ASIO_MOVE_ARG(P1) p1) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return (*this)( (*this)( @@ -337,8 +375,10 @@ struct impl template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == n_props, - typename call_traits::result_type + call_traits::overload == n_props, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, @@ -346,7 +386,7 @@ struct impl BOOST_ASIO_MOVE_ARG(P1) p1, BOOST_ASIO_MOVE_ARG(PN) BOOST_ASIO_ELLIPSIS pn) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return (*this)( (*this)( @@ -376,13 +416,16 @@ static BOOST_ASIO_CONSTEXPR const asio_require_fn::impl& } // namespace +typedef asio_require_fn::impl require_t; + #if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) template struct can_require : integral_constant::overload - != asio_require_fn::ill_formed> + asio_require_fn::call_traits< + require_t, T, void(Properties...)>::overload + != asio_require_fn::ill_formed> { }; @@ -392,7 +435,7 @@ template struct can_require : integral_constant::overload + asio_require_fn::call_traits::overload != asio_require_fn::ill_formed> { }; @@ -400,7 +443,7 @@ struct can_require : template struct can_require : integral_constant::overload + asio_require_fn::call_traits::overload != asio_require_fn::ill_formed> { }; @@ -408,7 +451,7 @@ struct can_require : template struct can_require : integral_constant::overload + asio_require_fn::call_traits::overload != asio_require_fn::ill_formed> { }; @@ -434,7 +477,8 @@ constexpr bool can_require_v template struct is_nothrow_require : integral_constant::is_noexcept> + asio_require_fn::call_traits< + require_t, T, void(Properties...)>::is_noexcept> { }; @@ -444,21 +488,24 @@ template struct is_nothrow_require : integral_constant::is_noexcept> + asio_require_fn::call_traits< + require_t, T, void(P0, P1, P2)>::is_noexcept> { }; template struct is_nothrow_require : integral_constant::is_noexcept> + asio_require_fn::call_traits< + require_t, T, void(P0, P1)>::is_noexcept> { }; template struct is_nothrow_require : integral_constant::is_noexcept> + asio_require_fn::call_traits< + require_t, T, void(P0)>::is_noexcept> { }; @@ -484,7 +531,7 @@ template struct require_result { typedef typename asio_require_fn::call_traits< - T, void(Properties...)>::result_type type; + require_t, T, void(Properties...)>::result_type type; }; #else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) @@ -494,21 +541,21 @@ template ::result_type type; + require_t, T, void(P0, P1, P2)>::result_type type; }; template struct require_result { typedef typename asio_require_fn::call_traits< - T, void(P0, P1)>::result_type type; + require_t, T, void(P0, P1)>::result_type type; }; template struct require_result { typedef typename asio_require_fn::call_traits< - T, void(P0)>::result_type type; + require_t, T, void(P0)>::result_type type; }; template diff --git a/boost/asio/require_concept.hpp b/boost/asio/require_concept.hpp index 0ad4dafe2c1f8bd14f8fc286e5a6cda90a2e9283..7fe2b8b4dd5d0d1e679735f39ab248751ffd286e 100644 --- a/boost/asio/require_concept.hpp +++ b/boost/asio/require_concept.hpp @@ -2,7 +2,7 @@ // require_concept.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -109,6 +109,7 @@ struct require_concept_result namespace asio_require_concept_fn { +using boost::asio::conditional; using boost::asio::decay; using boost::asio::declval; using boost::asio::enable_if; @@ -127,7 +128,8 @@ enum overload_type ill_formed }; -template +template struct call_traits { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed); @@ -135,19 +137,19 @@ struct call_traits typedef void result_type; }; -template -struct call_traits +struct call_traits::type, + typename decay::type + >::value + >::type, typename enable_if< - ( - is_applicable_property< - typename decay::type, - typename decay::type - >::value - && - decay::type::is_requirable_concept - && - static_require_concept::is_valid - ) + decay::type::is_requirable_concept + >::type, + typename enable_if< + static_require_concept::is_valid >::type> { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = identity); @@ -155,44 +157,56 @@ struct call_traits -struct call_traits +struct call_traits::type, - typename decay::type - >::value - && - decay::type::is_requirable_concept - && - !static_require_concept::is_valid - && - require_concept_member::is_valid - ) + is_applicable_property< + typename decay::type, + typename decay::type + >::value + >::type, + typename enable_if< + decay::type::is_requirable_concept + >::type, + typename enable_if< + !static_require_concept::is_valid + >::type, + typename enable_if< + require_concept_member< + typename Impl::template proxy::type, + Property + >::is_valid >::type> : - require_concept_member + require_concept_member< + typename Impl::template proxy::type, + Property + > { BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = call_member); }; -template -struct call_traits +struct call_traits::type, - typename decay::type - >::value - && - decay::type::is_requirable_concept - && - !static_require_concept::is_valid - && - !require_concept_member::is_valid - && - require_concept_free::is_valid - ) + is_applicable_property< + typename decay::type, + typename decay::type + >::value + >::type, + typename enable_if< + decay::type::is_requirable_concept + >::type, + typename enable_if< + !static_require_concept::is_valid + >::type, + typename enable_if< + !require_concept_member< + typename Impl::template proxy::type, + Property + >::is_valid + >::type, + typename enable_if< + require_concept_free::is_valid >::type> : require_concept_free { @@ -201,30 +215,54 @@ struct call_traits + struct proxy + { +#if defined(BOOST_ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_MEMBER_TRAIT) + struct type + { + template + auto require_concept(BOOST_ASIO_MOVE_ARG(P) p) + noexcept( + noexcept( + declval::type>().require_concept( + BOOST_ASIO_MOVE_CAST(P)(p)) + ) + ) + -> decltype( + declval::type>().require_concept( + BOOST_ASIO_MOVE_CAST(P)(p)) + ); + }; +#else // defined(BOOST_ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_MEMBER_TRAIT) + typedef T type; +#endif // defined(BOOST_ASIO_HAS_DEDUCED_REQUIRE_CONCEPT_MEMBER_TRAIT) + }; + template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == identity, - typename call_traits::result_type + call_traits::overload == identity, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(Property)) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return BOOST_ASIO_MOVE_CAST(T)(t); } template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == call_member, - typename call_traits::result_type + call_traits::overload == call_member, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(Property) p) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return BOOST_ASIO_MOVE_CAST(T)(t).require_concept( BOOST_ASIO_MOVE_CAST(Property)(p)); @@ -232,14 +270,14 @@ struct impl template BOOST_ASIO_NODISCARD BOOST_ASIO_CONSTEXPR typename enable_if< - call_traits::overload == call_free, - typename call_traits::result_type + call_traits::overload == call_free, + typename call_traits::result_type >::type operator()( BOOST_ASIO_MOVE_ARG(T) t, BOOST_ASIO_MOVE_ARG(Property) p) const BOOST_ASIO_NOEXCEPT_IF(( - call_traits::is_noexcept)) + call_traits::is_noexcept)) { return require_concept( BOOST_ASIO_MOVE_CAST(T)(t), @@ -266,11 +304,14 @@ static BOOST_ASIO_CONSTEXPR const asio_require_concept_fn::impl& } // namespace +typedef asio_require_concept_fn::impl require_concept_t; + template struct can_require_concept : integral_constant::overload != - asio_require_concept_fn::ill_formed> + asio_require_concept_fn::call_traits< + require_concept_t, T, void(Property)>::overload != + asio_require_concept_fn::ill_formed> { }; @@ -285,7 +326,8 @@ constexpr bool can_require_concept_v template struct is_nothrow_require_concept : integral_constant::is_noexcept> + asio_require_concept_fn::call_traits< + require_concept_t, T, void(Property)>::is_noexcept> { }; @@ -301,7 +343,7 @@ template struct require_concept_result { typedef typename asio_require_concept_fn::call_traits< - T, void(Property)>::result_type type; + require_concept_t, T, void(Property)>::result_type type; }; } // namespace asio diff --git a/boost/asio/serial_port.hpp b/boost/asio/serial_port.hpp old mode 100755 new mode 100644 index ab73bfc65ff65f8e83d770f5c1ee69d93385467a..a212c383fe9a5eaf806ec48578de31e3a4b01798 --- a/boost/asio/serial_port.hpp +++ b/boost/asio/serial_port.hpp @@ -2,7 +2,7 @@ // serial_port.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/serial_port_base.hpp b/boost/asio/serial_port_base.hpp old mode 100755 new mode 100644 index 97838f153bb47c1596e8671e9344bc1d8e1237d9..4b120403134f4d6990119700cad81201046853ac --- a/boost/asio/serial_port_base.hpp +++ b/boost/asio/serial_port_base.hpp @@ -2,7 +2,7 @@ // serial_port_base.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/signal_set.hpp b/boost/asio/signal_set.hpp old mode 100755 new mode 100644 index 4e4d798f7c0f5c65182da5135a3cde6f97a3f043..5a776851fc69f914cffd32545604dc4e0c028033 --- a/boost/asio/signal_set.hpp +++ b/boost/asio/signal_set.hpp @@ -2,7 +2,7 @@ // signal_set.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/socket_base.hpp b/boost/asio/socket_base.hpp old mode 100755 new mode 100644 index f4522a41ff42ea51b43bd9ab3b69e5e96095c8ec..0b661f3a7e5768e0110a8bbfe8c42513788d76de --- a/boost/asio/socket_base.hpp +++ b/boost/asio/socket_base.hpp @@ -2,7 +2,7 @@ // socket_base.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/spawn.hpp b/boost/asio/spawn.hpp old mode 100755 new mode 100644 index 6bcc94702150a987b6edfbf6d931f055027f2099..429a15e56dd12ee8abf9e8f9be3c59e9b54e6d92 --- a/boost/asio/spawn.hpp +++ b/boost/asio/spawn.hpp @@ -2,7 +2,7 @@ // spawn.hpp // ~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -226,10 +226,10 @@ void spawn(BOOST_ASIO_MOVE_ARG(Handler) handler, BOOST_ASIO_MOVE_ARG(Function) function, const boost::coroutines::attributes& attributes = boost::coroutines::attributes(), - typename enable_if< + typename constraint< !is_executor::type>::value && !execution::is_executor::type>::value && - !is_convertible::value>::type* = 0); + !is_convertible::value>::type = 0); /// Start a new stackful coroutine, inheriting the execution context of another. /** @@ -269,9 +269,9 @@ void spawn(const Executor& ex, BOOST_ASIO_MOVE_ARG(Function) function, const boost::coroutines::attributes& attributes = boost::coroutines::attributes(), - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type* = 0); + >::type = 0); /// Start a new stackful coroutine that executes on a given strand. /** @@ -331,8 +331,8 @@ void spawn(ExecutionContext& ctx, BOOST_ASIO_MOVE_ARG(Function) function, const boost::coroutines::attributes& attributes = boost::coroutines::attributes(), - typename enable_if::value>::type* = 0); + typename constraint::value>::type = 0); /*@}*/ diff --git a/boost/asio/ssl.hpp b/boost/asio/ssl.hpp old mode 100755 new mode 100644 index 5440e8b5abe10fb094a93bfb199cd050cecfbf47..6cb6ed5de65d1285a08b65e0cb34233507632aef --- a/boost/asio/ssl.hpp +++ b/boost/asio/ssl.hpp @@ -2,7 +2,7 @@ // ssl.hpp // ~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/context.hpp b/boost/asio/ssl/context.hpp old mode 100755 new mode 100644 index 3973eea6957efacbff13ed5d705a01f9d9955087..8299a2b99bd0ecc2a63e463fb5cbaa97709242c9 --- a/boost/asio/ssl/context.hpp +++ b/boost/asio/ssl/context.hpp @@ -2,7 +2,7 @@ // ssl/context.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/context_base.hpp b/boost/asio/ssl/context_base.hpp old mode 100755 new mode 100644 index 4ee0b7c044ecb47d7eac420d4f4c81ac85eeb39e..87c3c625a40cafab28ebf835fac452fdf6a4966e --- a/boost/asio/ssl/context_base.hpp +++ b/boost/asio/ssl/context_base.hpp @@ -2,7 +2,7 @@ // ssl/context_base.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/detail/buffered_handshake_op.hpp b/boost/asio/ssl/detail/buffered_handshake_op.hpp old mode 100755 new mode 100644 index 2cf8d1513cbb5a267ab64a26233b821b24fad632..856cec372499e1b005ce25d39af86115cea6d876 --- a/boost/asio/ssl/detail/buffered_handshake_op.hpp +++ b/boost/asio/ssl/detail/buffered_handshake_op.hpp @@ -2,7 +2,7 @@ // ssl/detail/buffered_handshake_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/detail/engine.hpp b/boost/asio/ssl/detail/engine.hpp old mode 100755 new mode 100644 index d84fad97f6c93fced964556ac8c1b87de5bc96ac..f64288fe36aea0116333b7bf6498f1f73ad02752 --- a/boost/asio/ssl/detail/engine.hpp +++ b/boost/asio/ssl/detail/engine.hpp @@ -2,7 +2,7 @@ // ssl/detail/engine.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/detail/handshake_op.hpp b/boost/asio/ssl/detail/handshake_op.hpp old mode 100755 new mode 100644 index 7904af7b0d9d6a26974a274a921a5cd06d711c80..2d683fe29fac1b62e0b4e32b715cfbb78370a862 --- a/boost/asio/ssl/detail/handshake_op.hpp +++ b/boost/asio/ssl/detail/handshake_op.hpp @@ -2,7 +2,7 @@ // ssl/detail/handshake_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/detail/impl/engine.ipp b/boost/asio/ssl/detail/impl/engine.ipp old mode 100755 new mode 100644 index c377ab76b2b67232320d3e7c67e76237271d7e06..2def5dd0de1241fe48b3187496645396e0e66fdd --- a/boost/asio/ssl/detail/impl/engine.ipp +++ b/boost/asio/ssl/detail/impl/engine.ipp @@ -2,7 +2,7 @@ // ssl/detail/impl/engine.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/detail/impl/openssl_init.ipp b/boost/asio/ssl/detail/impl/openssl_init.ipp old mode 100755 new mode 100644 index fa5d46b5de5ce275e2b8ffd541a46b2366b368be..5da1bca93bb05488f1e357c6ebb581e7595ad83c --- a/boost/asio/ssl/detail/impl/openssl_init.ipp +++ b/boost/asio/ssl/detail/impl/openssl_init.ipp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/detail/io.hpp b/boost/asio/ssl/detail/io.hpp old mode 100755 new mode 100644 index a59e96fbf813facdad49d2052208eeba90f623b3..f8d81c1e31085d8bde1a417410b401982dd5394f --- a/boost/asio/ssl/detail/io.hpp +++ b/boost/asio/ssl/detail/io.hpp @@ -2,7 +2,7 @@ // ssl/detail/io.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -399,6 +399,7 @@ template struct associated_executor< ssl::detail::io_op, Executor> + : detail::associated_executor_forwarding_base { typedef typename associated_executor::type type; diff --git a/boost/asio/ssl/detail/openssl_init.hpp b/boost/asio/ssl/detail/openssl_init.hpp old mode 100755 new mode 100644 index 75e3f7fcd8501b34e9d21f0faca20631f42913cb..0155a6f85c298b19875604fbd775f6c1e450db88 --- a/boost/asio/ssl/detail/openssl_init.hpp +++ b/boost/asio/ssl/detail/openssl_init.hpp @@ -2,7 +2,7 @@ // ssl/detail/openssl_init.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/detail/openssl_types.hpp b/boost/asio/ssl/detail/openssl_types.hpp old mode 100755 new mode 100644 index 593f7833d0e74d92aed44bd9f37c25bb823dcb0d..3a87a1968cd709aeb15ce71531449d82bda99836 --- a/boost/asio/ssl/detail/openssl_types.hpp +++ b/boost/asio/ssl/detail/openssl_types.hpp @@ -2,7 +2,7 @@ // ssl/detail/openssl_types.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/detail/password_callback.hpp b/boost/asio/ssl/detail/password_callback.hpp old mode 100755 new mode 100644 index f53bf5684a84970c4e0988ddbaf4f0c887576189..74c089e82fe3ce10e0cc157b07bdc6d2011f8746 --- a/boost/asio/ssl/detail/password_callback.hpp +++ b/boost/asio/ssl/detail/password_callback.hpp @@ -2,7 +2,7 @@ // ssl/detail/password_callback.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/detail/read_op.hpp b/boost/asio/ssl/detail/read_op.hpp old mode 100755 new mode 100644 index ede49f1b0ee86071734fbef5e9a96e0acd617ae4..b7eea499552e7ee69dff97b8761ebad2c1aa3eae --- a/boost/asio/ssl/detail/read_op.hpp +++ b/boost/asio/ssl/detail/read_op.hpp @@ -2,7 +2,7 @@ // ssl/detail/read_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/detail/shutdown_op.hpp b/boost/asio/ssl/detail/shutdown_op.hpp old mode 100755 new mode 100644 index 51e2c787ae9fd02516797e2d174f4dfb92049b8c..c2a33ba846237f1eb1aacf4746fac67df2f041bf --- a/boost/asio/ssl/detail/shutdown_op.hpp +++ b/boost/asio/ssl/detail/shutdown_op.hpp @@ -2,7 +2,7 @@ // ssl/detail/shutdown_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/detail/stream_core.hpp b/boost/asio/ssl/detail/stream_core.hpp old mode 100755 new mode 100644 index 88bad7848b6ce8afab11a9659e4d50cb6e596693..bdeaf514f971dc793f72cd0f0010a46adaca954b --- a/boost/asio/ssl/detail/stream_core.hpp +++ b/boost/asio/ssl/detail/stream_core.hpp @@ -2,7 +2,7 @@ // ssl/detail/stream_core.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/detail/verify_callback.hpp b/boost/asio/ssl/detail/verify_callback.hpp old mode 100755 new mode 100644 index 9f04e88340e0b58f03af016ad3d8af4e07b78af8..ffd0ced806a0828cc9480f67cfd35589bd989d87 --- a/boost/asio/ssl/detail/verify_callback.hpp +++ b/boost/asio/ssl/detail/verify_callback.hpp @@ -2,7 +2,7 @@ // ssl/detail/verify_callback.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/detail/write_op.hpp b/boost/asio/ssl/detail/write_op.hpp old mode 100755 new mode 100644 index 292e5fd50890970d49290946f4996087522a8d53..b19aee6f8544fb021be405e3f5e8c6f66952fc0a --- a/boost/asio/ssl/detail/write_op.hpp +++ b/boost/asio/ssl/detail/write_op.hpp @@ -2,7 +2,7 @@ // ssl/detail/write_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/error.hpp b/boost/asio/ssl/error.hpp old mode 100755 new mode 100644 index 4eced604ed15f75f0618f2ad39a437a67ca9913b..efa21e533907f94bb840870ade23a80c60ab88f7 --- a/boost/asio/ssl/error.hpp +++ b/boost/asio/ssl/error.hpp @@ -2,7 +2,7 @@ // ssl/error.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/host_name_verification.hpp b/boost/asio/ssl/host_name_verification.hpp index 109d2b4b050d32287be32b1539a5a1756d21e0db..187b1ae643feb5a71ba85e277b67ac953d131323 100644 --- a/boost/asio/ssl/host_name_verification.hpp +++ b/boost/asio/ssl/host_name_verification.hpp @@ -2,7 +2,7 @@ // ssl/host_name_verification.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/impl/context.hpp b/boost/asio/ssl/impl/context.hpp old mode 100755 new mode 100644 index 0f55d5c80d3a72b9e588cd41514d48ba0ade940d..300c5b2f56dcc41153b6549039fb6ded95bfcc30 --- a/boost/asio/ssl/impl/context.hpp +++ b/boost/asio/ssl/impl/context.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/impl/context.ipp b/boost/asio/ssl/impl/context.ipp old mode 100755 new mode 100644 index e2f414a1e4edd992b8d870f1f319ac34f444ee5d..ec0ec8b98458aa9b21aca8cfeb32d734b026bef1 --- a/boost/asio/ssl/impl/context.ipp +++ b/boost/asio/ssl/impl/context.ipp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/impl/error.ipp b/boost/asio/ssl/impl/error.ipp old mode 100755 new mode 100644 index 1a91919f45a85a9fb77a1b237400328de3cf3f77..57f149fc9e23ea1b85133161a75cfb57ab73f232 --- a/boost/asio/ssl/impl/error.ipp +++ b/boost/asio/ssl/impl/error.ipp @@ -2,7 +2,7 @@ // ssl/impl/error.ipp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/impl/host_name_verification.ipp b/boost/asio/ssl/impl/host_name_verification.ipp index ef496673ef2051815d4485b33ebc2c9f7e2e031a..b0675dbeb04f6f3f229244116938aae148da9708 100644 --- a/boost/asio/ssl/impl/host_name_verification.ipp +++ b/boost/asio/ssl/impl/host_name_verification.ipp @@ -2,7 +2,7 @@ // ssl/impl/host_name_verification.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/impl/rfc2818_verification.ipp b/boost/asio/ssl/impl/rfc2818_verification.ipp old mode 100755 new mode 100644 index 83e90c67461bfac4c4afe0e2c9bd72e7f1a8ef13..38b422fe41b5afc51f04a423e57b2b298d4eaf63 --- a/boost/asio/ssl/impl/rfc2818_verification.ipp +++ b/boost/asio/ssl/impl/rfc2818_verification.ipp @@ -2,7 +2,7 @@ // ssl/impl/rfc2818_verification.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/impl/src.hpp b/boost/asio/ssl/impl/src.hpp old mode 100755 new mode 100644 index fc938d674e28234a4939bdd72a0d5e2c869aca1c..8d38d13e2a76505cd765a98d50e4002a76c479aa --- a/boost/asio/ssl/impl/src.hpp +++ b/boost/asio/ssl/impl/src.hpp @@ -2,7 +2,7 @@ // impl/ssl/src.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/rfc2818_verification.hpp b/boost/asio/ssl/rfc2818_verification.hpp old mode 100755 new mode 100644 index 46185e6081e41946ca7de5cbc2eb58a8f5d08eea..39eddbbecc67207c68484e6be465ab4cea088129 --- a/boost/asio/ssl/rfc2818_verification.hpp +++ b/boost/asio/ssl/rfc2818_verification.hpp @@ -2,7 +2,7 @@ // ssl/rfc2818_verification.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/stream.hpp b/boost/asio/ssl/stream.hpp old mode 100755 new mode 100644 index cc157b8963556d7a1e8ae1562262746f9124ce4c..0a7c805d3cca839101ac7e5aa76aaa3810327a30 --- a/boost/asio/ssl/stream.hpp +++ b/boost/asio/ssl/stream.hpp @@ -2,7 +2,7 @@ // ssl/stream.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/stream_base.hpp b/boost/asio/ssl/stream_base.hpp old mode 100755 new mode 100644 index 380bac49d315bd6ed68b1635f050acf9b871694c..c5993ca2bc480e65a5e743cce6243f7623bd0ba7 --- a/boost/asio/ssl/stream_base.hpp +++ b/boost/asio/ssl/stream_base.hpp @@ -2,7 +2,7 @@ // ssl/stream_base.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/verify_context.hpp b/boost/asio/ssl/verify_context.hpp old mode 100755 new mode 100644 index a41dae029eea7ecdc53316bf774e09e8fb578c6e..237e9f01fac46cc2252653f5a9f576cd561f6c59 --- a/boost/asio/ssl/verify_context.hpp +++ b/boost/asio/ssl/verify_context.hpp @@ -2,7 +2,7 @@ // ssl/verify_context.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ssl/verify_mode.hpp b/boost/asio/ssl/verify_mode.hpp old mode 100755 new mode 100644 index ca0f2620df7ed84f7ba8c6afea92d174dbd2a448..56059e6a5d8a92f621b57b7faabab38ad35478f6 --- a/boost/asio/ssl/verify_mode.hpp +++ b/boost/asio/ssl/verify_mode.hpp @@ -2,7 +2,7 @@ // ssl/verify_mode.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/static_thread_pool.hpp b/boost/asio/static_thread_pool.hpp index 3ca477a0d77dfc2a6eb1a1095ae1ea3b1fb2930c..4245d1d114d1356e96b6af0478c26b9d22f84fed 100644 --- a/boost/asio/static_thread_pool.hpp +++ b/boost/asio/static_thread_pool.hpp @@ -2,7 +2,7 @@ // static_thread_pool.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/steady_timer.hpp b/boost/asio/steady_timer.hpp old mode 100755 new mode 100644 index bf143a112ee696c97e0b7b545d1a541ea9b09fdb..dd846f4fb98abb520377a39d7e2342147b15264f --- a/boost/asio/steady_timer.hpp +++ b/boost/asio/steady_timer.hpp @@ -2,7 +2,7 @@ // steady_timer.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/strand.hpp b/boost/asio/strand.hpp old mode 100755 new mode 100644 index 8f3e4c3c67d66353d2e01155faa78812fda39564..6d6f5a5ba6fa3eaaf1fd78d81b3e726061fc3e16 --- a/boost/asio/strand.hpp +++ b/boost/asio/strand.hpp @@ -2,7 +2,7 @@ // strand.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -48,13 +49,13 @@ public: /// Construct a strand for the specified executor. template explicit strand(const Executor1& e, - typename enable_if< + typename constraint< conditional< !is_same::value, is_convertible, false_type >::type::value - >::type* = 0) + >::type = 0) : executor_(e), impl_(strand::create_implementation(executor_)) { @@ -158,7 +159,7 @@ public: /// Forward a query to the underlying executor. /** * Do not call this function directly. It is intended for use with the - * execution::execute customisation point. + * boost::asio::query customisation point. * * For example: * @code boost::asio::strand ex = ...; @@ -167,14 +168,19 @@ public: * ... @endcode */ template - typename enable_if< + typename constraint< can_query::value, - typename query_result::type + typename conditional< + is_convertible::value, + execution::blocking_t, + typename query_result::type + >::type >::type query(const Property& p) const BOOST_ASIO_NOEXCEPT_IF(( is_nothrow_query::value)) { - return boost::asio::query(executor_, p); + return this->query_helper( + is_convertible(), p); } /// Forward a requirement to the underlying executor. @@ -188,8 +194,9 @@ public: * boost::asio::execution::blocking.never); @endcode */ template - typename enable_if< - can_require::value, + typename constraint< + can_require::value + && !is_convertible::value, strand::type >::type> @@ -213,8 +220,9 @@ public: * boost::asio::execution::blocking.never); @endcode */ template - typename enable_if< - can_prefer::value, + typename constraint< + can_prefer::value + && !is_convertible::value, strand::type >::type> @@ -271,8 +279,9 @@ public: * function object must be: @code void function(); @endcode */ template - typename enable_if< - execution::can_execute::value + typename constraint< + execution::can_execute::value, + void >::type execute(BOOST_ASIO_MOVE_ARG(Function) f) const { detail::strand_executor_service::execute(impl_, @@ -382,9 +391,9 @@ private: template static implementation_type create_implementation(const InnerExecutor& ex, - typename enable_if< + typename constraint< can_query::value - >::type* = 0) + >::type = 0) { return use_service( boost::asio::query(ex, execution::context)).create_implementation(); @@ -392,9 +401,9 @@ private: template static implementation_type create_implementation(const InnerExecutor& ex, - typename enable_if< + typename constraint< !can_query::value - >::type* = 0) + >::type = 0) { return use_service( ex.context()).create_implementation(); @@ -406,6 +415,21 @@ private: { } + template + typename query_result::type query_helper( + false_type, const Property& property) const + { + return boost::asio::query(executor_, property); + } + + template + execution::blocking_t query_helper(true_type, const Property& property) const + { + execution::blocking_t result = boost::asio::query(executor_, property); + return result == execution::blocking.always + ? execution::blocking.possibly : result; + } + Executor executor_; implementation_type impl_; }; @@ -420,9 +444,9 @@ private: /// Create a @ref strand object for an executor. template inline strand make_strand(const Executor& ex, - typename enable_if< + typename constraint< is_executor::value || execution::is_executor::value - >::type* = 0) + >::type = 0) { return strand(ex); } @@ -431,9 +455,9 @@ inline strand make_strand(const Executor& ex, template inline strand make_strand(ExecutionContext& ctx, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) { return strand(ctx.get_executor()); } @@ -458,7 +482,10 @@ struct equality_comparable > #if !defined(BOOST_ASIO_HAS_DEDUCED_EXECUTE_MEMBER_TRAIT) template -struct execute_member, Function> +struct execute_member, Function, + typename enable_if< + execution::can_execute::value + >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = false); @@ -478,7 +505,10 @@ struct query_member, Property, BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); BOOST_ASIO_STATIC_CONSTEXPR(bool, is_noexcept = (is_nothrow_query::value)); - typedef typename query_result::type result_type; + typedef typename conditional< + is_convertible::value, + execution::blocking_t, typename query_result::type + >::type result_type; }; #endif // !defined(BOOST_ASIO_HAS_DEDUCED_QUERY_MEMBER_TRAIT) @@ -489,6 +519,7 @@ template struct require_member, Property, typename enable_if< can_require::value + && !is_convertible::value >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); @@ -507,6 +538,7 @@ template struct prefer_member, Property, typename enable_if< can_prefer::value + && !is_convertible::value >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); diff --git a/boost/asio/streambuf.hpp b/boost/asio/streambuf.hpp old mode 100755 new mode 100644 index 4d7e74f5b40bb0330d817993e1d9917685916f7e..e980487dd345833af9f572312d5ec9a5680005cc --- a/boost/asio/streambuf.hpp +++ b/boost/asio/streambuf.hpp @@ -2,7 +2,7 @@ // streambuf.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/system_context.hpp b/boost/asio/system_context.hpp old mode 100755 new mode 100644 index c8c2f321a9d6af6db63877d6f5bcf8b97b5eb5ef..52d67e1c7dd748847aba2a4ddeb47640ebacd4a7 --- a/boost/asio/system_context.hpp +++ b/boost/asio/system_context.hpp @@ -2,7 +2,7 @@ // system_context.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/system_executor.hpp b/boost/asio/system_executor.hpp old mode 100755 new mode 100644 index 5bffa139b6079db4c1c929030443c8a46d429c81..3e60328e271adac4ec35dfe181f244f59d3d0272 --- a/boost/asio/system_executor.hpp +++ b/boost/asio/system_executor.hpp @@ -2,7 +2,7 @@ // system_executor.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -45,6 +45,12 @@ public: { } +#if !defined(GENERATING_DOCUMENTATION) +private: + friend struct asio_require_fn::impl; + friend struct asio_prefer_fn::impl; +#endif // !defined(GENERATING_DOCUMENTATION) + /// Obtain an executor with the @c blocking.possibly property. /** * Do not call this function directly. It is intended for use with the @@ -170,6 +176,15 @@ public: Relationship, std::allocator >(); } +#if !defined(GENERATING_DOCUMENTATION) +private: + friend struct asio_query_fn::impl; + friend struct boost::asio::execution::detail::blocking_t<0>; + friend struct boost::asio::execution::detail::mapping_t<0>; + friend struct boost::asio::execution::detail::outstanding_work_t<0>; + friend struct boost::asio::execution::detail::relationship_t<0>; +#endif // !defined(GENERATING_DOCUMENTATION) + /// Query the current value of the @c mapping property. /** * Do not call this function directly. It is intended for use with the @@ -279,6 +294,7 @@ public: */ std::size_t query(execution::occupancy_t) const BOOST_ASIO_NOEXCEPT; +public: /// Compare two executors for equality. /** * Two executors are equal if they refer to the same underlying io_context. @@ -299,6 +315,11 @@ public: return false; } +#if !defined(GENERATING_DOCUMENTATION) +private: + friend struct asio_execution_execute_fn::impl; +#endif // !defined(GENERATING_DOCUMENTATION) + /// Execution function. /** * Do not call this function directly. It is intended for use with the @@ -315,6 +336,7 @@ public: } #if !defined(BOOST_ASIO_NO_TS_EXECUTORS) +public: /// Obtain the underlying execution context. system_context& context() const BOOST_ASIO_NOEXCEPT; diff --git a/boost/asio/system_timer.hpp b/boost/asio/system_timer.hpp old mode 100755 new mode 100644 index 46cc7f20002e742c0d6258177cc8262817615abb..4561c9032e6862ea34a847fd2dc6cff58655b18b --- a/boost/asio/system_timer.hpp +++ b/boost/asio/system_timer.hpp @@ -2,7 +2,7 @@ // system_timer.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/this_coro.hpp b/boost/asio/this_coro.hpp old mode 100755 new mode 100644 index 860e79111ff3e6abb509084382e497a58a73f482..6cccc22731dfc9f3e32bcd4286c81beab1b0bc1a --- a/boost/asio/this_coro.hpp +++ b/boost/asio/this_coro.hpp @@ -2,7 +2,7 @@ // this_coro.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/thread_pool.hpp b/boost/asio/thread_pool.hpp old mode 100755 new mode 100644 index 3cc157b0b9a516c57193357395013eb08ed86273..5397e434b13690380cd87fecefe05df37bdfbb17 --- a/boost/asio/thread_pool.hpp +++ b/boost/asio/thread_pool.hpp @@ -2,7 +2,7 @@ // thread_pool.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -231,6 +231,12 @@ public: basic_executor_type&& other) BOOST_ASIO_NOEXCEPT; #endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) +#if !defined(GENERATING_DOCUMENTATION) +private: + friend struct asio_require_fn::impl; + friend struct asio_prefer_fn::impl; +#endif // !defined(GENERATING_DOCUMENTATION) + /// Obtain an executor with the @c blocking.possibly property. /** * Do not call this function directly. It is intended for use with the @@ -391,6 +397,13 @@ public: pool_, std::allocator(), bits_); } +#if !defined(GENERATING_DOCUMENTATION) +private: + friend struct asio_query_fn::impl; + friend struct boost::asio::execution::detail::mapping_t<0>; + friend struct boost::asio::execution::detail::outstanding_work_t<0>; +#endif // !defined(GENERATING_DOCUMENTATION) + /// Query the current value of the @c bulk_guarantee property. /** * Do not call this function directly. It is intended for use with the @@ -547,6 +560,7 @@ public: return static_cast(pool_->num_threads_); } +public: /// Determine whether the thread pool is running in the current thread. /** * @return @c true if the current thread is running the thread pool. Otherwise @@ -578,6 +592,11 @@ public: || a.bits_ != b.bits_; } +#if !defined(GENERATING_DOCUMENTATION) +private: + friend struct asio_execution_execute_fn::impl; +#endif // !defined(GENERATING_DOCUMENTATION) + /// Execution function. /** * Do not call this function directly. It is intended for use with the @@ -594,6 +613,7 @@ public: integral_constant()); } +public: /// Bulk execution function. template void bulk_execute(BOOST_ASIO_MOVE_ARG(Function) f, std::size_t n) const diff --git a/boost/asio/time_traits.hpp b/boost/asio/time_traits.hpp old mode 100755 new mode 100644 index 5d55afdc13eb793500d45a1e779e295b6805eb07..d0aa5f83838f85d8acda13c8467d4a1dd3ef997e --- a/boost/asio/time_traits.hpp +++ b/boost/asio/time_traits.hpp @@ -2,7 +2,7 @@ // time_traits.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/bulk_execute_free.hpp b/boost/asio/traits/bulk_execute_free.hpp index aab66b8baf8e6becd2b293f35493e31038a804f0..d42db4e4003a3572c226d90a90d9fc224fcb6cea 100644 --- a/boost/asio/traits/bulk_execute_free.hpp +++ b/boost/asio/traits/bulk_execute_free.hpp @@ -2,7 +2,7 @@ // traits/bulk_execute_free.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/bulk_execute_member.hpp b/boost/asio/traits/bulk_execute_member.hpp index d0eb702ca8ea53561c54865c07d390d9a0ea5ffb..d923618b4dbdbe348f1a189021a5695bb6ec8c81 100644 --- a/boost/asio/traits/bulk_execute_member.hpp +++ b/boost/asio/traits/bulk_execute_member.hpp @@ -2,7 +2,7 @@ // traits/bulk_execute_member.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/connect_free.hpp b/boost/asio/traits/connect_free.hpp index d1d3250d12ed3120dc5c90c6264c5aab84da251b..88a1c1b2071c8cc5e705cb634b0fe091c581de37 100644 --- a/boost/asio/traits/connect_free.hpp +++ b/boost/asio/traits/connect_free.hpp @@ -2,7 +2,7 @@ // traits/connect_free.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/connect_member.hpp b/boost/asio/traits/connect_member.hpp index 90ba9dedc5248f1a48b9230a681a4a302d22aa8a..8d907f7640d03471fc710589f4c430e8280f3b0c 100644 --- a/boost/asio/traits/connect_member.hpp +++ b/boost/asio/traits/connect_member.hpp @@ -2,7 +2,7 @@ // traits/connect_member.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/equality_comparable.hpp b/boost/asio/traits/equality_comparable.hpp index c49a21f05057ca272ddd80474e3a8be8a5df8c26..685713ea6390242135ff5eda37dd6224470630ef 100644 --- a/boost/asio/traits/equality_comparable.hpp +++ b/boost/asio/traits/equality_comparable.hpp @@ -2,7 +2,7 @@ // traits/equality_comparable.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -56,8 +56,12 @@ template struct equality_comparable_trait(declval() == declval()), - static_cast(declval() != declval()) + static_cast( + static_cast(declval() == declval()) + ), + static_cast( + static_cast(declval() != declval()) + ) ) >::type> { diff --git a/boost/asio/traits/execute_free.hpp b/boost/asio/traits/execute_free.hpp index 6834459821cc18a277e368e162ebb4fcadf20204..56acc2a10277bd42b1bc746d08e0b95e1e2a9481 100644 --- a/boost/asio/traits/execute_free.hpp +++ b/boost/asio/traits/execute_free.hpp @@ -2,7 +2,7 @@ // traits/execute_free.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/execute_member.hpp b/boost/asio/traits/execute_member.hpp index 87b43ce440a796b4255821bdb9f07819ba7e0332..24a80a5d361e5dbb29b12ff95b1df1f7c3dd11e9 100644 --- a/boost/asio/traits/execute_member.hpp +++ b/boost/asio/traits/execute_member.hpp @@ -2,7 +2,7 @@ // traits/execute_member.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/prefer_free.hpp b/boost/asio/traits/prefer_free.hpp index 5f8b73de92a5d019b5f58aba76d1e4afaaed417e..c534f3f43849d3b2d83f11c33474eac8f79b8431 100644 --- a/boost/asio/traits/prefer_free.hpp +++ b/boost/asio/traits/prefer_free.hpp @@ -2,7 +2,7 @@ // traits/prefer_free.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/prefer_member.hpp b/boost/asio/traits/prefer_member.hpp index 4c71c439cad3d7c171690473ab01d58e705d01ae..496b41761f2b6416c8e13b0021e6c31945d0ac76 100644 --- a/boost/asio/traits/prefer_member.hpp +++ b/boost/asio/traits/prefer_member.hpp @@ -2,7 +2,7 @@ // traits/prefer_member.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/query_free.hpp b/boost/asio/traits/query_free.hpp index 335b12e5db3a2a2fe1e44f38bb1ce1b756cdd723..8cac82d41e930a0376e999d22b4b59ff677f0cf4 100644 --- a/boost/asio/traits/query_free.hpp +++ b/boost/asio/traits/query_free.hpp @@ -2,7 +2,7 @@ // traits/query_free.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/query_member.hpp b/boost/asio/traits/query_member.hpp index aa175934f57ab59fbd71d4a84e813753d61164f7..3017db0f6851d8b65684413f1103ce9f48c6d146 100644 --- a/boost/asio/traits/query_member.hpp +++ b/boost/asio/traits/query_member.hpp @@ -2,7 +2,7 @@ // traits/query_member.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/query_static_constexpr_member.hpp b/boost/asio/traits/query_static_constexpr_member.hpp index 582e7f9a9717ee25784919f53bc25cd973c23d15..ec0ce0d738d35e5da9dd83c20105537608f0f6b6 100644 --- a/boost/asio/traits/query_static_constexpr_member.hpp +++ b/boost/asio/traits/query_static_constexpr_member.hpp @@ -2,7 +2,7 @@ // traits/query_static_constexpr_member.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/require_concept_free.hpp b/boost/asio/traits/require_concept_free.hpp index 4b27af4378d0e7f7f02de85537b64eaf6c6218c7..2011c75235524ccc336ac724c0299cd6ae1168f7 100644 --- a/boost/asio/traits/require_concept_free.hpp +++ b/boost/asio/traits/require_concept_free.hpp @@ -2,7 +2,7 @@ // traits/require_concept_free.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/require_concept_member.hpp b/boost/asio/traits/require_concept_member.hpp index c8084a84c3743a431780081474a31425a5cb29ac..541ceaaedaa246ecfc5d45cb62dbeb24149bba67 100644 --- a/boost/asio/traits/require_concept_member.hpp +++ b/boost/asio/traits/require_concept_member.hpp @@ -2,7 +2,7 @@ // traits/require_concept_member.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/require_free.hpp b/boost/asio/traits/require_free.hpp index 10a8ed079e93665309d86422891b46c442faf2a1..38fbd918b28c9494dd62f5019d18593ee918ad28 100644 --- a/boost/asio/traits/require_free.hpp +++ b/boost/asio/traits/require_free.hpp @@ -2,7 +2,7 @@ // traits/require_free.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/require_member.hpp b/boost/asio/traits/require_member.hpp index 63bb7564a6332aef35c89188153bdb5b646e7094..25b3df76c6380050b1e9b72a58c3cc53d24d8137 100644 --- a/boost/asio/traits/require_member.hpp +++ b/boost/asio/traits/require_member.hpp @@ -2,7 +2,7 @@ // traits/require_member.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/schedule_free.hpp b/boost/asio/traits/schedule_free.hpp index 7384584a5782c0ee6ced196ec3b720907e519155..76d55d63133db023f2b1e3368995f8081f2d4efa 100644 --- a/boost/asio/traits/schedule_free.hpp +++ b/boost/asio/traits/schedule_free.hpp @@ -2,7 +2,7 @@ // traits/schedule_free.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/schedule_member.hpp b/boost/asio/traits/schedule_member.hpp index 7e15999215b12604058e48002f69c8f260eb1642..b5a1facf9a42bd91de0d73366dbe6b019e982005 100644 --- a/boost/asio/traits/schedule_member.hpp +++ b/boost/asio/traits/schedule_member.hpp @@ -2,7 +2,7 @@ // traits/schedule_member.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/set_done_free.hpp b/boost/asio/traits/set_done_free.hpp index 6966aa3b9afa8188eded0cac7f936f1aeee8f360..4c86011bda15329b4d0cede09b644266b4d35ad8 100644 --- a/boost/asio/traits/set_done_free.hpp +++ b/boost/asio/traits/set_done_free.hpp @@ -2,7 +2,7 @@ // traits/set_done_free.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/set_done_member.hpp b/boost/asio/traits/set_done_member.hpp index 25ad82ddb54ad19195280d8e748165db6523573e..2c8b981aef7eff786abda4dcae8b29709a109001 100644 --- a/boost/asio/traits/set_done_member.hpp +++ b/boost/asio/traits/set_done_member.hpp @@ -2,7 +2,7 @@ // traits/set_done_member.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/set_error_free.hpp b/boost/asio/traits/set_error_free.hpp index be00636f03ab645b86ab47c742f74546f2610874..f950ee92a10a42125955b460007c099d322ec162 100644 --- a/boost/asio/traits/set_error_free.hpp +++ b/boost/asio/traits/set_error_free.hpp @@ -2,7 +2,7 @@ // traits/set_error_free.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/set_error_member.hpp b/boost/asio/traits/set_error_member.hpp index 7b6ed4eb7060e45b2ab0ee9e97ee25527345f85a..e7df5dc9e531c934e76502605425595395757397 100644 --- a/boost/asio/traits/set_error_member.hpp +++ b/boost/asio/traits/set_error_member.hpp @@ -2,7 +2,7 @@ // traits/set_error_member.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/set_value_free.hpp b/boost/asio/traits/set_value_free.hpp index 40d897c03bb8dbdaa7dddf0cf8739595cba92add..2d2e5561c989d401fccc9f0c3f7c5c5cbf6ade92 100644 --- a/boost/asio/traits/set_value_free.hpp +++ b/boost/asio/traits/set_value_free.hpp @@ -2,7 +2,7 @@ // traits/set_value_free.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/set_value_member.hpp b/boost/asio/traits/set_value_member.hpp index 2979f0f2cd5f3d41e8b0393a36d652d2c10f5ad4..5ceddad5f6338b8b93a551cdb2a8e02afd9a4161 100644 --- a/boost/asio/traits/set_value_member.hpp +++ b/boost/asio/traits/set_value_member.hpp @@ -2,7 +2,7 @@ // traits/set_value_member.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/start_free.hpp b/boost/asio/traits/start_free.hpp index 1a2a2c04cc1185aff6b9cef38e441df6443d1e47..00ab86b91a55d1cc9c9cabb30a7840162802fc28 100644 --- a/boost/asio/traits/start_free.hpp +++ b/boost/asio/traits/start_free.hpp @@ -2,7 +2,7 @@ // traits/start_free.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/start_member.hpp b/boost/asio/traits/start_member.hpp index 6ab3c0858005f19b9b4ef77737927a5e41ec83af..9c9045e7b183728807d48bfb0bc57e1ce3f26ec8 100644 --- a/boost/asio/traits/start_member.hpp +++ b/boost/asio/traits/start_member.hpp @@ -2,7 +2,7 @@ // traits/start_member.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/static_query.hpp b/boost/asio/traits/static_query.hpp index 2cc8fbe68fb9690a03cb47e31f2c8664cf42e706..b51bc56b5a92790f42a2fda9859383fd584f6f4f 100644 --- a/boost/asio/traits/static_query.hpp +++ b/boost/asio/traits/static_query.hpp @@ -2,7 +2,7 @@ // traits/static_query.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/static_require.hpp b/boost/asio/traits/static_require.hpp index c0bdbbeaea9c900b3d8924c18ab3845b3c786cd5..1b2812f07ddcc386e30c765b913946abaa85ddf8 100644 --- a/boost/asio/traits/static_require.hpp +++ b/boost/asio/traits/static_require.hpp @@ -2,7 +2,7 @@ // traits/static_require.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/static_require_concept.hpp b/boost/asio/traits/static_require_concept.hpp index 97ee2285e7b71e1130f6595e7ff76140659c4752..ca4d7df37b0d934301d2e2f039f2d61343347c02 100644 --- a/boost/asio/traits/static_require_concept.hpp +++ b/boost/asio/traits/static_require_concept.hpp @@ -2,7 +2,7 @@ // traits/static_require_concept.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -92,7 +92,8 @@ struct has_static_require_concept template struct static_require_concept_trait::type>::value + has_static_require_concept::type, + typename decay::type>::value >::type> { BOOST_ASIO_STATIC_CONSTEXPR(bool, is_valid = true); diff --git a/boost/asio/traits/submit_free.hpp b/boost/asio/traits/submit_free.hpp index 768f61391ec5ed95d1e4f8e492c71be0ab899a0d..1a8bee2cdbb2997866ff83e7c72f060ccfd8d5b5 100644 --- a/boost/asio/traits/submit_free.hpp +++ b/boost/asio/traits/submit_free.hpp @@ -2,7 +2,7 @@ // traits/submit_free.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/traits/submit_member.hpp b/boost/asio/traits/submit_member.hpp index 5cacb7955954ad57d644fdc0f9359c9b51e4bbff..76c4ffdb5bbb9c0a80647166e12ad9a4a8019b25 100644 --- a/boost/asio/traits/submit_member.hpp +++ b/boost/asio/traits/submit_member.hpp @@ -2,7 +2,7 @@ // traits/submit_member.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ts/buffer.hpp b/boost/asio/ts/buffer.hpp old mode 100755 new mode 100644 index ac5768c00a3a94e1885c5944d533cbf149929a3f..4283730fdaa8aa18e9dcd6dde9acbfd2faa9d3ce --- a/boost/asio/ts/buffer.hpp +++ b/boost/asio/ts/buffer.hpp @@ -2,7 +2,7 @@ // ts/buffer.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ts/executor.hpp b/boost/asio/ts/executor.hpp old mode 100755 new mode 100644 index 06fa3eeb9ddd6be0ddcda3eeb6b9804577feb3fb..3099ee3ff6cf8b805dbc9ee5bda50ba1c4478ca2 --- a/boost/asio/ts/executor.hpp +++ b/boost/asio/ts/executor.hpp @@ -2,7 +2,7 @@ // ts/executor.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ts/internet.hpp b/boost/asio/ts/internet.hpp old mode 100755 new mode 100644 index 429c5d6387e68681a03db9be6f5b546b851c79dc..90fc10064e013a81c9dc2c38b3d6de46217150e2 --- a/boost/asio/ts/internet.hpp +++ b/boost/asio/ts/internet.hpp @@ -2,7 +2,7 @@ // ts/internet.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ts/io_context.hpp b/boost/asio/ts/io_context.hpp old mode 100755 new mode 100644 index 4abdc5c4ab4caad54d171557459f3f662ea723e2..7bc0883eb20fa77c76ba46bb4dcc3b1115b6580b --- a/boost/asio/ts/io_context.hpp +++ b/boost/asio/ts/io_context.hpp @@ -2,7 +2,7 @@ // ts/io_context.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ts/net.hpp b/boost/asio/ts/net.hpp old mode 100755 new mode 100644 index f218dc12f36463149ac921293a7664b9f5fb18d0..cb26b16738d581f413b43e90a5f94431efd73be7 --- a/boost/asio/ts/net.hpp +++ b/boost/asio/ts/net.hpp @@ -2,7 +2,7 @@ // ts/net.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ts/netfwd.hpp b/boost/asio/ts/netfwd.hpp old mode 100755 new mode 100644 index f1921b62dbec913d6854998b76daf91b6040916a..2d6cc7b4e566322b09c1b16cb81e7c5dc8780c30 --- a/boost/asio/ts/netfwd.hpp +++ b/boost/asio/ts/netfwd.hpp @@ -2,7 +2,7 @@ // ts/netfwd.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -46,7 +46,7 @@ class executor_binder; #if !defined(BOOST_ASIO_EXECUTOR_WORK_GUARD_DECL) #define BOOST_ASIO_EXECUTOR_WORK_GUARD_DECL -template +template class executor_work_guard; #endif // !defined(BOOST_ASIO_EXECUTOR_WORK_GUARD_DECL) @@ -91,15 +91,7 @@ struct prefer_only; } // namespace execution -typedef execution::any_executor< - execution::context_as_t, - execution::blocking_t::never_t, - execution::prefer_only, - execution::prefer_only, - execution::prefer_only, - execution::prefer_only, - execution::prefer_only - > any_io_executor; +class any_io_executor; #endif // defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) diff --git a/boost/asio/ts/socket.hpp b/boost/asio/ts/socket.hpp old mode 100755 new mode 100644 index 440488ec7c74b207ec8529b3188b10991eb7dd0b..e87d49cb4f4421317b1a5f851f00d829335c9f52 --- a/boost/asio/ts/socket.hpp +++ b/boost/asio/ts/socket.hpp @@ -2,7 +2,7 @@ // ts/socket.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/ts/timer.hpp b/boost/asio/ts/timer.hpp old mode 100755 new mode 100644 index 264a9aa80d605e4ca51897b4ea3e9de8514b56cb..a9dea9602f713b08824036d1e581e4354c1022df --- a/boost/asio/ts/timer.hpp +++ b/boost/asio/ts/timer.hpp @@ -2,7 +2,7 @@ // ts/timer.hpp // ~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/unyield.hpp b/boost/asio/unyield.hpp old mode 100755 new mode 100644 index ee68b2ffe7057c581ea6247c558df1926a39ea4d..983a000546e06c985a28de1b725479e3ea1b4253 --- a/boost/asio/unyield.hpp +++ b/boost/asio/unyield.hpp @@ -2,7 +2,7 @@ // unyield.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/use_awaitable.hpp b/boost/asio/use_awaitable.hpp old mode 100755 new mode 100644 index 724f42b26451989a2091fd9a9b9074caa7c96383..4f13c8f6eacbb9bec869c3c5a624942648b532c6 --- a/boost/asio/use_awaitable.hpp +++ b/boost/asio/use_awaitable.hpp @@ -2,7 +2,7 @@ // use_awaitable.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -109,9 +109,9 @@ struct use_awaitable_t /// that to construct the adapted executor. template executor_with_default(const OtherExecutor& ex, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) BOOST_ASIO_NOEXCEPT + >::type = 0) BOOST_ASIO_NOEXCEPT : InnerExecutor(ex) { } diff --git a/boost/asio/use_future.hpp b/boost/asio/use_future.hpp old mode 100755 new mode 100644 index 3bedd5ba1cda83365c1e022b178d81df4b4b080e..d73ba244ca1e9a2d31d029447405a82cc0307dcd --- a/boost/asio/use_future.hpp +++ b/boost/asio/use_future.hpp @@ -2,7 +2,7 @@ // use_future.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/uses_executor.hpp b/boost/asio/uses_executor.hpp old mode 100755 new mode 100644 index e6a4c330487167e7319590a659edb502fe2aee6a..2c5a18b3a9c893713170dfe80eeab94e931f0576 --- a/boost/asio/uses_executor.hpp +++ b/boost/asio/uses_executor.hpp @@ -2,7 +2,7 @@ // uses_executor.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/version.hpp b/boost/asio/version.hpp old mode 100755 new mode 100644 index 54e04606b05fe6afdfcd8980f89a8a633e88a357..771e3930c64d91b2ae7354f69f6c72eb62a8893c --- a/boost/asio/version.hpp +++ b/boost/asio/version.hpp @@ -2,7 +2,7 @@ // version.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -18,6 +18,6 @@ // BOOST_ASIO_VERSION % 100 is the sub-minor version // BOOST_ASIO_VERSION / 100 % 1000 is the minor version // BOOST_ASIO_VERSION / 100000 is the major version -#define BOOST_ASIO_VERSION 101800 // 1.18.0 +#define BOOST_ASIO_VERSION 101802 // 1.18.2 #endif // BOOST_ASIO_VERSION_HPP diff --git a/boost/asio/wait_traits.hpp b/boost/asio/wait_traits.hpp old mode 100755 new mode 100644 index 4608449f023c4692a2c192427e2f72524426b08e..307d6e44f2c8e6857062f6b049d1d202dd88b578 --- a/boost/asio/wait_traits.hpp +++ b/boost/asio/wait_traits.hpp @@ -2,7 +2,7 @@ // wait_traits.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/windows/basic_object_handle.hpp b/boost/asio/windows/basic_object_handle.hpp old mode 100755 new mode 100644 index 6c3d9309f9f890aeed01997572284ecfc59fb520..a37ddbe6ca3d5c150609a1bc76b5c4a412ccccba --- a/boost/asio/windows/basic_object_handle.hpp +++ b/boost/asio/windows/basic_object_handle.hpp @@ -2,7 +2,7 @@ // windows/basic_object_handle.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2011 Boris Schaeling (boris@highscore.de) // // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -83,7 +83,7 @@ public: * object handle. */ explicit basic_object_handle(const executor_type& ex) - : impl_(ex) + : impl_(0, ex) { } @@ -97,11 +97,11 @@ public: */ template explicit basic_object_handle(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value, - basic_object_handle - >::type* = 0) - : impl_(context) + defaulted_constraint + >::type = defaulted_constraint()) + : impl_(0, 0, context) { } @@ -120,7 +120,7 @@ public: */ basic_object_handle(const executor_type& ex, const native_handle_type& native_handle) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().assign(impl_.get_implementation(), native_handle, ec); @@ -143,10 +143,10 @@ public: template basic_object_handle(ExecutionContext& context, const native_handle_type& native_handle, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().assign(impl_.get_implementation(), native_handle, ec); diff --git a/boost/asio/windows/basic_overlapped_handle.hpp b/boost/asio/windows/basic_overlapped_handle.hpp old mode 100755 new mode 100644 index 928c4855301abc3b2b87db0108d8b8d07816c214..a1303228343dbd26a40796160fc85d35890b0538 --- a/boost/asio/windows/basic_overlapped_handle.hpp +++ b/boost/asio/windows/basic_overlapped_handle.hpp @@ -2,7 +2,7 @@ // windows/basic_overlapped_handle.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -86,7 +86,7 @@ public: * overlapped handle. */ explicit basic_overlapped_handle(const executor_type& ex) - : impl_(ex) + : impl_(0, ex) { } @@ -100,11 +100,11 @@ public: */ template explicit basic_overlapped_handle(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value, - basic_overlapped_handle - >::type* = 0) - : impl_(context) + defaulted_constraint + >::type = defaulted_constraint()) + : impl_(0, 0, context) { } @@ -123,7 +123,7 @@ public: */ basic_overlapped_handle(const executor_type& ex, const native_handle_type& native_handle) - : impl_(ex) + : impl_(0, ex) { boost::system::error_code ec; impl_.get_service().assign(impl_.get_implementation(), native_handle, ec); @@ -146,10 +146,10 @@ public: template basic_overlapped_handle(ExecutionContext& context, const native_handle_type& native_handle, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) - : impl_(context) + >::type = 0) + : impl_(0, 0, context) { boost::system::error_code ec; impl_.get_service().assign(impl_.get_implementation(), native_handle, ec); diff --git a/boost/asio/windows/basic_random_access_handle.hpp b/boost/asio/windows/basic_random_access_handle.hpp old mode 100755 new mode 100644 index 2afa0bdd3e441e68efb37cee7ccef1cbe7e76db5..dfd17bc17aebaf4987d44b2bf1022b569425a053 --- a/boost/asio/windows/basic_random_access_handle.hpp +++ b/boost/asio/windows/basic_random_access_handle.hpp @@ -2,7 +2,7 @@ // windows/basic_random_access_handle.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -85,10 +85,10 @@ public: */ template explicit basic_random_access_handle(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value, - basic_random_access_handle - >::type* = 0) + defaulted_constraint + >::type = defaulted_constraint()) : basic_overlapped_handle(context) { } @@ -128,9 +128,9 @@ public: template basic_random_access_handle(ExecutionContext& context, const native_handle_type& handle, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_overlapped_handle(context, handle) { } diff --git a/boost/asio/windows/basic_stream_handle.hpp b/boost/asio/windows/basic_stream_handle.hpp old mode 100755 new mode 100644 index 9ed81a6258d12e34ede04c8fc33ab539b27d1395..990bf8db0cf01e96dd7ec91e81af64c677bafa06 --- a/boost/asio/windows/basic_stream_handle.hpp +++ b/boost/asio/windows/basic_stream_handle.hpp @@ -2,7 +2,7 @@ // windows/basic_stream_handle.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -87,10 +87,10 @@ public: */ template explicit basic_stream_handle(ExecutionContext& context, - typename enable_if< + typename constraint< is_convertible::value, - basic_stream_handle - >::type* = 0) + defaulted_constraint + >::type = defaulted_constraint()) : basic_overlapped_handle(context) { } @@ -129,9 +129,9 @@ public: template basic_stream_handle(ExecutionContext& context, const native_handle_type& handle, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : basic_overlapped_handle(context, handle) { } diff --git a/boost/asio/windows/object_handle.hpp b/boost/asio/windows/object_handle.hpp old mode 100755 new mode 100644 index c80358fea75fbec7bfb62e51b96e62bf3f6f6088..a15c9d9be5349e76ee843fd28eb5f150be0ad406 --- a/boost/asio/windows/object_handle.hpp +++ b/boost/asio/windows/object_handle.hpp @@ -2,7 +2,7 @@ // windows/object_handle.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2011 Boris Schaeling (boris@highscore.de) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/boost/asio/windows/overlapped_handle.hpp b/boost/asio/windows/overlapped_handle.hpp old mode 100755 new mode 100644 index df9953ee93e482a1e2a9ca8564d85bd34f1b66f6..5ccc8b768623e5a8b172a60ce1299968c9990e54 --- a/boost/asio/windows/overlapped_handle.hpp +++ b/boost/asio/windows/overlapped_handle.hpp @@ -2,7 +2,7 @@ // windows/overlapped_handle.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/windows/overlapped_ptr.hpp b/boost/asio/windows/overlapped_ptr.hpp old mode 100755 new mode 100644 index 4dd487c699d7f365f00cf356b6c1071135a737e3..299a4a4d8b30f2545dd16ca22386c996685a1761 --- a/boost/asio/windows/overlapped_ptr.hpp +++ b/boost/asio/windows/overlapped_ptr.hpp @@ -2,7 +2,7 @@ // windows/overlapped_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -53,9 +53,9 @@ public: template explicit overlapped_ptr(ExecutionContext& context, BOOST_ASIO_MOVE_ARG(Handler) handler, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) : impl_(context.get_executor(), BOOST_ASIO_MOVE_CAST(Handler)(handler)) { } @@ -64,10 +64,10 @@ public: template explicit overlapped_ptr(const Executor& ex, BOOST_ASIO_MOVE_ARG(Handler) handler, - typename enable_if< + typename constraint< execution::is_executor::value || is_executor::value - >::type* = 0) + >::type = 0) : impl_(ex, BOOST_ASIO_MOVE_CAST(Handler)(handler)) { } @@ -87,9 +87,9 @@ public: /// object. template void reset(ExecutionContext& context, BOOST_ASIO_MOVE_ARG(Handler) handler, - typename enable_if< + typename constraint< is_convertible::value - >::type* = 0) + >::type = 0) { impl_.reset(context.get_executor(), BOOST_ASIO_MOVE_CAST(Handler)(handler)); } @@ -98,10 +98,10 @@ public: /// object. template void reset(const Executor& ex, BOOST_ASIO_MOVE_ARG(Handler) handler, - typename enable_if< + typename constraint< execution::is_executor::value || is_executor::value - >::type* = 0) + >::type = 0) { impl_.reset(ex, BOOST_ASIO_MOVE_CAST(Handler)(handler)); } diff --git a/boost/asio/windows/random_access_handle.hpp b/boost/asio/windows/random_access_handle.hpp old mode 100755 new mode 100644 index bd6696b4dfa3169c1dabb3e89f85374f17adee6d..8692bc14322a257f5fc1efd6a7b31fa1aff8f92d --- a/boost/asio/windows/random_access_handle.hpp +++ b/boost/asio/windows/random_access_handle.hpp @@ -2,7 +2,7 @@ // windows/random_access_handle.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/windows/stream_handle.hpp b/boost/asio/windows/stream_handle.hpp old mode 100755 new mode 100644 index 59f08b98c16b6fc0706712e69e2c641be7aa020a..a7ae638848e3dac3a4148ef1e8c483dc9641963a --- a/boost/asio/windows/stream_handle.hpp +++ b/boost/asio/windows/stream_handle.hpp @@ -2,7 +2,7 @@ // windows/stream_handle.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/write.hpp b/boost/asio/write.hpp old mode 100755 new mode 100644 index 20cb9a8a399afaec7f50df012217450f3722aa67..11dd505197bfd42f297cf1c0a179a01838a2adc7 --- a/boost/asio/write.hpp +++ b/boost/asio/write.hpp @@ -2,7 +2,7 @@ // write.hpp // ~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) @@ -76,9 +76,9 @@ namespace asio { */ template std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, - typename enable_if< + typename constraint< is_const_buffer_sequence::value - >::type* = 0); + >::type = 0); /// Write all of the supplied data to a stream before returning. /** @@ -119,9 +119,9 @@ std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, template std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_const_buffer_sequence::value - >::type* = 0); + >::type = 0); /// Write a certain amount of data to a stream before returning. /** @@ -173,9 +173,9 @@ template std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, CompletionCondition completion_condition, - typename enable_if< + typename constraint< is_const_buffer_sequence::value - >::type* = 0); + >::type = 0); /// Write a certain amount of data to a stream before returning. /** @@ -220,9 +220,9 @@ template std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, CompletionCondition completion_condition, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_const_buffer_sequence::value - >::type* = 0); + >::type = 0); #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1) @@ -256,10 +256,12 @@ std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers, template std::size_t write(SyncWriteStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); /// Write all of the supplied data to a stream before returning. /** @@ -292,10 +294,12 @@ template std::size_t write(SyncWriteStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); /// Write a certain amount of data to a stream before returning. /** @@ -338,10 +342,12 @@ template ::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); /// Write a certain amount of data to a stream before returning. /** @@ -385,10 +391,12 @@ template ::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); #if !defined(BOOST_ASIO_NO_EXTENSIONS) #if !defined(BOOST_ASIO_NO_IOSTREAM) @@ -566,9 +574,9 @@ std::size_t write(SyncWriteStream& s, basic_streambuf& b, */ template std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /// Write all of the supplied data to a stream before returning. /** @@ -600,9 +608,9 @@ std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, template std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /// Write a certain amount of data to a stream before returning. /** @@ -644,9 +652,9 @@ template std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, CompletionCondition completion_condition, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /// Write a certain amount of data to a stream before returning. /** @@ -689,9 +697,9 @@ template std::size_t write(SyncWriteStream& s, DynamicBuffer_v2 buffers, CompletionCondition completion_condition, boost::system::error_code& ec, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /*@}*/ /** @@ -765,9 +773,9 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers, BOOST_ASIO_MOVE_ARG(WriteHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncWriteStream::executor_type), - typename enable_if< + typename constraint< is_const_buffer_sequence::value - >::type* = 0); + >::type = 0); /// Start an asynchronous operation to write a certain amount of data to a /// stream. @@ -845,9 +853,9 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler, async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers, CompletionCondition completion_condition, BOOST_ASIO_MOVE_ARG(WriteHandler) handler, - typename enable_if< + typename constraint< is_const_buffer_sequence::value - >::type* = 0); + >::type = 0); #if !defined(BOOST_ASIO_NO_DYNAMIC_BUFFER_V1) @@ -906,10 +914,12 @@ async_write(AsyncWriteStream& s, BOOST_ASIO_MOVE_ARG(WriteHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncWriteStream::executor_type), - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); /// Start an asynchronous operation to write a certain amount of data to a /// stream. @@ -978,10 +988,12 @@ async_write(AsyncWriteStream& s, BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers, CompletionCondition completion_condition, BOOST_ASIO_MOVE_ARG(WriteHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v1::type>::value - && !is_dynamic_buffer_v2::type>::value - >::type* = 0); + >::type = 0, + typename constraint< + !is_dynamic_buffer_v2::type>::value + >::type = 0); #if !defined(BOOST_ASIO_NO_EXTENSIONS) #if !defined(BOOST_ASIO_NO_IOSTREAM) @@ -1162,9 +1174,9 @@ async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers, BOOST_ASIO_MOVE_ARG(WriteHandler) handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN( typename AsyncWriteStream::executor_type), - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /// Start an asynchronous operation to write a certain amount of data to a /// stream. @@ -1232,9 +1244,9 @@ BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler, async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers, CompletionCondition completion_condition, BOOST_ASIO_MOVE_ARG(WriteHandler) handler, - typename enable_if< + typename constraint< is_dynamic_buffer_v2::value - >::type* = 0); + >::type = 0); /*@}*/ diff --git a/boost/asio/write_at.hpp b/boost/asio/write_at.hpp old mode 100755 new mode 100644 index f8c79a45c23030aad24939a51d33e57eaeacb69b..680ac007a10449854dc0f7102d64483ccbcba981 --- a/boost/asio/write_at.hpp +++ b/boost/asio/write_at.hpp @@ -2,7 +2,7 @@ // write_at.hpp // ~~~~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/asio/yield.hpp b/boost/asio/yield.hpp old mode 100755 new mode 100644 index afdec0137bf3769ced242ce59c72b3dc14f1fc7f..5f9ddd007b9d2e0f4e44ee75a8e958d138443ee9 --- a/boost/asio/yield.hpp +++ b/boost/asio/yield.hpp @@ -2,7 +2,7 @@ // yield.hpp // ~~~~~~~~~ // -// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // 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) diff --git a/boost/beast.hpp b/boost/beast.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/http/icy_stream.hpp b/boost/beast/_experimental/http/icy_stream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/http/impl/icy_stream.hpp b/boost/beast/_experimental/http/impl/icy_stream.hpp old mode 100755 new mode 100644 index c2760c558967c68c0039a3c540e2552a5883d9ce..308d61a9905cf0b58509ffdd9aadc93eb2418ded --- a/boost/beast/_experimental/http/impl/icy_stream.hpp +++ b/boost/beast/_experimental/http/impl/icy_stream.hpp @@ -95,10 +95,16 @@ public: { // Try to read the first three characters BOOST_ASIO_CORO_YIELD - s_.next_layer().async_read_some( - net::mutable_buffer( - s_.buf_ + s_.n_, 3 - s_.n_), - std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "http::icy_stream::async_read_some")); + + s_.next_layer().async_read_some( + net::mutable_buffer( + s_.buf_ + s_.n_, 3 - s_.n_), + std::move(*this)); + } s_.n_ += static_cast(bytes_transferred); if(ec) goto upcall; @@ -127,8 +133,14 @@ public: else { BOOST_ASIO_CORO_YIELD - s_.next_layer().async_read_some( - b_, std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "http::icy_stream::async_read_some")); + + s_.next_layer().async_read_some( + b_, std::move(*this)); + } } upcall: if(! cont) @@ -136,9 +148,15 @@ public: ec_ = ec; n_ = bytes_transferred; BOOST_ASIO_CORO_YIELD - s_.next_layer().async_read_some( - net::mutable_buffer{}, - std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "http::icy_stream::async_read_some")); + + s_.next_layer().async_read_some( + net::mutable_buffer{}, + std::move(*this)); + } ec = ec_; bytes_transferred = n_; } diff --git a/boost/beast/_experimental/test/detail/stream_state.hpp b/boost/beast/_experimental/test/detail/stream_state.hpp new file mode 100644 index 0000000000000000000000000000000000000000..5df55cf3f9cfb3bada8cee4011daccf39f40f5f1 --- /dev/null +++ b/boost/beast/_experimental/test/detail/stream_state.hpp @@ -0,0 +1,135 @@ +// +// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) +// Copyright (c) 2020 Richard Hodges (hodges.r@gmail.com) +// +// 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) +// +// Official repository: https://github.com/boostorg/beast +// + +#ifndef BOOST_BEAST_TEST_DETAIL_STREAM_STATE_HPP +#define BOOST_BEAST_TEST_DETAIL_STREAM_STATE_HPP + +#include +#include +#include + +#include +#include +#include +#include + +namespace boost { +namespace beast { +namespace test { +namespace detail { + +struct stream_state; + +struct stream_service_impl +{ + std::mutex m_; + std::vector v_; + + BOOST_BEAST_DECL + void + remove(stream_state& impl); +}; + +//------------------------------------------------------------------------------ + +class stream_service + : public beast::detail::service_base +{ + boost::shared_ptr sp_; + + BOOST_BEAST_DECL + void + shutdown() override; + +public: + BOOST_BEAST_DECL + explicit + stream_service(net::execution_context& ctx); + + BOOST_BEAST_DECL + static + auto + make_impl( + net::any_io_executor exec, + test::fail_count* fc) -> + boost::shared_ptr; +}; + +//------------------------------------------------------------------------------ + +struct stream_read_op_base +{ + virtual ~stream_read_op_base() = default; + virtual void operator()(error_code ec) = 0; +}; + +//------------------------------------------------------------------------------ + +enum class stream_status +{ + ok, + eof, +}; + +//------------------------------------------------------------------------------ + +struct stream_state +{ + net::any_io_executor exec; + boost::weak_ptr wp; + std::mutex m; + flat_buffer b; + std::condition_variable cv; + std::unique_ptr op; + stream_status code = stream_status::ok; + fail_count* fc = nullptr; + std::size_t nread = 0; + std::size_t nread_bytes = 0; + std::size_t nwrite = 0; + std::size_t nwrite_bytes = 0; + std::size_t read_max = + (std::numeric_limits::max)(); + std::size_t write_max = + (std::numeric_limits::max)(); + + BOOST_BEAST_DECL + stream_state( + net::any_io_executor exec_, + boost::weak_ptr wp_, + fail_count* fc_); + + BOOST_BEAST_DECL + ~stream_state(); + + BOOST_BEAST_DECL + void + remove() noexcept; + + BOOST_BEAST_DECL + void + notify_read(); + + BOOST_BEAST_DECL + void + cancel_read(); +}; + + + +} // detail +} // test +} // beast +} // boost + +#ifdef BOOST_BEAST_HEADER_ONLY +#include +#endif + +#endif // BOOST_BEAST_TEST_DETAIL_STREAM_STATE_HPP diff --git a/boost/beast/_experimental/test/detail/stream_state.ipp b/boost/beast/_experimental/test/detail/stream_state.ipp new file mode 100644 index 0000000000000000000000000000000000000000..c86c7e97777f2638bc0a8d055fec679af96ce369 --- /dev/null +++ b/boost/beast/_experimental/test/detail/stream_state.ipp @@ -0,0 +1,149 @@ +// +// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) +// Copyright (c) 2020 Richard Hodges (hodges.r@gmail.com) +// +// 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) +// +// Official repository: https://github.com/boostorg/beast +// + +#ifndef BOOST_BEAST_TEST_DETAIL_STREAM_STATE_IPP +#define BOOST_BEAST_TEST_DETAIL_STREAM_STATE_IPP + +#include + +namespace boost { +namespace beast { +namespace test { + +namespace detail { + +//------------------------------------------------------------------------------ + +stream_service:: +stream_service(net::execution_context& ctx) + : beast::detail::service_base(ctx) + , sp_(boost::make_shared()) +{ +} + +void +stream_service:: +shutdown() +{ + std::vector> v; + std::lock_guard g1(sp_->m_); + v.reserve(sp_->v_.size()); + for(auto p : sp_->v_) + { + std::lock_guard g2(p->m); + v.emplace_back(std::move(p->op)); + p->code = detail::stream_status::eof; + } +} + +auto +stream_service:: +make_impl( + net::any_io_executor exec, + test::fail_count* fc) -> + boost::shared_ptr +{ +#if defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) + auto& ctx = exec.context(); +#else + auto& ctx = net::query( + exec, + net::execution::context); +#endif + auto& svc = net::use_service(ctx); + auto sp = boost::make_shared(exec, svc.sp_, fc); + std::lock_guard g(svc.sp_->m_); + svc.sp_->v_.push_back(sp.get()); + return sp; +} + +//------------------------------------------------------------------------------ + +void +stream_service_impl:: +remove(stream_state& impl) +{ + std::lock_guard g(m_); + *std::find( + v_.begin(), v_.end(), + &impl) = std::move(v_.back()); + v_.pop_back(); +} + +//------------------------------------------------------------------------------ + +stream_state:: +stream_state( + net::any_io_executor exec_, + boost::weak_ptr wp_, + fail_count* fc_) + : exec(std::move(exec_)) + , wp(std::move(wp_)) + , fc(fc_) +{ +} + +stream_state:: +~stream_state() +{ + // cancel outstanding read + if(op != nullptr) + (*op)(net::error::operation_aborted); +} + +void +stream_state:: +remove() noexcept +{ + auto sp = wp.lock(); + + // If this goes off, it means the lifetime of a test::stream object + // extended beyond the lifetime of the associated execution context. + BOOST_ASSERT(sp); + + sp->remove(*this); +} + +void +stream_state:: +notify_read() +{ + if(op) + { + auto op_ = std::move(op); + op_->operator()(error_code{}); + } + else + { + cv.notify_all(); + } +} + +void +stream_state:: +cancel_read() +{ + std::unique_ptr p; + { + std::lock_guard lock(m); + code = stream_status::eof; + p = std::move(op); + } + if(p != nullptr) + (*p)(net::error::operation_aborted); +} + +} // detail + +} // test +} // beast +} // boost + +#endif // BOOST_BEAST_TEST_DETAIL_STREAM_STATE_IPP diff --git a/boost/beast/_experimental/test/error.hpp b/boost/beast/_experimental/test/error.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/test/fail_count.hpp b/boost/beast/_experimental/test/fail_count.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/test/handler.hpp b/boost/beast/_experimental/test/handler.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/test/impl/error.hpp b/boost/beast/_experimental/test/impl/error.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/test/impl/error.ipp b/boost/beast/_experimental/test/impl/error.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/test/impl/fail_count.ipp b/boost/beast/_experimental/test/impl/fail_count.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/test/impl/stream.hpp b/boost/beast/_experimental/test/impl/stream.hpp old mode 100755 new mode 100644 index f7eac6afdbbe2d579e23a50583a91bc686a80e9f..5702583329db6fccbf4f0a1d82dd8c75e20309b2 --- a/boost/beast/_experimental/test/impl/stream.hpp +++ b/boost/beast/_experimental/test/impl/stream.hpp @@ -27,53 +27,19 @@ namespace test { //------------------------------------------------------------------------------ -struct stream::service_impl -{ - std::mutex m_; - std::vector v_; - - BOOST_BEAST_DECL - void - remove(state& impl); -}; - -class stream::service - : public beast::detail::service_base -{ - boost::shared_ptr sp_; - - BOOST_BEAST_DECL - void - shutdown() override; - -public: - BOOST_BEAST_DECL - explicit - service(net::execution_context& ctx); - - BOOST_BEAST_DECL - static - auto - make_impl( - net::io_context& ctx, - test::fail_count* fc) -> - boost::shared_ptr; -}; - -//------------------------------------------------------------------------------ - +template template -class stream::read_op : public stream::read_op_base +class basic_stream::read_op : public detail::stream_read_op_base { using ex1_type = - net::io_context::executor_type; + executor_type; using ex2_type = net::associated_executor_t; struct lambda { Handler h_; - boost::weak_ptr wp_; + boost::weak_ptr wp_; Buffers b_; #if defined(BOOST_ASIO_NO_TS_EXECUTORS) net::any_io_executor wg2_; @@ -87,7 +53,7 @@ class stream::read_op : public stream::read_op_base template lambda( Handler_&& h, - boost::shared_ptr const& s, + boost::shared_ptr const& s, Buffers const& b) : h_(std::forward(h)) , wp_(s) @@ -95,11 +61,11 @@ class stream::read_op : public stream::read_op_base #if defined(BOOST_ASIO_NO_TS_EXECUTORS) , wg2_(net::prefer( net::get_associated_executor( - h_, s->ioc.get_executor()), + h_, s->exec), net::execution::outstanding_work.tracked)) #else // defined(BOOST_ASIO_NO_TS_EXECUTORS) , wg2_(net::get_associated_executor( - h_, s->ioc.get_executor())) + h_, s->exec)) #endif // defined(BOOST_ASIO_NO_TS_EXECUTORS) { } @@ -151,43 +117,44 @@ class stream::read_op : public stream::read_op_base }; lambda fn_; -#if defined(BOOST_ASIO_NO_TS_EXECUTORS) +#if defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) + net::executor_work_guard wg1_; +#else net::any_io_executor wg1_; -#else // defined(BOOST_ASIO_NO_TS_EXECUTORS) - net::executor_work_guard wg1_; -#endif // defined(BOOST_ASIO_NO_TS_EXECUTORS) +#endif public: template read_op( Handler_&& h, - boost::shared_ptr const& s, + boost::shared_ptr const& s, Buffers const& b) : fn_(std::forward(h), s, b) -#if defined(BOOST_ASIO_NO_TS_EXECUTORS) - , wg1_(net::prefer(s->ioc.get_executor(), +#if defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) + , wg1_(s->exec) +#else + , wg1_(net::prefer(s->exec, net::execution::outstanding_work.tracked)) -#else // defined(BOOST_ASIO_NO_TS_EXECUTORS) - , wg1_(s->ioc.get_executor()) -#endif // defined(BOOST_ASIO_NO_TS_EXECUTORS) +#endif { } void operator()(error_code ec) override { -#if defined(BOOST_ASIO_NO_TS_EXECUTORS) - net::post(wg1_, beast::bind_front_handler(std::move(fn_), ec)); - wg1_ = net::any_io_executor(); // probably unnecessary -#else // defined(BOOST_ASIO_NO_TS_EXECUTORS) +#if defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) net::post(wg1_.get_executor(), beast::bind_front_handler(std::move(fn_), ec)); wg1_.reset(); -#endif // defined(BOOST_ASIO_NO_TS_EXECUTORS) +#else + net::post(wg1_, beast::bind_front_handler(std::move(fn_), ec)); + wg1_ = net::any_io_executor(); // probably unnecessary +#endif } }; -struct stream::run_read_op +template +struct basic_stream::run_read_op { template< class ReadHandler, @@ -195,7 +162,7 @@ struct stream::run_read_op void operator()( ReadHandler&& h, - boost::shared_ptr const& in, + boost::shared_ptr const& in, MutableBufferSequence const& buffers) { // If you get an error on the following line it means @@ -209,7 +176,7 @@ struct stream::run_read_op initiate_read( in, - std::unique_ptr{ + std::unique_ptr{ new read_op< typename std::decay::type, MutableBufferSequence>( @@ -220,7 +187,8 @@ struct stream::run_read_op } }; -struct stream::run_write_op +template +struct basic_stream::run_write_op { template< class WriteHandler, @@ -228,8 +196,8 @@ struct stream::run_write_op void operator()( WriteHandler&& h, - boost::shared_ptr in_, - boost::weak_ptr out_, + boost::shared_ptr in_, + boost::weak_ptr out_, ConstBufferSequence const& buffers) { // If you get an error on the following line it means @@ -245,7 +213,7 @@ struct stream::run_write_op auto const upcall = [&](error_code ec, std::size_t n) { net::post( - in_->ioc.get_executor(), + in_->exec, beast::bind_front_handler(std::move(h), ec, n)); }; @@ -281,9 +249,10 @@ struct stream::run_write_op //------------------------------------------------------------------------------ +template template std::size_t -stream:: +basic_stream:: read_some(MutableBufferSequence const& buffers) { static_assert(net::is_mutable_buffer_sequence< @@ -296,9 +265,10 @@ read_some(MutableBufferSequence const& buffers) return n; } +template template std::size_t -stream:: +basic_stream:: read_some(MutableBufferSequence const& buffers, error_code& ec) { @@ -326,7 +296,7 @@ read_some(MutableBufferSequence const& buffers, { return in_->b.size() > 0 || - in_->code != status::ok; + in_->code != detail::stream_status::ok; }); // deliver bytes before eof @@ -340,14 +310,16 @@ read_some(MutableBufferSequence const& buffers, } // deliver error - BOOST_ASSERT(in_->code != status::ok); + BOOST_ASSERT(in_->code != detail::stream_status::ok); ec = net::error::eof; return 0; } -template -BOOST_BEAST_ASYNC_RESULT2(ReadHandler) -stream:: +template +template +BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, void(error_code, std::size_t)) +basic_stream:: async_read_some( MutableBufferSequence const& buffers, ReadHandler&& handler) @@ -365,9 +337,10 @@ async_read_some( buffers); } +template template std::size_t -stream:: +basic_stream:: write_some(ConstBufferSequence const& buffers) { static_assert(net::is_const_buffer_sequence< @@ -381,9 +354,10 @@ write_some(ConstBufferSequence const& buffers) return bytes_transferred; } +template template std::size_t -stream:: +basic_stream:: write_some( ConstBufferSequence const& buffers, error_code& ec) { @@ -425,9 +399,11 @@ write_some( return n; } -template -BOOST_BEAST_ASYNC_RESULT2(WriteHandler) -stream:: +template +template +BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, void(error_code, std::size_t)) +basic_stream:: async_write_some( ConstBufferSequence const& buffers, WriteHandler&& handler) @@ -448,11 +424,11 @@ async_write_some( //------------------------------------------------------------------------------ -template +template void async_teardown( role_type, - stream& s, + basic_stream& s, TeardownHandler&& handler) { error_code ec; @@ -477,8 +453,8 @@ async_teardown( //------------------------------------------------------------------------------ -template -stream +template +basic_stream connect(stream& to, Arg1&& arg1, ArgN&&... argn) { stream from{ @@ -488,6 +464,34 @@ connect(stream& to, Arg1&& arg1, ArgN&&... argn) return from; } +namespace detail +{ +template +struct extract_executor_op +{ + To operator()(net::any_io_executor& ex) const + { + assert(ex.template target()); + return *ex.template target(); + } +}; + +template<> +struct extract_executor_op +{ + net::any_io_executor operator()(net::any_io_executor& ex) const + { + return ex; + } +}; +} + +template +auto basic_stream::get_executor() noexcept -> executor_type +{ + return detail::extract_executor_op()(in_->exec); +} + } // test } // beast } // boost diff --git a/boost/beast/_experimental/test/impl/stream.ipp b/boost/beast/_experimental/test/impl/stream.ipp old mode 100755 new mode 100644 index ec544ce15991add7c7f3ff1cb8fff2dd5e0d7393..98ddea9003bdad5e8e9b58828ddd016b44a2ac5a --- a/boost/beast/_experimental/test/impl/stream.ipp +++ b/boost/beast/_experimental/test/impl/stream.ipp @@ -23,62 +23,10 @@ namespace test { //------------------------------------------------------------------------------ -stream:: -service:: -service(net::execution_context& ctx) - : beast::detail::service_base(ctx) - , sp_(boost::make_shared()) -{ -} - -void -stream:: -service:: -shutdown() -{ - std::vector> v; - std::lock_guard g1(sp_->m_); - v.reserve(sp_->v_.size()); - for(auto p : sp_->v_) - { - std::lock_guard g2(p->m); - v.emplace_back(std::move(p->op)); - p->code = status::eof; - } -} - -auto -stream:: -service:: -make_impl( - net::io_context& ctx, - test::fail_count* fc) -> - boost::shared_ptr -{ - auto& svc = net::use_service(ctx); - auto sp = boost::make_shared(ctx, svc.sp_, fc); - std::lock_guard g(svc.sp_->m_); - svc.sp_->v_.push_back(sp.get()); - return sp; -} - -void -stream:: -service_impl:: -remove(state& impl) -{ - std::lock_guard g(m_); - *std::find( - v_.begin(), v_.end(), - &impl) = std::move(v_.back()); - v_.pop_back(); -} - -//------------------------------------------------------------------------------ - -void stream::initiate_read( - boost::shared_ptr const& in_, - std::unique_ptr&& op, +template +void basic_stream::initiate_read( + boost::shared_ptr const& in_, + std::unique_ptr&& op, std::size_t buf_size) { std::unique_lock lock(in_->m); @@ -106,7 +54,7 @@ void stream::initiate_read( } // deliver error - if(in_->code != status::ok) + if(in_->code != detail::stream_status::ok) { lock.unlock(); (*op)(net::error::eof); @@ -117,98 +65,36 @@ void stream::initiate_read( in_->op = std::move(op); } -stream:: -state:: -state( - net::io_context& ioc_, - boost::weak_ptr wp_, - fail_count* fc_) - : ioc(ioc_) - , wp(std::move(wp_)) - , fc(fc_) -{ -} - -stream:: -state:: -~state() -{ - // cancel outstanding read - if(op != nullptr) - (*op)(net::error::operation_aborted); -} - -void -stream:: -state:: -remove() noexcept -{ - auto sp = wp.lock(); - - // If this goes off, it means the lifetime of a test::stream object - // extended beyond the lifetime of the associated execution context. - BOOST_ASSERT(sp); - - sp->remove(*this); -} - -void -stream:: -state:: -notify_read() -{ - if(op) - { - auto op_ = std::move(op); - op_->operator()(error_code{}); - } - else - { - cv.notify_all(); - } -} - -void -stream:: -state:: -cancel_read() -{ - std::unique_ptr p; - { - std::lock_guard lock(m); - code = status::eof; - p = std::move(op); - } - if(p != nullptr) - (*p)(net::error::operation_aborted); -} - //------------------------------------------------------------------------------ -stream:: -~stream() +template +basic_stream:: +~basic_stream() { close(); in_->remove(); } -stream:: -stream(stream&& other) +template +basic_stream:: +basic_stream(basic_stream&& other) { - auto in = service::make_impl( - other.in_->ioc, other.in_->fc); + auto in = detail::stream_service::make_impl( + other.in_->exec, other.in_->fc); in_ = std::move(other.in_); out_ = std::move(other.out_); other.in_ = in; } -stream& -stream:: -operator=(stream&& other) + +template +basic_stream& +basic_stream:: +operator=(basic_stream&& other) { close(); - auto in = service::make_impl( - other.in_->ioc, other.in_->fc); + auto in = detail::stream_service::make_impl( + other.in_->exec, other.in_->fc); in_->remove(); in_ = std::move(other.in_); out_ = std::move(other.out_); @@ -218,46 +104,51 @@ operator=(stream&& other) //------------------------------------------------------------------------------ -stream:: -stream(net::io_context& ioc) - : in_(service::make_impl(ioc, nullptr)) +template +basic_stream:: +basic_stream(executor_type exec) + : in_(detail::stream_service::make_impl(std::move(exec), nullptr)) { } -stream:: -stream( +template +basic_stream:: +basic_stream( net::io_context& ioc, fail_count& fc) - : in_(service::make_impl(ioc, &fc)) + : in_(detail::stream_service::make_impl(ioc.get_executor(), &fc)) { } -stream:: -stream( +template +basic_stream:: +basic_stream( net::io_context& ioc, string_view s) - : in_(service::make_impl(ioc, nullptr)) + : in_(detail::stream_service::make_impl(ioc.get_executor(), nullptr)) { in_->b.commit(net::buffer_copy( in_->b.prepare(s.size()), net::buffer(s.data(), s.size()))); } -stream:: -stream( +template +basic_stream:: +basic_stream( net::io_context& ioc, fail_count& fc, string_view s) - : in_(service::make_impl(ioc, &fc)) + : in_(detail::stream_service::make_impl(ioc.get_executor(), &fc)) { in_->b.commit(net::buffer_copy( in_->b.prepare(s.size()), net::buffer(s.data(), s.size()))); } +template void -stream:: -connect(stream& remote) +basic_stream:: +connect(basic_stream& remote) { BOOST_ASSERT(! out_.lock()); BOOST_ASSERT(! remote.out_.lock()); @@ -266,12 +157,13 @@ connect(stream& remote) std::lock_guard guard2{remote.in_->m, std::adopt_lock}; out_ = remote.in_; remote.out_ = in_; - in_->code = status::ok; - remote.in_->code = status::ok; + in_->code = detail::stream_status::ok; + remote.in_->code = detail::stream_status::ok; } +template string_view -stream:: +basic_stream:: str() const { auto const bs = in_->b.data(); @@ -281,8 +173,9 @@ str() const return {static_cast(b.data()), b.size()}; } +template void -stream:: +basic_stream:: append(string_view s) { std::lock_guard lock{in_->m}; @@ -291,16 +184,18 @@ append(string_view s) net::buffer(s.data(), s.size()))); } +template void -stream:: +basic_stream:: clear() { std::lock_guard lock{in_->m}; in_->b.consume(in_->b.size()); } +template void -stream:: +basic_stream:: close() { in_->cancel_read(); @@ -314,31 +209,33 @@ close() if(out) { std::lock_guard lock(out->m); - if(out->code == status::ok) + if(out->code == detail::stream_status::ok) { - out->code = status::eof; + out->code = detail::stream_status::eof; out->notify_read(); } } } } +template void -stream:: +basic_stream:: close_remote() { std::lock_guard lock{in_->m}; - if(in_->code == status::ok) + if(in_->code == detail::stream_status::ok) { - in_->code = status::eof; + in_->code = detail::stream_status::eof; in_->notify_read(); } } +template void teardown( role_type, - stream& s, + basic_stream& s, boost::system::error_code& ec) { if( s.in_->fc && @@ -356,20 +253,18 @@ teardown( //------------------------------------------------------------------------------ -stream -connect(stream& to) +template +basic_stream +connect(basic_stream& to) { -#if defined(BOOST_ASIO_NO_TS_EXECUTORS) - stream from{net::query(to.get_executor(), net::execution::context)}; -#else // defined(BOOST_ASIO_NO_TS_EXECUTORS) - stream from{to.get_executor().context()}; -#endif // defined(BOOST_ASIO_NO_TS_EXECUTORS) + basic_stream from(to.get_executor()); from.connect(to); return from; } +template void -connect(stream& s1, stream& s2) +connect(basic_stream& s1, basic_stream& s2) { s1.connect(s2); } diff --git a/boost/beast/_experimental/test/stream.hpp b/boost/beast/_experimental/test/stream.hpp old mode 100755 new mode 100644 index 9d829530c1e5c17239d42b3a5e699fd992b3922e..f96269234b99fb856cf52b3caf4c2ba3a4112fdf --- a/boost/beast/_experimental/test/stream.hpp +++ b/boost/beast/_experimental/test/stream.hpp @@ -16,10 +16,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -106,71 +108,45 @@ namespace test { @li AsyncReadStream @li AsyncWriteStream */ -class stream -{ - struct state; +template +class basic_stream; - boost::shared_ptr in_; - boost::weak_ptr out_; +template +void +teardown( + role_type, + basic_stream& s, + boost::system::error_code& ec); - enum class status - { - ok, - eof, - }; +template +void +async_teardown( + role_type role, + basic_stream& s, + TeardownHandler&& handler); - class service; - struct service_impl; +template +class basic_stream +{ +public: + /// The type of the executor associated with the object. + using executor_type = + Executor; - struct read_op_base + /// Rebinds the socket type to another executor. + template + struct rebind_executor { - virtual ~read_op_base() = default; - virtual void operator()(error_code ec) = 0; + /// The socket type when rebound to the specified executor. + typedef basic_stream other; }; - struct state - { - friend class stream; - - net::io_context& ioc; - boost::weak_ptr wp; - std::mutex m; - flat_buffer b; - std::condition_variable cv; - std::unique_ptr op; - status code = status::ok; - fail_count* fc = nullptr; - std::size_t nread = 0; - std::size_t nread_bytes = 0; - std::size_t nwrite = 0; - std::size_t nwrite_bytes = 0; - std::size_t read_max = - (std::numeric_limits::max)(); - std::size_t write_max = - (std::numeric_limits::max)(); - - BOOST_BEAST_DECL - state( - net::io_context& ioc_, - boost::weak_ptr wp_, - fail_count* fc_); - - - BOOST_BEAST_DECL - ~state(); - - BOOST_BEAST_DECL - void - remove() noexcept; - - BOOST_BEAST_DECL - void - notify_read(); - - BOOST_BEAST_DECL - void - cancel_read(); - }; +private: + template + friend class basic_stream; + + boost::shared_ptr in_; + boost::weak_ptr out_; template class read_op; @@ -178,14 +154,34 @@ class stream struct run_read_op; struct run_write_op; - BOOST_BEAST_DECL static void initiate_read( - boost::shared_ptr const& in, - std::unique_ptr&& op, + boost::shared_ptr const& in, + std::unique_ptr&& op, std::size_t buf_size); +#if ! BOOST_BEAST_DOXYGEN + // boost::asio::ssl::stream needs these + // DEPRECATED + template + friend class boost::asio::ssl::stream; + // DEPRECATED + using lowest_layer_type = basic_stream; + // DEPRECATED + lowest_layer_type& + lowest_layer() noexcept + { + return *this; + } + // DEPRECATED + lowest_layer_type const& + lowest_layer() const noexcept + { + return *this; + } +#endif + public: using buffer_type = flat_buffer; @@ -199,25 +195,40 @@ public: the peer will see the error `net::error::connection_reset` when performing any reads or writes. */ - BOOST_BEAST_DECL - ~stream(); + ~basic_stream(); /** Move Constructor Moving the stream while asynchronous operations are pending results in undefined behavior. */ - BOOST_BEAST_DECL - stream(stream&& other); + basic_stream(basic_stream&& other); + + /** Move Constructor + + Moving the stream while asynchronous operations are pending + results in undefined behavior. + */ + template + basic_stream(basic_stream&& other) + : in_(std::move(other.in_)) + , out_(std::move(other.out_)) + { + assert(in_->exec.target_type() == typeid(Executor2)); + in_->exec = executor_type(*in_->exec.template target()); + } /** Move Assignment Moving the stream while asynchronous operations are pending results in undefined behavior. */ - BOOST_BEAST_DECL - stream& - operator=(stream&& other); + basic_stream& + operator=(basic_stream&& other); + + template + basic_stream& + operator==(basic_stream&& other); /** Construct a stream @@ -226,9 +237,24 @@ public: @param ioc The `io_context` object that the stream will use to dispatch handlers for any asynchronous operations. */ - BOOST_BEAST_DECL + template + explicit basic_stream(ExecutionContext& context, + typename std::enable_if< + std::is_convertible::value + >::type* = 0) + : basic_stream(context.get_executor()) + { + } + + /** Construct a stream + + The stream will be created in a disconnected state. + + @param exec The `executor` object that the stream will use to + dispatch handlers for any asynchronous operations. + */ explicit - stream(net::io_context& ioc); + basic_stream(executor_type exec); /** Construct a stream @@ -242,8 +268,7 @@ public: fail count. When the fail count reaches its internal limit, a simulated failure error will be raised. */ - BOOST_BEAST_DECL - stream( + basic_stream( net::io_context& ioc, fail_count& fc); @@ -257,8 +282,7 @@ public: @param s A string which will be appended to the input area, not including the null terminator. */ - BOOST_BEAST_DECL - stream( + basic_stream( net::io_context& ioc, string_view s); @@ -277,27 +301,18 @@ public: @param s A string which will be appended to the input area, not including the null terminator. */ - BOOST_BEAST_DECL - stream( + basic_stream( net::io_context& ioc, fail_count& fc, string_view s); /// Establish a connection - BOOST_BEAST_DECL void - connect(stream& remote); - - /// The type of the executor associated with the object. - using executor_type = - net::io_context::executor_type; + connect(basic_stream& remote); /// Return the executor associated with the object. executor_type - get_executor() noexcept - { - return in_->ioc.get_executor(); - }; + get_executor() noexcept; /// Set the maximum number of bytes returned by read_some void @@ -321,17 +336,14 @@ public: } /// Returns a string view representing the pending input data - BOOST_BEAST_DECL string_view str() const; /// Appends a string to the pending input data - BOOST_BEAST_DECL void append(string_view s); /// Clear the pending input area - BOOST_BEAST_DECL void clear(); @@ -368,7 +380,6 @@ public: The other end of the connection will see `error::eof` after reading all the remaining data. */ - BOOST_BEAST_DECL void close(); @@ -377,7 +388,6 @@ public: This end of the connection will see `error::eof` after reading all the remaining data. */ - BOOST_BEAST_DECL void close_remote(); @@ -456,11 +466,12 @@ public: */ template< class MutableBufferSequence, - BOOST_BEAST_ASYNC_TPARAM2 ReadHandler> - BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, std::size_t)) ReadHandler + BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> + BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, void(error_code, std::size_t)) async_read_some( MutableBufferSequence const& buffers, - ReadHandler&& handler); + ReadHandler&& handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(executor_type)); /** Write some data to the stream. @@ -534,36 +545,36 @@ public: */ template< class ConstBufferSequence, - BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> - BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, std::size_t)) WriteHandler + BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(executor_type)> + BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, void(error_code, std::size_t)) async_write_some( ConstBufferSequence const& buffers, - WriteHandler&& handler); + WriteHandler&& handler BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(executor_type) + ); #if ! BOOST_BEAST_DOXYGEN friend - BOOST_BEAST_DECL void - teardown( + teardown<>( role_type, - stream& s, + basic_stream& s, boost::system::error_code& ec); - template + template friend - BOOST_BEAST_DECL void async_teardown( role_type role, - stream& s, + basic_stream& s, TeardownHandler&& handler); #endif }; #if ! BOOST_BEAST_DOXYGEN -inline +template void -beast_close_socket(stream& s) +beast_close_socket(basic_stream& s) { s.close(); } @@ -578,31 +589,34 @@ beast_close_socket(stream& s) @return The new, connected stream. */ +template template -stream -connect(stream& to, Args&&... args); +bascic_stream +connect(basic_stream& to, Args&&... args); #else -BOOST_BEAST_DECL -stream -connect(stream& to); +template +basic_stream +connect(basic_stream& to); -BOOST_BEAST_DECL +template void -connect(stream& s1, stream& s2); +connect(basic_stream& s1, basic_stream& s2); -template -stream -connect(stream& to, Arg1&& arg1, ArgN&&... argn); +template +basic_stream +connect(basic_stream& to, Arg1&& arg1, ArgN&&... argn); #endif +using stream = basic_stream<>; + } // test } // beast } // boost #include -#ifdef BOOST_BEAST_HEADER_ONLY +//#ifdef BOOST_BEAST_HEADER_ONLY #include -#endif +//#endif #endif diff --git a/boost/beast/_experimental/test/tcp.hpp b/boost/beast/_experimental/test/tcp.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/unit_test/amount.hpp b/boost/beast/_experimental/unit_test/amount.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/unit_test/detail/const_container.hpp b/boost/beast/_experimental/unit_test/detail/const_container.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/unit_test/dstream.hpp b/boost/beast/_experimental/unit_test/dstream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/unit_test/global_suites.hpp b/boost/beast/_experimental/unit_test/global_suites.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/unit_test/main.ipp b/boost/beast/_experimental/unit_test/main.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/unit_test/match.hpp b/boost/beast/_experimental/unit_test/match.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/unit_test/recorder.hpp b/boost/beast/_experimental/unit_test/recorder.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/unit_test/reporter.hpp b/boost/beast/_experimental/unit_test/reporter.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/unit_test/results.hpp b/boost/beast/_experimental/unit_test/results.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/unit_test/runner.hpp b/boost/beast/_experimental/unit_test/runner.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/unit_test/suite.hpp b/boost/beast/_experimental/unit_test/suite.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/unit_test/suite_info.hpp b/boost/beast/_experimental/unit_test/suite_info.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/_experimental/unit_test/suite_list.hpp b/boost/beast/_experimental/unit_test/suite_list.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core.hpp b/boost/beast/core.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/async_base.hpp b/boost/beast/core/async_base.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/basic_stream.hpp b/boost/beast/core/basic_stream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/bind_handler.hpp b/boost/beast/core/bind_handler.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/buffer_traits.hpp b/boost/beast/core/buffer_traits.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/buffered_read_stream.hpp b/boost/beast/core/buffered_read_stream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/buffers_adaptor.hpp b/boost/beast/core/buffers_adaptor.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/buffers_cat.hpp b/boost/beast/core/buffers_cat.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/buffers_prefix.hpp b/boost/beast/core/buffers_prefix.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/buffers_range.hpp b/boost/beast/core/buffers_range.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/buffers_suffix.hpp b/boost/beast/core/buffers_suffix.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/buffers_to_string.hpp b/boost/beast/core/buffers_to_string.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/allocator.hpp b/boost/beast/core/detail/allocator.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/async_base.hpp b/boost/beast/core/detail/async_base.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/base64.hpp b/boost/beast/core/detail/base64.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/base64.ipp b/boost/beast/core/detail/base64.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/bind_continuation.hpp b/boost/beast/core/detail/bind_continuation.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/bind_default_executor.hpp b/boost/beast/core/detail/bind_default_executor.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/bind_handler.hpp b/boost/beast/core/detail/bind_handler.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/buffer.hpp b/boost/beast/core/detail/buffer.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/buffer_traits.hpp b/boost/beast/core/detail/buffer_traits.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/buffers_pair.hpp b/boost/beast/core/detail/buffers_pair.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/buffers_range_adaptor.hpp b/boost/beast/core/detail/buffers_range_adaptor.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/buffers_ref.hpp b/boost/beast/core/detail/buffers_ref.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/chacha.hpp b/boost/beast/core/detail/chacha.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/char_buffer.hpp b/boost/beast/core/detail/char_buffer.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/clamp.hpp b/boost/beast/core/detail/clamp.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/config.hpp b/boost/beast/core/detail/config.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/cpu_info.hpp b/boost/beast/core/detail/cpu_info.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/flat_stream.hpp b/boost/beast/core/detail/flat_stream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/get_io_context.hpp b/boost/beast/core/detail/get_io_context.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/impl/read.hpp b/boost/beast/core/detail/impl/read.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/impl/temporary_buffer.ipp b/boost/beast/core/detail/impl/temporary_buffer.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/is_invocable.hpp b/boost/beast/core/detail/is_invocable.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/ostream.hpp b/boost/beast/core/detail/ostream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/pcg.hpp b/boost/beast/core/detail/pcg.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/read.hpp b/boost/beast/core/detail/read.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/remap_post_to_defer.hpp b/boost/beast/core/detail/remap_post_to_defer.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/service_base.hpp b/boost/beast/core/detail/service_base.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/sha1.hpp b/boost/beast/core/detail/sha1.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/sha1.ipp b/boost/beast/core/detail/sha1.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/static_const.hpp b/boost/beast/core/detail/static_const.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/static_ostream.hpp b/boost/beast/core/detail/static_ostream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/static_string.hpp b/boost/beast/core/detail/static_string.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/stream_base.hpp b/boost/beast/core/detail/stream_base.hpp old mode 100755 new mode 100644 index 3f675d47f954db02571281951dc34a7f2e8d0e40..e6e806202b96c5b09855351aab263e0f314850a3 --- a/boost/beast/core/detail/stream_base.hpp +++ b/boost/beast/core/detail/stream_base.hpp @@ -56,19 +56,25 @@ struct stream_base class pending_guard { - bool& b_; + bool* b_ = nullptr; bool clear_ = true; public: ~pending_guard() { - if(clear_) - b_ = false; + if(clear_ && b_) + *b_ = false; + } + + pending_guard() + : b_(nullptr) + , clear_(true) + { } explicit pending_guard(bool& b) - : b_(b) + : b_(&b) { // If this assert goes off, it means you are attempting // to issue two of the same asynchronous I/O operation @@ -77,8 +83,8 @@ struct stream_base // calls to async_read_some. Only one pending call of // each I/O type (read and write) is permitted. // - BOOST_ASSERT(! b_); - b_ = true; + BOOST_ASSERT(! *b_); + *b_ = true; } pending_guard( @@ -89,11 +95,29 @@ struct stream_base { } + void assign(bool& b) + { + BOOST_ASSERT(!b_); + BOOST_ASSERT(clear_); + b_ = &b; + + // If this assert goes off, it means you are attempting + // to issue two of the same asynchronous I/O operation + // at the same time, without waiting for the first one + // to complete. For example, attempting two simultaneous + // calls to async_read_some. Only one pending call of + // each I/O type (read and write) is permitted. + // + BOOST_ASSERT(! *b_); + *b_ = true; + } + void reset() { BOOST_ASSERT(clear_); - b_ = false; + if (b_) + *b_ = false; clear_ = false; } }; diff --git a/boost/beast/core/detail/stream_traits.hpp b/boost/beast/core/detail/stream_traits.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/string.hpp b/boost/beast/core/detail/string.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/temporary_buffer.hpp b/boost/beast/core/detail/temporary_buffer.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/tuple.hpp b/boost/beast/core/detail/tuple.hpp old mode 100755 new mode 100644 index 5d65e9de7748fb8d0d575ef128a46bb55cbb52bb..ee9640fbb425e06b28835b7542b70fd442747cdd --- a/boost/beast/core/detail/tuple.hpp +++ b/boost/beast/core/detail/tuple.hpp @@ -1,5 +1,5 @@ // -// Copyright (c) 2016-2019Damian Jarek (damian dot jarek93 at gmail dot com) +// Copyright (c) 2016-2019 Damian Jarek (damian dot jarek93 at gmail dot com) // // 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) diff --git a/boost/beast/core/detail/type_traits.hpp b/boost/beast/core/detail/type_traits.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/variant.hpp b/boost/beast/core/detail/variant.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detail/varint.hpp b/boost/beast/core/detail/varint.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/detect_ssl.hpp b/boost/beast/core/detect_ssl.hpp old mode 100755 new mode 100644 index 644318de349e31c97027aa03f86808988eca38a0..272535f58a17df89b3e3882288afe2668e8e7769 --- a/boost/beast/core/detect_ssl.hpp +++ b/boost/beast/core/detect_ssl.hpp @@ -591,8 +591,19 @@ operator()(error_code ec, std::size_t bytes_transferred, bool cont) // by the move, are first moved to the stack before calling the // initiating function. - yield stream_.async_read_some(buffer_.prepare( - read_size(buffer_, 1536)), std::move(*this)); + yield + { + // This macro facilitates asynchrnous handler tracking and + // debugging when the preprocessor macro + // BOOST_ASIO_CUSTOM_HANDLER_TRACKING is defined. + + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "async_detect_ssl")); + + stream_.async_read_some(buffer_.prepare( + read_size(buffer_, 1536)), std::move(*this)); + } // Commit what we read into the buffer's input area. buffer_.commit(bytes_transferred); @@ -626,7 +637,14 @@ operator()(error_code ec, std::size_t bytes_transferred, bool cont) // used in the call to async_read_some above, to avoid // instantiating another version of the function template. - yield stream_.async_read_some(buffer_.prepare(0), std::move(*this)); + yield + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "async_detect_ssl")); + + stream_.async_read_some(buffer_.prepare(0), std::move(*this)); + } // Restore the saved error code ec = ec_; diff --git a/boost/beast/core/error.hpp b/boost/beast/core/error.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/file.hpp b/boost/beast/core/file.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/file_base.hpp b/boost/beast/core/file_base.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/file_posix.hpp b/boost/beast/core/file_posix.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/file_stdio.hpp b/boost/beast/core/file_stdio.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/file_win32.hpp b/boost/beast/core/file_win32.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/flat_buffer.hpp b/boost/beast/core/flat_buffer.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/flat_static_buffer.hpp b/boost/beast/core/flat_static_buffer.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/flat_stream.hpp b/boost/beast/core/flat_stream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/async_base.hpp b/boost/beast/core/impl/async_base.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/basic_stream.hpp b/boost/beast/core/impl/basic_stream.hpp old mode 100755 new mode 100644 index f21958c07faa8658afdad45e88cc9509bdf144f0..73fb91697578b8c7e711e60e1227ab5de4f74315 --- a/boost/beast/core/impl/basic_stream.hpp +++ b/boost/beast/core/impl/basic_stream.hpp @@ -269,6 +269,8 @@ class transfer_op std::move(*this)); } + static bool never_pending_; + public: template transfer_op( @@ -278,10 +280,25 @@ public: : async_base( std::forward(h), s.get_executor()) , impl_(s.impl_) - , pg_(state().pending) + , pg_() , b_(b) { - (*this)({}); + if (buffer_bytes(b_) == 0 && state().pending) + { + // Workaround: + // Corner case discovered in https://github.com/boostorg/beast/issues/2065 + // Enclosing SSL stream wishes to complete a 0-length write early by + // executing a 0-length read against the underlying stream. + // This can occur even if an existing async_read is in progress. + // In this specific case, we will complete the async op with no error + // in order to prevent assertions and/or internal corruption of the basic_stream + this->complete(false, error_code(), 0); + } + else + { + pg_.assign(state().pending); + (*this)({}); + } } void @@ -296,7 +313,14 @@ public: { // make sure we perform the no-op BOOST_ASIO_CORO_YIELD - async_perform(0, is_read{}); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + (isRead ? "basic_stream::async_read_some" + : "basic_stream::async_write_some"))); + + async_perform(0, is_read{}); + } // apply the timeout manually, otherwise // behavior varies across platforms. if(state().timer.expiry() <= clock_type::now()) @@ -309,12 +333,19 @@ public: // if a timeout is active, wait on the timer if(state().timer.expiry() != never()) + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + (isRead ? "basic_stream::async_read_some" + : "basic_stream::async_write_some"))); + state().timer.async_wait( timeout_handlerget_executor())>{ state(), impl_, state().tick, this->get_executor()}); + } // check rate limit, maybe wait std::size_t amount; @@ -323,7 +354,14 @@ public: { ++impl_->waiting; BOOST_ASIO_CORO_YIELD - impl_->timer.async_wait(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + (isRead ? "basic_stream::async_read_some" + : "basic_stream::async_write_some"))); + + impl_->timer.async_wait(std::move(*this)); + } if(ec) { // socket was closed, or a timeout @@ -347,7 +385,14 @@ public: } BOOST_ASIO_CORO_YIELD - async_perform(amount, is_read{}); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + (isRead ? "basic_stream::async_read_some" + : "basic_stream::async_write_some"))); + + async_perform(amount, is_read{}); + } if(state().timer.expiry() != never()) { @@ -408,12 +453,22 @@ public: , pg1_(impl_->write.pending) { if(state().timer.expiry() != stream_base::never()) + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "basic_stream::async_connect")); + impl_->write.timer.async_wait( timeout_handlerget_executor())>{ state(), impl_, state().tick, this->get_executor()}); + } + + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "basic_stream::async_connect")); impl_->socket.async_connect( ep, std::move(*this)); @@ -435,12 +490,22 @@ public: , pg1_(impl_->write.pending) { if(state().timer.expiry() != stream_base::never()) + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "basic_stream::async_connect")); + impl_->write.timer.async_wait( timeout_handlerget_executor())>{ state(), impl_, state().tick, this->get_executor()}); + } + + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "basic_stream::async_connect")); net::async_connect(impl_->socket, eps, cond, std::move(*this)); @@ -462,12 +527,22 @@ public: , pg1_(impl_->write.pending) { if(state().timer.expiry() != stream_base::never()) + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "basic_stream::async_connect")); + impl_->write.timer.async_wait( timeout_handlerget_executor())>{ state(), impl_, state().tick, this->get_executor()}); + } + + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "basic_stream::async_connect")); net::async_connect(impl_->socket, begin, end, cond, std::move(*this)); diff --git a/boost/beast/core/impl/buffered_read_stream.hpp b/boost/beast/core/impl/buffered_read_stream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/buffers_adaptor.hpp b/boost/beast/core/impl/buffers_adaptor.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/buffers_cat.hpp b/boost/beast/core/impl/buffers_cat.hpp old mode 100755 new mode 100644 index a0506a0b356dfab6cf43cf7fe4e09bed9d3e8843..feb41ba4a79a1a3cc065e0323a13eaf0ec2f6939 --- a/boost/beast/core/impl/buffers_cat.hpp +++ b/boost/beast/core/impl/buffers_cat.hpp @@ -52,7 +52,7 @@ public: #if defined(_MSC_VER) && ! defined(__clang__) # define BOOST_BEAST_UNREACHABLE() __assume(false) -# define BOOST_BEAST_UNREACHABLE_RETURN(v) __assume(false) +# define BOOST_BEAST_UNREACHABLE_RETURN(v) return v #else # define BOOST_BEAST_UNREACHABLE() __builtin_unreachable() # define BOOST_BEAST_UNREACHABLE_RETURN(v) \ diff --git a/boost/beast/core/impl/buffers_prefix.hpp b/boost/beast/core/impl/buffers_prefix.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/buffers_suffix.hpp b/boost/beast/core/impl/buffers_suffix.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/error.hpp b/boost/beast/core/impl/error.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/error.ipp b/boost/beast/core/impl/error.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/file_posix.ipp b/boost/beast/core/impl/file_posix.ipp old mode 100755 new mode 100644 index 0f7f42ac8d08319f703ac0bdc24c5feef14b7814..61a33a521062c4dadd05dca02fc8804eebd0053c --- a/boost/beast/core/impl/file_posix.ipp +++ b/boost/beast/core/impl/file_posix.ipp @@ -172,7 +172,7 @@ open(char const* path, file_mode mode, error_code& ec) break; case file_mode::append_existing: - f = O_WRONLY; + f = O_WRONLY | O_APPEND; #if BOOST_BEAST_USE_POSIX_FADVISE advise = POSIX_FADV_SEQUENTIAL; #endif diff --git a/boost/beast/core/impl/file_stdio.ipp b/boost/beast/core/impl/file_stdio.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/file_win32.ipp b/boost/beast/core/impl/file_win32.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/flat_buffer.hpp b/boost/beast/core/impl/flat_buffer.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/flat_static_buffer.hpp b/boost/beast/core/impl/flat_static_buffer.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/flat_static_buffer.ipp b/boost/beast/core/impl/flat_static_buffer.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/flat_stream.hpp b/boost/beast/core/impl/flat_stream.hpp old mode 100755 new mode 100644 index 4551a59edaa971c470770693312ba787ca0a9618..11c75c4c189b3a351ee64e01b5fbc6a33694447d --- a/boost/beast/core/impl/flat_stream.hpp +++ b/boost/beast/core/impl/flat_stream.hpp @@ -51,6 +51,11 @@ public: s.buffer_.commit(net::buffer_copy( s.buffer_.prepare(result.size), b, result.size)); + + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "flat_stream::async_write_some")); + s.stream_.async_write_some( s.buffer_.data(), std::move(*this)); } @@ -58,6 +63,11 @@ public: { s.buffer_.clear(); s.buffer_.shrink_to_fit(); + + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "flat_stream::async_write_some")); + s.stream_.async_write_some( beast::buffers_prefix( result.size, b), std::move(*this)); diff --git a/boost/beast/core/impl/multi_buffer.hpp b/boost/beast/core/impl/multi_buffer.hpp old mode 100755 new mode 100644 index 510d1265e4bb3ac670899a527d361c6bf65829d0..bd4087cd4b8ddca483708ee80b7cad8712f14c5a --- a/boost/beast/core/impl/multi_buffer.hpp +++ b/boost/beast/core/impl/multi_buffer.hpp @@ -912,15 +912,17 @@ prepare(size_type n) -> destroy(reuse); if(n > 0) { - auto const growth_factor = 2.0f; + std::size_t const growth_factor = 2; + std::size_t altn = in_size_ * growth_factor; + // Overflow detection: + if(in_size_ > altn) + altn = (std::numeric_limits::max)(); + else + altn = (std::max)(512, altn); auto const size = (std::min)( max_ - total, - (std::max)({ - static_cast( - in_size_ * growth_factor - in_size_), - 512, - n})); + (std::max)(n, altn)); auto& e = alloc(size); list_.push_back(e); if(out_ == list_.end()) diff --git a/boost/beast/core/impl/read_size.hpp b/boost/beast/core/impl/read_size.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/saved_handler.hpp b/boost/beast/core/impl/saved_handler.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/saved_handler.ipp b/boost/beast/core/impl/saved_handler.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/static_buffer.hpp b/boost/beast/core/impl/static_buffer.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/static_buffer.ipp b/boost/beast/core/impl/static_buffer.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/static_string.hpp b/boost/beast/core/impl/static_string.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/string.ipp b/boost/beast/core/impl/string.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/core/impl/string_param.hpp b/boost/beast/core/impl/string_param.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/make_printable.hpp b/boost/beast/core/make_printable.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/multi_buffer.hpp b/boost/beast/core/multi_buffer.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/ostream.hpp b/boost/beast/core/ostream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/rate_policy.hpp b/boost/beast/core/rate_policy.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/read_size.hpp b/boost/beast/core/read_size.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/role.hpp b/boost/beast/core/role.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/saved_handler.hpp b/boost/beast/core/saved_handler.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/span.hpp b/boost/beast/core/span.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/static_buffer.hpp b/boost/beast/core/static_buffer.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/static_string.hpp b/boost/beast/core/static_string.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/stream_traits.hpp b/boost/beast/core/stream_traits.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/string.hpp b/boost/beast/core/string.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/string_param.hpp b/boost/beast/core/string_param.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/string_type.hpp b/boost/beast/core/string_type.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/core/tcp_stream.hpp b/boost/beast/core/tcp_stream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http.hpp b/boost/beast/http.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/basic_dynamic_body.hpp b/boost/beast/http/basic_dynamic_body.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/basic_file_body.hpp b/boost/beast/http/basic_file_body.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/basic_parser.hpp b/boost/beast/http/basic_parser.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/buffer_body.hpp b/boost/beast/http/buffer_body.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/chunk_encode.hpp b/boost/beast/http/chunk_encode.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/detail/basic_parsed_list.hpp b/boost/beast/http/detail/basic_parsed_list.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/detail/basic_parser.hpp b/boost/beast/http/detail/basic_parser.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/detail/basic_parser.ipp b/boost/beast/http/detail/basic_parser.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/http/detail/chunk_encode.hpp b/boost/beast/http/detail/chunk_encode.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/detail/rfc7230.hpp b/boost/beast/http/detail/rfc7230.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/detail/rfc7230.ipp b/boost/beast/http/detail/rfc7230.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/http/detail/type_traits.hpp b/boost/beast/http/detail/type_traits.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/dynamic_body.hpp b/boost/beast/http/dynamic_body.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/empty_body.hpp b/boost/beast/http/empty_body.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/error.hpp b/boost/beast/http/error.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/field.hpp b/boost/beast/http/field.hpp old mode 100755 new mode 100644 index 3f943647719be0c9b53ee12d3081a2344c7deb78..b75b9b06aeb196e4fa420b852894c0b54911c9ce --- a/boost/beast/http/field.hpp +++ b/boost/beast/http/field.hpp @@ -18,364 +18,367 @@ namespace boost { namespace beast { namespace http { -enum class field : unsigned short -{ - unknown = 0, - - a_im, - accept, - accept_additions, - accept_charset, - accept_datetime, - accept_encoding, - accept_features, - accept_language, - accept_patch, - accept_post, - accept_ranges, - access_control, - access_control_allow_credentials, - access_control_allow_headers, - access_control_allow_methods, - access_control_allow_origin, - access_control_expose_headers, - access_control_max_age, - access_control_request_headers, - access_control_request_method, - age, - allow, - alpn, - also_control, - alt_svc, - alt_used, - alternate_recipient, - alternates, - apparently_to, - apply_to_redirect_ref, - approved, - archive, - archived_at, - article_names, - article_updates, - authentication_control, - authentication_info, - authentication_results, - authorization, - auto_submitted, - autoforwarded, - autosubmitted, - base, - bcc, - body, - c_ext, - c_man, - c_opt, - c_pep, - c_pep_info, - cache_control, - caldav_timezones, - cancel_key, - cancel_lock, - cc, - close, - comments, - compliance, - connection, - content_alternative, - content_base, - content_description, - content_disposition, - content_duration, - content_encoding, - content_features, - content_id, - content_identifier, - content_language, - content_length, - content_location, - content_md5, - content_range, - content_return, - content_script_type, - content_style_type, - content_transfer_encoding, - content_type, - content_version, - control, - conversion, - conversion_with_loss, - cookie, - cookie2, - cost, - dasl, - date, - date_received, - dav, - default_style, - deferred_delivery, - delivery_date, - delta_base, - depth, - derived_from, - destination, - differential_id, - digest, - discarded_x400_ipms_extensions, - discarded_x400_mts_extensions, - disclose_recipients, - disposition_notification_options, - disposition_notification_to, - distribution, - dkim_signature, - dl_expansion_history, - downgraded_bcc, - downgraded_cc, - downgraded_disposition_notification_to, - downgraded_final_recipient, - downgraded_from, - downgraded_in_reply_to, - downgraded_mail_from, - downgraded_message_id, - downgraded_original_recipient, - downgraded_rcpt_to, - downgraded_references, - downgraded_reply_to, - downgraded_resent_bcc, - downgraded_resent_cc, - downgraded_resent_from, - downgraded_resent_reply_to, - downgraded_resent_sender, - downgraded_resent_to, - downgraded_return_path, - downgraded_sender, - downgraded_to, - ediint_features, - eesst_version, - encoding, - encrypted, - errors_to, - etag, - expect, - expires, - expiry_date, - ext, - followup_to, - forwarded, - from, - generate_delivery_report, - getprofile, - hobareg, - host, - http2_settings, - if_, - if_match, - if_modified_since, - if_none_match, - if_range, - if_schedule_tag_match, - if_unmodified_since, - im, - importance, - in_reply_to, - incomplete_copy, - injection_date, - injection_info, - jabber_id, - keep_alive, - keywords, - label, - language, - last_modified, - latest_delivery_time, - lines, - link, - list_archive, - list_help, - list_id, - list_owner, - list_post, - list_subscribe, - list_unsubscribe, - list_unsubscribe_post, - location, - lock_token, - man, - max_forwards, - memento_datetime, - message_context, - message_id, - message_type, - meter, - method_check, - method_check_expires, - mime_version, - mmhs_acp127_message_identifier, - mmhs_authorizing_users, - mmhs_codress_message_indicator, - mmhs_copy_precedence, - mmhs_exempted_address, - mmhs_extended_authorisation_info, - mmhs_handling_instructions, - mmhs_message_instructions, - mmhs_message_type, - mmhs_originator_plad, - mmhs_originator_reference, - mmhs_other_recipients_indicator_cc, - mmhs_other_recipients_indicator_to, - mmhs_primary_precedence, - mmhs_subject_indicator_codes, - mt_priority, - negotiate, - newsgroups, - nntp_posting_date, - nntp_posting_host, - non_compliance, - obsoletes, - opt, - optional, - optional_www_authenticate, - ordering_type, - organization, - origin, - original_encoded_information_types, - original_from, - original_message_id, - original_recipient, - original_sender, - original_subject, - originator_return_address, - overwrite, - p3p, - path, - pep, - pep_info, - pics_label, - position, - posting_version, - pragma, - prefer, - preference_applied, - prevent_nondelivery_report, - priority, - privicon, - profileobject, - protocol, - protocol_info, - protocol_query, - protocol_request, - proxy_authenticate, - proxy_authentication_info, - proxy_authorization, - proxy_connection, - proxy_features, - proxy_instruction, - public_, - public_key_pins, - public_key_pins_report_only, - range, - received, - received_spf, - redirect_ref, - references, - referer, - referer_root, - relay_version, - reply_by, - reply_to, - require_recipient_valid_since, - resent_bcc, - resent_cc, - resent_date, - resent_from, - resent_message_id, - resent_reply_to, - resent_sender, - resent_to, - resolution_hint, - resolver_location, - retry_after, - return_path, - safe, - schedule_reply, - schedule_tag, - sec_websocket_accept, - sec_websocket_extensions, - sec_websocket_key, - sec_websocket_protocol, - sec_websocket_version, - security_scheme, - see_also, - sender, - sensitivity, - server, - set_cookie, - set_cookie2, - setprofile, - sio_label, - sio_label_history, - slug, - soapaction, - solicitation, - status_uri, - strict_transport_security, - subject, - subok, - subst, - summary, - supersedes, - surrogate_capability, - surrogate_control, - tcn, - te, - timeout, - title, - to, - topic, - trailer, - transfer_encoding, - ttl, - ua_color, - ua_media, - ua_pixels, - ua_resolution, - ua_windowpixels, - upgrade, - urgency, - uri, - user_agent, - variant_vary, - vary, - vbr_info, - version, - via, - want_digest, - warning, - www_authenticate, - x_archived_at, - x_device_accept, - x_device_accept_charset, - x_device_accept_encoding, - x_device_accept_language, - x_device_user_agent, - x_frame_options, - x_mittente, - x_pgp_sig, - x_ricevuta, - x_riferimento_message_id, - x_tiporicevuta, - x_trasporto, - x_verificasicurezza, - x400_content_identifier, - x400_content_return, - x400_content_type, - x400_mts_identifier, - x400_originator, - x400_received, - x400_recipients, - x400_trace, - xref, -}; + enum class field : unsigned short + { + unknown = 0, + a_im, + accept, + accept_additions, + accept_charset, + accept_datetime, + accept_encoding, + accept_features, + accept_language, + accept_patch, + accept_post, + accept_ranges, + access_control, + access_control_allow_credentials, + access_control_allow_headers, + access_control_allow_methods, + access_control_allow_origin, + access_control_expose_headers, + access_control_max_age, + access_control_request_headers, + access_control_request_method, + age, + allow, + alpn, + also_control, + alt_svc, + alt_used, + alternate_recipient, + alternates, + apparently_to, + apply_to_redirect_ref, + approved, + archive, + archived_at, + article_names, + article_updates, + authentication_control, + authentication_info, + authentication_results, + authorization, + auto_submitted, + autoforwarded, + autosubmitted, + base, + bcc, + body, + c_ext, + c_man, + c_opt, + c_pep, + c_pep_info, + cache_control, + caldav_timezones, + cancel_key, + cancel_lock, + cc, + close, + comments, + compliance, + connection, + content_alternative, + content_base, + content_description, + content_disposition, + content_duration, + content_encoding, + content_features, + content_id, + content_identifier, + content_language, + content_length, + content_location, + content_md5, + content_range, + content_return, + content_script_type, + content_style_type, + content_transfer_encoding, + content_type, + content_version, + control, + conversion, + conversion_with_loss, + cookie, + cookie2, + cost, + dasl, + date, + date_received, + dav, + default_style, + deferred_delivery, + delivery_date, + delta_base, + depth, + derived_from, + destination, + differential_id, + digest, + discarded_x400_ipms_extensions, + discarded_x400_mts_extensions, + disclose_recipients, + disposition_notification_options, + disposition_notification_to, + distribution, + dkim_signature, + dl_expansion_history, + downgraded_bcc, + downgraded_cc, + downgraded_disposition_notification_to, + downgraded_final_recipient, + downgraded_from, + downgraded_in_reply_to, + downgraded_mail_from, + downgraded_message_id, + downgraded_original_recipient, + downgraded_rcpt_to, + downgraded_references, + downgraded_reply_to, + downgraded_resent_bcc, + downgraded_resent_cc, + downgraded_resent_from, + downgraded_resent_reply_to, + downgraded_resent_sender, + downgraded_resent_to, + downgraded_return_path, + downgraded_sender, + downgraded_to, + ediint_features, + eesst_version, + encoding, + encrypted, + errors_to, + etag, + expect, + expires, + expiry_date, + ext, + followup_to, + forwarded, + from, + generate_delivery_report, + getprofile, + hobareg, + host, + http2_settings, + if_, + if_match, + if_modified_since, + if_none_match, + if_range, + if_schedule_tag_match, + if_unmodified_since, + im, + importance, + in_reply_to, + incomplete_copy, + injection_date, + injection_info, + jabber_id, + keep_alive, + keywords, + label, + language, + last_modified, + latest_delivery_time, + lines, + link, + list_archive, + list_help, + list_id, + list_owner, + list_post, + list_subscribe, + list_unsubscribe, + list_unsubscribe_post, + location, + lock_token, + man, + max_forwards, + memento_datetime, + message_context, + message_id, + message_type, + meter, + method_check, + method_check_expires, + mime_version, + mmhs_acp127_message_identifier, + mmhs_authorizing_users, + mmhs_codress_message_indicator, + mmhs_copy_precedence, + mmhs_exempted_address, + mmhs_extended_authorisation_info, + mmhs_handling_instructions, + mmhs_message_instructions, + mmhs_message_type, + mmhs_originator_plad, + mmhs_originator_reference, + mmhs_other_recipients_indicator_cc, + mmhs_other_recipients_indicator_to, + mmhs_primary_precedence, + mmhs_subject_indicator_codes, + mt_priority, + negotiate, + newsgroups, + nntp_posting_date, + nntp_posting_host, + non_compliance, + obsoletes, + opt, + optional, + optional_www_authenticate, + ordering_type, + organization, + origin, + original_encoded_information_types, + original_from, + original_message_id, + original_recipient, + original_sender, + original_subject, + originator_return_address, + overwrite, + p3p, + path, + pep, + pep_info, + pics_label, + position, + posting_version, + pragma, + prefer, + preference_applied, + prevent_nondelivery_report, + priority, + privicon, + profileobject, + protocol, + protocol_info, + protocol_query, + protocol_request, + proxy_authenticate, + proxy_authentication_info, + proxy_authorization, + proxy_connection, + proxy_features, + proxy_instruction, + public_, + public_key_pins, + public_key_pins_report_only, + range, + received, + received_spf, + redirect_ref, + references, + referer, + referer_root, + relay_version, + reply_by, + reply_to, + require_recipient_valid_since, + resent_bcc, + resent_cc, + resent_date, + resent_from, + resent_message_id, + resent_reply_to, + resent_sender, + resent_to, + resolution_hint, + resolver_location, + retry_after, + return_path, + safe, + schedule_reply, + schedule_tag, + sec_fetch_dest, + sec_fetch_mode, + sec_fetch_site, + sec_fetch_user, + sec_websocket_accept, + sec_websocket_extensions, + sec_websocket_key, + sec_websocket_protocol, + sec_websocket_version, + security_scheme, + see_also, + sender, + sensitivity, + server, + set_cookie, + set_cookie2, + setprofile, + sio_label, + sio_label_history, + slug, + soapaction, + solicitation, + status_uri, + strict_transport_security, + subject, + subok, + subst, + summary, + supersedes, + surrogate_capability, + surrogate_control, + tcn, + te, + timeout, + title, + to, + topic, + trailer, + transfer_encoding, + ttl, + ua_color, + ua_media, + ua_pixels, + ua_resolution, + ua_windowpixels, + upgrade, + urgency, + uri, + user_agent, + variant_vary, + vary, + vbr_info, + version, + via, + want_digest, + warning, + www_authenticate, + x_archived_at, + x_device_accept, + x_device_accept_charset, + x_device_accept_encoding, + x_device_accept_language, + x_device_user_agent, + x_frame_options, + x_mittente, + x_pgp_sig, + x_ricevuta, + x_riferimento_message_id, + x_tiporicevuta, + x_trasporto, + x_verificasicurezza, + x400_content_identifier, + x400_content_return, + x400_content_type, + x400_mts_identifier, + x400_originator, + x400_received, + x400_recipients, + x400_trace, + xref + }; /** Convert a field enum to a string. @param f The field to convert diff --git a/boost/beast/http/fields.hpp b/boost/beast/http/fields.hpp old mode 100755 new mode 100644 index cf5022821d22ed819bc162ec6b3510d549500e51..2d83db5b5e37cc62447d90e5388f95b64e194035 --- a/boost/beast/http/fields.hpp +++ b/boost/beast/http/fields.hpp @@ -425,6 +425,11 @@ public: void insert(field name, string_view const& value); + /* Set a field from a null pointer (deleted). + */ + void + insert(field, std::nullptr_t) = delete; + /** Insert a field. If one or more fields with the same name already exist, @@ -438,6 +443,11 @@ public: void insert(string_view name, string_view const& value); + /* Insert a field from a null pointer (deleted). + */ + void + insert(string_view, std::nullptr_t) = delete; + /** Insert a field. If one or more fields with the same name already exist, @@ -457,6 +467,9 @@ public: insert(field name, string_view name_string, string_view const& value); + void + insert(field, string_view, std::nullptr_t) = delete; + /** Set a field value, removing any other instances of that field. First removes any values with matching field names, then @@ -471,6 +484,9 @@ public: void set(field name, string_view const& value); + void + set(field, std::nullptr_t) = delete; + /** Set a field value, removing any other instances of that field. First removes any values with matching field names, then @@ -483,7 +499,10 @@ public: void set(string_view name, string_view const& value); - /** Remove a field. + void + set(string_view, std::nullptr_t) = delete; + + /** Remove a field. References and iterators to the erased elements are invalidated. Other references and iterators are not diff --git a/boost/beast/http/file_body.hpp b/boost/beast/http/file_body.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/basic_parser.hpp b/boost/beast/http/impl/basic_parser.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/basic_parser.ipp b/boost/beast/http/impl/basic_parser.ipp old mode 100755 new mode 100644 index 485a999e4c1e41bf8238899e1f2717d457c0c343..4eff491cd3977e773d02b8c2556326f05a337cdd --- a/boost/beast/http/impl/basic_parser.ipp +++ b/boost/beast/http/impl/basic_parser.ipp @@ -82,7 +82,17 @@ basic_parser:: put(net::const_buffer buffer, error_code& ec) { - BOOST_ASSERT(state_ != state::complete); + // If this goes off you have tried to parse more data after the parser + // has completed. A common cause of this is re-using a parser, which is + // not supported. If you need to re-use a parser, consider storing it + // in an optional. Then reset() and emplace() prior to parsing each new + // message. + BOOST_ASSERT(!is_done()); + if (is_done()) + { + ec = error::stale_parser; + return 0; + } auto p = static_cast(buffer.data()); auto n = buffer.size(); auto const p0 = p; @@ -154,6 +164,8 @@ loop: goto done; } finish_header(ec, is_request{}); + if(ec) + goto done; break; case state::body0: @@ -447,7 +459,8 @@ finish_header(error_code& ec, std::true_type) } else if(f_ & flagContentLength) { - if(len_ > body_limit_) + if(body_limit_.has_value() && + len_ > body_limit_) { ec = error::body_limit; return; @@ -511,7 +524,8 @@ finish_header(error_code& ec, std::false_type) f_ |= flagHasBody; state_ = state::body0; - if(len_ > body_limit_) + if(body_limit_.has_value() && + len_ > body_limit_) { ec = error::body_limit; return; diff --git a/boost/beast/http/impl/chunk_encode.hpp b/boost/beast/http/impl/chunk_encode.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/error.hpp b/boost/beast/http/impl/error.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/error.ipp b/boost/beast/http/impl/error.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/field.ipp b/boost/beast/http/impl/field.ipp old mode 100755 new mode 100644 index f25be99b4245a07f82fb2eef83f2eaab7dd9ea52..29a37fdf966e2ed9ed03c92dfe2bbba562b4d462 --- a/boost/beast/http/impl/field.ipp +++ b/boost/beast/http/impl/field.ipp @@ -43,7 +43,7 @@ struct field_table } using array_type = - std::array; + std::array; // Strings are converted to lowercase static @@ -116,6 +116,7 @@ struct field_table */ field_table() : by_name_({{ +// string constants "", "A-IM", "Accept", @@ -393,6 +394,10 @@ struct field_table "Safe", "Schedule-Reply", "Schedule-Tag", + "Sec-Fetch-Dest", + "Sec-Fetch-Mode", + "Sec-Fetch-Site", + "Sec-Fetch-User", "Sec-WebSocket-Accept", "Sec-WebSocket-Extensions", "Sec-WebSocket-Key", diff --git a/boost/beast/http/impl/fields.hpp b/boost/beast/http/impl/fields.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/fields.ipp b/boost/beast/http/impl/fields.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/file_body_win32.hpp b/boost/beast/http/impl/file_body_win32.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/message.hpp b/boost/beast/http/impl/message.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/parser.hpp b/boost/beast/http/impl/parser.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/read.hpp b/boost/beast/http/impl/read.hpp old mode 100755 new mode 100644 index c97b6eda65b7318ef1de2c6e07acf56672b0cc95..3ddede6843bb1fcee8513b697d6fa8832090c5a1 --- a/boost/beast/http/impl/read.hpp +++ b/boost/beast/http/impl/read.hpp @@ -97,6 +97,10 @@ public: , d_(beast::allocate_stable( *this, s, m)) { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "http::async_read(msg)")); + http::async_read(d_.s, b, d_.p, std::move(*this)); } @@ -203,6 +207,11 @@ public: b_, size, ec, error::buffer_overflow); if(ec) goto upcall; + + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "http::async_read_some")); + s_.async_read_some(*mb, std::move(self)); } b_.commit(bytes_transferred); @@ -230,8 +239,14 @@ public: if(! cont_) { BOOST_ASIO_CORO_YIELD + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "http::async_read_some")); + net::post( beast::bind_front_handler(std::move(self), ec)); + } } self.complete(ec, bytes_transferred_); } @@ -264,15 +279,27 @@ public: if (Condition{}(p_)) { BOOST_ASIO_CORO_YIELD + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "http::async_read")); + net::post(std::move(self)); + } } else { do { BOOST_ASIO_CORO_YIELD + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "http::async_read")); + async_read_some( s_, b_, p_, std::move(self)); + } bytes_transferred_ += bytes_transferred; } while (!ec && !Condition{}(p_)); diff --git a/boost/beast/http/impl/rfc7230.hpp b/boost/beast/http/impl/rfc7230.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/rfc7230.ipp b/boost/beast/http/impl/rfc7230.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/serializer.hpp b/boost/beast/http/impl/serializer.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/status.ipp b/boost/beast/http/impl/status.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/verb.ipp b/boost/beast/http/impl/verb.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/http/impl/write.hpp b/boost/beast/http/impl/write.hpp old mode 100755 new mode 100644 index 671108da71530eda283ad4b7ae89ea340aef027a..c0819a16f0650db496cc0671e88b911cc8f2c999 --- a/boost/beast/http/impl/write.hpp +++ b/boost/beast/http/impl/write.hpp @@ -60,6 +60,10 @@ class write_some_op error_code& ec, ConstBufferSequence const& buffers) { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "http::async_write_some")); + invoked = true; ec = {}; op_.s_.async_write_some( @@ -93,6 +97,11 @@ public: if(ec) { BOOST_ASSERT(! f.invoked); + + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "http::async_write_some")); + return net::post( s_.get_executor(), beast::bind_front_handler( @@ -107,6 +116,10 @@ public: BOOST_ASSERT(sr_.is_done()); } + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "http::async_write_some")); + return net::post( s_.get_executor(), beast::bind_front_handler( @@ -191,16 +204,28 @@ public: if(Predicate{}(sr_)) { BOOST_ASIO_CORO_YIELD - net::post( - s_.get_executor(), - std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "http::async_write")); + + net::post( + s_.get_executor(), + std::move(*this)); + } goto upcall; } for(;;) { BOOST_ASIO_CORO_YIELD - beast::http::async_write_some( - s_, sr_, std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "http::async_write")); + + beast::http::async_write_some( + s_, sr_, std::move(*this)); + } bytes_transferred_ += bytes_transferred; if(ec) goto upcall; @@ -248,6 +273,10 @@ public: void operator()() { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "http::async_write(msg)")); + async_write(s_, sr_, std::move(*this)); } diff --git a/boost/beast/http/message.hpp b/boost/beast/http/message.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/parser.hpp b/boost/beast/http/parser.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/read.hpp b/boost/beast/http/read.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/rfc7230.hpp b/boost/beast/http/rfc7230.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/serializer.hpp b/boost/beast/http/serializer.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/span_body.hpp b/boost/beast/http/span_body.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/status.hpp b/boost/beast/http/status.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/string_body.hpp b/boost/beast/http/string_body.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/type_traits.hpp b/boost/beast/http/type_traits.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/vector_body.hpp b/boost/beast/http/vector_body.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/verb.hpp b/boost/beast/http/verb.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/http/write.hpp b/boost/beast/http/write.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/src.hpp b/boost/beast/src.hpp old mode 100755 new mode 100644 index 2376c3fcc2b1c97f06bf6600cecb2be05d2ff463..62229d249097deb86c611dcdeb3f9a302065883e --- a/boost/beast/src.hpp +++ b/boost/beast/src.hpp @@ -28,6 +28,7 @@ the program, with the macro BOOST_BEAST_SEPARATE_COMPILATION defined. #include #include #include +#include #include #include diff --git a/boost/beast/ssl.hpp b/boost/beast/ssl.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/ssl/ssl_stream.hpp b/boost/beast/ssl/ssl_stream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/version.hpp b/boost/beast/version.hpp old mode 100755 new mode 100644 index 2efd68c7cefed22b8aad04be602e6211a245ec53..b6de4ae47315c22bea3c8937f924d2236835ab8f --- a/boost/beast/version.hpp +++ b/boost/beast/version.hpp @@ -20,7 +20,7 @@ This is a simple integer that is incremented by one every time a set of code changes is merged to the develop branch. */ -#define BOOST_BEAST_VERSION 300 +#define BOOST_BEAST_VERSION 313 #define BOOST_BEAST_VERSION_STRING "Boost.Beast/" BOOST_STRINGIZE(BOOST_BEAST_VERSION) diff --git a/boost/beast/websocket.hpp b/boost/beast/websocket.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/decorator.hpp b/boost/beast/websocket/detail/decorator.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/frame.hpp b/boost/beast/websocket/detail/frame.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/hybi13.hpp b/boost/beast/websocket/detail/hybi13.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/hybi13.ipp b/boost/beast/websocket/detail/hybi13.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/impl_base.hpp b/boost/beast/websocket/detail/impl_base.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/mask.hpp b/boost/beast/websocket/detail/mask.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/mask.ipp b/boost/beast/websocket/detail/mask.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/pmd_extension.hpp b/boost/beast/websocket/detail/pmd_extension.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/pmd_extension.ipp b/boost/beast/websocket/detail/pmd_extension.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/prng.hpp b/boost/beast/websocket/detail/prng.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/prng.ipp b/boost/beast/websocket/detail/prng.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/service.hpp b/boost/beast/websocket/detail/service.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/service.ipp b/boost/beast/websocket/detail/service.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/soft_mutex.hpp b/boost/beast/websocket/detail/soft_mutex.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/type_traits.hpp b/boost/beast/websocket/detail/type_traits.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/utf8_checker.hpp b/boost/beast/websocket/detail/utf8_checker.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/detail/utf8_checker.ipp b/boost/beast/websocket/detail/utf8_checker.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/error.hpp b/boost/beast/websocket/error.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/impl/accept.hpp b/boost/beast/websocket/impl/accept.hpp old mode 100755 new mode 100644 index 5bc592fe8ed631ce16875a5cb5fdb1c812fc05dd..588aa5da605c03f1a31cd843b7f115501bb0d683 --- a/boost/beast/websocket/impl/accept.hpp +++ b/boost/beast/websocket/impl/accept.hpp @@ -215,8 +215,14 @@ public: // Send response BOOST_ASIO_CORO_YIELD - http::async_write( - impl.stream(), res_, std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_accept")); + + http::async_write( + impl.stream(), res_, std::move(*this)); + } if(impl.check_stop_now(ec)) goto upcall; if(! ec) @@ -298,8 +304,14 @@ public: goto upcall; BOOST_ASIO_CORO_YIELD - http::async_read(impl.stream(), - impl.rd_buf, p_, std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_accept")); + + http::async_read(impl.stream(), + impl.rd_buf, p_, std::move(*this)); + } if(ec == http::error::end_of_stream) ec = error::closed; if(impl.check_stop_now(ec)) diff --git a/boost/beast/websocket/impl/close.hpp b/boost/beast/websocket/impl/close.hpp old mode 100755 new mode 100644 index 2b7d72932e07761ec619aeb7fc9a232da820731f..4e42c3668c2fd1ec3bc90a0372546cfbec86490c --- a/boost/beast/websocket/impl/close.hpp +++ b/boost/beast/websocket/impl/close.hpp @@ -86,10 +86,22 @@ public: if(! impl.wr_block.try_lock(this)) { BOOST_ASIO_CORO_YIELD - impl.op_close.emplace(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_close")); + + impl.op_close.emplace(std::move(*this)); + } impl.wr_block.lock(this); BOOST_ASIO_CORO_YIELD - net::post(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_close")); + + net::post(std::move(*this)); + } BOOST_ASSERT(impl.wr_block.is_locked(this)); } if(impl.check_stop_now(ec)) @@ -104,8 +116,14 @@ public: impl.change_status(status::closing); impl.update_timer(this->get_executor()); BOOST_ASIO_CORO_YIELD - net::async_write(impl.stream(), fb_.data(), - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_close")); + + net::async_write(impl.stream(), fb_.data(), + beast::detail::bind_continuation(std::move(*this))); + } if(impl.check_stop_now(ec)) goto upcall; @@ -121,10 +139,22 @@ public: if(! impl.rd_block.try_lock(this)) { BOOST_ASIO_CORO_YIELD - impl.op_r_close.emplace(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_close")); + + impl.op_r_close.emplace(std::move(*this)); + } impl.rd_block.lock(this); BOOST_ASIO_CORO_YIELD - net::post(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_close")); + + net::post(std::move(*this)); + } BOOST_ASSERT(impl.rd_block.is_locked(this)); if(impl.check_stop_now(ec)) goto upcall; @@ -144,10 +174,16 @@ public: if(ev_) goto teardown; BOOST_ASIO_CORO_YIELD - impl.stream().async_read_some( - impl.rd_buf.prepare(read_size( - impl.rd_buf, impl.rd_buf.max_size())), - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_close")); + + impl.stream().async_read_some( + impl.rd_buf.prepare(read_size( + impl.rd_buf, impl.rd_buf.max_size())), + beast::detail::bind_continuation(std::move(*this))); + } impl.rd_buf.commit(bytes_transferred); if(impl.check_stop_now(ec)) goto upcall; @@ -184,10 +220,16 @@ public: impl.rd_remain -= impl.rd_buf.size(); impl.rd_buf.consume(impl.rd_buf.size()); BOOST_ASIO_CORO_YIELD - impl.stream().async_read_some( - impl.rd_buf.prepare(read_size( - impl.rd_buf, impl.rd_buf.max_size())), - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_close")); + + impl.stream().async_read_some( + impl.rd_buf.prepare(read_size( + impl.rd_buf, impl.rd_buf.max_size())), + beast::detail::bind_continuation(std::move(*this))); + } impl.rd_buf.commit(bytes_transferred); if(impl.check_stop_now(ec)) goto upcall; @@ -202,8 +244,14 @@ public: BOOST_ASSERT(impl.wr_block.is_locked(this)); using beast::websocket::async_teardown; BOOST_ASIO_CORO_YIELD - async_teardown(impl.role, impl.stream(), - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_close")); + + async_teardown(impl.role, impl.stream(), + beast::detail::bind_continuation(std::move(*this))); + } BOOST_ASSERT(impl.wr_block.is_locked(this)); if(ec == net::error::eof) { diff --git a/boost/beast/websocket/impl/error.hpp b/boost/beast/websocket/impl/error.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/impl/error.ipp b/boost/beast/websocket/impl/error.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/impl/handshake.hpp b/boost/beast/websocket/impl/handshake.hpp old mode 100755 new mode 100644 index c1ed0264850b2533f1d826720025f837d76ad263..2298decf9f38eee23d0b9566d3139afd96a8c5eb --- a/boost/beast/websocket/impl/handshake.hpp +++ b/boost/beast/websocket/impl/handshake.hpp @@ -105,16 +105,28 @@ public: // write HTTP request impl.do_pmd_config(d_.req); BOOST_ASIO_CORO_YIELD - http::async_write(impl.stream(), - d_.req, std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_handshake")); + + http::async_write(impl.stream(), + d_.req, std::move(*this)); + } if(impl.check_stop_now(ec)) goto upcall; // read HTTP response BOOST_ASIO_CORO_YIELD - http::async_read(impl.stream(), - impl.rd_buf, d_.p, - std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_handshake")); + + http::async_read(impl.stream(), + impl.rd_buf, d_.p, + std::move(*this)); + } if(ec == http::error::buffer_overflow) { // If the response overflows the internal @@ -127,8 +139,14 @@ public: impl.rd_buf.clear(); BOOST_ASIO_CORO_YIELD - http::async_read(impl.stream(), - d_.fb, d_.p, std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_handshake")); + + http::async_read(impl.stream(), + d_.fb, d_.p, std::move(*this)); + } if(! ec) { diff --git a/boost/beast/websocket/impl/ping.hpp b/boost/beast/websocket/impl/ping.hpp old mode 100755 new mode 100644 index eef9983b3701073cf2f9012c9eafedd9c8ab53b7..735c854350cef77a5a16ea362d44abafcd5b28ae --- a/boost/beast/websocket/impl/ping.hpp +++ b/boost/beast/websocket/impl/ping.hpp @@ -82,10 +82,22 @@ public: if(! impl.wr_block.try_lock(this)) { BOOST_ASIO_CORO_YIELD - impl.op_ping.emplace(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_ping")); + + impl.op_ping.emplace(std::move(*this)); + } impl.wr_block.lock(this); BOOST_ASIO_CORO_YIELD - net::post(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_ping")); + + net::post(std::move(*this)); + } BOOST_ASSERT(impl.wr_block.is_locked(this)); } if(impl.check_stop_now(ec)) @@ -93,8 +105,14 @@ public: // Send ping frame BOOST_ASIO_CORO_YIELD - net::async_write(impl.stream(), fb_.data(), - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_ping")); + + net::async_write(impl.stream(), fb_.data(), + beast::detail::bind_continuation(std::move(*this))); + } if(impl.check_stop_now(ec)) goto upcall; @@ -173,11 +191,23 @@ public: if(! impl.wr_block.try_lock(this)) { BOOST_ASIO_CORO_YIELD - impl.op_idle_ping.emplace(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_ping")); + + impl.op_idle_ping.emplace(std::move(*this)); + } impl.wr_block.lock(this); BOOST_ASIO_CORO_YIELD - net::post( - this->get_executor(), std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_ping")); + + net::post( + this->get_executor(), std::move(*this)); + } BOOST_ASSERT(impl.wr_block.is_locked(this)); } if(impl.check_stop_now(ec)) @@ -185,9 +215,14 @@ public: // Send ping frame BOOST_ASIO_CORO_YIELD - net::async_write(impl.stream(), fb_->data(), - //beast::detail::bind_continuation(std::move(*this))); - std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_ping")); + + net::async_write(impl.stream(), fb_->data(), + std::move(*this)); + } if(impl.check_stop_now(ec)) goto upcall; diff --git a/boost/beast/websocket/impl/read.hpp b/boost/beast/websocket/impl/read.hpp old mode 100755 new mode 100644 index 9d788be1cce1fc4d0a794662cf87256b7ce85421..714639698274ba3b2413bbb57b099e6dbfb6a2b0 --- a/boost/beast/websocket/impl/read.hpp +++ b/boost/beast/websocket/impl/read.hpp @@ -102,10 +102,22 @@ public: { do_suspend: BOOST_ASIO_CORO_YIELD - impl.op_r_rd.emplace(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + impl.op_r_rd.emplace(std::move(*this)); + } impl.rd_block.lock(this); BOOST_ASIO_CORO_YIELD - net::post(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + net::post(std::move(*this)); + } BOOST_ASSERT(impl.rd_block.is_locked(this)); BOOST_ASSERT(!ec); @@ -162,10 +174,16 @@ public: } BOOST_ASSERT(impl.rd_block.is_locked(this)); BOOST_ASIO_CORO_YIELD - impl.stream().async_read_some( - impl.rd_buf.prepare(read_size( - impl.rd_buf, impl.rd_buf.max_size())), - std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + impl.stream().async_read_some( + impl.rd_buf.prepare(read_size( + impl.rd_buf, impl.rd_buf.max_size())), + std::move(*this)); + } BOOST_ASSERT(impl.rd_block.is_locked(this)); impl.rd_buf.commit(bytes_transferred); if(impl.check_stop_now(ec)) @@ -205,7 +223,13 @@ public: if(! cont) { BOOST_ASIO_CORO_YIELD - net::post(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + net::post(std::move(*this)); + } BOOST_ASSERT(cont); // VFALCO call check_stop_now() here? } @@ -240,10 +264,22 @@ public: if(! impl.wr_block.try_lock(this)) { BOOST_ASIO_CORO_YIELD - impl.op_rd.emplace(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + impl.op_rd.emplace(std::move(*this)); + } impl.wr_block.lock(this); BOOST_ASIO_CORO_YIELD - net::post(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + net::post(std::move(*this)); + } BOOST_ASSERT(impl.wr_block.is_locked(this)); if(impl.check_stop_now(ec)) goto upcall; @@ -252,9 +288,15 @@ public: // Send pong BOOST_ASSERT(impl.wr_block.is_locked(this)); BOOST_ASIO_CORO_YIELD - net::async_write( - impl.stream(), impl.rd_fb.data(), - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + net::async_write( + impl.stream(), net::const_buffer(impl.rd_fb.data()), + beast::detail::bind_continuation(std::move(*this))); + } BOOST_ASSERT(impl.wr_block.is_locked(this)); if(impl.check_stop_now(ec)) goto upcall; @@ -275,7 +317,13 @@ public: if(! cont) { BOOST_ASIO_CORO_YIELD - net::post(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + net::post(std::move(*this)); + } BOOST_ASSERT(cont); } } @@ -300,7 +348,13 @@ public: if(! cont) { BOOST_ASIO_CORO_YIELD - net::post(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + net::post(std::move(*this)); + } BOOST_ASSERT(cont); } } @@ -358,10 +412,16 @@ public: // Fill the read buffer first, otherwise we // get fewer bytes at the cost of one I/O. BOOST_ASIO_CORO_YIELD - impl.stream().async_read_some( - impl.rd_buf.prepare(read_size( - impl.rd_buf, impl.rd_buf.max_size())), - std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + impl.stream().async_read_some( + impl.rd_buf.prepare(read_size( + impl.rd_buf, impl.rd_buf.max_size())), + std::move(*this)); + } impl.rd_buf.commit(bytes_transferred); if(impl.check_stop_now(ec)) goto upcall; @@ -404,8 +464,14 @@ public: BOOST_ASSERT(buffer_bytes(buffers_prefix( clamp(impl.rd_remain), cb_)) > 0); BOOST_ASIO_CORO_YIELD - impl.stream().async_read_some(buffers_prefix( - clamp(impl.rd_remain), cb_), std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + impl.stream().async_read_some(buffers_prefix( + clamp(impl.rd_remain), cb_), std::move(*this)); + } if(impl.check_stop_now(ec)) goto upcall; impl.reset_idle(); @@ -448,10 +514,16 @@ public: { // read new BOOST_ASIO_CORO_YIELD - impl.stream().async_read_some( - impl.rd_buf.prepare(read_size( - impl.rd_buf, impl.rd_buf.max_size())), - std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + impl.stream().async_read_some( + impl.rd_buf.prepare(read_size( + impl.rd_buf, impl.rd_buf.max_size())), + std::move(*this)); + } if(impl.check_stop_now(ec)) goto upcall; impl.reset_idle(); @@ -470,6 +542,8 @@ public: zs.avail_out = out.size(); BOOST_ASSERT(zs.avail_out > 0); } + // boolean to track the end of the message. + bool fin = false; if(impl.rd_remain > 0) { if(impl.rd_buf.size() > 0) @@ -489,22 +563,11 @@ public: else if(impl.rd_fh.fin) { // append the empty block codes - std::uint8_t constexpr + static std::uint8_t constexpr empty_block[4] = { 0x00, 0x00, 0xff, 0xff }; zs.next_in = empty_block; zs.avail_in = sizeof(empty_block); - impl.inflate(zs, zlib::Flush::sync, ec); - if(! ec) - { - // https://github.com/madler/zlib/issues/280 - if(zs.total_out > 0) - ec = error::partial_deflate_block; - } - if(impl.check_stop_now(ec)) - goto upcall; - impl.do_context_takeover_read(impl.role); - impl.rd_done = true; - break; + fin = true; } else { @@ -513,6 +576,11 @@ public: impl.inflate(zs, zlib::Flush::sync, ec); if(impl.check_stop_now(ec)) goto upcall; + if(fin && zs.total_out == 0) { + impl.do_context_takeover_read(impl.role); + impl.rd_done = true; + break; + } if(impl.rd_msg_max && beast::detail::sum_exceeds( impl.rd_size, zs.total_out, impl.rd_msg_max)) { @@ -523,8 +591,10 @@ public: } cb_.consume(zs.total_out); impl.rd_size += zs.total_out; - impl.rd_remain -= zs.total_in; - impl.rd_buf.consume(zs.total_in); + if (! fin) { + impl.rd_remain -= zs.total_in; + impl.rd_buf.consume(zs.total_in); + } bytes_written_ += zs.total_out; } if(impl.rd_op == detail::opcode::text) @@ -548,10 +618,22 @@ public: if(! impl.wr_block.try_lock(this)) { BOOST_ASIO_CORO_YIELD - impl.op_rd.emplace(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + impl.op_rd.emplace(std::move(*this)); + } impl.wr_block.lock(this); BOOST_ASIO_CORO_YIELD - net::post(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + net::post(std::move(*this)); + } BOOST_ASSERT(impl.wr_block.is_locked(this)); if(impl.check_stop_now(ec)) goto upcall; @@ -572,8 +654,14 @@ public: // Send close frame BOOST_ASSERT(impl.wr_block.is_locked(this)); BOOST_ASIO_CORO_YIELD - net::async_write(impl.stream(), impl.rd_fb.data(), - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + net::async_write(impl.stream(), net::const_buffer(impl.rd_fb.data()), + beast::detail::bind_continuation(std::move(*this))); + } BOOST_ASSERT(impl.wr_block.is_locked(this)); if(impl.check_stop_now(ec)) goto upcall; @@ -583,8 +671,14 @@ public: using beast::websocket::async_teardown; BOOST_ASSERT(impl.wr_block.is_locked(this)); BOOST_ASIO_CORO_YIELD - async_teardown(impl.role, impl.stream(), - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read_some")); + + async_teardown(impl.role, impl.stream(), + beast::detail::bind_continuation(std::move(*this))); + } BOOST_ASSERT(impl.wr_block.is_locked(this)); if(ec == net::error::eof) { @@ -677,6 +771,11 @@ public: ec, error::buffer_overflow); if(impl.check_stop_now(ec)) goto upcall; + + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::async_read")); + read_some_op( std::move(*this), sp, *mb); } @@ -1164,6 +1263,8 @@ loop: zs.avail_out = out.size(); BOOST_ASSERT(zs.avail_out > 0); } + // boolean to track the end of the message. + bool fin = false; if(impl.rd_remain > 0) { if(impl.rd_buf.size() > 0) @@ -1207,22 +1308,10 @@ loop: { // append the empty block codes static std::uint8_t constexpr - empty_block[4] = { - 0x00, 0x00, 0xff, 0xff }; + empty_block[4] = { 0x00, 0x00, 0xff, 0xff }; zs.next_in = empty_block; zs.avail_in = sizeof(empty_block); - impl.inflate(zs, zlib::Flush::sync, ec); - if(! ec) - { - // https://github.com/madler/zlib/issues/280 - if(zs.total_out > 0) - ec = error::partial_deflate_block; - } - if(impl.check_stop_now(ec)) - return bytes_written; - impl.do_context_takeover_read(impl.role); - impl.rd_done = true; - break; + fin = true; } else { @@ -1231,6 +1320,11 @@ loop: impl.inflate(zs, zlib::Flush::sync, ec); if(impl.check_stop_now(ec)) return bytes_written; + if (fin && zs.total_out == 0) { + impl.do_context_takeover_read(impl.role); + impl.rd_done = true; + break; + } if(impl.rd_msg_max && beast::detail::sum_exceeds( impl.rd_size, zs.total_out, impl.rd_msg_max)) { @@ -1240,8 +1334,10 @@ loop: } cb.consume(zs.total_out); impl.rd_size += zs.total_out; - impl.rd_remain -= zs.total_in; - impl.rd_buf.consume(zs.total_in); + if (! fin) { + impl.rd_remain -= zs.total_in; + impl.rd_buf.consume(zs.total_in); + } bytes_written += zs.total_out; } if(impl.rd_op == detail::opcode::text) diff --git a/boost/beast/websocket/impl/rfc6455.hpp b/boost/beast/websocket/impl/rfc6455.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/impl/ssl.hpp b/boost/beast/websocket/impl/ssl.hpp old mode 100755 new mode 100644 index f5530226193c5a64ea2bec5474ec551c0544ed99..7b9bdd63e1f3fc3560327635bef4addfb57182e1 --- a/boost/beast/websocket/impl/ssl.hpp +++ b/boost/beast/websocket/impl/ssl.hpp @@ -11,6 +11,9 @@ #define BOOST_BEAST_WEBSOCKET_IMPL_SSL_HPP #include +#include +#include +#include namespace boost { namespace beast { @@ -33,24 +36,71 @@ namespace beast { template void teardown( - role_type, - net::ssl::stream& stream, + role_type role, + boost::asio::ssl::stream& stream, error_code& ec) { stream.shutdown(ec); + using boost::beast::websocket::teardown; + error_code ec2; + teardown(role, stream.next_layer(), ec ? ec2 : ec); } +namespace detail { + +template +struct ssl_shutdown_op + : boost::asio::coroutine +{ + ssl_shutdown_op( + boost::asio::ssl::stream& s, + role_type role) + : s_(s) + , role_(role) + { + } + + template + void + operator()(Self& self, error_code ec = {}, std::size_t = 0) + { + BOOST_ASIO_CORO_REENTER(*this) + { + BOOST_ASIO_CORO_YIELD + s_.async_shutdown(std::move(self)); + ec_ = ec; + + using boost::beast::websocket::async_teardown; + BOOST_ASIO_CORO_YIELD + async_teardown(role_, s_.next_layer(), std::move(self)); + if (!ec_) + ec_ = ec; + + self.complete(ec_); + } + } + +private: + boost::asio::ssl::stream& s_; + role_type role_; + error_code ec_; +}; + +} // detail + template< class AsyncStream, class TeardownHandler> void async_teardown( - role_type, - net::ssl::stream& stream, + role_type role, + boost::asio::ssl::stream& stream, TeardownHandler&& handler) { - stream.async_shutdown( - std::forward(handler)); + return boost::asio::async_compose( + detail::ssl_shutdown_op(stream, role), + handler, + stream); } } // beast diff --git a/boost/beast/websocket/impl/stream.hpp b/boost/beast/websocket/impl/stream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/impl/stream_impl.hpp b/boost/beast/websocket/impl/stream_impl.hpp old mode 100755 new mode 100644 index 53e18157b7b8b44ee6ee4144addd069c469a4a42..01c0be847ea87975fc6321d390fde526fd7fcc58 --- a/boost/beast/websocket/impl/stream_impl.hpp +++ b/boost/beast/websocket/impl/stream_impl.hpp @@ -420,6 +420,12 @@ struct stream::impl_type { timer.expires_after( timeout_opt.handshake_timeout); + + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::check_stop_now" + )); + timer.async_wait( timeout_handler( ex, this->weak_from_this())); @@ -436,6 +442,12 @@ struct stream::impl_type else timer.expires_after( timeout_opt.idle_timeout); + + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::check_stop_now" + )); + timer.async_wait( timeout_handler( ex, this->weak_from_this())); @@ -453,6 +465,12 @@ struct stream::impl_type idle_counter = 0; timer.expires_after( timeout_opt.handshake_timeout); + + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::check_stop_now" + )); + timer.async_wait( timeout_handler( ex, this->weak_from_this())); @@ -551,12 +569,26 @@ private: if( impl.timeout_opt.keep_alive_pings && impl.idle_counter < 1) { - idle_ping_op(sp, get_executor()); - + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::timeout_handler" + )); + + idle_ping_op(sp, get_executor()); + } ++impl.idle_counter; impl.timer.expires_after( impl.timeout_opt.idle_timeout / 2); - impl.timer.async_wait(std::move(*this)); + + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::timeout_handler" + )); + + impl.timer.async_wait(std::move(*this)); + } return; } diff --git a/boost/beast/websocket/impl/teardown.hpp b/boost/beast/websocket/impl/teardown.hpp old mode 100755 new mode 100644 index 2e2f0ad7e3a71b03082f1e7099d41ded4e8edb8a..3dfc3d2f33e46baf677eaef47533de14cc90086a --- a/boost/beast/websocket/impl/teardown.hpp +++ b/boost/beast/websocket/impl/teardown.hpp @@ -56,6 +56,7 @@ public: s.get_executor()) , s_(s) , role_(role) + , nb_(false) { (*this)({}, 0, false); } @@ -85,9 +86,16 @@ public: if(ec == net::error::would_block) { BOOST_ASIO_CORO_YIELD - s_.async_wait( - net::socket_base::wait_read, - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::tcp::async_teardown" + )); + + s_.async_wait( + net::socket_base::wait_read, + beast::detail::bind_continuation(std::move(*this))); + } continue; } if(ec) @@ -113,8 +121,15 @@ public: if(! cont) { BOOST_ASIO_CORO_YIELD - net::post(bind_front_handler( - std::move(*this), ec)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + "websocket::tcp::async_teardown" + )); + + net::post(bind_front_handler( + std::move(*this), ec)); + } } { error_code ignored; diff --git a/boost/beast/websocket/impl/write.hpp b/boost/beast/websocket/impl/write.hpp old mode 100755 new mode 100644 index b76441d39f8a5361b11d2ef5d2071132f0af5f49..6f1c80d90099277aa9fec50a25ceb7430a316010 --- a/boost/beast/websocket/impl/write.hpp +++ b/boost/beast/websocket/impl/write.hpp @@ -147,10 +147,10 @@ public: }; template -template +template void stream:: -write_some_op:: +write_some_op:: operator()( error_code ec, std::size_t bytes_transferred, @@ -174,10 +174,28 @@ operator()( { do_suspend: BOOST_ASIO_CORO_YIELD - impl.op_wr.emplace(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + fin_ ? + "websocket::async_write" : + "websocket::async_write_some" + )); + + impl.op_wr.emplace(std::move(*this)); + } impl.wr_block.lock(this); BOOST_ASIO_CORO_YIELD - net::post(std::move(*this)); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + fin_ ? + "websocket::async_write" : + "websocket::async_write_some" + )); + + net::post(std::move(*this)); + } BOOST_ASSERT(impl.wr_block.is_locked(this)); } if(impl.check_stop_now(ec)) @@ -195,9 +213,23 @@ operator()( impl.wr_fb, fh_); impl.wr_cont = ! fin_; BOOST_ASIO_CORO_YIELD - net::async_write(impl.stream(), - buffers_cat(impl.wr_fb.data(), cb_), - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + fin_ ? + "websocket::async_write" : + "websocket::async_write_some" + )); + + net::async_write(impl.stream(), + buffers_cat( + net::const_buffer(impl.wr_fb.data()), + net::const_buffer(0, 0), + cb_, + buffers_prefix(0, cb_) + ), + beast::detail::bind_continuation(std::move(*this))); + } bytes_transferred_ += clamp(fh_.len); if(impl.check_stop_now(ec)) goto upcall; @@ -221,10 +253,26 @@ operator()( impl.wr_cont = ! fin_; // Send frame BOOST_ASIO_CORO_YIELD - net::async_write(impl.stream(), buffers_cat( - impl.wr_fb.data(), - buffers_prefix(clamp(fh_.len), cb_)), - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + fin_ ? + "websocket::async_write" : + "websocket::async_write_some" + )); + + buffers_suffix empty_cb(cb_); + empty_cb.consume(~std::size_t(0)); + + net::async_write(impl.stream(), + buffers_cat( + net::const_buffer(impl.wr_fb.data()), + net::const_buffer(0, 0), + empty_cb, + buffers_prefix(clamp(fh_.len), cb_) + ), + beast::detail::bind_continuation(std::move(*this))); + } n = clamp(fh_.len); // restore `n` on yield bytes_transferred_ += n; if(impl.check_stop_now(ec)) @@ -272,10 +320,26 @@ operator()( impl.wr_cont = ! fin_; // write frame header and some payload BOOST_ASIO_CORO_YIELD - net::async_write(impl.stream(), buffers_cat( - impl.wr_fb.data(), - net::buffer(impl.wr_buf.get(), n)), - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + fin_ ? + "websocket::async_write" : + "websocket::async_write_some" + )); + + buffers_suffix empty_cb(cb_); + empty_cb.consume(~std::size_t(0)); + + net::async_write(impl.stream(), + buffers_cat( + net::const_buffer(impl.wr_fb.data()), + net::const_buffer(net::buffer(impl.wr_buf.get(), n)), + empty_cb, + buffers_prefix(0, empty_cb) + ), + beast::detail::bind_continuation(std::move(*this))); + } // VFALCO What about consuming the buffer on error? bytes_transferred_ += bytes_transferred - impl.wr_fb.size(); @@ -292,9 +356,26 @@ operator()( remain_ -= n; // write more payload BOOST_ASIO_CORO_YIELD - net::async_write(impl.stream(), - net::buffer(impl.wr_buf.get(), n), - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + fin_ ? + "websocket::async_write" : + "websocket::async_write_some" + )); + + buffers_suffix empty_cb(cb_); + empty_cb.consume(~std::size_t(0)); + + net::async_write(impl.stream(), + buffers_cat( + net::const_buffer(0, 0), + net::const_buffer(net::buffer(impl.wr_buf.get(), n)), + empty_cb, + buffers_prefix(0, empty_cb) + ), + beast::detail::bind_continuation(std::move(*this))); + } bytes_transferred_ += bytes_transferred; if(impl.check_stop_now(ec)) goto upcall; @@ -325,10 +406,26 @@ operator()( impl.wr_cont = ! fin_; // Send frame BOOST_ASIO_CORO_YIELD - net::async_write(impl.stream(), buffers_cat( - impl.wr_fb.data(), - net::buffer(impl.wr_buf.get(), n)), - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + fin_ ? + "websocket::async_write" : + "websocket::async_write_some" + )); + + buffers_suffix empty_cb(cb_); + empty_cb.consume(~std::size_t(0)); + + net::async_write(impl.stream(), + buffers_cat( + net::const_buffer(impl.wr_fb.data()), + net::const_buffer(net::buffer(impl.wr_buf.get(), n)), + empty_cb, + buffers_prefix(0, empty_cb) + ), + beast::detail::bind_continuation(std::move(*this))); + } n = bytes_transferred - impl.wr_fb.size(); bytes_transferred_ += n; if(impl.check_stop_now(ec)) @@ -389,9 +486,26 @@ operator()( impl.wr_cont = ! fin_; // Send frame BOOST_ASIO_CORO_YIELD - net::async_write(impl.stream(), buffers_cat( - impl.wr_fb.data(), b), - beast::detail::bind_continuation(std::move(*this))); + { + BOOST_ASIO_HANDLER_LOCATION(( + __FILE__, __LINE__, + fin_ ? + "websocket::async_write" : + "websocket::async_write_some" + )); + + buffers_suffix empty_cb(cb_); + empty_cb.consume(~std::size_t(0)); + + net::async_write(impl.stream(), + buffers_cat( + net::const_buffer(impl.wr_fb.data()), + net::const_buffer(b), + empty_cb, + buffers_prefix(0, empty_cb) + ), + beast::detail::bind_continuation(std::move(*this))); + } bytes_transferred_ += in_; if(impl.check_stop_now(ec)) goto upcall; diff --git a/boost/beast/websocket/option.hpp b/boost/beast/websocket/option.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/rfc6455.hpp b/boost/beast/websocket/rfc6455.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/ssl.hpp b/boost/beast/websocket/ssl.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/stream.hpp b/boost/beast/websocket/stream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/stream_base.hpp b/boost/beast/websocket/stream_base.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/stream_fwd.hpp b/boost/beast/websocket/stream_fwd.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/websocket/teardown.hpp b/boost/beast/websocket/teardown.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/zlib.hpp b/boost/beast/zlib.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/zlib/deflate_stream.hpp b/boost/beast/zlib/deflate_stream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/zlib/detail/bitstream.hpp b/boost/beast/zlib/detail/bitstream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/zlib/detail/deflate_stream.hpp b/boost/beast/zlib/detail/deflate_stream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/zlib/detail/deflate_stream.ipp b/boost/beast/zlib/detail/deflate_stream.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/zlib/detail/inflate_stream.hpp b/boost/beast/zlib/detail/inflate_stream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/zlib/detail/inflate_stream.ipp b/boost/beast/zlib/detail/inflate_stream.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/zlib/detail/ranges.hpp b/boost/beast/zlib/detail/ranges.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/zlib/detail/window.hpp b/boost/beast/zlib/detail/window.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/zlib/error.hpp b/boost/beast/zlib/error.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/zlib/impl/error.hpp b/boost/beast/zlib/impl/error.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/zlib/impl/error.ipp b/boost/beast/zlib/impl/error.ipp old mode 100755 new mode 100644 diff --git a/boost/beast/zlib/inflate_stream.hpp b/boost/beast/zlib/inflate_stream.hpp old mode 100755 new mode 100644 diff --git a/boost/beast/zlib/zlib.hpp b/boost/beast/zlib/zlib.hpp old mode 100755 new mode 100644 diff --git a/boost/compute.hpp b/boost/compute.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm.hpp b/boost/compute/algorithm.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/accumulate.hpp b/boost/compute/algorithm/accumulate.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/adjacent_difference.hpp b/boost/compute/algorithm/adjacent_difference.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/adjacent_find.hpp b/boost/compute/algorithm/adjacent_find.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/all_of.hpp b/boost/compute/algorithm/all_of.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/any_of.hpp b/boost/compute/algorithm/any_of.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/binary_search.hpp b/boost/compute/algorithm/binary_search.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/copy.hpp b/boost/compute/algorithm/copy.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/copy_if.hpp b/boost/compute/algorithm/copy_if.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/copy_n.hpp b/boost/compute/algorithm/copy_n.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/count.hpp b/boost/compute/algorithm/count.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/count_if.hpp b/boost/compute/algorithm/count_if.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/balanced_path.hpp b/boost/compute/algorithm/detail/balanced_path.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/binary_find.hpp b/boost/compute/algorithm/detail/binary_find.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/compact.hpp b/boost/compute/algorithm/detail/compact.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/copy_on_device.hpp b/boost/compute/algorithm/detail/copy_on_device.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/copy_to_device.hpp b/boost/compute/algorithm/detail/copy_to_device.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/copy_to_host.hpp b/boost/compute/algorithm/detail/copy_to_host.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/count_if_with_ballot.hpp b/boost/compute/algorithm/detail/count_if_with_ballot.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/count_if_with_reduce.hpp b/boost/compute/algorithm/detail/count_if_with_reduce.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/count_if_with_threads.hpp b/boost/compute/algorithm/detail/count_if_with_threads.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/find_extrema.hpp b/boost/compute/algorithm/detail/find_extrema.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/find_extrema_on_cpu.hpp b/boost/compute/algorithm/detail/find_extrema_on_cpu.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/find_extrema_with_atomics.hpp b/boost/compute/algorithm/detail/find_extrema_with_atomics.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/find_extrema_with_reduce.hpp b/boost/compute/algorithm/detail/find_extrema_with_reduce.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/find_if_with_atomics.hpp b/boost/compute/algorithm/detail/find_if_with_atomics.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/inplace_reduce.hpp b/boost/compute/algorithm/detail/inplace_reduce.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/insertion_sort.hpp b/boost/compute/algorithm/detail/insertion_sort.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/merge_path.hpp b/boost/compute/algorithm/detail/merge_path.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/merge_sort_on_cpu.hpp b/boost/compute/algorithm/detail/merge_sort_on_cpu.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/merge_sort_on_gpu.hpp b/boost/compute/algorithm/detail/merge_sort_on_gpu.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/merge_with_merge_path.hpp b/boost/compute/algorithm/detail/merge_with_merge_path.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/radix_sort.hpp b/boost/compute/algorithm/detail/radix_sort.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/random_fill.hpp b/boost/compute/algorithm/detail/random_fill.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/reduce_by_key.hpp b/boost/compute/algorithm/detail/reduce_by_key.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/reduce_by_key_with_scan.hpp b/boost/compute/algorithm/detail/reduce_by_key_with_scan.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/reduce_on_cpu.hpp b/boost/compute/algorithm/detail/reduce_on_cpu.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/reduce_on_gpu.hpp b/boost/compute/algorithm/detail/reduce_on_gpu.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/scan.hpp b/boost/compute/algorithm/detail/scan.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/scan_on_cpu.hpp b/boost/compute/algorithm/detail/scan_on_cpu.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/scan_on_gpu.hpp b/boost/compute/algorithm/detail/scan_on_gpu.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/search_all.hpp b/boost/compute/algorithm/detail/search_all.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/serial_accumulate.hpp b/boost/compute/algorithm/detail/serial_accumulate.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/serial_count_if.hpp b/boost/compute/algorithm/detail/serial_count_if.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/serial_find_extrema.hpp b/boost/compute/algorithm/detail/serial_find_extrema.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/serial_merge.hpp b/boost/compute/algorithm/detail/serial_merge.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/serial_reduce.hpp b/boost/compute/algorithm/detail/serial_reduce.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/serial_reduce_by_key.hpp b/boost/compute/algorithm/detail/serial_reduce_by_key.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/detail/serial_scan.hpp b/boost/compute/algorithm/detail/serial_scan.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/equal.hpp b/boost/compute/algorithm/equal.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/equal_range.hpp b/boost/compute/algorithm/equal_range.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/exclusive_scan.hpp b/boost/compute/algorithm/exclusive_scan.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/fill.hpp b/boost/compute/algorithm/fill.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/fill_n.hpp b/boost/compute/algorithm/fill_n.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/find.hpp b/boost/compute/algorithm/find.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/find_end.hpp b/boost/compute/algorithm/find_end.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/find_if.hpp b/boost/compute/algorithm/find_if.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/find_if_not.hpp b/boost/compute/algorithm/find_if_not.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/for_each.hpp b/boost/compute/algorithm/for_each.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/for_each_n.hpp b/boost/compute/algorithm/for_each_n.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/gather.hpp b/boost/compute/algorithm/gather.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/generate.hpp b/boost/compute/algorithm/generate.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/generate_n.hpp b/boost/compute/algorithm/generate_n.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/includes.hpp b/boost/compute/algorithm/includes.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/inclusive_scan.hpp b/boost/compute/algorithm/inclusive_scan.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/inner_product.hpp b/boost/compute/algorithm/inner_product.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/inplace_merge.hpp b/boost/compute/algorithm/inplace_merge.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/iota.hpp b/boost/compute/algorithm/iota.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/is_partitioned.hpp b/boost/compute/algorithm/is_partitioned.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/is_permutation.hpp b/boost/compute/algorithm/is_permutation.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/is_sorted.hpp b/boost/compute/algorithm/is_sorted.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/lexicographical_compare.hpp b/boost/compute/algorithm/lexicographical_compare.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/lower_bound.hpp b/boost/compute/algorithm/lower_bound.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/max_element.hpp b/boost/compute/algorithm/max_element.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/merge.hpp b/boost/compute/algorithm/merge.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/min_element.hpp b/boost/compute/algorithm/min_element.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/minmax_element.hpp b/boost/compute/algorithm/minmax_element.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/mismatch.hpp b/boost/compute/algorithm/mismatch.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/next_permutation.hpp b/boost/compute/algorithm/next_permutation.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/none_of.hpp b/boost/compute/algorithm/none_of.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/nth_element.hpp b/boost/compute/algorithm/nth_element.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/partial_sum.hpp b/boost/compute/algorithm/partial_sum.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/partition.hpp b/boost/compute/algorithm/partition.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/partition_copy.hpp b/boost/compute/algorithm/partition_copy.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/partition_point.hpp b/boost/compute/algorithm/partition_point.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/prev_permutation.hpp b/boost/compute/algorithm/prev_permutation.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/random_shuffle.hpp b/boost/compute/algorithm/random_shuffle.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/reduce.hpp b/boost/compute/algorithm/reduce.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/reduce_by_key.hpp b/boost/compute/algorithm/reduce_by_key.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/remove.hpp b/boost/compute/algorithm/remove.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/remove_if.hpp b/boost/compute/algorithm/remove_if.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/replace.hpp b/boost/compute/algorithm/replace.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/replace_copy.hpp b/boost/compute/algorithm/replace_copy.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/reverse.hpp b/boost/compute/algorithm/reverse.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/reverse_copy.hpp b/boost/compute/algorithm/reverse_copy.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/rotate.hpp b/boost/compute/algorithm/rotate.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/rotate_copy.hpp b/boost/compute/algorithm/rotate_copy.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/scatter.hpp b/boost/compute/algorithm/scatter.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/scatter_if.hpp b/boost/compute/algorithm/scatter_if.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/search.hpp b/boost/compute/algorithm/search.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/search_n.hpp b/boost/compute/algorithm/search_n.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/set_difference.hpp b/boost/compute/algorithm/set_difference.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/set_intersection.hpp b/boost/compute/algorithm/set_intersection.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/set_symmetric_difference.hpp b/boost/compute/algorithm/set_symmetric_difference.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/set_union.hpp b/boost/compute/algorithm/set_union.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/sort.hpp b/boost/compute/algorithm/sort.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/sort_by_key.hpp b/boost/compute/algorithm/sort_by_key.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/stable_partition.hpp b/boost/compute/algorithm/stable_partition.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/stable_sort.hpp b/boost/compute/algorithm/stable_sort.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/stable_sort_by_key.hpp b/boost/compute/algorithm/stable_sort_by_key.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/swap_ranges.hpp b/boost/compute/algorithm/swap_ranges.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/transform.hpp b/boost/compute/algorithm/transform.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/transform_if.hpp b/boost/compute/algorithm/transform_if.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/transform_reduce.hpp b/boost/compute/algorithm/transform_reduce.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/unique.hpp b/boost/compute/algorithm/unique.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/unique_copy.hpp b/boost/compute/algorithm/unique_copy.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/algorithm/upper_bound.hpp b/boost/compute/algorithm/upper_bound.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/allocator.hpp b/boost/compute/allocator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/allocator/buffer_allocator.hpp b/boost/compute/allocator/buffer_allocator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/allocator/pinned_allocator.hpp b/boost/compute/allocator/pinned_allocator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/async.hpp b/boost/compute/async.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/async/future.hpp b/boost/compute/async/future.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/async/wait.hpp b/boost/compute/async/wait.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/async/wait_guard.hpp b/boost/compute/async/wait_guard.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/buffer.hpp b/boost/compute/buffer.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/cl.hpp b/boost/compute/cl.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/cl_ext.hpp b/boost/compute/cl_ext.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/closure.hpp b/boost/compute/closure.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/command_queue.hpp b/boost/compute/command_queue.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/config.hpp b/boost/compute/config.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/container.hpp b/boost/compute/container.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/container/array.hpp b/boost/compute/container/array.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/container/basic_string.hpp b/boost/compute/container/basic_string.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/container/detail/scalar.hpp b/boost/compute/container/detail/scalar.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/container/dynamic_bitset.hpp b/boost/compute/container/dynamic_bitset.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/container/flat_map.hpp b/boost/compute/container/flat_map.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/container/flat_set.hpp b/boost/compute/container/flat_set.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/container/mapped_view.hpp b/boost/compute/container/mapped_view.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/container/stack.hpp b/boost/compute/container/stack.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/container/string.hpp b/boost/compute/container/string.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/container/valarray.hpp b/boost/compute/container/valarray.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/container/vector.hpp b/boost/compute/container/vector.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/context.hpp b/boost/compute/context.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/core.hpp b/boost/compute/core.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/assert_cl_success.hpp b/boost/compute/detail/assert_cl_success.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/buffer_value.hpp b/boost/compute/detail/buffer_value.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/cl_versions.hpp b/boost/compute/detail/cl_versions.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/device_ptr.hpp b/boost/compute/detail/device_ptr.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/diagnostic.hpp b/boost/compute/detail/diagnostic.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/duration.hpp b/boost/compute/detail/duration.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/get_object_info.hpp b/boost/compute/detail/get_object_info.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/getenv.hpp b/boost/compute/detail/getenv.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/global_static.hpp b/boost/compute/detail/global_static.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/is_buffer_iterator.hpp b/boost/compute/detail/is_buffer_iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/is_contiguous_iterator.hpp b/boost/compute/detail/is_contiguous_iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/iterator_plus_distance.hpp b/boost/compute/detail/iterator_plus_distance.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/iterator_range_size.hpp b/boost/compute/detail/iterator_range_size.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/iterator_traits.hpp b/boost/compute/detail/iterator_traits.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/literal.hpp b/boost/compute/detail/literal.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/lru_cache.hpp b/boost/compute/detail/lru_cache.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/meta_kernel.hpp b/boost/compute/detail/meta_kernel.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/mpl_vector_to_tuple.hpp b/boost/compute/detail/mpl_vector_to_tuple.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/nvidia_compute_capability.hpp b/boost/compute/detail/nvidia_compute_capability.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/parameter_cache.hpp b/boost/compute/detail/parameter_cache.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/path.hpp b/boost/compute/detail/path.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/print_range.hpp b/boost/compute/detail/print_range.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/read_write_single_value.hpp b/boost/compute/detail/read_write_single_value.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/sha1.hpp b/boost/compute/detail/sha1.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/variadic_macros.hpp b/boost/compute/detail/variadic_macros.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/vendor.hpp b/boost/compute/detail/vendor.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/detail/work_size.hpp b/boost/compute/detail/work_size.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/device.hpp b/boost/compute/device.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/event.hpp b/boost/compute/event.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/exception.hpp b/boost/compute/exception.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/exception/context_error.hpp b/boost/compute/exception/context_error.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/exception/no_device_found.hpp b/boost/compute/exception/no_device_found.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/exception/opencl_error.hpp b/boost/compute/exception/opencl_error.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/exception/program_build_failure.hpp b/boost/compute/exception/program_build_failure.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/exception/unsupported_extension_error.hpp b/boost/compute/exception/unsupported_extension_error.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/experimental/clamp_range.hpp b/boost/compute/experimental/clamp_range.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/experimental/malloc.hpp b/boost/compute/experimental/malloc.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/experimental/sort_by_transform.hpp b/boost/compute/experimental/sort_by_transform.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/experimental/tabulate.hpp b/boost/compute/experimental/tabulate.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/function.hpp b/boost/compute/function.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional.hpp b/boost/compute/functional.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/as.hpp b/boost/compute/functional/as.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/atomic.hpp b/boost/compute/functional/atomic.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/bind.hpp b/boost/compute/functional/bind.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/common.hpp b/boost/compute/functional/common.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/convert.hpp b/boost/compute/functional/convert.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/detail/macros.hpp b/boost/compute/functional/detail/macros.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/detail/nvidia_ballot.hpp b/boost/compute/functional/detail/nvidia_ballot.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/detail/nvidia_popcount.hpp b/boost/compute/functional/detail/nvidia_popcount.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/detail/unpack.hpp b/boost/compute/functional/detail/unpack.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/field.hpp b/boost/compute/functional/field.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/geometry.hpp b/boost/compute/functional/geometry.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/get.hpp b/boost/compute/functional/get.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/hash.hpp b/boost/compute/functional/hash.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/identity.hpp b/boost/compute/functional/identity.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/integer.hpp b/boost/compute/functional/integer.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/logical.hpp b/boost/compute/functional/logical.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/math.hpp b/boost/compute/functional/math.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/operator.hpp b/boost/compute/functional/operator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/popcount.hpp b/boost/compute/functional/popcount.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/functional/relational.hpp b/boost/compute/functional/relational.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/image.hpp b/boost/compute/image.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/image/image1d.hpp b/boost/compute/image/image1d.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/image/image2d.hpp b/boost/compute/image/image2d.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/image/image3d.hpp b/boost/compute/image/image3d.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/image/image_format.hpp b/boost/compute/image/image_format.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/image/image_object.hpp b/boost/compute/image/image_object.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/image/image_sampler.hpp b/boost/compute/image/image_sampler.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/image2d.hpp b/boost/compute/image2d.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/image3d.hpp b/boost/compute/image3d.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/image_format.hpp b/boost/compute/image_format.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/image_sampler.hpp b/boost/compute/image_sampler.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/eigen.hpp b/boost/compute/interop/eigen.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/eigen/core.hpp b/boost/compute/interop/eigen/core.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/opencv.hpp b/boost/compute/interop/opencv.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/opencv/core.hpp b/boost/compute/interop/opencv/core.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/opencv/highgui.hpp b/boost/compute/interop/opencv/highgui.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/opencv/ocl.hpp b/boost/compute/interop/opencv/ocl.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/opengl.hpp b/boost/compute/interop/opengl.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/opengl/acquire.hpp b/boost/compute/interop/opengl/acquire.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/opengl/cl_gl.hpp b/boost/compute/interop/opengl/cl_gl.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/opengl/cl_gl_ext.hpp b/boost/compute/interop/opengl/cl_gl_ext.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/opengl/context.hpp b/boost/compute/interop/opengl/context.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/opengl/gl.hpp b/boost/compute/interop/opengl/gl.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/opengl/opengl_buffer.hpp b/boost/compute/interop/opengl/opengl_buffer.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/opengl/opengl_renderbuffer.hpp b/boost/compute/interop/opengl/opengl_renderbuffer.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/opengl/opengl_texture.hpp b/boost/compute/interop/opengl/opengl_texture.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/qt.hpp b/boost/compute/interop/qt.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/qt/qimage.hpp b/boost/compute/interop/qt/qimage.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/qt/qpoint.hpp b/boost/compute/interop/qt/qpoint.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/qt/qpointf.hpp b/boost/compute/interop/qt/qpointf.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/qt/qtcore.hpp b/boost/compute/interop/qt/qtcore.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/qt/qtgui.hpp b/boost/compute/interop/qt/qtgui.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/qt/qvector.hpp b/boost/compute/interop/qt/qvector.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/vtk.hpp b/boost/compute/interop/vtk.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/vtk/bounds.hpp b/boost/compute/interop/vtk/bounds.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/vtk/data_array.hpp b/boost/compute/interop/vtk/data_array.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/vtk/matrix4x4.hpp b/boost/compute/interop/vtk/matrix4x4.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/interop/vtk/points.hpp b/boost/compute/interop/vtk/points.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/iterator.hpp b/boost/compute/iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/iterator/buffer_iterator.hpp b/boost/compute/iterator/buffer_iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/iterator/constant_buffer_iterator.hpp b/boost/compute/iterator/constant_buffer_iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/iterator/constant_iterator.hpp b/boost/compute/iterator/constant_iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/iterator/counting_iterator.hpp b/boost/compute/iterator/counting_iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/iterator/detail/get_base_iterator_buffer.hpp b/boost/compute/iterator/detail/get_base_iterator_buffer.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/iterator/detail/swizzle_iterator.hpp b/boost/compute/iterator/detail/swizzle_iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/iterator/discard_iterator.hpp b/boost/compute/iterator/discard_iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/iterator/function_input_iterator.hpp b/boost/compute/iterator/function_input_iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/iterator/permutation_iterator.hpp b/boost/compute/iterator/permutation_iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/iterator/strided_iterator.hpp b/boost/compute/iterator/strided_iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/iterator/transform_iterator.hpp b/boost/compute/iterator/transform_iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/iterator/zip_iterator.hpp b/boost/compute/iterator/zip_iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/kernel.hpp b/boost/compute/kernel.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/lambda.hpp b/boost/compute/lambda.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/lambda/context.hpp b/boost/compute/lambda/context.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/lambda/functional.hpp b/boost/compute/lambda/functional.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/lambda/get.hpp b/boost/compute/lambda/get.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/lambda/make_pair.hpp b/boost/compute/lambda/make_pair.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/lambda/make_tuple.hpp b/boost/compute/lambda/make_tuple.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/lambda/placeholder.hpp b/boost/compute/lambda/placeholder.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/lambda/placeholders.hpp b/boost/compute/lambda/placeholders.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/lambda/result_of.hpp b/boost/compute/lambda/result_of.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/memory.hpp b/boost/compute/memory.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/memory/local_buffer.hpp b/boost/compute/memory/local_buffer.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/memory/svm_ptr.hpp b/boost/compute/memory/svm_ptr.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/memory_object.hpp b/boost/compute/memory_object.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/pipe.hpp b/boost/compute/pipe.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/platform.hpp b/boost/compute/platform.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/program.hpp b/boost/compute/program.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/random.hpp b/boost/compute/random.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/random/bernoulli_distribution.hpp b/boost/compute/random/bernoulli_distribution.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/random/default_random_engine.hpp b/boost/compute/random/default_random_engine.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/random/discrete_distribution.hpp b/boost/compute/random/discrete_distribution.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/random/linear_congruential_engine.hpp b/boost/compute/random/linear_congruential_engine.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/random/mersenne_twister_engine.hpp b/boost/compute/random/mersenne_twister_engine.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/random/normal_distribution.hpp b/boost/compute/random/normal_distribution.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/random/threefry_engine.hpp b/boost/compute/random/threefry_engine.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/random/uniform_int_distribution.hpp b/boost/compute/random/uniform_int_distribution.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/random/uniform_real_distribution.hpp b/boost/compute/random/uniform_real_distribution.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/source.hpp b/boost/compute/source.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/svm.hpp b/boost/compute/svm.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/system.hpp b/boost/compute/system.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/type_traits.hpp b/boost/compute/type_traits.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/type_traits/common_type.hpp b/boost/compute/type_traits/common_type.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/type_traits/detail/capture_traits.hpp b/boost/compute/type_traits/detail/capture_traits.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/type_traits/is_device_iterator.hpp b/boost/compute/type_traits/is_device_iterator.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/type_traits/is_fundamental.hpp b/boost/compute/type_traits/is_fundamental.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/type_traits/is_vector_type.hpp b/boost/compute/type_traits/is_vector_type.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/type_traits/make_vector_type.hpp b/boost/compute/type_traits/make_vector_type.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/type_traits/result_of.hpp b/boost/compute/type_traits/result_of.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/type_traits/scalar_type.hpp b/boost/compute/type_traits/scalar_type.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/type_traits/type_definition.hpp b/boost/compute/type_traits/type_definition.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/type_traits/type_name.hpp b/boost/compute/type_traits/type_name.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/type_traits/vector_size.hpp b/boost/compute/type_traits/vector_size.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/types.hpp b/boost/compute/types.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/types/builtin.hpp b/boost/compute/types/builtin.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/types/complex.hpp b/boost/compute/types/complex.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/types/fundamental.hpp b/boost/compute/types/fundamental.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/types/pair.hpp b/boost/compute/types/pair.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/types/size_t.hpp b/boost/compute/types/size_t.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/types/struct.hpp b/boost/compute/types/struct.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/types/tuple.hpp b/boost/compute/types/tuple.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/user_event.hpp b/boost/compute/user_event.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/utility.hpp b/boost/compute/utility.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/utility/dim.hpp b/boost/compute/utility/dim.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/utility/extents.hpp b/boost/compute/utility/extents.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/utility/invoke.hpp b/boost/compute/utility/invoke.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/utility/program_cache.hpp b/boost/compute/utility/program_cache.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/utility/source.hpp b/boost/compute/utility/source.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/utility/wait_list.hpp b/boost/compute/utility/wait_list.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/version.hpp b/boost/compute/version.hpp old mode 100755 new mode 100644 diff --git a/boost/compute/wait_list.hpp b/boost/compute/wait_list.hpp old mode 100755 new mode 100644 diff --git a/boost/hana.hpp b/boost/hana.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/accessors.hpp b/boost/hana/accessors.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/adapt_adt.hpp b/boost/hana/adapt_adt.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/adapt_struct.hpp b/boost/hana/adapt_struct.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/adjust.hpp b/boost/hana/adjust.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/adjust_if.hpp b/boost/hana/adjust_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/all.hpp b/boost/hana/all.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/all_of.hpp b/boost/hana/all_of.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/and.hpp b/boost/hana/and.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/any.hpp b/boost/hana/any.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/any_of.hpp b/boost/hana/any_of.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ap.hpp b/boost/hana/ap.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/append.hpp b/boost/hana/append.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/assert.hpp b/boost/hana/assert.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/at.hpp b/boost/hana/at.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/at_key.hpp b/boost/hana/at_key.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/back.hpp b/boost/hana/back.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/basic_tuple.hpp b/boost/hana/basic_tuple.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/bool.hpp b/boost/hana/bool.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/cartesian_product.hpp b/boost/hana/cartesian_product.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/chain.hpp b/boost/hana/chain.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/comparing.hpp b/boost/hana/comparing.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concat.hpp b/boost/hana/concat.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept.hpp b/boost/hana/concept.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/applicative.hpp b/boost/hana/concept/applicative.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/comonad.hpp b/boost/hana/concept/comonad.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/comparable.hpp b/boost/hana/concept/comparable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/constant.hpp b/boost/hana/concept/constant.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/euclidean_ring.hpp b/boost/hana/concept/euclidean_ring.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/foldable.hpp b/boost/hana/concept/foldable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/functor.hpp b/boost/hana/concept/functor.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/group.hpp b/boost/hana/concept/group.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/hashable.hpp b/boost/hana/concept/hashable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/integral_constant.hpp b/boost/hana/concept/integral_constant.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/iterable.hpp b/boost/hana/concept/iterable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/logical.hpp b/boost/hana/concept/logical.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/metafunction.hpp b/boost/hana/concept/metafunction.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/monad.hpp b/boost/hana/concept/monad.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/monad_plus.hpp b/boost/hana/concept/monad_plus.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/monoid.hpp b/boost/hana/concept/monoid.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/orderable.hpp b/boost/hana/concept/orderable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/product.hpp b/boost/hana/concept/product.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/ring.hpp b/boost/hana/concept/ring.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/searchable.hpp b/boost/hana/concept/searchable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/sequence.hpp b/boost/hana/concept/sequence.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/concept/struct.hpp b/boost/hana/concept/struct.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/config.hpp b/boost/hana/config.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/contains.hpp b/boost/hana/contains.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/core.hpp b/boost/hana/core.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/core/common.hpp b/boost/hana/core/common.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/core/default.hpp b/boost/hana/core/default.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/core/dispatch.hpp b/boost/hana/core/dispatch.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/core/is_a.hpp b/boost/hana/core/is_a.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/core/make.hpp b/boost/hana/core/make.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/core/tag_of.hpp b/boost/hana/core/tag_of.hpp old mode 100755 new mode 100644 index 87406521cd89f82cd248eeea1304aa79402dc350..656e246702b353efc1075e38921e80abb1f17601 --- a/boost/hana/core/tag_of.hpp +++ b/boost/hana/core/tag_of.hpp @@ -15,6 +15,8 @@ Distributed under the Boost Software License, Version 1.0. #include #include +#include + BOOST_HANA_NAMESPACE_BEGIN //! @cond @@ -44,6 +46,14 @@ BOOST_HANA_NAMESPACE_BEGIN template struct tag_of : tag_of { }; template struct tag_of : tag_of { }; template struct tag_of : tag_of { }; + + namespace detail { + template + struct has_idempotent_tag + : std::is_same, + std::remove_const_t>> + { }; + } BOOST_HANA_NAMESPACE_END #endif // !BOOST_HANA_CORE_TAG_OF_HPP diff --git a/boost/hana/core/to.hpp b/boost/hana/core/to.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/core/when.hpp b/boost/hana/core/when.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/count.hpp b/boost/hana/count.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/count_if.hpp b/boost/hana/count_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/cycle.hpp b/boost/hana/cycle.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/define_struct.hpp b/boost/hana/define_struct.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/algorithm.hpp b/boost/hana/detail/algorithm.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/any_of.hpp b/boost/hana/detail/any_of.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/array.hpp b/boost/hana/detail/array.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/canonical_constant.hpp b/boost/hana/detail/canonical_constant.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/concepts.hpp b/boost/hana/detail/concepts.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/create.hpp b/boost/hana/detail/create.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/decay.hpp b/boost/hana/detail/decay.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/dispatch_if.hpp b/boost/hana/detail/dispatch_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/ebo.hpp b/boost/hana/detail/ebo.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/fast_and.hpp b/boost/hana/detail/fast_and.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/first_unsatisfied_index.hpp b/boost/hana/detail/first_unsatisfied_index.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/has_common_embedding.hpp b/boost/hana/detail/has_common_embedding.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/has_duplicates.hpp b/boost/hana/detail/has_duplicates.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/hash_table.hpp b/boost/hana/detail/hash_table.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/index_if.hpp b/boost/hana/detail/index_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/integral_constant.hpp b/boost/hana/detail/integral_constant.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/intrinsics.hpp b/boost/hana/detail/intrinsics.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/nested_by.hpp b/boost/hana/detail/nested_by.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/nested_by_fwd.hpp b/boost/hana/detail/nested_by_fwd.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/nested_than.hpp b/boost/hana/detail/nested_than.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/nested_than_fwd.hpp b/boost/hana/detail/nested_than_fwd.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/nested_to.hpp b/boost/hana/detail/nested_to.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/nested_to_fwd.hpp b/boost/hana/detail/nested_to_fwd.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/operators/adl.hpp b/boost/hana/detail/operators/adl.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/operators/arithmetic.hpp b/boost/hana/detail/operators/arithmetic.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/operators/comparable.hpp b/boost/hana/detail/operators/comparable.hpp old mode 100755 new mode 100644 index 0c110fe3a3d35c5ca07dd701917177d4447fa70f..762c2dadfad97e53883b979bec1010357e6e4bfe --- a/boost/hana/detail/operators/comparable.hpp +++ b/boost/hana/detail/operators/comparable.hpp @@ -26,15 +26,23 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail { namespace operators { template ::type>::value || - detail::comparable_operators::type>::value + !detail::has_idempotent_tag::value && + !detail::has_idempotent_tag::value && + (detail::comparable_operators< + typename hana::tag_of::type>::value || + detail::comparable_operators< + typename hana::tag_of::type>::value) >::type> constexpr auto operator==(X&& x, Y&& y) { return hana::equal(static_cast(x), static_cast(y)); } template ::type>::value || - detail::comparable_operators::type>::value + !detail::has_idempotent_tag::value && + !detail::has_idempotent_tag::value && + (detail::comparable_operators< + typename hana::tag_of::type>::value || + detail::comparable_operators< + typename hana::tag_of::type>::value) >::type> constexpr auto operator!=(X&& x, Y&& y) { return hana::not_equal(static_cast(x), static_cast(y)); } diff --git a/boost/hana/detail/operators/iterable.hpp b/boost/hana/detail/operators/iterable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/operators/logical.hpp b/boost/hana/detail/operators/logical.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/operators/monad.hpp b/boost/hana/detail/operators/monad.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/operators/orderable.hpp b/boost/hana/detail/operators/orderable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/operators/searchable.hpp b/boost/hana/detail/operators/searchable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/preprocessor.hpp b/boost/hana/detail/preprocessor.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/std_common_type.hpp b/boost/hana/detail/std_common_type.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/struct_macros.hpp b/boost/hana/detail/struct_macros.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/struct_macros.hpp.erb b/boost/hana/detail/struct_macros.hpp.erb old mode 100755 new mode 100644 diff --git a/boost/hana/detail/type_at.hpp b/boost/hana/detail/type_at.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/type_foldl1.hpp b/boost/hana/detail/type_foldl1.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/type_foldr1.hpp b/boost/hana/detail/type_foldr1.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/unpack_flatten.hpp b/boost/hana/detail/unpack_flatten.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/variadic/at.hpp b/boost/hana/detail/variadic/at.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/variadic/drop_into.hpp b/boost/hana/detail/variadic/drop_into.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/variadic/foldl1.hpp b/boost/hana/detail/variadic/foldl1.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/variadic/foldr1.hpp b/boost/hana/detail/variadic/foldr1.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/variadic/reverse_apply.hpp b/boost/hana/detail/variadic/reverse_apply.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/variadic/reverse_apply/flat.hpp b/boost/hana/detail/variadic/reverse_apply/flat.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/variadic/reverse_apply/unrolled.hpp b/boost/hana/detail/variadic/reverse_apply/unrolled.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/variadic/split_at.hpp b/boost/hana/detail/variadic/split_at.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/variadic/take.hpp b/boost/hana/detail/variadic/take.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/void_t.hpp b/boost/hana/detail/void_t.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/detail/wrong.hpp b/boost/hana/detail/wrong.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/difference.hpp b/boost/hana/difference.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/div.hpp b/boost/hana/div.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/drop_back.hpp b/boost/hana/drop_back.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/drop_front.hpp b/boost/hana/drop_front.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/drop_front_exactly.hpp b/boost/hana/drop_front_exactly.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/drop_while.hpp b/boost/hana/drop_while.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/duplicate.hpp b/boost/hana/duplicate.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/empty.hpp b/boost/hana/empty.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/equal.hpp b/boost/hana/equal.hpp old mode 100755 new mode 100644 index 1fa5e8bbe18493064ecef3046dde1da439eedcca..dd09b7eeecfa22e7b932ae3945c1a7d2cad0d110 --- a/boost/hana/equal.hpp +++ b/boost/hana/equal.hpp @@ -191,7 +191,10 @@ BOOST_HANA_NAMESPACE_BEGIN } template - struct equal_impl::value>> { + struct equal_impl::value && + !detail::EqualityComparable::value + >> { template static constexpr auto apply(X const& x, Y const& y) { return hana::all_of(hana::accessors(), diff --git a/boost/hana/erase_key.hpp b/boost/hana/erase_key.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/eval.hpp b/boost/hana/eval.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/eval_if.hpp b/boost/hana/eval_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/experimental/printable.hpp b/boost/hana/experimental/printable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/experimental/type_name.hpp b/boost/hana/experimental/type_name.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/experimental/types.hpp b/boost/hana/experimental/types.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/experimental/view.hpp b/boost/hana/experimental/view.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/boost.hpp b/boost/hana/ext/boost.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/boost/fusion.hpp b/boost/hana/ext/boost/fusion.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/boost/fusion/deque.hpp b/boost/hana/ext/boost/fusion/deque.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/boost/fusion/detail/common.hpp b/boost/hana/ext/boost/fusion/detail/common.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/boost/fusion/list.hpp b/boost/hana/ext/boost/fusion/list.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/boost/fusion/tuple.hpp b/boost/hana/ext/boost/fusion/tuple.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/boost/fusion/vector.hpp b/boost/hana/ext/boost/fusion/vector.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/boost/mpl.hpp b/boost/hana/ext/boost/mpl.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/boost/mpl/integral_c.hpp b/boost/hana/ext/boost/mpl/integral_c.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/boost/mpl/list.hpp b/boost/hana/ext/boost/mpl/list.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/boost/mpl/vector.hpp b/boost/hana/ext/boost/mpl/vector.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/boost/tuple.hpp b/boost/hana/ext/boost/tuple.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/std.hpp b/boost/hana/ext/std.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/std/array.hpp b/boost/hana/ext/std/array.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/std/integer_sequence.hpp b/boost/hana/ext/std/integer_sequence.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/std/integral_constant.hpp b/boost/hana/ext/std/integral_constant.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/std/pair.hpp b/boost/hana/ext/std/pair.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/std/ratio.hpp b/boost/hana/ext/std/ratio.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/std/tuple.hpp b/boost/hana/ext/std/tuple.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ext/std/vector.hpp b/boost/hana/ext/std/vector.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/extend.hpp b/boost/hana/extend.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/extract.hpp b/boost/hana/extract.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fill.hpp b/boost/hana/fill.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/filter.hpp b/boost/hana/filter.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/find.hpp b/boost/hana/find.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/find_if.hpp b/boost/hana/find_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/first.hpp b/boost/hana/first.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/flatten.hpp b/boost/hana/flatten.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fold.hpp b/boost/hana/fold.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fold_left.hpp b/boost/hana/fold_left.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fold_right.hpp b/boost/hana/fold_right.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/for_each.hpp b/boost/hana/for_each.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/front.hpp b/boost/hana/front.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional.hpp b/boost/hana/functional.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/always.hpp b/boost/hana/functional/always.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/apply.hpp b/boost/hana/functional/apply.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/arg.hpp b/boost/hana/functional/arg.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/capture.hpp b/boost/hana/functional/capture.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/compose.hpp b/boost/hana/functional/compose.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/curry.hpp b/boost/hana/functional/curry.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/demux.hpp b/boost/hana/functional/demux.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/fix.hpp b/boost/hana/functional/fix.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/flip.hpp b/boost/hana/functional/flip.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/id.hpp b/boost/hana/functional/id.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/infix.hpp b/boost/hana/functional/infix.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/iterate.hpp b/boost/hana/functional/iterate.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/lockstep.hpp b/boost/hana/functional/lockstep.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/on.hpp b/boost/hana/functional/on.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/overload.hpp b/boost/hana/functional/overload.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/overload_linearly.hpp b/boost/hana/functional/overload_linearly.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/partial.hpp b/boost/hana/functional/partial.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/placeholder.hpp b/boost/hana/functional/placeholder.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/functional/reverse_partial.hpp b/boost/hana/functional/reverse_partial.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fuse.hpp b/boost/hana/fuse.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/accessors.hpp b/boost/hana/fwd/accessors.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/adapt_adt.hpp b/boost/hana/fwd/adapt_adt.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/adapt_struct.hpp b/boost/hana/fwd/adapt_struct.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/adjust.hpp b/boost/hana/fwd/adjust.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/adjust_if.hpp b/boost/hana/fwd/adjust_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/all.hpp b/boost/hana/fwd/all.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/all_of.hpp b/boost/hana/fwd/all_of.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/and.hpp b/boost/hana/fwd/and.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/any.hpp b/boost/hana/fwd/any.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/any_of.hpp b/boost/hana/fwd/any_of.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/ap.hpp b/boost/hana/fwd/ap.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/append.hpp b/boost/hana/fwd/append.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/at.hpp b/boost/hana/fwd/at.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/at_key.hpp b/boost/hana/fwd/at_key.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/back.hpp b/boost/hana/fwd/back.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/basic_tuple.hpp b/boost/hana/fwd/basic_tuple.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/bool.hpp b/boost/hana/fwd/bool.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/cartesian_product.hpp b/boost/hana/fwd/cartesian_product.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/chain.hpp b/boost/hana/fwd/chain.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/comparing.hpp b/boost/hana/fwd/comparing.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concat.hpp b/boost/hana/fwd/concat.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/applicative.hpp b/boost/hana/fwd/concept/applicative.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/comonad.hpp b/boost/hana/fwd/concept/comonad.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/comparable.hpp b/boost/hana/fwd/concept/comparable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/constant.hpp b/boost/hana/fwd/concept/constant.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/euclidean_ring.hpp b/boost/hana/fwd/concept/euclidean_ring.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/foldable.hpp b/boost/hana/fwd/concept/foldable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/functor.hpp b/boost/hana/fwd/concept/functor.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/group.hpp b/boost/hana/fwd/concept/group.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/hashable.hpp b/boost/hana/fwd/concept/hashable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/integral_constant.hpp b/boost/hana/fwd/concept/integral_constant.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/iterable.hpp b/boost/hana/fwd/concept/iterable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/logical.hpp b/boost/hana/fwd/concept/logical.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/metafunction.hpp b/boost/hana/fwd/concept/metafunction.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/monad.hpp b/boost/hana/fwd/concept/monad.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/monad_plus.hpp b/boost/hana/fwd/concept/monad_plus.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/monoid.hpp b/boost/hana/fwd/concept/monoid.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/orderable.hpp b/boost/hana/fwd/concept/orderable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/product.hpp b/boost/hana/fwd/concept/product.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/ring.hpp b/boost/hana/fwd/concept/ring.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/searchable.hpp b/boost/hana/fwd/concept/searchable.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/sequence.hpp b/boost/hana/fwd/concept/sequence.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/concept/struct.hpp b/boost/hana/fwd/concept/struct.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/contains.hpp b/boost/hana/fwd/contains.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/core.hpp b/boost/hana/fwd/core.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/core/common.hpp b/boost/hana/fwd/core/common.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/core/default.hpp b/boost/hana/fwd/core/default.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/core/is_a.hpp b/boost/hana/fwd/core/is_a.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/core/make.hpp b/boost/hana/fwd/core/make.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/core/tag_of.hpp b/boost/hana/fwd/core/tag_of.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/core/to.hpp b/boost/hana/fwd/core/to.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/core/when.hpp b/boost/hana/fwd/core/when.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/count.hpp b/boost/hana/fwd/count.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/count_if.hpp b/boost/hana/fwd/count_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/cycle.hpp b/boost/hana/fwd/cycle.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/define_struct.hpp b/boost/hana/fwd/define_struct.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/difference.hpp b/boost/hana/fwd/difference.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/div.hpp b/boost/hana/fwd/div.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/drop_back.hpp b/boost/hana/fwd/drop_back.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/drop_front.hpp b/boost/hana/fwd/drop_front.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/drop_front_exactly.hpp b/boost/hana/fwd/drop_front_exactly.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/drop_while.hpp b/boost/hana/fwd/drop_while.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/duplicate.hpp b/boost/hana/fwd/duplicate.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/empty.hpp b/boost/hana/fwd/empty.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/equal.hpp b/boost/hana/fwd/equal.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/erase_key.hpp b/boost/hana/fwd/erase_key.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/eval.hpp b/boost/hana/fwd/eval.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/eval_if.hpp b/boost/hana/fwd/eval_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/extend.hpp b/boost/hana/fwd/extend.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/extract.hpp b/boost/hana/fwd/extract.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/fill.hpp b/boost/hana/fwd/fill.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/filter.hpp b/boost/hana/fwd/filter.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/find.hpp b/boost/hana/fwd/find.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/find_if.hpp b/boost/hana/fwd/find_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/first.hpp b/boost/hana/fwd/first.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/flatten.hpp b/boost/hana/fwd/flatten.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/fold.hpp b/boost/hana/fwd/fold.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/fold_left.hpp b/boost/hana/fwd/fold_left.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/fold_right.hpp b/boost/hana/fwd/fold_right.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/for_each.hpp b/boost/hana/fwd/for_each.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/front.hpp b/boost/hana/fwd/front.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/fuse.hpp b/boost/hana/fwd/fuse.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/greater.hpp b/boost/hana/fwd/greater.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/greater_equal.hpp b/boost/hana/fwd/greater_equal.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/group.hpp b/boost/hana/fwd/group.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/hash.hpp b/boost/hana/fwd/hash.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/if.hpp b/boost/hana/fwd/if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/index_if.hpp b/boost/hana/fwd/index_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/insert.hpp b/boost/hana/fwd/insert.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/insert_range.hpp b/boost/hana/fwd/insert_range.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/integral_constant.hpp b/boost/hana/fwd/integral_constant.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/intersection.hpp b/boost/hana/fwd/intersection.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/intersperse.hpp b/boost/hana/fwd/intersperse.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/is_disjoint.hpp b/boost/hana/fwd/is_disjoint.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/is_empty.hpp b/boost/hana/fwd/is_empty.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/is_subset.hpp b/boost/hana/fwd/is_subset.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/keys.hpp b/boost/hana/fwd/keys.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/lazy.hpp b/boost/hana/fwd/lazy.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/length.hpp b/boost/hana/fwd/length.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/less.hpp b/boost/hana/fwd/less.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/less_equal.hpp b/boost/hana/fwd/less_equal.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/lexicographical_compare.hpp b/boost/hana/fwd/lexicographical_compare.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/lift.hpp b/boost/hana/fwd/lift.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/map.hpp b/boost/hana/fwd/map.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/max.hpp b/boost/hana/fwd/max.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/maximum.hpp b/boost/hana/fwd/maximum.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/members.hpp b/boost/hana/fwd/members.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/min.hpp b/boost/hana/fwd/min.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/minimum.hpp b/boost/hana/fwd/minimum.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/minus.hpp b/boost/hana/fwd/minus.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/mod.hpp b/boost/hana/fwd/mod.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/monadic_compose.hpp b/boost/hana/fwd/monadic_compose.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/monadic_fold_left.hpp b/boost/hana/fwd/monadic_fold_left.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/monadic_fold_right.hpp b/boost/hana/fwd/monadic_fold_right.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/mult.hpp b/boost/hana/fwd/mult.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/negate.hpp b/boost/hana/fwd/negate.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/none.hpp b/boost/hana/fwd/none.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/none_of.hpp b/boost/hana/fwd/none_of.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/not.hpp b/boost/hana/fwd/not.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/not_equal.hpp b/boost/hana/fwd/not_equal.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/one.hpp b/boost/hana/fwd/one.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/optional.hpp b/boost/hana/fwd/optional.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/or.hpp b/boost/hana/fwd/or.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/ordering.hpp b/boost/hana/fwd/ordering.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/pair.hpp b/boost/hana/fwd/pair.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/partition.hpp b/boost/hana/fwd/partition.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/permutations.hpp b/boost/hana/fwd/permutations.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/plus.hpp b/boost/hana/fwd/plus.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/power.hpp b/boost/hana/fwd/power.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/prefix.hpp b/boost/hana/fwd/prefix.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/prepend.hpp b/boost/hana/fwd/prepend.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/product.hpp b/boost/hana/fwd/product.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/range.hpp b/boost/hana/fwd/range.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/remove.hpp b/boost/hana/fwd/remove.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/remove_at.hpp b/boost/hana/fwd/remove_at.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/remove_if.hpp b/boost/hana/fwd/remove_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/remove_range.hpp b/boost/hana/fwd/remove_range.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/repeat.hpp b/boost/hana/fwd/repeat.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/replace.hpp b/boost/hana/fwd/replace.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/replace_if.hpp b/boost/hana/fwd/replace_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/replicate.hpp b/boost/hana/fwd/replicate.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/reverse.hpp b/boost/hana/fwd/reverse.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/reverse_fold.hpp b/boost/hana/fwd/reverse_fold.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/scan_left.hpp b/boost/hana/fwd/scan_left.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/scan_right.hpp b/boost/hana/fwd/scan_right.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/second.hpp b/boost/hana/fwd/second.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/set.hpp b/boost/hana/fwd/set.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/size.hpp b/boost/hana/fwd/size.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/slice.hpp b/boost/hana/fwd/slice.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/sort.hpp b/boost/hana/fwd/sort.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/span.hpp b/boost/hana/fwd/span.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/string.hpp b/boost/hana/fwd/string.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/suffix.hpp b/boost/hana/fwd/suffix.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/sum.hpp b/boost/hana/fwd/sum.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/symmetric_difference.hpp b/boost/hana/fwd/symmetric_difference.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/take_back.hpp b/boost/hana/fwd/take_back.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/take_front.hpp b/boost/hana/fwd/take_front.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/take_while.hpp b/boost/hana/fwd/take_while.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/tap.hpp b/boost/hana/fwd/tap.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/then.hpp b/boost/hana/fwd/then.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/transform.hpp b/boost/hana/fwd/transform.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/tuple.hpp b/boost/hana/fwd/tuple.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/type.hpp b/boost/hana/fwd/type.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/unfold_left.hpp b/boost/hana/fwd/unfold_left.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/unfold_right.hpp b/boost/hana/fwd/unfold_right.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/union.hpp b/boost/hana/fwd/union.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/unique.hpp b/boost/hana/fwd/unique.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/unpack.hpp b/boost/hana/fwd/unpack.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/value.hpp b/boost/hana/fwd/value.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/while.hpp b/boost/hana/fwd/while.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/zero.hpp b/boost/hana/fwd/zero.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/zip.hpp b/boost/hana/fwd/zip.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/zip_shortest.hpp b/boost/hana/fwd/zip_shortest.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/zip_shortest_with.hpp b/boost/hana/fwd/zip_shortest_with.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/fwd/zip_with.hpp b/boost/hana/fwd/zip_with.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/greater.hpp b/boost/hana/greater.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/greater_equal.hpp b/boost/hana/greater_equal.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/group.hpp b/boost/hana/group.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/hash.hpp b/boost/hana/hash.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/if.hpp b/boost/hana/if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/index_if.hpp b/boost/hana/index_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/insert.hpp b/boost/hana/insert.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/insert_range.hpp b/boost/hana/insert_range.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/integral_constant.hpp b/boost/hana/integral_constant.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/intersection.hpp b/boost/hana/intersection.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/intersperse.hpp b/boost/hana/intersperse.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/is_disjoint.hpp b/boost/hana/is_disjoint.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/is_empty.hpp b/boost/hana/is_empty.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/is_subset.hpp b/boost/hana/is_subset.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/keys.hpp b/boost/hana/keys.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/lazy.hpp b/boost/hana/lazy.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/length.hpp b/boost/hana/length.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/less.hpp b/boost/hana/less.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/less_equal.hpp b/boost/hana/less_equal.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/lexicographical_compare.hpp b/boost/hana/lexicographical_compare.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/lift.hpp b/boost/hana/lift.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/map.hpp b/boost/hana/map.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/max.hpp b/boost/hana/max.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/maximum.hpp b/boost/hana/maximum.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/members.hpp b/boost/hana/members.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/min.hpp b/boost/hana/min.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/minimum.hpp b/boost/hana/minimum.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/minus.hpp b/boost/hana/minus.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/mod.hpp b/boost/hana/mod.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/monadic_compose.hpp b/boost/hana/monadic_compose.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/monadic_fold_left.hpp b/boost/hana/monadic_fold_left.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/monadic_fold_right.hpp b/boost/hana/monadic_fold_right.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/mult.hpp b/boost/hana/mult.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/negate.hpp b/boost/hana/negate.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/none.hpp b/boost/hana/none.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/none_of.hpp b/boost/hana/none_of.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/not.hpp b/boost/hana/not.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/not_equal.hpp b/boost/hana/not_equal.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/one.hpp b/boost/hana/one.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/optional.hpp b/boost/hana/optional.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/or.hpp b/boost/hana/or.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/ordering.hpp b/boost/hana/ordering.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/pair.hpp b/boost/hana/pair.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/partition.hpp b/boost/hana/partition.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/permutations.hpp b/boost/hana/permutations.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/plus.hpp b/boost/hana/plus.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/power.hpp b/boost/hana/power.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/prefix.hpp b/boost/hana/prefix.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/prepend.hpp b/boost/hana/prepend.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/product.hpp b/boost/hana/product.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/range.hpp b/boost/hana/range.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/remove.hpp b/boost/hana/remove.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/remove_at.hpp b/boost/hana/remove_at.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/remove_if.hpp b/boost/hana/remove_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/remove_range.hpp b/boost/hana/remove_range.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/repeat.hpp b/boost/hana/repeat.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/replace.hpp b/boost/hana/replace.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/replace_if.hpp b/boost/hana/replace_if.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/replicate.hpp b/boost/hana/replicate.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/reverse.hpp b/boost/hana/reverse.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/reverse_fold.hpp b/boost/hana/reverse_fold.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/scan_left.hpp b/boost/hana/scan_left.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/scan_right.hpp b/boost/hana/scan_right.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/second.hpp b/boost/hana/second.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/set.hpp b/boost/hana/set.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/size.hpp b/boost/hana/size.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/slice.hpp b/boost/hana/slice.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/sort.hpp b/boost/hana/sort.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/span.hpp b/boost/hana/span.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/string.hpp b/boost/hana/string.hpp old mode 100755 new mode 100644 index aea19bd2eda645e3382735185dcde76473e541be..fcdce266d741c6ffb69f662e9b04cb23cb4aef70 --- a/boost/hana/string.hpp +++ b/boost/hana/string.hpp @@ -117,7 +117,7 @@ BOOST_HANA_NAMESPACE_BEGIN constexpr auto operator"" _s() { static_assert(std::is_same::value, "hana::string: Only narrow string literals are supported with " - "the _s string literal right now. See https://goo.gl/fBbKD7 " + "the _s string literal right now. See https://github.com/boostorg/hana/issues/80 " "if you need support for fancier types of compile-time strings."); return hana::string_c; } diff --git a/boost/hana/suffix.hpp b/boost/hana/suffix.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/sum.hpp b/boost/hana/sum.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/symmetric_difference.hpp b/boost/hana/symmetric_difference.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/take_back.hpp b/boost/hana/take_back.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/take_front.hpp b/boost/hana/take_front.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/take_while.hpp b/boost/hana/take_while.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/tap.hpp b/boost/hana/tap.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/then.hpp b/boost/hana/then.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/traits.hpp b/boost/hana/traits.hpp old mode 100755 new mode 100644 index 983bdf8367e473dfadb226f0812988b049dedfc5..de207d3c986a4cfb6c0323fb39c55e0b3c0eb5cd --- a/boost/hana/traits.hpp +++ b/boost/hana/traits.hpp @@ -67,7 +67,9 @@ BOOST_HANA_NAMESPACE_BEGIN namespace traits { constexpr auto is_trivial = detail::hana_trait{}; constexpr auto is_trivially_copyable = detail::hana_trait{}; constexpr auto is_standard_layout = detail::hana_trait{}; +#if __cplusplus < 202002L constexpr auto is_pod = detail::hana_trait{}; +#endif constexpr auto is_literal_type = detail::hana_trait{}; constexpr auto is_empty = detail::hana_trait{}; constexpr auto is_polymorphic = detail::hana_trait{}; @@ -194,7 +196,6 @@ BOOST_HANA_NAMESPACE_BEGIN namespace traits { constexpr auto common_type = metafunction; constexpr auto underlying_type = metafunction; - constexpr auto result_of = metafunction; /////////////////////// diff --git a/boost/hana/transform.hpp b/boost/hana/transform.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/tuple.hpp b/boost/hana/tuple.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/type.hpp b/boost/hana/type.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/unfold_left.hpp b/boost/hana/unfold_left.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/unfold_right.hpp b/boost/hana/unfold_right.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/union.hpp b/boost/hana/union.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/unique.hpp b/boost/hana/unique.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/unpack.hpp b/boost/hana/unpack.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/value.hpp b/boost/hana/value.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/version.hpp b/boost/hana/version.hpp old mode 100755 new mode 100644 index af8daac64dcb5e441ded20c390a28171328b42ad..282070d06270a3010ee39f43c5fbb9d3cea76eb7 --- a/boost/hana/version.hpp +++ b/boost/hana/version.hpp @@ -24,7 +24,7 @@ Distributed under the Boost Software License, Version 1.0. //! @ingroup group-config //! Macro expanding to the minor version of the library, i.e. the `y` in `x.y.z`. -#define BOOST_HANA_MINOR_VERSION 6 +#define BOOST_HANA_MINOR_VERSION 7 //! @ingroup group-config //! Macro expanding to the patch level of the library, i.e. the `z` in `x.y.z`. diff --git a/boost/hana/while.hpp b/boost/hana/while.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/zero.hpp b/boost/hana/zero.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/zip.hpp b/boost/hana/zip.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/zip_shortest.hpp b/boost/hana/zip_shortest.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/zip_shortest_with.hpp b/boost/hana/zip_shortest_with.hpp old mode 100755 new mode 100644 diff --git a/boost/hana/zip_with.hpp b/boost/hana/zip_with.hpp old mode 100755 new mode 100644 diff --git a/boost/pfr.hpp b/boost/pfr.hpp new file mode 100644 index 0000000000000000000000000000000000000000..3eaf421bc7e4e282d36d364b7e59b9a5e3e2d068 --- /dev/null +++ b/boost/pfr.hpp @@ -0,0 +1,21 @@ +// Copyright (c) 2016-2021 Antony Polukhin +// +// 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_PFR_HPP +#define BOOST_PFR_HPP + +/// \file boost/pfr.hpp +/// Includes all the Boost.PFR headers + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_PFR_HPP diff --git a/boost/pfr/core.hpp b/boost/pfr/core.hpp new file mode 100644 index 0000000000000000000000000000000000000000..6bbb4c65b880bf4c9aa1cb162000af841c5d443f --- /dev/null +++ b/boost/pfr/core.hpp @@ -0,0 +1,226 @@ +// Copyright (c) 2016-2021 Antony Polukhin +// +// 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_PFR_CORE_HPP +#define BOOST_PFR_CORE_HPP +#pragma once + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include // metaprogramming stuff + +#include + +/// \file boost/pfr/core.hpp +/// Contains all the basic tuple-like interfaces \forcedlink{get}, \forcedlink{tuple_size}, \forcedlink{tuple_element_t}, and others. +/// +/// \b Synopsis: + +namespace boost { namespace pfr { + +/// \brief Returns reference or const reference to a field with index `I` in \aggregate `val`. +/// +/// \b Example: +/// \code +/// struct my_struct { int i, short s; }; +/// my_struct s {10, 11}; +/// assert(boost::pfr::get<0>(s) == 10); +/// boost::pfr::get<1>(s) = 0; +/// \endcode +template +constexpr decltype(auto) get(const T& val) noexcept { + return detail::sequence_tuple::get( detail::tie_as_tuple(val) ); +} + + +/// \overload get +template +constexpr decltype(auto) get(T& val +#if !BOOST_PFR_USE_CPP17 + , std::enable_if_t::value>* = nullptr +#endif +) noexcept { + return detail::sequence_tuple::get( detail::tie_as_tuple(val) ); +} + +#if !BOOST_PFR_USE_CPP17 +/// \overload get +template +constexpr auto get(T&, std::enable_if_t::value>* = nullptr) noexcept { + static_assert(sizeof(T) && false, "====================> Boost.PFR: Calling boost::pfr::get on non const non assignable type is allowed only in C++17"); + return 0; +} +#endif + + +/// \overload get +template +constexpr auto get(T&& val, std::enable_if_t< std::is_rvalue_reference::value>* = 0) noexcept { + return std::move(detail::sequence_tuple::get( detail::tie_as_tuple(val) )); +} + + +/// \brief `tuple_element` has a member typedef `type` that returns the type of a field with index I in \aggregate T. +/// +/// \b Example: +/// \code +/// std::vector< boost::pfr::tuple_element<0, my_structure>::type > v; +/// \endcode +template +using tuple_element = detail::sequence_tuple::tuple_element()) ) >; + + +/// \brief Type of a field with index `I` in \aggregate `T`. +/// +/// \b Example: +/// \code +/// std::vector< boost::pfr::tuple_element_t<0, my_structure> > v; +/// \endcode +template +using tuple_element_t = typename tuple_element::type; + + +/// \brief Creates a `std::tuple` from fields of an \aggregate `val`. +/// +/// \b Example: +/// \code +/// struct my_struct { int i, short s; }; +/// my_struct s {10, 11}; +/// std::tuple t = make_tuple(s); +/// assert(get<0>(t) == 10); +/// \endcode +template +constexpr auto structure_to_tuple(const T& val) noexcept { + return detail::make_stdtuple_from_tietuple( + detail::tie_as_tuple(val), + detail::make_index_sequence< tuple_size_v >() + ); +} + + +/// \brief std::tie` like function that ties fields of a structure. +/// +/// \returns a `std::tuple` with lvalue and const lvalue references to fields of an \aggregate `val`. +/// +/// \b Example: +/// \code +/// void foo(const int&, const short&); +/// struct my_struct { int i, short s; }; +/// +/// const my_struct const_s{1, 2}; +/// std::apply(foo, structure_tie(const_s)); +/// +/// my_struct s; +/// structure_tie(s) = std::tuple{10, 11}; +/// assert(s.s == 11); +/// \endcode +template +constexpr auto structure_tie(const T& val) noexcept { + return detail::make_conststdtiedtuple_from_tietuple( + detail::tie_as_tuple(const_cast(val)), + detail::make_index_sequence< tuple_size_v >() + ); +} + + +/// \overload structure_tie +template +constexpr auto structure_tie(T& val +#if !BOOST_PFR_USE_CPP17 + , std::enable_if_t::value>* = nullptr +#endif +) noexcept { + return detail::make_stdtiedtuple_from_tietuple( + detail::tie_as_tuple(val), + detail::make_index_sequence< tuple_size_v >() + ); +} + +#if !BOOST_PFR_USE_CPP17 +/// \overload structure_tie +template +constexpr auto structure_tie(T&, std::enable_if_t::value>* = nullptr) noexcept { + static_assert(sizeof(T) && false, "====================> Boost.PFR: Calling boost::pfr::structure_tie on non const non assignable type is allowed only in C++17"); + return 0; +} +#endif + + +/// \overload structure_tie +template +constexpr auto structure_tie(T&&, std::enable_if_t< std::is_rvalue_reference::value>* = 0) noexcept { + static_assert(sizeof(T) && false, "====================> Boost.PFR: Calling boost::pfr::structure_tie on rvalue references is forbidden"); + return 0; +} + +/// Calls `func` for each field of a `value`. +/// +/// \param func must have one of the following signatures: +/// * any_return_type func(U&& field) // field of value is perfect forwarded to function +/// * any_return_type func(U&& field, std::size_t i) +/// * any_return_type func(U&& value, I i) // Here I is an `std::integral_constant` +/// +/// \param value To each field of this variable will be the `func` applied. +/// +/// \b Example: +/// \code +/// struct my_struct { int i, short s; }; +/// int sum = 0; +/// for_each_field(my_struct{20, 22}, [&sum](const auto& field) { sum += field; }); +/// assert(sum == 42); +/// \endcode +template +void for_each_field(T&& value, F&& func) { + constexpr std::size_t fields_count_val = boost::pfr::detail::fields_count>(); + + ::boost::pfr::detail::for_each_field_dispatcher( + value, + [f = std::forward(func)](auto&& t) mutable { + // MSVC related workaround. Its lambdas do not capture constexprs. + constexpr std::size_t fields_count_val_in_lambda + = boost::pfr::detail::fields_count>(); + + ::boost::pfr::detail::for_each_field_impl( + t, + std::forward(f), + detail::make_index_sequence{}, + std::is_rvalue_reference{} + ); + }, + detail::make_index_sequence{} + ); +} + +/// \brief std::tie-like function that allows assigning to tied values from aggregates. +/// +/// \returns an object with lvalue references to `args...`; on assignment of an \aggregate value to that +/// object each field of an aggregate is assigned to the corresponding `args...` reference. +/// +/// \b Example: +/// \code +/// auto f() { +/// struct { struct { int x, y } p; short s; } res { { 4, 5 }, 6 }; +/// return res; +/// } +/// auto [p, s] = f(); +/// tie_from_structure(p, s) = f(); +/// \endcode +template +constexpr detail::tie_from_structure_tuple tie_from_structure(Elements&... args) noexcept { + return detail::tie_from_structure_tuple(args...); +} + +}} // namespace boost::pfr + +#endif // BOOST_PFR_CORE_HPP diff --git a/boost/pfr/detail/cast_to_layout_compatible.hpp b/boost/pfr/detail/cast_to_layout_compatible.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d7106c62e4ba256a665105368959a0cb31fbec75 --- /dev/null +++ b/boost/pfr/detail/cast_to_layout_compatible.hpp @@ -0,0 +1,75 @@ +// Copyright (c) 2016-2021 Antony Polukhin +// +// 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_PFR_DETAIL_CAST_TO_LAYOUT_COMPATIBLE_HPP +#define BOOST_PFR_DETAIL_CAST_TO_LAYOUT_COMPATIBLE_HPP +#pragma once + +#include + +#include +#include // metaprogramming stuff +#include + +namespace boost { namespace pfr { namespace detail { + +template +constexpr void static_assert_layout_compatible() noexcept { + static_assert( + std::alignment_of::value == std::alignment_of::value, + "====================> Boost.PFR: Alignment check failed, probably your structure has user-defined alignment for the whole structure or for some of the fields." + ); + static_assert(sizeof(T) == sizeof(U), "====================> Boost.PFR: Size check failed, probably your structure has bitfields or user-defined alignment."); +} + +/// @cond +#ifdef __GNUC__ +#define MAY_ALIAS __attribute__((__may_alias__)) +#else +#define MAY_ALIAS +#endif +/// @endcond + +template +MAY_ALIAS const To& cast_to_layout_compatible(const From& val) noexcept { + MAY_ALIAS const To* const t = reinterpret_cast( std::addressof(val) ); + detail::static_assert_layout_compatible(); + return *t; +} + +template +MAY_ALIAS const volatile To& cast_to_layout_compatible(const volatile From& val) noexcept { + MAY_ALIAS const volatile To* const t = reinterpret_cast( std::addressof(val) ); + detail::static_assert_layout_compatible(); + return *t; +} + + +template +MAY_ALIAS volatile To& cast_to_layout_compatible(volatile From& val) noexcept { + MAY_ALIAS volatile To* const t = reinterpret_cast( std::addressof(val) ); + detail::static_assert_layout_compatible(); + return *t; +} + + +template +MAY_ALIAS To& cast_to_layout_compatible(From& val) noexcept { + MAY_ALIAS To* const t = reinterpret_cast( std::addressof(val) ); + detail::static_assert_layout_compatible(); + return *t; +} + +#ifdef BOOST_PFR_DETAIL_STRICT_RVALUE_TESTING +template +To&& cast_to_layout_compatible(rvalue_t val) noexcept = delete; +#endif + +#undef MAY_ALIAS + + +}}} // namespace boost::pfr::detail + +#endif // BOOST_PFR_DETAIL_CAST_TO_LAYOUT_COMPATIBLE_HPP diff --git a/boost/pfr/detail/config.hpp b/boost/pfr/detail/config.hpp new file mode 100644 index 0000000000000000000000000000000000000000..e8ffb0ec3cee2780eefa553860d22182e88997ec --- /dev/null +++ b/boost/pfr/detail/config.hpp @@ -0,0 +1,80 @@ +// Copyright (c) 2016-2021 Antony Polukhin +// +// 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_PFR_DETAIL_CONFIG_HPP +#define BOOST_PFR_DETAIL_CONFIG_HPP +#pragma once + +#include // to get non standard platform macro definitions (__GLIBCXX__ for example) + +// Reminder: +// * MSVC++ 14.2 _MSC_VER == 1927 <- Loophole is known to work (Visual Studio ????) +// * MSVC++ 14.1 _MSC_VER == 1916 <- Loophole is known to NOT work (Visual Studio 2017) +// * MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015) +// * MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013) + +#if defined(_MSC_VER) +# if !defined(_MSVC_LANG) || _MSC_VER <= 1900 +# error Boost.PFR library requires more modern MSVC compiler. +# endif +#elif __cplusplus < 201402L +# error Boost.PFR library requires at least C++14. +#endif + +#ifndef BOOST_PFR_USE_LOOPHOLE +# if defined(_MSC_VER) +# if _MSC_VER >= 1927 +# define BOOST_PFR_USE_LOOPHOLE 1 +# else +# define BOOST_PFR_USE_LOOPHOLE 0 +# endif +# elif defined(__clang_major__) && __clang_major__ >= 8 +# define BOOST_PFR_USE_LOOPHOLE 0 +# else +# define BOOST_PFR_USE_LOOPHOLE 1 +# endif +#endif + +#ifndef BOOST_PFR_USE_CPP17 +# ifdef __cpp_structured_bindings +# define BOOST_PFR_USE_CPP17 1 +# elif defined(_MSVC_LANG) +# if _MSVC_LANG >= 201703L +# define BOOST_PFR_USE_CPP17 1 +# else +# define BOOST_PFR_USE_CPP17 0 +# if !BOOST_PFR_USE_LOOPHOLE +# error Boost.PFR requires /std:c++latest or /std:c++17 flags on your compiler. +# endif +# endif +# else +# define BOOST_PFR_USE_CPP17 0 +# endif +#endif + +#ifndef BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE +// Assume that libstdc++ since GCC-7.3 does not have linear instantiation depth in std::make_integral_sequence +# if defined( __GLIBCXX__) && __GLIBCXX__ >= 20180101 +# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 +# elif defined(_MSC_VER) +# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 1 +//# elif other known working lib +# else +# define BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE 0 +# endif +#endif + +#if defined(__has_cpp_attribute) +# if __has_cpp_attribute(maybe_unused) +# define BOOST_PFR_MAYBE_UNUSED [[maybe_unused]] +# endif +#endif + +#ifndef BOOST_PFR_MAYBE_UNUSED +# define BOOST_PFR_MAYBE_UNUSED +#endif + + +#endif // BOOST_PFR_DETAIL_CONFIG_HPP diff --git a/boost/pfr/detail/core.hpp b/boost/pfr/detail/core.hpp new file mode 100644 index 0000000000000000000000000000000000000000..88efa0d98d66477781747e840c63f7b7f5f542bf --- /dev/null +++ b/boost/pfr/detail/core.hpp @@ -0,0 +1,24 @@ +// Copyright (c) 2016-2021 Antony Polukhin +// +// 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_PFR_DETAIL_CORE_HPP +#define BOOST_PFR_DETAIL_CORE_HPP +#pragma once + +#include + +// Each core provides `boost::pfr::detail::tie_as_tuple` and +// `boost::pfr::detail::for_each_field_dispatcher` functions. +// +// The whole PFR library is build on top of those two functions. +#if BOOST_PFR_USE_CPP17 +# include +#elif BOOST_PFR_USE_LOOPHOLE +# include +#else +# include +#endif + +#endif // BOOST_PFR_DETAIL_CORE_HPP diff --git a/boost/pfr/detail/core14_classic.hpp b/boost/pfr/detail/core14_classic.hpp new file mode 100644 index 0000000000000000000000000000000000000000..610dbd3c8f8f9e5846eb69241b8d430c5559cb51 --- /dev/null +++ b/boost/pfr/detail/core14_classic.hpp @@ -0,0 +1,703 @@ +// Copyright (c) 2016-2021 Antony Polukhin +// +// 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_PFR_DETAIL_CORE14_CLASSIC_HPP +#define BOOST_PFR_DETAIL_CORE14_CLASSIC_HPP +#pragma once + +#include + +#include +#include // metaprogramming stuff + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wmissing-braces" +# pragma clang diagnostic ignored "-Wundefined-inline" +# pragma clang diagnostic ignored "-Wundefined-internal" +# pragma clang diagnostic ignored "-Wmissing-field-initializers" +#endif + +namespace boost { namespace pfr { namespace detail { + +///////////////////// General utility stuff + +template struct identity { + typedef T type; +}; + +template +constexpr T construct_helper() noexcept { // adding const here allows to deal with copyable only types + return {}; +} + +template constexpr size_array fields_count_and_type_ids_with_zeros() noexcept; +template constexpr auto flat_array_of_type_ids() noexcept; + +///////////////////// All the stuff for representing Type as integer and converting integer back to type +namespace typeid_conversions { + +///////////////////// Helper constants and typedefs + +#ifdef _MSC_VER +# pragma warning( push ) + // '<<': check operator precedence for possible error; use parentheses to clarify precedence +# pragma warning( disable : 4554 ) +#endif + +constexpr std::size_t native_types_mask = 31; +constexpr std::size_t bits_per_extension = 3; +constexpr std::size_t extension_mask = ( + static_cast((1 << bits_per_extension) - 1) + << static_cast(sizeof(std::size_t) * 8 - bits_per_extension) +); +constexpr std::size_t native_ptr_type = ( + static_cast(1) + << static_cast(sizeof(std::size_t) * 8 - bits_per_extension) +); +constexpr std::size_t native_const_ptr_type = ( + static_cast(2) + << static_cast(sizeof(std::size_t) * 8 - bits_per_extension) +); + +constexpr std::size_t native_const_volatile_ptr_type = ( + static_cast(3) + << static_cast(sizeof(std::size_t) * 8 - bits_per_extension) +); + +constexpr std::size_t native_volatile_ptr_type = ( + static_cast(4) + << static_cast(sizeof(std::size_t) * 8 - bits_per_extension) +); + +constexpr std::size_t native_ref_type = ( + static_cast(5) + << static_cast(sizeof(std::size_t) * 8 - bits_per_extension) +); + +template +using if_extension = std::enable_if_t< (Index & extension_mask) == Extension >*; + +///////////////////// Helper functions +template +constexpr std::size_t type_to_id_extension_apply(std::size_t ext) noexcept { + constexpr std::size_t native_id = (Unptr & native_types_mask); + constexpr std::size_t extensions = (Unptr & ~native_types_mask); + static_assert( + !((extensions >> bits_per_extension) & native_types_mask), + "====================> Boost.PFR: Too many extensions for a single field (something close to `int************************** p;` is in the POD type)." + ); + + return (extensions >> bits_per_extension) | native_id | ext; +} + +template +using remove_1_ext = size_t_< + ((Index & ~native_types_mask) << bits_per_extension) | (Index & native_types_mask) +>; + +#ifdef _MSC_VER +# pragma warning( pop ) +#endif + +///////////////////// Forward declarations + +template constexpr std::size_t type_to_id(identity) noexcept; +template constexpr std::size_t type_to_id(identity) noexcept; +template constexpr std::size_t type_to_id(identity) noexcept; +template constexpr std::size_t type_to_id(identity) noexcept; +template constexpr std::size_t type_to_id(identity) noexcept; +template constexpr std::size_t type_to_id(identity, std::enable_if_t::value>* = 0) noexcept; +template constexpr std::size_t type_to_id(identity, std::enable_if_t::value>* = 0) noexcept; +template constexpr std::size_t type_to_id(identity, std::enable_if_t::value>* = 0) noexcept; +template constexpr size_array type_to_id(identity, std::enable_if_t::value && !std::is_empty::value && !std::is_union::value>* = 0) noexcept; + +template constexpr auto id_to_type(size_t_, if_extension = 0) noexcept; +template constexpr auto id_to_type(size_t_, if_extension = 0) noexcept; +template constexpr auto id_to_type(size_t_, if_extension = 0) noexcept; +template constexpr auto id_to_type(size_t_, if_extension = 0) noexcept; +template constexpr auto id_to_type(size_t_, if_extension = 0) noexcept; + + +///////////////////// Definitions of type_to_id and id_to_type for fundamental types +/// @cond +#define BOOST_MAGIC_GET_REGISTER_TYPE(Type, Index) \ + constexpr std::size_t type_to_id(identity) noexcept { \ + return Index; \ + } \ + constexpr Type id_to_type( size_t_ ) noexcept { \ + return detail::construct_helper(); \ + } \ + /**/ +/// @endcond + + +// Register all base types here +BOOST_MAGIC_GET_REGISTER_TYPE(unsigned char , 1) +BOOST_MAGIC_GET_REGISTER_TYPE(unsigned short , 2) +BOOST_MAGIC_GET_REGISTER_TYPE(unsigned int , 3) +BOOST_MAGIC_GET_REGISTER_TYPE(unsigned long , 4) +BOOST_MAGIC_GET_REGISTER_TYPE(unsigned long long , 5) +BOOST_MAGIC_GET_REGISTER_TYPE(signed char , 6) +BOOST_MAGIC_GET_REGISTER_TYPE(short , 7) +BOOST_MAGIC_GET_REGISTER_TYPE(int , 8) +BOOST_MAGIC_GET_REGISTER_TYPE(long , 9) +BOOST_MAGIC_GET_REGISTER_TYPE(long long , 10) +BOOST_MAGIC_GET_REGISTER_TYPE(char , 11) +BOOST_MAGIC_GET_REGISTER_TYPE(wchar_t , 12) +BOOST_MAGIC_GET_REGISTER_TYPE(char16_t , 13) +BOOST_MAGIC_GET_REGISTER_TYPE(char32_t , 14) +BOOST_MAGIC_GET_REGISTER_TYPE(float , 15) +BOOST_MAGIC_GET_REGISTER_TYPE(double , 16) +BOOST_MAGIC_GET_REGISTER_TYPE(long double , 17) +BOOST_MAGIC_GET_REGISTER_TYPE(bool , 18) +BOOST_MAGIC_GET_REGISTER_TYPE(void* , 19) +BOOST_MAGIC_GET_REGISTER_TYPE(const void* , 20) +BOOST_MAGIC_GET_REGISTER_TYPE(volatile void* , 21) +BOOST_MAGIC_GET_REGISTER_TYPE(const volatile void* , 22) +BOOST_MAGIC_GET_REGISTER_TYPE(std::nullptr_t , 23) +constexpr std::size_t tuple_begin_tag = 24; +constexpr std::size_t tuple_end_tag = 25; + +#undef BOOST_MAGIC_GET_REGISTER_TYPE + +///////////////////// Definitions of type_to_id and id_to_type for types with extensions and nested types +template +constexpr std::size_t type_to_id(identity) noexcept { + constexpr auto unptr = typeid_conversions::type_to_id(identity{}); + static_assert( + std::is_same::value, + "====================> Boost.PFR: Pointers to user defined types are not supported." + ); + return typeid_conversions::type_to_id_extension_apply(native_ptr_type); +} + +template +constexpr std::size_t type_to_id(identity) noexcept { + constexpr auto unptr = typeid_conversions::type_to_id(identity{}); + static_assert( + std::is_same::value, + "====================> Boost.PFR: Const pointers to user defined types are not supported." + ); + return typeid_conversions::type_to_id_extension_apply(native_const_ptr_type); +} + +template +constexpr std::size_t type_to_id(identity) noexcept { + constexpr auto unptr = typeid_conversions::type_to_id(identity{}); + static_assert( + std::is_same::value, + "====================> Boost.PFR: Const volatile pointers to user defined types are not supported." + ); + return typeid_conversions::type_to_id_extension_apply(native_const_volatile_ptr_type); +} + +template +constexpr std::size_t type_to_id(identity) noexcept { + constexpr auto unptr = typeid_conversions::type_to_id(identity{}); + static_assert( + std::is_same::value, + "====================> Boost.PFR: Volatile pointers to user defined types are not supported." + ); + return typeid_conversions::type_to_id_extension_apply(native_volatile_ptr_type); +} + +template +constexpr std::size_t type_to_id(identity) noexcept { + constexpr auto unptr = typeid_conversions::type_to_id(identity{}); + static_assert( + std::is_same::value, + "====================> Boost.PFR: References to user defined types are not supported." + ); + return typeid_conversions::type_to_id_extension_apply(native_ref_type); +} + +template +constexpr std::size_t type_to_id(identity, std::enable_if_t::value>*) noexcept { + return typeid_conversions::type_to_id(identity::type >{}); +} + +template +constexpr std::size_t type_to_id(identity, std::enable_if_t::value>*) noexcept { + static_assert(!std::is_empty::value, "====================> Boost.PFR: Empty classes/structures as members are not supported."); + return 0; +} + +template +constexpr std::size_t type_to_id(identity, std::enable_if_t::value>*) noexcept { + static_assert( + !std::is_union::value, + "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for more info." + ); + return 0; +} + +template +constexpr size_array type_to_id(identity, std::enable_if_t::value && !std::is_empty::value && !std::is_union::value>*) noexcept { + constexpr auto t = detail::flat_array_of_type_ids(); + size_array result {{tuple_begin_tag}}; + constexpr bool requires_tuplening = ( + (t.count_nonzeros() != 1) || (t.count_nonzeros() == t.count_from_opening_till_matching_parenthis_seq(0, tuple_begin_tag, tuple_end_tag)) + ); + + if (requires_tuplening) { + for (std::size_t i = 0; i < t.size(); ++i) + result.data[i + 1] = t.data[i]; + result.data[result.size() - 1] = tuple_end_tag; + } else { + for (std::size_t i = 0; i < t.size(); ++i) + result.data[i] = t.data[i]; + } + return result; +} + + + +template +constexpr auto id_to_type(size_t_, if_extension) noexcept { + typedef decltype( typeid_conversions::id_to_type(remove_1_ext()) )* res_t; + return detail::construct_helper(); +} + +template +constexpr auto id_to_type(size_t_, if_extension) noexcept { + typedef const decltype( typeid_conversions::id_to_type(remove_1_ext()) )* res_t; + return detail::construct_helper(); +} + +template +constexpr auto id_to_type(size_t_, if_extension) noexcept { + typedef const volatile decltype( typeid_conversions::id_to_type(remove_1_ext()) )* res_t; + return detail::construct_helper(); +} + + +template +constexpr auto id_to_type(size_t_, if_extension) noexcept { + typedef volatile decltype( typeid_conversions::id_to_type(remove_1_ext()) )* res_t; + return detail::construct_helper(); +} + + +template +constexpr auto id_to_type(size_t_, if_extension) noexcept { + static_assert(!Index, "====================> Boost.PFR: References are not supported"); + return nullptr; +} + +} // namespace typeid_conversions + +///////////////////// Structure that remembers types as integers on a `constexpr operator Type()` call +struct ubiq_val { + std::size_t* ref_; + + template + constexpr void assign(const T& typeids) const noexcept { + for (std::size_t i = 0; i < T::size(); ++i) + ref_[i] = typeids.data[i]; + } + + constexpr void assign(std::size_t val) const noexcept { + ref_[0] = val; + } + + template + constexpr operator Type() const noexcept { + constexpr auto typeids = typeid_conversions::type_to_id(identity{}); + assign(typeids); + return detail::construct_helper(); + } +}; + +///////////////////// Structure that remembers size of the type on a `constexpr operator Type()` call +struct ubiq_sizes { + std::size_t& ref_; + + template + constexpr operator Type() const noexcept { + ref_ = sizeof(Type); + return detail::construct_helper(); + } +}; + +///////////////////// Returns array of (offsets without accounting alignments). Required for keeping places for nested type ids +template +constexpr size_array get_type_offsets() noexcept { + typedef size_array array_t; + array_t sizes{}; + T tmp{ ubiq_sizes{sizes.data[I]}... }; + (void)tmp; + + array_t offsets{{0}}; + for (std::size_t i = 1; i < N; ++i) + offsets.data[i] = offsets.data[i - 1] + sizes.data[i - 1]; + + return offsets; +} + +///////////////////// Returns array of typeids and zeros if construtor of a type accepts sizeof...(I) parameters +template +constexpr void* flat_type_to_array_of_type_ids(std::size_t* types, std::index_sequence) noexcept +{ + static_assert( + N <= sizeof(T), + "====================> Boost.PFR: Bit fields are not supported." + ); + + constexpr auto offsets = detail::get_type_offsets(); + T tmp{ ubiq_val{types + get(offsets) * 3}... }; + (void)types; + (void)tmp; + (void)offsets; // If type is empty offsets are not used + return nullptr; +} + +///////////////////// Returns array of typeids and zeros +template +constexpr size_array fields_count_and_type_ids_with_zeros() noexcept { + size_array types{}; + constexpr std::size_t N = detail::fields_count(); + detail::flat_type_to_array_of_type_ids(types.data, detail::make_index_sequence()); + return types; +} + +///////////////////// Returns array of typeids without zeros +template +constexpr auto flat_array_of_type_ids() noexcept { + constexpr auto types = detail::fields_count_and_type_ids_with_zeros(); + constexpr std::size_t count = types.count_nonzeros(); + size_array res{}; + std::size_t j = 0; + for (std::size_t i = 0; i < decltype(types)::size(); ++i) { + if (types.data[i]) { + res.data[j] = types.data[i]; + ++ j; + } + } + + return res; +} + +///////////////////// Convert array of typeids into sequence_tuple::tuple + +template +constexpr auto as_flat_tuple_impl(std::index_sequence) noexcept; + +template +constexpr sequence_tuple::tuple<> as_flat_tuple_impl(std::index_sequence<>) noexcept { + return sequence_tuple::tuple<>{}; +} + +template +constexpr auto increment_index_sequence(std::index_sequence) noexcept { + return std::index_sequence{}; +} + +template +constexpr auto prepare_subtuples(size_t_, size_t_, size_t_) noexcept { + static_assert(SubtupleLength == 0, "====================> Boost.PFR: Internal error while representing nested field as tuple"); + return typeid_conversions::id_to_type(size_t_{}); +} + +template +constexpr auto prepare_subtuples(size_t_, size_t_, size_t_) noexcept { + static_assert(sizeof(T) == 0, "====================> Boost.PFR: Internal error while representing nested field as tuple"); + return int{}; +} + +template +constexpr auto prepare_subtuples(size_t_, size_t_, size_t_) noexcept { + static_assert(SubtupleLength > 2, "====================> Boost.PFR: Internal error while representing nested field as tuple"); + constexpr auto seq = detail::make_index_sequence{}; + return detail::as_flat_tuple_impl( detail::increment_index_sequence(seq) ); +} + + +template +constexpr Array remove_subtuples(Array indexes_plus_1, const Array& subtuple_lengths) noexcept { + for (std::size_t i = 0; i < subtuple_lengths.size(); ++i) { + if (subtuple_lengths.data[i]) { + const std::size_t skips_count = subtuple_lengths.data[i]; + for (std::size_t j = i + 1; j < skips_count + i; ++j) { + indexes_plus_1.data[j] = 0; + } + i += skips_count - 1; + } + } + return indexes_plus_1; +} + +template +constexpr size_array resize_dropping_zeros_and_decrementing(size_t_, const Array& a) noexcept { + size_array result{}; + std::size_t result_indx = 0; + for (std::size_t i = 0; i < a.size(); ++i) { + if (a.data[i]) { + result.data[result_indx] = static_cast(a.data[i] - 1); + ++ result_indx; + } + } + + return result; +} + +template +constexpr auto as_flat_tuple_impl_drop_helpers(std::index_sequence, std::index_sequence) noexcept { + constexpr auto a = detail::flat_array_of_type_ids(); + + constexpr size_array subtuples_length {{ + a.count_from_opening_till_matching_parenthis_seq(First, typeid_conversions::tuple_begin_tag, typeid_conversions::tuple_end_tag), + a.count_from_opening_till_matching_parenthis_seq(I, typeid_conversions::tuple_begin_tag, typeid_conversions::tuple_end_tag)... + }}; + + constexpr size_array type_indexes_with_subtuple_internals {{ 1, 1 + I - First...}}; + constexpr auto type_indexes_plus_1_and_zeros_as_skips = detail::remove_subtuples(type_indexes_with_subtuple_internals, subtuples_length); + constexpr auto new_size = size_t_{}; + constexpr auto type_indexes = detail::resize_dropping_zeros_and_decrementing(new_size, type_indexes_plus_1_and_zeros_as_skips); + + typedef sequence_tuple::tuple< + decltype(detail::prepare_subtuples( + size_t_< a.data[ First + type_indexes.data[INew] ] >{}, // id of type + size_t_< First + type_indexes.data[INew] >{}, // index of current id in `a` + size_t_< subtuples_length.data[ type_indexes.data[INew] ] >{} // if id of type is tuple, then length of that tuple + ))... + > subtuples_uncleanuped_t; + + return subtuples_uncleanuped_t{}; +} + +template +constexpr std::size_t count_skips_in_array(std::size_t begin_index, std::size_t end_index, const Array& a) noexcept { + std::size_t skips = 0; + for (std::size_t i = begin_index; i < end_index; ++i) { + if (a.data[i] == typeid_conversions::tuple_begin_tag) { + const std::size_t this_tuple_size = a.count_from_opening_till_matching_parenthis_seq(i, typeid_conversions::tuple_begin_tag, typeid_conversions::tuple_end_tag) - 1; + skips += this_tuple_size; + i += this_tuple_size - 1; + } + } + + return skips; +} + +template +constexpr auto as_flat_tuple_impl(std::index_sequence) noexcept { + constexpr auto a = detail::flat_array_of_type_ids(); + constexpr std::size_t count_of_I = sizeof...(I); + + return detail::as_flat_tuple_impl_drop_helpers( + std::index_sequence{}, + detail::make_index_sequence< 1 + count_of_I - count_skips_in_array(First, First + count_of_I, a) >{} + ); +} + +template +constexpr auto internal_tuple_with_same_alignment() noexcept { + typedef typename std::remove_cv::type type; + + static_assert( + std::is_trivial::value && std::is_standard_layout::value, + "====================> Boost.PFR: Type can not be reflected without Loophole or C++17, because it's not POD" + ); + static_assert(!std::is_reference::value, "====================> Boost.PFR: Not applyable"); + constexpr auto res = detail::as_flat_tuple_impl( + detail::make_index_sequence< decltype(detail::flat_array_of_type_ids())::size() >() + ); + + return res; +} + +template +using internal_tuple_with_same_alignment_t = decltype( detail::internal_tuple_with_same_alignment() ); + + +///////////////////// Flattening +struct ubiq_is_flat_refelectable { + bool& is_flat_refelectable; + + template + constexpr operator Type() const noexcept { + is_flat_refelectable = std::is_fundamental>::value; + return {}; + } +}; + +template +constexpr bool is_flat_refelectable(std::index_sequence) noexcept { + constexpr std::size_t fields = sizeof...(I); + bool result[fields] = {static_cast(I)...}; + const T v{ ubiq_is_flat_refelectable{result[I]}... }; + (void)v; + + for (std::size_t i = 0; i < fields; ++i) { + if (!result[i]) { + return false; + } + } + + return true; +} + +template +auto tie_as_flat_tuple(T& lvalue) noexcept { + static_assert( + !std::is_union::value, + "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for more info." + ); + using type = std::remove_cv_t; + using tuple_type = internal_tuple_with_same_alignment_t; + + offset_based_getter getter; + return boost::pfr::detail::make_flat_tuple_of_references(lvalue, getter, size_t_<0>{}, size_t_{}); +} + +template +auto tie_as_tuple(T& val) noexcept { + static_assert( + !std::is_union::value, + "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for more info." + ); + static_assert( + boost::pfr::detail::is_flat_refelectable( detail::make_index_sequence()>{} ), + "====================> Boost.PFR: Not possible in C++14 to represent that type without loosing information. Change type definition or enable C++17" + ); + return boost::pfr::detail::tie_as_flat_tuple(val); +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +///////////////////// Structure that can be converted to copy of anything +struct ubiq_constructor_constexpr_copy { + std::size_t ignore; + + template + constexpr operator Type() const noexcept { + static_assert( + std::is_trivially_destructible::value, + "====================> Boost.PFR: One of the fields in the type passed to `for_each_field` has non trivial destructor." + ); + return {}; + } +}; + +///////////////////// + +template +struct is_constexpr_aggregate_initializable { // TODO: try to fix it + template + static std::true_type test(long) noexcept; + + static std::false_type test(...) noexcept; + + static constexpr decltype( test(0) ) value{}; +}; + + +template +void for_each_field_in_depth(T& t, F&& f, std::index_sequence, identity...); + +template +void for_each_field_in_depth(T& t, F&& f, std::index_sequence<>, identity...); + +template +struct next_step { + T& t; + F& f; + + template + operator Field() const { + boost::pfr::detail::for_each_field_in_depth( + t, + std::forward(f), + IndexSeq{}, + identity{}..., + identity{} + ); + + return {}; + } +}; + +template +void for_each_field_in_depth(T& t, F&& f, std::index_sequence, identity...) { + (void)std::add_const_t>{ + Fields{}..., + next_step, Fields...>{t, f}, + ubiq_constructor_constexpr_copy{I}... + }; +} + +template +void for_each_field_in_depth(T& lvalue, F&& f, std::index_sequence<>, identity...) { + using tuple_type = sequence_tuple::tuple; + + offset_based_getter>, tuple_type> getter; + std::forward(f)( + boost::pfr::detail::make_flat_tuple_of_references(lvalue, getter, size_t_<0>{}, size_t_{}) + ); +} + +template +void for_each_field_dispatcher_1(T& t, F&& f, std::index_sequence, std::true_type /*is_flat_refelectable*/) { + std::forward(f)( + boost::pfr::detail::tie_as_flat_tuple(t) + ); +} + + +template +void for_each_field_dispatcher_1(T& t, F&& f, std::index_sequence, std::false_type /*is_flat_refelectable*/) { + boost::pfr::detail::for_each_field_in_depth( + t, + std::forward(f), + std::index_sequence{} + ); +} + +template +void for_each_field_dispatcher(T& t, F&& f, std::index_sequence) { + static_assert( + !std::is_union::value, + "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for more info." + ); + + /// Compile time error at this point means that you have called `for_each_field` or some other non-flat function or operator for a + /// type that is not constexpr aggregate initializable. + /// + /// Make sure that all the fields of your type have constexpr default construtors and trivial destructors. + /// Or compile in C++17 mode. + constexpr T tmp{ ubiq_constructor_constexpr_copy{I}... }; + (void)tmp; + + //static_assert(is_constexpr_aggregate_initializable::value, "====================> Boost.PFR: T must be a constexpr initializable type"); + + constexpr bool is_flat_refelectable_val = detail::is_flat_refelectable( std::index_sequence{} ); + detail::for_each_field_dispatcher_1( + t, + std::forward(f), + std::index_sequence{}, + std::integral_constant{} + ); +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + +#ifdef __clang__ +# pragma clang diagnostic pop +#endif + +}}} // namespace boost::pfr::detail + +#endif // BOOST_PFR_DETAIL_CORE14_CLASSIC_HPP diff --git a/boost/pfr/detail/core14_loophole.hpp b/boost/pfr/detail/core14_loophole.hpp new file mode 100644 index 0000000000000000000000000000000000000000..88c4c2aaf92e6d49eac5b23eb9674104e4eb8225 --- /dev/null +++ b/boost/pfr/detail/core14_loophole.hpp @@ -0,0 +1,200 @@ +// Copyright (c) 2017-2018 Alexandr Poltavsky, Antony Polukhin. +// Copyright (c) 2019-2021 Antony Polukhin. +// +// 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) + + +// The Great Type Loophole (C++14) +// Initial implementation by Alexandr Poltavsky, http://alexpolt.github.io +// +// Description: +// The Great Type Loophole is a technique that allows to exchange type information with template +// instantiations. Basically you can assign and read type information during compile time. +// Here it is used to detect data members of a data type. I described it for the first time in +// this blog post http://alexpolt.github.io/type-loophole.html . +// +// This technique exploits the http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#2118 +// CWG 2118. Stateful metaprogramming via friend injection +// Note: CWG agreed that such techniques should be ill-formed, although the mechanism for prohibiting them is as yet undetermined. + +#ifndef BOOST_PFR_DETAIL_CORE14_LOOPHOLE_HPP +#define BOOST_PFR_DETAIL_CORE14_LOOPHOLE_HPP + +#include + +#include +#include + +#include // still needed for enums +#include +#include +#include +#include +#include +#include +#include + + +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wmissing-braces" +# pragma clang diagnostic ignored "-Wundefined-inline" +# pragma clang diagnostic ignored "-Wundefined-internal" +# pragma clang diagnostic ignored "-Wmissing-field-initializers" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wnon-template-friend" +#endif + + +namespace boost { namespace pfr { namespace detail { + +// tag generates friend declarations and helps with overload resolution. +// There are two types: one with the auto return type, which is the way we read types later. +// The second one is used in the detection of instantiations without which we'd get multiple +// definitions. + +template +struct tag { + friend auto loophole(tag); +}; + +// The definitions of friend functions. +template +struct fn_def_lref { + friend auto loophole(tag) { + // Standard Library containers do not SFINAE on invalid copy constructor. Because of that std::vector> reports that it is copyable, + // which leads to an instantiation error at this place. + // + // To workaround the issue, we check that the type U is movable, and move it in that case. + using no_extents_t = std::remove_all_extents_t; + return static_cast< std::conditional_t::value, no_extents_t&&, no_extents_t&> >( + boost::pfr::detail::unsafe_declval() + ); + } +}; +template +struct fn_def_rref { + friend auto loophole(tag) { return std::move(boost::pfr::detail::unsafe_declval< std::remove_all_extents_t& >()); } +}; + + +// Those specializations are to avoid multiple definition errors. +template +struct fn_def_lref {}; + +template +struct fn_def_rref {}; + + +// This has a templated conversion operator which in turn triggers instantiations. +// Important point, using sizeof seems to be more reliable. Also default template +// arguments are "cached" (I think). To fix that I provide a U template parameter to +// the ins functions which do the detection using constexpr friend functions and SFINAE. +template +struct loophole_ubiq_lref { + template static std::size_t ins(...); + template{})) > static char ins(int); + + template(0)) == sizeof(char)>)> + constexpr operator U&() const&& noexcept; // `const&&` here helps to avoid ambiguity in loophole instantiations. optional_like test validate that behavior. +}; + +template +struct loophole_ubiq_rref { + template static std::size_t ins(...); + template{})) > static char ins(int); + + template(0)) == sizeof(char)>)> + constexpr operator U&&() const&& noexcept; // `const&&` here helps to avoid ambiguity in loophole instantiations. optional_like test validate that behavior. +}; + + +// This is a helper to turn a data structure into a tuple. +template +struct loophole_type_list_lref; + +template +struct loophole_type_list_lref< T, std::index_sequence > + // Instantiating loopholes: + : sequence_tuple::tuple< decltype(T{ loophole_ubiq_lref{}... }, 0) > +{ + using type = sequence_tuple::tuple< decltype(loophole(tag{}))... >; +}; + + +template +struct loophole_type_list_rref; + +template +struct loophole_type_list_rref< T, std::index_sequence > + // Instantiating loopholes: + : sequence_tuple::tuple< decltype(T{ loophole_ubiq_rref{}... }, 0) > +{ + using type = sequence_tuple::tuple< decltype(loophole(tag{}))... >; +}; + + +// Lazily returns loophole_type_list_{lr}ref. +template +struct loophole_type_list_selector { + using type = loophole_type_list_lref; +}; + +template +struct loophole_type_list_selector { + using type = loophole_type_list_rref; +}; + +template +auto tie_as_tuple_loophole_impl(T& lvalue) noexcept { + using type = std::remove_cv_t>; + using indexes = detail::make_index_sequence()>; + using loophole_type_list = typename detail::loophole_type_list_selector< + std::is_copy_constructible>::value, type, indexes + >::type; + using tuple_type = typename loophole_type_list::type; + + return boost::pfr::detail::make_flat_tuple_of_references( + lvalue, + offset_based_getter{}, + size_t_<0>{}, + size_t_{} + ); +} + +template +auto tie_as_tuple(T& val) noexcept { + static_assert( + !std::is_union::value, + "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for more info." + ); + return boost::pfr::detail::tie_as_tuple_loophole_impl( + val + ); +} + +template +void for_each_field_dispatcher(T& t, F&& f, std::index_sequence) { + static_assert( + !std::is_union::value, + "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for more info." + ); + std::forward(f)( + boost::pfr::detail::tie_as_tuple_loophole_impl(t) + ); +} + +}}} // namespace boost::pfr::detail + + +#ifdef __clang__ +# pragma clang diagnostic pop +#elif defined(__GNUC__) +# pragma GCC diagnostic pop +#endif + + +#endif // BOOST_PFR_DETAIL_CORE14_LOOPHOLE_HPP + diff --git a/boost/pfr/detail/core17.hpp b/boost/pfr/detail/core17.hpp new file mode 100644 index 0000000000000000000000000000000000000000..20a2821ce4515ed651b1e00087876ce527a88ce5 --- /dev/null +++ b/boost/pfr/detail/core17.hpp @@ -0,0 +1,71 @@ +// Copyright (c) 2016-2021 Antony Polukhin +// +// 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_PFR_DETAIL_CORE17_HPP +#define BOOST_PFR_DETAIL_CORE17_HPP + +#include +#include +#include +#include + +namespace boost { namespace pfr { namespace detail { + +#ifndef _MSC_VER // MSVC fails to compile the following code, but compiles the structured bindings in core17_generated.hpp +struct do_not_define_std_tuple_size_for_me { + bool test1 = true; +}; + +template +constexpr bool do_structured_bindings_work() noexcept { // ******************************************* IN CASE OF ERROR READ THE FOLLOWING LINES IN boost/pfr/detail/core17.hpp FILE: + T val{}; + const auto& [a] = val; // ******************************************* IN CASE OF ERROR READ THE FOLLOWING LINES IN boost/pfr/detail/core17.hpp FILE: + + /**************************************************************************** + * + * It looks like your compiler or Standard Library can not handle C++17 + * structured bindings. + * + * Workaround: Define BOOST_PFR_USE_CPP17 to 0 + * It will disable the C++17 features for Boost.PFR library. + * + * Sorry for the inconvenience caused. + * + ****************************************************************************/ + + return a; +} + +static_assert( + do_structured_bindings_work(), + "====================> Boost.PFR: Your compiler can not handle C++17 structured bindings. Read the above comments for workarounds." +); +#endif // #ifndef _MSC_VER + +template +constexpr auto tie_as_tuple(T& val) noexcept { + static_assert( + !std::is_union::value, + "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for more info." + ); + typedef size_t_()> fields_count_tag; + return boost::pfr::detail::tie_as_tuple(val, fields_count_tag{}); +} + +template +void for_each_field_dispatcher(T& t, F&& f, std::index_sequence) { + static_assert( + !std::is_union::value, + "====================> Boost.PFR: For safety reasons it is forbidden to reflect unions. See `Reflection of unions` section in the docs for more info." + ); + std::forward(f)( + detail::tie_as_tuple(t) + ); +} + +}}} // namespace boost::pfr::detail + +#endif // BOOST_PFR_DETAIL_CORE17_HPP diff --git a/boost/pfr/detail/core17_generated.hpp b/boost/pfr/detail/core17_generated.hpp new file mode 100644 index 0000000000000000000000000000000000000000..d3098cd3ff529f0e37c9c08e2edde268e954e3f6 --- /dev/null +++ b/boost/pfr/detail/core17_generated.hpp @@ -0,0 +1,1036 @@ +// Copyright (c) 2016-2021 Antony Polukhin +// +// 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) + + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////// THIS HEADER IS AUTO GENERATED BY misc/generate_cpp17.py //////////////// +//////////////// MODIFY AND RUN THE misc/generate_cpp17.py INSTEAD OF DIRECTLY MODIFYING THE GENERATED FILE //////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_PFR_DETAIL_CORE17_GENERATED_HPP +#define BOOST_PFR_DETAIL_CORE17_GENERATED_HPP +#pragma once + +#include +#if !BOOST_PFR_USE_CPP17 +# error C++17 is required for this header. +#endif + +#include +#include + +namespace boost { namespace pfr { namespace detail { + +template +constexpr auto make_tuple_of_references(Args&&... args) noexcept { + return sequence_tuple::tuple{ args... }; +} + +template +constexpr auto tie_as_tuple(T& /*val*/, size_t_<0>) noexcept { + return sequence_tuple::tuple<>{}; +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<1>, std::enable_if_t >::value>* = 0) noexcept { + auto& [a] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a); +} + + +template +constexpr auto tie_as_tuple(T& val, size_t_<1>, std::enable_if_t >::value>* = 0) noexcept { + return ::boost::pfr::detail::make_tuple_of_references( val ); +} + + +template +constexpr auto tie_as_tuple(T& val, size_t_<2>) noexcept { + auto& [a,b] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<3>) noexcept { + auto& [a,b,c] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<4>) noexcept { + auto& [a,b,c,d] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<5>) noexcept { + auto& [a,b,c,d,e] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<6>) noexcept { + auto& [a,b,c,d,e,f] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<7>) noexcept { + auto& [a,b,c,d,e,f,g] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<8>) noexcept { + auto& [a,b,c,d,e,f,g,h] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<9>) noexcept { + auto& [a,b,c,d,e,f,g,h,j] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<10>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<11>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<12>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<13>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<14>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<15>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<16>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<17>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<18>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<19>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<20>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<21>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<22>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<23>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<24>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<25>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<26>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<27>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<28>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<29>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<30>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<31>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<32>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<33>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<34>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<35>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<36>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<37>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<38>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<39>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<40>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<41>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<42>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<43>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<44>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<45>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<46>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<47>) noexcept { + auto& [a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + return ::boost::pfr::detail::make_tuple_of_references(a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<48>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<49>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<50>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<51>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<52>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<53>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<54>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<55>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<56>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<57>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<58>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<59>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<60>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<61>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<62>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<63>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<64>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<65>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<66>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<67>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<68>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<69>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<70>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<71>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<72>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<73>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<74>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<75>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<76>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<77>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<78>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<79>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<80>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<81>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<82>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<83>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<84>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<85>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<86>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<87>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<88>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<89>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<90>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<91>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<92>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<93>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<94>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<95>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, + ba + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, + ba + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<96>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, + ba,bb + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, + ba,bb + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<97>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, + ba,bb,bc + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, + ba,bb,bc + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<98>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, + ba,bb,bc,bd + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, + ba,bb,bc,bd + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<99>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, + ba,bb,bc,bd,be + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, + ba,bb,bc,bd,be + ); +} + +template +constexpr auto tie_as_tuple(T& val, size_t_<100>) noexcept { + auto& [ + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, + ba,bb,bc,bd,be,bf + ] = val; // ====================> Boost.PFR: User-provided type is not a SimpleAggregate. + + return ::boost::pfr::detail::make_tuple_of_references( + a,b,c,d,e,f,g,h,j,k,l,m,n,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,J,K,L,M,N,P,Q,R,S,U,V,W,X,Y,Z, + aa,ab,ac,ad,ae,af,ag,ah,aj,ak,al,am,an,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aJ,aK,aL,aM,aN,aP,aQ,aR,aS,aU,aV,aW,aX,aY,aZ, + ba,bb,bc,bd,be,bf + ); +} + + +template +constexpr void tie_as_tuple(T& /*val*/, size_t_) noexcept { + static_assert(sizeof(T) && false, + "====================> Boost.PFR: Too many fields in a structure T. Regenerate include/boost/pfr/detail/core17_generated.hpp file for appropriate count of fields. For example: `python ./misc/generate_cpp17.py 300 > include/boost/pfr/detail/core17_generated.hpp`"); +} + +}}} // namespace boost::pfr::detail + +#endif // BOOST_PFR_DETAIL_CORE17_GENERATED_HPP + diff --git a/boost/pfr/detail/detectors.hpp b/boost/pfr/detail/detectors.hpp new file mode 100644 index 0000000000000000000000000000000000000000..e18be7dcdfe797266da55e0e10538d87cba18cf8 --- /dev/null +++ b/boost/pfr/detail/detectors.hpp @@ -0,0 +1,70 @@ +// Copyright (c) 2016-2021 Antony Polukhin +// +// 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_PFR_DETAIL_DETECTORS_HPP +#define BOOST_PFR_DETAIL_DETECTORS_HPP +#pragma once + +#include + +#include +#include + +namespace boost { namespace pfr { namespace detail { +///////////////////// `value` is true if Detector does not compile (SFINAE) + struct can_not_apply{}; + + template