A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/cplusplus/sender-receiver/issues/314 below:

constraints on `into_variant`'s `get-state` function are incorrect · Issue #314 · cplusplus/sender-receiver · GitHub

[exec.into.variant] p5 reads:

The member impls-for<into_variant_t>​::​get-state is initialized with a callable object equivalent to the following lambda:

[]<class Sndr, class Rcvr>(Sndr&& sndr, Rcvr& rcvr) noexcept
  -> type_identity<value_types_of_t<child-type<Sndr>, env_of_t<Rcvr>>>  {
  return {};
}

The constraint should account for the fact that the child sender will be connected with FWD-ENV(get_env(rcvr)).

Proposed Resolution

Change [exec.snd.expos] p2 as follows:

For a queryable object `env`, `FWD-ENV(env)` is an expression whose
type satisfies `queryable` such that for a query object `q` and a pack
of subexpressions `as`, the expression `FWD-ENV(env).query(q, as...)`
is ill-formed if `forwarding_query(q)` is `false`; otherwise, it is
expression-equivalent to `env.query(q, as...)`.
+The type `FWD-ENV-T(Env)` is `decltype(FWD-ENV(declval<Env>()))`.

Change [exec.into.variant] p5 as follows:

The member `impls-for<into_variant_t>​::​get-state` is initialized with
a callable object equivalent to the following lambda:

  []<class Sndr, class Rcvr>(Sndr&& sndr, Rcvr& rcvr) noexcept
-   -> type_identity<value_types_of_t<child-type<Sndr>, env_of_t<Rcvr>>> {
+   -> type_identity<value_types_of_t<child-type<Sndr>, FWD-ENV-T(env_of_t<Rcvr>)>> {
    return {};
  }

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4