...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Configures an execution context by reading variables from a string.
class config_from_string : public execution_context::service_maker
Name |
Description |
---|---|
config_from_string [constructor] |
Construct with the default prefix "asio". |
Add a concrete service to the specified execution context. |
Each variable must be on a line of its own, and of the form:
section.key=value
or, if an optional prefix is specified:
prefix.section.key=value
Blank lines and lines starting with #
are ignored. It is also permitted to include a comment starting with #
after the value.
boost::asio::io_context my_io_context{ boost::asio::config_from_string{ "scheduler.concurrency_hint=10\n" "scheduler.locking=1"}};
Header: boost/asio/config.hpp
Convenience header: boost/asio.hpp