| 200 | |
| 201 | template <class _Fn, class _Default> |
| 202 | struct __with_default : _Fn |
| 203 | { |
| 204 | STDEXEC_ATTRIBUTE(host, device, always_inline) |
| 205 | constexpr __with_default(_Fn __fn, _Default __default) |
| 206 | noexcept(__nothrow_move_constructible<_Fn>) |
| 207 | : _Fn(static_cast<_Fn &&>(__fn)) |
| 208 | , __default_(static_cast<_Default &&>(__default)) |
| 209 | {} |
| 210 | |
| 211 | using _Fn::operator(); |
| 212 | |
| 213 | template <class... _As> |
| 214 | requires(!__callable<_Fn const &, _As...>) |
| 215 | STDEXEC_ATTRIBUTE(host, device, always_inline) |
| 216 | constexpr auto |
| 217 | operator()(_As &&...) const noexcept(__nothrow_copy_constructible<_Default>) -> _Default |
| 218 | { |
| 219 | return __default_; |
| 220 | } |
| 221 | |
| 222 | _Default __default_{}; |
| 223 | }; |
| 224 | |
| 225 | template <class _Fn, class _Default> |
| 226 | STDEXEC_HOST_DEVICE_DEDUCTION_GUIDE |
no outgoing calls
no test coverage detected