Created on 2019-11-06.00:00:00 last changed 46 months ago
Proposed resolution:
This wording is relative to N4835.
Modify [range.elements.view], class template elements_view synopsis, as indicated:
namespace std::ranges { 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>&>; }; […] }
[ 2019-11 Status to Ready during Wednesday night issue processing in Belfast. ]
Addresses GB 299
has-tuple-element helper concept needs convertible_to
The exposition-only has-tuple-element concept (for elements_view) is defined astemplate<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<N>(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>&>; };
Jonathan Wakely:
The NB comment says "The return type constraint for { get(t) } is no longer valid under the latest concepts changes." The changes referred to are those in P1452R2.History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2020-02-24 16:02:59 | admin | set | status: voting -> wp |
2020-01-17 04:54:50 | admin | set | status: ready -> voting |
2019-11-07 08:02:35 | admin | set | messages: + msg10774 |
2019-11-07 08:02:35 | admin | set | status: new -> ready |
2019-11-06 19:37:45 | admin | set | messages: + msg10762 |
2019-11-06 00:00:00 | admin | create |