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