[libcxx-commits] [PATCH] D105753: [libcxx][ranges] Add `ranges::common_view`.

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 12 12:39:40 PDT 2021


zoecarver marked 10 inline comments as done.
zoecarver added inline comments.


================
Comment at: libcxx/include/__ranges/common_view.h:84
+common_view(_Range&&)
+  -> common_view<decltype(views::all(_VSTD::declval<_Range>()))>;
+
----------------
Quuxplusone wrote:
> Nit: lose the `_VSTD` on `declval`, for consistency with other libc++ headers. (It's ADL-proof by virtue of taking no arguments.)
> But also, why is this not
> ```
> template<class _Range>
> common_view(_Range&&)
>   -> common_view<views::all_t<_Range>>;
> ```
> as in the standard's reference implementation? If we have `all`, we must have `all_t`, right?
We don't have all_t, it's on my list of things todo. 


================
Comment at: libcxx/include/ranges:119
 #include <__ranges/all.h>
+#include <__ranges/common_view.h>
 #include <__ranges/concepts.h>
----------------
Quuxplusone wrote:
> Also update the modulemap.
It's already updated. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105753



More information about the libcxx-commits mailing list