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 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03, c++11, c++14, c++17
16 // bool contains(const key_type& x) const;
18 template <typename T
, typename V
, typename B
, typename
... Vals
>
19 void test(B bad
, Vals
... args
) {
23 for (auto& v
: vals
) set
.insert(v
);
24 for (auto& v
: vals
) assert(set
.contains(v
));
26 assert(!set
.contains(bad
));
29 struct E
{ int a
= 1; double b
= 1; char c
= 1; };
34 test
<std::set
<int>, int>(14, 10, 11, 12, 13);
35 test
<std::set
<char>, char>('e', 'a', 'b', 'c', 'd');
38 test
<std::multiset
<int>, int>(14, 10, 11, 12, 13);
39 test
<std::multiset
<char>, char>('e', 'a', 'b', 'c', 'd');