Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / containers / associative / map / map.ops / equal_range0.pass.cpp
blob6beb9b2246e29f7ecdbef321298733b4ed6c9f95
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 //===----------------------------------------------------------------------===//
8 //
9 // XFAIL: c++03, c++11
11 // <map>
13 // class map
15 // pair<iterator,iterator> equal_range(const key_type& k);
16 // pair<const_iterator,const_iterator> equal_range(const key_type& k) const;
18 // The member function templates find, count, lower_bound, upper_bound, and
19 // equal_range shall not participate in overload resolution unless the
20 // qualified-id Compare::is_transparent is valid and denotes a type
23 #include <map>
24 #include <cassert>
26 #include "test_macros.h"
27 #include "is_transparent.h"
29 int main(int, char**)
32 typedef std::map<int, double, transparent_less> M;
33 typedef std::pair<typename M::iterator, typename M::iterator> P;
34 M example;
35 P result = example.equal_range(C2Int{5});
36 assert(result.first == result.second);
39 typedef std::map<int, double, transparent_less_not_referenceable> M;
40 typedef std::pair<typename M::iterator, typename M::iterator> P;
41 M example;
42 P result = example.equal_range(C2Int{5});
43 assert(result.first == result.second);
46 return 0;