Mandates: callable<QueryTag, prop-like<ValueType>>
is modeled,
where prop-like is the following exposition-only class template:
template<class ValueType>structprop-like{// exposition onlyconst ValueType& query(auto)constnoexcept;
};
[Example 1: template<sender Sndr>
sender auto parameterize_work(Sndr sndr){// Make an environment such that get_allocator(env) returns a reference to a copy of my_alloc{}.auto e = prop(get_allocator, my_alloc{});
// Parameterize the input sender so that it will use our custom execution environment.return write_env(sndr, e);
} — end example]
It is unspecified
whether env supports initialization
using a parenthesized expression-list ([dcl.init]),
unless the expression-list consist of
a single element of type (possibly const) env.
[Example 1: template<sender Sndr>
sender auto parameterize_work(Sndr sndr){// Make an environment such that:// get_allocator(env) returns a reference to a copy of my_alloc{}// get_scheduler(env) returns a reference to a copy of my_sched{}auto e = env{prop(get_allocator, my_alloc{}),
prop(get_scheduler, my_sched{})};
// Parameterize the input sender so that it will use our custom execution environment.return write_env(sndr, e);
} — end example]
Let has-query be the following exposition-only concept:
template<class Env, class QueryTag>concepthas-query=// exposition onlyrequires(const Env& env){
env.query(QueryTag());
};