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 //===----------------------------------------------------------------------===//
11 // template<class T> class valarray;
18 #include "test_macros.h"
21 S() { ctor_called
= true; }
22 static bool ctor_called
;
25 bool S::ctor_called
= false;
31 assert(v
.size() == 0);
34 std::valarray
<float> v
;
35 assert(v
.size() == 0);
38 std::valarray
<double> v
;
39 assert(v
.size() == 0);
42 std::valarray
<std::valarray
<double> > v
;
43 assert(v
.size() == 0);
47 assert(v
.size() == 0);
48 assert(!S::ctor_called
);