Created on 2019-05-31.00:00:00 last changed 55 months ago
Proposed resolution:
Resolved by P2116R0.
[ 2020-05-01; reflector discussions ]
Resolved by P2116R0 voted in in Prague.
[ 2020-02-14, Prague ]
Lengthy discussion about the intended design of span's tuple interface. Has been send to LEWG, who made several polls and concluded to remove the tuple interface for span for C++20.
Will be resolved by P2116R0.[ 2020-02-13, Prague ]
Wording needs to be adjusted, because we accepted P1831R1.
Previous resolution [SUPERSEDED]:This wording is relative to N4849.
Modify [span.syn], header <span> synopsis, as indicated:
[…] // [span.tuple], tuple interface template<class T> class tuple_size; template<size_t I, class T> class tuple_element; template<class ElementType, size_t Extent> struct tuple_size<span<ElementType, Extent>>; template<class ElementType> struct tuple_size<span<ElementType, dynamic_extent>>; // not defined template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, span<ElementType, Extent>>; template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, const span<ElementType, Extent>>; […]
Modify [span.tuple] before p1 as indicated:
template<class ElementType, size_t Extent> struct tuple_size<span<ElementType, Extent>> : integral_constant<size_t, Extent> { }; template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, span<ElementType, Extent>> { using type = ElementType; }; template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, const span<ElementType, Extent>> { using type = ElementType; };-1- Mandates: Extent != dynamic_extent && I < Extent is true.
Add the following wording to Annex D:
D.? Deprecated span tuple interface [depr.span.syn]
1 The header <span> ([span.syn]) has the following additions:namespace std { template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, volatile span<ElementType, Extent>>; template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, const volatile span<ElementType, Extent>>; }D.1.? tuple interface [depr.span.tuple]
template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, volatile span<ElementType, Extent>> { using type = ElementType; }; template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, const volatile span<ElementType, Extent>> { using type = ElementType; };-?- Mandates: Extent != dynamic_extent && I < Extent is true.
As currently specified, it uses the cv-qualified partial specialization, which incorrectly adds cv-qualification to the element type.
Previous resolution [SUPERSEDED]:This wording is relative to N4810.
Modify [span.syn], header <span> synopsis, as indicated:
[…] // [span.tuple], tuple interface template<class T> class tuple_size; template<size_t I, class T> class tuple_element; template<class ElementType, size_t Extent> struct tuple_size<span<ElementType, Extent>>; template<class ElementType> struct tuple_size<span<ElementType, dynamic_extent>>; // not defined template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, span<ElementType, Extent>>; template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, const span<ElementType, Extent>>; template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, volatile span<ElementType, Extent>>; template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, const volatile span<ElementType, Extent>>; […]
Modify [span.tuple] before p1 as indicated:
[Drafting note: The representation style for the newly added wording follows the new style for tuple_element<I, span<ElementType, Extent>>::type, which had recently been changed editorially.]
template<class ElementType, size_t Extent> struct tuple_size<span<ElementType, Extent>> : integral_constant<size_t, Extent> { }; tuple_element<I, span<ElementType, Extent>>::type template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, const span<ElementType, Extent>> { using type = ElementType; }; template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, volatile span<ElementType, Extent>> { using type = ElementType; }; template<size_t I, class ElementType, size_t Extent> struct tuple_element<I, const volatile span<ElementType, Extent>> { using type = ElementType; };-1- Mandates: Extent != dynamic_extent && I < Extent is true.
History | |||
---|---|---|---|
Date | User | Action | Args |
2020-05-01 19:14:16 | admin | set | messages: + msg11251 |
2020-05-01 19:14:16 | admin | set | messages: + msg11250 |
2020-05-01 19:14:16 | admin | set | status: new -> resolved |
2020-02-13 12:25:23 | admin | set | messages: + msg11054 |
2019-06-08 16:31:03 | admin | set | messages: + msg10424 |
2019-05-31 00:00:00 | admin | create |