|
1958 | 1958 | \end{codeblock} |
1959 | 1959 | \end{itemdescr} |
1960 | 1960 |
|
1961 | | -\begin{itemdecl} |
1962 | | -template<@\libconcept{sender}@ Sndr, @\exposconcept{queryable}@ Env> |
1963 | | - constexpr auto @\exposid{write-env}@(Sndr&& sndr, Env&& env); // \expos |
1964 | | -\end{itemdecl} |
1965 | | - |
1966 | | -\begin{itemdescr} |
1967 | | -\pnum |
1968 | | -\exposid{write-env} is an exposition-only sender adaptor that, |
1969 | | -when connected with a receiver \tcode{rcvr}, |
1970 | | -connects the adapted sender with a receiver |
1971 | | -whose execution environment is the result of |
1972 | | -joining the \exposconcept{queryable} argument \tcode{env} |
1973 | | -to the result of \tcode{get_env(rcvr)}. |
1974 | | - |
1975 | | -\pnum |
1976 | | -Let \exposid{write-env-t} be an exposition-only empty class type. |
1977 | | - |
1978 | | -\pnum |
1979 | | -\returns |
1980 | | -\begin{codeblock} |
1981 | | -@\exposid{make-sender}@(@\exposid{write-env-t}@(), std::forward<Env>(env), std::forward<Sndr>(sndr)) |
1982 | | -\end{codeblock} |
1983 | | - |
1984 | | -\pnum |
1985 | | -\remarks |
1986 | | -The exposition-only class template \exposid{impls-for}\iref{exec.snd.general} |
1987 | | -is specialized for \exposid{write-env-t} as follows: |
1988 | | -\begin{codeblock} |
1989 | | -template<> |
1990 | | -struct @\exposid{impls-for}@<@\exposid{write-env-t}@> : @\exposid{default-impls}@ { |
1991 | | - static constexpr auto @\exposid{get-env}@ = |
1992 | | - [](auto, const auto& state, const auto& rcvr) noexcept { |
1993 | | - return @\seebelow@; |
1994 | | - }; |
1995 | | -}; |
1996 | | -\end{codeblock} |
1997 | | -Invocation of |
1998 | | -\tcode{\exposid{impls-for}<\exposid{write-env-t}>::\exposid{get-env}} |
1999 | | -returns an object \tcode{e} such that |
2000 | | -\begin{itemize} |
2001 | | -\item |
2002 | | -\tcode{decltype(e)} models \exposconcept{queryable} and |
2003 | | -\item |
2004 | | -given a query object \tcode{q}, |
2005 | | -the expression \tcode{e.query(q)} is expression-equivalent |
2006 | | -to \tcode{state.query(q)} if that expression is valid, |
2007 | | -otherwise, \tcode{e.query(q)} is expression-equivalent |
2008 | | -to \tcode{get_env(rcvr).que\-ry(q)}. |
2009 | | -\end{itemize} |
2010 | | -\end{itemdescr} |
2011 | | - |
2012 | 1961 | \pnum |
2013 | 1962 | \indexlibraryglobal{\exposid{overload-set}} |
2014 | 1963 | %%FIXME: Should this be in a namespace? |
|
0 commit comments