Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
io_context::basic_executor_type::require (7 of 8 overloads)

Obtain an executor with the specified allocator property.

template<
    typename OtherAllocator>
constexpr basic_executor_type< OtherAllocator, Bits > require(
    execution::allocator_t< OtherAllocator > a) const;

Do not call this function directly. It is intended for use with the require customisation point.

For example:

auto ex1 = my_io_context.get_executor();
auto ex2 = boost::asio::require(ex1,
    boost::asio::execution::allocator(my_allocator));

PrevUpHomeNext