From bd680139d084b673d1f56d0e63e01936c4680a91 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 1 Jul 2022 16:31:47 -0700 Subject: update libcxx to llvm 14.0.6 --- lib/libcxx/include/valarray | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/libcxx/include/valarray') diff --git a/lib/libcxx/include/valarray b/lib/libcxx/include/valarray index 6e25514a6a..a55d921872 100644 --- a/lib/libcxx/include/valarray +++ b/lib/libcxx/include/valarray @@ -1,5 +1,5 @@ // -*- C++ -*- -//===-------------------------- valarray ----------------------------------===// +//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -105,6 +105,8 @@ public: void resize(size_t n, value_type x = value_type()); }; +template valarray(const T(&)[cnt], size_t) -> valarray; + class slice { public: @@ -346,6 +348,7 @@ template unspecified2 end(const valarray& v); #include #include #include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -1081,6 +1084,11 @@ private: valarray& __assign_range(const value_type* __f, const value_type* __l); }; +#if _LIBCPP_STD_VER > 14 +template +valarray(const _Tp(&)[_Size], size_t) -> valarray<_Tp>; +#endif + _LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS void valarray::resize(size_t, size_t)) template @@ -3048,7 +3056,7 @@ template valarray<_Tp>& valarray<_Tp>::operator=(const valarray& __v) { - if (this != &__v) + if (this != _VSTD::addressof(__v)) return __assign_range(__v.__begin_, __v.__end_); return *this; } -- cgit v1.2.3