|
2072 | 2072 | its members need not be defined.
|
2073 | 2073 | \end{note}
|
2074 | 2074 |
|
| 2075 | +\rSec2[exec.domain.default]{\tcode{execution::default_domain}} |
2075 | 2076 |
|
| 2077 | +\pnum |
| 2078 | +\begin{codeblock} |
| 2079 | +namespace std::execution { |
| 2080 | + struct default_domain { |
| 2081 | + template<@\libconcept{sender}@ Sndr, @\exposconcept{queryable}@... Env> |
| 2082 | + requires (sizeof...(Env) <= 1) |
| 2083 | + static constexpr @\libconcept{sender}@ decltype(auto) transform_sender(Sndr&& sndr, const Env&... env) |
| 2084 | + noexcept(@\seebelow@); |
| 2085 | + |
| 2086 | + template<@\libconcept{sender}@ Sndr, @\exposconcept{queryable}@ Env> |
| 2087 | + static constexpr @\exposconcept{queryable}@ decltype(auto) transform_env(Sndr&& sndr, Env&& env) noexcept; |
| 2088 | + |
| 2089 | + template<class Tag, @\libconcept{sender}@ Sndr, class... Args> |
| 2090 | + static constexpr decltype(auto) apply_sender(Tag, Sndr&& sndr, Args&&... args) |
| 2091 | + noexcept(@\seebelow@); |
| 2092 | + }; |
| 2093 | +} |
| 2094 | +\end{codeblock} |
| 2095 | + |
| 2096 | +\begin{itemdecl} |
| 2097 | +template<@\libconcept{sender}@ Sndr, @\exposconcept{queryable}@... Env> |
| 2098 | + requires (sizeof...(Env) <= 1) |
| 2099 | +constexpr @\libconcept{sender}@ decltype(auto) transform_sender(Sndr&& sndr, const Env&... env) |
| 2100 | + noexcept(@\seebelow@); |
| 2101 | +\end{itemdecl} |
| 2102 | + |
| 2103 | +\begin{itemdescr} |
| 2104 | +\pnum |
| 2105 | +Let \tcode{e} be the expression |
| 2106 | +\begin{codeblock} |
| 2107 | +tag_of_t<Sndr>().transform_sender(std::forward<Sndr>(sndr), env...) |
| 2108 | +\end{codeblock} |
| 2109 | +if that expression is well-formed; |
| 2110 | +otherwise, \tcode{std::forward<Sndr>(sndr)}. |
| 2111 | + |
| 2112 | +\pnum |
| 2113 | +\returns |
| 2114 | +\tcode{e} |
| 2115 | + |
| 2116 | +\remarks |
| 2117 | +The exception specification is equivalent to \tcode{noexcept(e)}. |
| 2118 | +\end{itemdescr} |
| 2119 | + |
| 2120 | +\begin{itemdecl} |
| 2121 | +template<@\libconcept{sender}@ Sndr, @\exposconcept{queryable}@ Env> |
| 2122 | + constexpr @\exposconcept{queryable}@ decltype(auto) transform_env(Sndr&& sndr, Env&& env) noexcept; |
| 2123 | +\end{itemdecl} |
| 2124 | + |
| 2125 | +\begin{itemdescr} |
| 2126 | +\pnum |
| 2127 | +Let \tcode{e} be the expression |
| 2128 | +\begin{codeblock} |
| 2129 | +tag_of_t<Sndr>().transform_env(std::forward<Sndr>(sndr), std::forward<Env>(env)) |
| 2130 | +\end{codeblock} |
| 2131 | +if that expression is well-formed; |
| 2132 | +otherwise, \tcode{static_cast<Env>(std::forward<Env>(env))}. |
| 2133 | + |
| 2134 | +\pnum |
| 2135 | +\mandates \tcode{noexcept(e)} is \tcode{true}. |
| 2136 | + |
| 2137 | +\pnum |
| 2138 | +\returns |
| 2139 | +\tcode{e} |
| 2140 | +\end{itemdescr} |
| 2141 | + |
| 2142 | +\begin{itemdecl} |
| 2143 | +template<class Tag, @\libconcept{sender}@ Sndr, class... Args> |
| 2144 | +constexpr decltype(auto) apply_sender(Tag, Sndr&& sndr, Args&&... args) |
| 2145 | + noexcept(@\seebelow@); |
| 2146 | +\end{itemdecl} |
| 2147 | + |
| 2148 | +\begin{itemdescr} |
| 2149 | +\pnum |
| 2150 | +Let \tcode{e} be the expression |
| 2151 | +\begin{codeblock} |
| 2152 | + Tag().apply_sender(std::forward<Sndr>(sndr), std::forward<Args>(args)...) |
| 2153 | +\end{codeblock} |
| 2154 | + |
| 2155 | +\pnum |
| 2156 | +\constraints |
| 2157 | +\tcode{e} is a well-formed expression. |
| 2158 | + |
| 2159 | +\pnum |
| 2160 | +\returns |
| 2161 | +\tcode{e} |
| 2162 | + |
| 2163 | +\pnum |
| 2164 | +\remarks |
| 2165 | +The exception specification is equivalent to \tcode{noexcept(e)}. |
| 2166 | +\end{itemdescr} |
| 2167 | + |
| 2168 | +\rSec2[exec.snd.transform]{\tcode{execution::transform_sender}} |
| 2169 | + |
| 2170 | +\begin{itemdecl} |
| 2171 | +namespace std::execution { |
| 2172 | + template<class Domain, @\libconcept{sender}@ Sndr, @\exposconcept{queryable}@... Env> |
| 2173 | + requires (sizeof...(Env) <= 1) |
| 2174 | + constexpr @\libconcept{sender}@ decltype(auto) transform_sender(Domain dom, Sndr&& sndr, const Env&... env) |
| 2175 | + noexcept(@\seebelow@); |
| 2176 | +} |
| 2177 | +\end{itemdecl} |
| 2178 | + |
| 2179 | +\begin{itemdescr} |
| 2180 | +\pnum |
| 2181 | +Let \exposid{transformed-sndr} be the expression |
| 2182 | +\begin{codeblock} |
| 2183 | +dom.transform_sender(std::forward<Sndr>(sndr), env...) |
| 2184 | +\end{codeblock} |
| 2185 | +if that expression is well-formed; otherwise, |
| 2186 | +\begin{codeblock} |
| 2187 | +default_domain().transform_sender(std::forward<Sndr>(sndr), env...) |
| 2188 | +\end{codeblock} |
| 2189 | +Let \exposid{final-sndr} be the expression \exposid{transformed-sndr} |
| 2190 | +if \exposid{transformed-sndr} and \exposid{sndr} |
| 2191 | +have the same type ignoring cv-qualifiers; |
| 2192 | +otherwise, it is |
| 2193 | +the expression \tcode{transform_sender(dom, transformed-sndr, env...)}. |
| 2194 | + |
| 2195 | +\pnum |
| 2196 | +\returns |
| 2197 | +\exposid{final-sndr} |
| 2198 | + |
| 2199 | +\pnum |
| 2200 | +\remarks |
| 2201 | +The exception specification is equivalent to |
| 2202 | +\tcode{noexcept(\exposid{final-sndr})}. |
| 2203 | +\end{itemdescr} |
2076 | 2204 |
|
2077 | 2205 | \rSec1[exec.util]{Sender/receiver utilities}
|
2078 | 2206 |
|
|
0 commit comments