[libcxx-commits] [PATCH] D123600: [libc++][ranges] Implement `views::take`.

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 12 06:03:27 PDT 2022


philnik added inline comments.


================
Comment at: libcxx/include/__fwd/string_view.h:1
+// -*- C++ -*-
+//===---------------------------------------------------------------------===//
----------------
`__string_view/fwd.h` would make more sense I think. Same for `span`.


================
Comment at: libcxx/include/__fwd/string_view.h:17
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#pragma GCC system_header
+#endif
----------------



================
Comment at: libcxx/include/__fwd/string_view.h:20-35
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template<class _CharT, class _Traits = char_traits<_CharT> >
+class _LIBCPP_TEMPLATE_VIS basic_string_view;
+
+typedef basic_string_view<char>     string_view;
+#ifndef _LIBCPP_HAS_NO_CHAR8_T
----------------
Shouldn't `string_view` be C++17 or later?


================
Comment at: libcxx/include/__ranges/take_view.h:234
+struct __fn {
+  // [range.take.overview] 2.1
+  template <class _Range, convertible_to<range_difference_t<_Range>> _Np>
----------------
I would only use the stable names. The numbers bit-rot way to fast.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123600



More information about the libcxx-commits mailing list