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

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 7 01:38:31 PST 2023


Mordante updated this revision to Diff 495427.
Mordante added a comment.

CI fixes.


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.495427.patch
Type: text/x-patch
Size: 4724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230207/4fbec789/attachment-0001.bin>


More information about the libcxx-commits mailing list