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
10
11 // <map>
12
13 // class multimap
14
15 // size_type count(const key_type& k) const;
16 //
17 // The member function templates find, count, lower_bound, upper_bound, and
18 // equal_range shall not participate in overload resolution unless the
19 // qualified-id Compare::is_transparent is valid and denotes a type
20
21
22 #include <map>
23 #include <cassert>
24
25 #include "test_macros.h"
26 #include "is_transparent.h"
27
main(int,char **)28 int main(int, char**)
29 {
30 {
31 typedef std::multimap<int, double, transparent_less> M;
32 assert(M().count(C2Int{5}) == 0);
33 }
34 {
35 typedef std::multimap<int, double, transparent_less_not_referenceable> M;
36 assert(M().count(C2Int{5}) == 0);
37 }
38
39 return 0;
40 }
41