[libcxx-commits] [PATCH] D108047: [libcxx][ranges] Move `namespace views` into `namespace ranges` and add an alias.
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Aug 13 16:11:35 PDT 2021
zoecarver marked 2 inline comments as done.
zoecarver added inline comments.
================
Comment at: libcxx/include/__ranges/all.h:35-36
+namespace ranges {
namespace views {
----------------
Quuxplusone wrote:
> Any appetite for `namespace ranges::views {` here? I have a slight preference for it, but won't push hard for it right now.
Good idea. Done.
================
Comment at: libcxx/test/std/ranges/range.adaptors/range.all/all.pass.cpp:88
{
- ASSERT_SAME_TYPE(decltype(std::views::all(View<true>())), View<true>);
- static_assert(noexcept(std::views::all(View<true>())));
- static_assert(!noexcept(std::views::all(View<false>())));
+ ASSERT_SAME_TYPE(decltype(std::ranges::views::all(View<true>())), View<true>);
+ static_assert(noexcept(std::ranges::views::all(View<true>())));
----------------
Quuxplusone wrote:
> zoecarver wrote:
> > Intentionally testing this inconsistently so that we cover both `std::ranges::views` and `std::views`.
> I don't particularly object, because I probably wouldn't have noticed if the test had been committed this way to begin with. But if you want to test that `std::views` is the same as `std::ranges::views`, the right place for that test is not semi-accidentally inside `all.pass.cpp`; it may deserve a dedicated test file.
> (However, IMHO it also //doesn't// need a test of its own, because it's super obvious.)
I updated these to have a specific test in the same file.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108047/new/
https://reviews.llvm.org/D108047
More information about the libcxx-commits
mailing list