[lld/COFF] Demangle symbol name in discarded section relocation error message (#119726)
[llvm-project.git] / libcxx / test / std / numerics / numarray / template.valarray / valarray.cons / default.pass.cpp
blob9595fbe89ae63ca3ca76bc80e165c6efbcfc23f5
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 //===----------------------------------------------------------------------===//
9 // <valarray>
11 // template<class T> class valarray;
13 // valarray();
15 #include <valarray>
16 #include <cassert>
18 #include "test_macros.h"
20 struct S {
21 S() { ctor_called = true; }
22 static bool ctor_called;
25 bool S::ctor_called = false;
27 int main(int, char**)
30 std::valarray<int> v;
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);
46 std::valarray<S> v;
47 assert(v.size() == 0);
48 assert(!S::ctor_called);
51 return 0;