[libcxx-commits] [PATCH] D117714: [libc++] Implement LWG3549: view_interface need not inherit from view_base

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 19 18:29:42 PST 2022


jloser added inline comments.


================
Comment at: libcxx/include/__ranges/view_interface.h:38-39
 
 template<class _Tp>
 void __implicitly_convert_to(type_identity_t<_Tp>) noexcept;
 
----------------
Quuxplusone wrote:
> Pre-existing: I bet we reinvent this helper all over the place. We should centralize it in <type_traits>.
> (No action required here.)
Yeah, I had the same thought. It is reinvented or taken as a direct function parameter (such as in `span` and `iota_view`). Might be worth cleaning up, but I don't feel strongly.


================
Comment at: libcxx/include/__ranges/view_interface.h:76
   constexpr explicit operator bool()
     noexcept(noexcept(ranges::empty(declval<_D2>())))
     requires __can_empty<_D2>
----------------
Quuxplusone wrote:
> Pre-existing: The repeated typo `_D2` for `_D2&` suggests to me that our test coverage for `view_interface` is somewhat insufficient.
Agreed. I can look into it as a follow-up.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117714



More information about the libcxx-commits mailing list