[libcxx-commits] [PATCH] D116808: fix __simple_view concept in std::ranges

Hui via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 7 06:41:29 PST 2022


huixie90 created this revision.
huixie90 added reviewers: ldionne, cjdb.
huixie90 requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

fix __simple_view concept in std::ranges

For reference, the definition in the standard is here:
 http://eel.is/c++draft/ranges#range.utility.helpers

Changes:

  libcxx/include/__ranges/concepts.h


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116808

Files:
  libcxx/include/__ranges/concepts.h


Index: libcxx/include/__ranges/concepts.h
===================================================================
--- libcxx/include/__ranges/concepts.h
+++ libcxx/include/__ranges/concepts.h
@@ -80,11 +80,9 @@
     movable<_Tp> &&
     enable_view<_Tp>;
 
-  template<class _Range>
-  concept __simple_view =
-    view<_Range> && range<const _Range> &&
-    same_as<iterator_t<_Range>, iterator_t<const _Range>> &&
-    same_as<sentinel_t<_Range>, iterator_t<const _Range>>;
+  template <class _Range>
+  concept __simple_view = view<_Range> && range<const _Range> &&
+      same_as<iterator_t<_Range>, iterator_t<const _Range>> && same_as<sentinel_t<_Range>, sentinel_t<const _Range>>;
 
   // [range.refinements], other range refinements
   template <class _Rp, class _Tp>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116808.398129.patch
Type: text/x-patch
Size: 772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220107/9c611f59/attachment-0001.bin>


More information about the libcxx-commits mailing list