1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
13 // template<class T> class valarray;
15 // valarray(initializer_list<value_type>);
20 #include "test_macros.h"
26 T a
[] = {1, 2, 3, 4, 5};
27 const unsigned N
= sizeof(a
)/sizeof(a
[0]);
28 std::valarray
<T
> v
= {1, 2, 3, 4, 5};
29 assert(v
.size() == N
);
30 for (unsigned i
= 0; i
< N
; ++i
)
35 T a
[] = {1, 2, 3, 4, 5};
36 const unsigned N
= sizeof(a
)/sizeof(a
[0]);
37 std::valarray
<T
> v
= {1, 2, 3, 4, 5};
38 assert(v
.size() == N
);
39 for (unsigned i
= 0; i
< N
; ++i
)