[libcxx-commits] [PATCH] D114561: [libc++] Fix constraints for string_view's iterator/sentinel constructor

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 25 08:40:40 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG68e7e76a9be0: [libc++] Fix constraints for string_view's iterator/sentinel constructor (authored by joe_loser).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114561

Files:
  libcxx/include/string_view


Index: libcxx/include/string_view
===================================================================
--- libcxx/include/string_view
+++ libcxx/include/string_view
@@ -191,8 +191,6 @@
 
 */
 
-#include <__concepts/convertible_to.h>
-#include <__concepts/same_as.h>
 #include <__config>
 #include <__debug>
 #include <__ranges/enable_borrowed_range.h>
@@ -282,7 +280,7 @@
 
 #if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_RANGES)
     template <contiguous_iterator _It, sized_sentinel_for<_It> _End>
-      requires (same_as<iter_value_t<_It>, _CharT> && !convertible_to<_End, size_type>)
+      requires (is_same_v<iter_value_t<_It>, _CharT> && !is_convertible_v<_End, size_type>)
     constexpr _LIBCPP_HIDE_FROM_ABI basic_string_view(_It __begin, _End __end)
        : __data(_VSTD::to_address(__begin)), __size(__end - __begin)
     {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114561.389814.patch
Type: text/x-patch
Size: 843 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211125/6cb5c5b0/attachment.bin>


More information about the libcxx-commits mailing list