1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8
9 // <valarray>
10
11 // template<class T> class valarray;
12
13 // template <class T>
14 // unspecified1
15 // begin(const valarray<T>& v);
16
17 #include <valarray>
18 #include <cassert>
19
20 #include "test_macros.h"
21
main(int,char **)22 int main(int, char**)
23 {
24 {
25 typedef int T;
26 T a[] = {1, 2, 3, 4, 5};
27 const unsigned N = sizeof(a)/sizeof(a[0]);
28 const std::valarray<T> v(a, N);
29 assert(v[0] == 1);
30 }
31
32 return 0;
33 }
34