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 // no emplace_back in C++03
20 #include "test_macros.h"
23 std::set
<int> destroyed
;
26 explicit Foo(int i
) : value(i
) { }
27 ~Foo() { destroyed
.insert(value
); }
38 assert(destroyed
.empty());
40 assert(destroyed
.count(1) == 1);
41 assert(destroyed
.count(2) == 1);
42 assert(destroyed
.count(3) == 1);