A RetroSearch Logo

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

Search Query:

Showing content from https://github.com/cplusplus/nbballot/issues/295 below:

GB299 24.07.16.2 has-tuple-element helper concept needs convertible_to LWG 3323 · Issue #295 · cplusplus/nbballot · GitHub

has-tuple-element helper concept needs convertible_to
The exposition-only has-tuple-element concept (for elements_view) is defined as

template<class T, size_t N>
concept has-tuple-element = exposition only
requires(T t) {
  typename tuple_size<T>::type;
  requires N < tuple_size_v<T>;
  typename tuple_element_t<N, T>;
  { get<N>(t) } -> const tuple_element_t<N, T>&;
};

However, the return type constraint for { get(t) } is no longer valid under the latest concepts changes

Proposed change:
Change to:

template<class T, size_t N>
concept has-tuple-element = exposition only
requires(T t) {
  typename tuple_size<T>::type;
  requires N < tuple_size_v<T>;
  typename tuple_element_t<N, T>;
  { get<N>(t) } -> convertible_to<const tuple_element_t<N, T>&>;
};

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