[libcxx-commits] [PATCH] D118963: [libc++] No longer support ranges::begin(x) when x is an array of incomplete type.
Konstantin Varlamov via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 3 22:00:31 PST 2022
var-const added inline comments.
================
Comment at: libcxx/include/__ranges/access.h:62
template <class _Tp>
- requires is_array_v<remove_cv_t<_Tp>>
- [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp& __t) const noexcept
+ [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[]) const noexcept
+ requires (sizeof(*__t) != 0) // Disallow incomplete element types.
----------------
Question: `end` only defines the case where the array size is known. Does the case where the size is unknown need to be handled by `end`, or does it not apply in that case?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118963/new/
https://reviews.llvm.org/D118963
More information about the libcxx-commits
mailing list