[libcxx-commits] [PATCH] D143432: [libc++] Addresses LWG3103.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Mar 4 04:24:53 PST 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG20b538fc641e: [libc++] Addresses LWG3103. (authored by Mordante).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143432/new/

https://reviews.llvm.org/D143432

Files:
  libcxx/docs/Status/Cxx20Issues.csv
  libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp
  libcxx/test/std/containers/views/views.span/span.sub/first.verify.cpp
  libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp
  libcxx/test/std/containers/views/views.span/span.sub/last.verify.cpp
  libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp
  libcxx/test/std/containers/views/views.span/span.sub/subspan.verify.cpp


Index: libcxx/test/std/containers/views/views.span/span.sub/subspan.verify.cpp
===================================================================
--- libcxx/test/std/containers/views/views.span/span.sub/subspan.verify.cpp
+++ libcxx/test/std/containers/views/views.span/span.sub/subspan.verify.cpp
@@ -16,8 +16,7 @@
 // template<size_t Offset, size_t Count = dynamic_extent>
 //   constexpr span<element_type, see below> subspan() const;
 //
-//  Requires: offset <= size() &&
-//            (count == dynamic_extent || count <= size() - offset)
+// Mandates: Offset <= Extent && (Count == dynamic_extent || Count <= Extent - Offset) is true.
 
 #include <span>
 #include <cstddef>
Index: libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp
===================================================================
--- libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp
+++ libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp
@@ -15,8 +15,7 @@
 // constexpr span<element_type, dynamic_extent> subspan(
 //   size_type offset, size_type count = dynamic_extent) const;
 //
-//  Requires: (0 <= Offset && Offset <= size())
-//      && (Count == dynamic_extent || Count >= 0 && Offset + Count <= size())
+// Mandates: Offset <= Extent && (Count == dynamic_extent || Count <= Extent - Offset) is true.
 
 #include <span>
 #include <cassert>
Index: libcxx/test/std/containers/views/views.span/span.sub/last.verify.cpp
===================================================================
--- libcxx/test/std/containers/views/views.span/span.sub/last.verify.cpp
+++ libcxx/test/std/containers/views/views.span/span.sub/last.verify.cpp
@@ -12,7 +12,7 @@
 // template<size_t Count>
 //  constexpr span<element_type, Count> last() const;
 //
-//  Requires: Count <= size().
+// Mandates: Count <= Extent is true.
 
 #include <span>
 #include <cstddef>
Index: libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp
===================================================================
--- libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp
+++ libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp
@@ -14,8 +14,7 @@
 //
 // constexpr span<element_type, dynamic_extent> last(size_type count) const;
 //
-//  Requires: Count <= size().
-
+// Mandates: Count <= Extent is true.
 
 #include <span>
 #include <cassert>
Index: libcxx/test/std/containers/views/views.span/span.sub/first.verify.cpp
===================================================================
--- libcxx/test/std/containers/views/views.span/span.sub/first.verify.cpp
+++ libcxx/test/std/containers/views/views.span/span.sub/first.verify.cpp
@@ -12,7 +12,7 @@
 // template<size_t Count>
 //  constexpr span<element_type, Count> first() const;
 //
-//  Requires: Count <= size().
+// Mandates: Count <= Extent is true.
 
 #include <span>
 #include <cstddef>
Index: libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp
===================================================================
--- libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp
+++ libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp
@@ -14,8 +14,7 @@
 //
 // constexpr span<element_type, dynamic_extent> first(size_type count) const;
 //
-//  Requires: Count <= size().
-
+// Mandates: Count <= Extent is true.
 
 #include <span>
 #include <cassert>
Index: libcxx/docs/Status/Cxx20Issues.csv
===================================================================
--- libcxx/docs/Status/Cxx20Issues.csv
+++ libcxx/docs/Status/Cxx20Issues.csv
@@ -183,7 +183,7 @@
 "`3266 <https://wg21.link/LWG3266>`__","``to_chars(bool)``\  should be deleted","Belfast","|Complete|","14.0"
 "`3272 <https://wg21.link/LWG3272>`__","``%I%p``\  should parse/format ``duration``\  since midnight","Belfast","","","|chrono| |format|"
 "`3259 <https://wg21.link/LWG3259>`__","The definition of *constexpr iterators* should be adjusted","Belfast","|Nothing To Do|",""
-"`3103 <https://wg21.link/LWG3103>`__","Errors in taking subview of ``span``\  should be ill-formed where possible","Belfast","",""
+"`3103 <https://wg21.link/LWG3103>`__","Errors in taking subview of ``span``\  should be ill-formed where possible","Belfast","11.0","|Complete|"
 "`3274 <https://wg21.link/LWG3274>`__","Missing feature test macro for ``<span>``\ ","Belfast","|Complete|","11.0"
 "`3276 <https://wg21.link/LWG3276>`__","Class ``split_view::outer_iterator::value_type``\  should inherit from ``view_interface``\ ","Belfast","|Complete|","15.0","|ranges|"
 "`3277 <https://wg21.link/LWG3277>`__","Pre-increment on prvalues is not a requirement of ``weakly_incrementable``\ ","Belfast","|Nothing To Do|","","|ranges|"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143432.502369.patch
Type: text/x-patch
Size: 4724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230304/6feae8bb/attachment.bin>


More information about the libcxx-commits mailing list