aboutsummaryrefslogtreecommitdiff
path: root/lib/libcxx/include/valarray
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-07-10 03:06:05 -0400
committerGitHub <noreply@github.com>2022-07-10 03:06:05 -0400
commitb88151e0e1553607cbebc197e1111ec4bf53a595 (patch)
treecd4f57feae521500fe4eb99a98a798241256d341 /lib/libcxx/include/valarray
parent3f11d1d56d9747de974b00eab1c880bea7972c01 (diff)
parentf9bf4889264aee387639bb8a35fdf594236b1283 (diff)
downloadzig-b88151e0e1553607cbebc197e1111ec4bf53a595.tar.gz
zig-b88151e0e1553607cbebc197e1111ec4bf53a595.zip
Merge pull request #12001 from ziglang/llvm14
Upgrade to LLVM 14
Diffstat (limited to 'lib/libcxx/include/valarray')
-rw-r--r--lib/libcxx/include/valarray12
1 files changed, 10 insertions, 2 deletions
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<class T, size_t cnt> valarray(const T(&)[cnt], size_t) -> valarray<T>;
+
class slice
{
public:
@@ -346,6 +348,7 @@ template <class T> unspecified2 end(const valarray<T>& v);
#include <functional>
#include <initializer_list>
#include <new>
+#include <version>
#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<class _Tp, size_t _Size>
+valarray(const _Tp(&)[_Size], size_t) -> valarray<_Tp>;
+#endif
+
_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS void valarray<size_t>::resize(size_t, size_t))
template <class _Op, class _Tp>
@@ -3048,7 +3056,7 @@ template <class _Tp>
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;
}