Skip to content

Commit a7eae9b

Browse files
Dawn Perchikzygoloid
authored andcommitted
P1870R1 forwarding-range<T> is too subtle
Also fixes NB US 279, US 279, and GB 280 (C++20 CD).
1 parent ef59f55 commit a7eae9b

File tree

3 files changed

+120
-79
lines changed

3 files changed

+120
-79
lines changed

source/containers.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10513,6 +10513,9 @@
1051310513
template<class ElementType, size_t Extent = dynamic_extent>
1051410514
class span;
1051510515

10516+
template<class ElementType, size_t Extent>
10517+
inline constexpr bool enable_safe_range<span<ElementType, Extent>> = true;
10518+
1051610519
// \ref{span.objectrep}, views of object representation
1051710520
template<class ElementType, size_t Extent>
1051810521
span<const byte, Extent == dynamic_extent ? dynamic_extent : sizeof(ElementType) * Extent>
@@ -10625,9 +10628,6 @@
1062510628
constexpr const_reverse_iterator crbegin() const noexcept;
1062610629
constexpr const_reverse_iterator crend() const noexcept;
1062710630

10628-
friend constexpr iterator begin(span s) noexcept { return s.begin(); }
10629-
friend constexpr iterator end(span s) noexcept { return s.end(); }
10630-
1063110631
private:
1063210632
pointer data_; // \expos
1063310633
size_type size_; // \expos

0 commit comments

Comments
 (0)