[libcxx-commits] [PATCH] D101189: [libcxx][ranges] Add ranges::ssize CPO.
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 30 14:57:07 PDT 2021
ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.
LGTM with changes applied.
================
Comment at: libcxx/include/__ranges/size.h:121
+ template<__can_invoke_size _Tp>
+ [[nodiscard]] constexpr integral auto operator()(_Tp&& __t) const
+ noexcept(noexcept(ranges::size(__t))) {
----------------
Here instead I would just write
```
require (_Tp&& __t) { ranges::size(__t); }
```
and get rid of `__can_invoke_size`. Closer to the spec and simpler IMO.
================
Comment at: libcxx/test/std/ranges/range.access/range.prim/size.pass.cpp:45
};
bool constexpr testArrayType() {
----------------
Can we move the `ssize` tests to their own file?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101189/new/
https://reviews.llvm.org/D101189
More information about the libcxx-commits
mailing list