[libcxx-commits] [PATCH] D118963: [libc++] No longer support ranges::begin(x) when x is an array of incomplete type.
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Feb 4 03:45:01 PST 2022
philnik 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.
----------------
var-const wrote:
> 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?
Couldn't we just say `input_or_output_iterator auto operator()`?
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