[flang][OpenMP] Parse METADIRECTIVE in specification part (#123397)
[llvm-project.git] / libcxx / test / std / containers / associative / multiset / multiset.observers / comp.pass.cpp
blobad2a304be703b032426a0920465834a65cd69acf
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 // <set>
11 // key_compare key_comp() const;
12 // value_compare value_comp() const;
14 #include <set>
15 #include <cassert>
17 int main(int, char**) {
18 typedef std::multiset<int> set_type;
20 set_type s;
21 set_type::iterator i1 = s.insert(1);
22 set_type::iterator i2 = s.insert(2);
24 const set_type& cs = s;
26 assert(cs.key_comp()(*i1, *i2));
27 assert(!cs.key_comp()(*i2, *i1));
29 assert(cs.value_comp()(*i1, *i2));
30 assert(!cs.value_comp()(*i2, *i1));
32 return 0;