...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
A customisation point that attempts to apply a property to an object.
constexpr unspecified prefer = unspecified;
The name prefer
denotes a customisation point object. The expression
boost::asio::prefer(E, P0, Pn...)
for some subexpressions E
and P0
, and where Pn...
represents N
subexpressions (where N
is 0 or more, and with types T
= decay_t<decltype(E)>
and Prop0 = decay_t<decltype(P0)>
)
is expression-equivalent to:
is_applicable_property_v<T, Prop0> && Prop0::is_preferable
is not a well-formed constant expression with value true
,
boost::asio::prefer(E, P0, Pn...)
is ill-formed.
E
if N == 0
and the expression
Prop0::template static_query_v<T> == Prop0::value()
is a well-formed constant expression with value true
.
(E).require(P0)
if N == 0
and the
expression (E).require(P0)
is a valid expression.
require(E, P0)
if N == 0
and the
expression require(E, P0)
is a valid expression with overload
resolution performed in a context that does not include the declaration
of the require
customization point object.
(E).prefer(P0)
if N == 0
and the
expression (E).prefer(P0)
is a valid expression.
prefer(E, P0)
if N == 0
and the
expression prefer(E, P0)
is a valid expression with overload
resolution performed in a context that does not include the declaration
of the prefer
customization point object.
E
if N == 0
.
boost::asio::prefer(boost::asio::prefer(E, P0), Pn...)
if N > 0
and the expression boost::asio::prefer(boost::asio::prefer(E,
P0), Pn...)
is a valid expression.
boost::asio::prefer(E, P0, Pn...)
is ill-formed.
Header: boost/asio/prefer.hpp
Convenience header: boost/asio.hpp