// execution/set_value.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#else // defined(GENERATING_DOCUMENTATION)
-namespace asio_execution_set_value_fn {
+namespace boost_asio_execution_set_value_fn {
using boost::asio::decay;
using boost::asio::declval;
ill_formed
};
-template <typename R, typename Vs, typename = void>
+template <typename R, typename Vs, typename = void, typename = void>
struct call_traits
{
BOOST_ASIO_STATIC_CONSTEXPR(overload_type, overload = ill_formed);
template <typename R, typename Vs>
struct call_traits<R, Vs,
typename enable_if<
- (
- set_value_member<R, Vs>::is_valid
- )
+ set_value_member<R, Vs>::is_valid
>::type> :
set_value_member<R, Vs>
{
template <typename R, typename Vs>
struct call_traits<R, Vs,
typename enable_if<
- (
- !set_value_member<R, Vs>::is_valid
- &&
- set_value_free<R, Vs>::is_valid
- )
+ !set_value_member<R, Vs>::is_valid
+ >::type,
+ typename enable_if<
+ set_value_free<R, Vs>::is_valid
>::type> :
set_value_free<R, Vs>
{
template <typename T>
const T static_instance<T>::instance = {};
-} // namespace asio_execution_set_value_fn
+} // namespace boost_asio_execution_set_value_fn
namespace boost {
namespace asio {
namespace execution {
namespace {
-static BOOST_ASIO_CONSTEXPR const asio_execution_set_value_fn::impl&
- set_value = asio_execution_set_value_fn::static_instance<>::instance;
+static BOOST_ASIO_CONSTEXPR const boost_asio_execution_set_value_fn::impl&
+ set_value = boost_asio_execution_set_value_fn::static_instance<>::instance;
} // namespace
template <typename R, typename... Vs>
struct can_set_value :
integral_constant<bool,
- asio_execution_set_value_fn::call_traits<R, void(Vs...)>::overload !=
- asio_execution_set_value_fn::ill_formed>
+ boost_asio_execution_set_value_fn::call_traits<R, void(Vs...)>::overload !=
+ boost_asio_execution_set_value_fn::ill_formed>
{
};
template <typename R, typename... Vs>
struct is_nothrow_set_value :
integral_constant<bool,
- asio_execution_set_value_fn::call_traits<R, void(Vs...)>::is_noexcept>
+ boost_asio_execution_set_value_fn::call_traits<R, void(Vs...)>::is_noexcept>
{
};
template <typename R>
struct can_set_value<R> :
integral_constant<bool,
- asio_execution_set_value_fn::call_traits<R, void()>::overload !=
- asio_execution_set_value_fn::ill_formed>
+ boost_asio_execution_set_value_fn::call_traits<R, void()>::overload !=
+ boost_asio_execution_set_value_fn::ill_formed>
{
};
template <typename R>
struct is_nothrow_set_value<R> :
integral_constant<bool,
- asio_execution_set_value_fn::call_traits<R, void()>::is_noexcept>
+ boost_asio_execution_set_value_fn::call_traits<R, void()>::is_noexcept>
{
};
template <typename R, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
struct can_set_value<R, BOOST_ASIO_VARIADIC_TARGS(n)> : \
integral_constant<bool, \
- asio_execution_set_value_fn::call_traits<R, \
+ boost_asio_execution_set_value_fn::call_traits<R, \
void(BOOST_ASIO_VARIADIC_TARGS(n))>::overload != \
- asio_execution_set_value_fn::ill_formed> \
+ boost_asio_execution_set_value_fn::ill_formed> \
{ \
}; \
\
template <typename R, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
struct is_nothrow_set_value<R, BOOST_ASIO_VARIADIC_TARGS(n)> : \
integral_constant<bool, \
- asio_execution_set_value_fn::call_traits<R, \
+ boost_asio_execution_set_value_fn::call_traits<R, \
void(BOOST_ASIO_VARIADIC_TARGS(n))>::is_noexcept> \
{ \
}; \