[libcxx-commits] [libcxx] [libc++] P3016R6: Resolve inconsistencies in begin/end for `valarray` and braced initializer lists (PR #173637)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jan 3 08:26:51 PST 2026
================
@@ -32,23 +32,31 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* end(_Tp (&__array)[_Np]) _NOEXCEPT
#if !defined(_LIBCPP_CXX03_LANG)
template <class _Cp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto begin(_Cp& __c) -> decltype(__c.begin()) {
- return __c.begin();
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 auto begin(_Cp& __c) //
+ noexcept(noexcept(__c.begin())) //
----------------
philnik777 wrote:
We should really have a language feature for "expression-equivalent to ...". This stuff gets worse and worse.
https://github.com/llvm/llvm-project/pull/173637
More information about the libcxx-commits
mailing list