• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // XFAIL: c++98, c++03, c++11
11 
12 // <map>
13 
14 // class multimap
15 
16 //       iterator find(const key_type& k);
17 // const_iterator find(const key_type& k) const;
18 //
19 //   The member function templates find, count, lower_bound, upper_bound, and
20 // equal_range shall not participate in overload resolution unless the
21 // qualified-id Compare::is_transparent is valid and denotes a type
22 
23 
24 #include <map>
25 #include <cassert>
26 
27 #include "is_transparent.h"
28 
main()29 int main()
30 {
31     {
32     typedef std::multimap<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);
37     }
38     {
39     typedef std::multimap<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);
44     }
45 }
46