1f8457a07SMarshall Clow //===----------------------------------------------------------------------===//
2f8457a07SMarshall Clow //
357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6f8457a07SMarshall Clow //
7f8457a07SMarshall Clow //===----------------------------------------------------------------------===//
8f8457a07SMarshall Clow //
9*31cbe0f2SLouis Dionne // XFAIL: c++03, c++11
10f8457a07SMarshall Clow
11f8457a07SMarshall Clow // <map>
12f8457a07SMarshall Clow
13f8457a07SMarshall Clow // class map
14f8457a07SMarshall Clow
15f8457a07SMarshall Clow // iterator upper_bound(const key_type& k);
16f8457a07SMarshall Clow // const_iterator upper_bound(const key_type& k) const;
17f8457a07SMarshall Clow //
18f8457a07SMarshall Clow // The member function templates find, count, lower_bound, upper_bound, and
19f8457a07SMarshall Clow // equal_range shall not participate in overload resolution unless the
20f8457a07SMarshall Clow // qualified-id Compare::is_transparent is valid and denotes a type
21f8457a07SMarshall Clow
22f8457a07SMarshall Clow
23f8457a07SMarshall Clow #include <map>
24f8457a07SMarshall Clow #include <cassert>
25f8457a07SMarshall Clow
267fc6a556SMarshall Clow #include "test_macros.h"
27f8457a07SMarshall Clow #include "is_transparent.h"
28f8457a07SMarshall Clow
main(int,char **)292df59c50SJF Bastien int main(int, char**)
30f8457a07SMarshall Clow {
31b707e7f3SMarshall Clow {
32f8457a07SMarshall Clow typedef std::map<int, double, transparent_less> M;
3383252766SBilly Robert O'Neal III M example;
3483252766SBilly Robert O'Neal III assert(example.upper_bound(C2Int{5}) == example.end());
35f8457a07SMarshall Clow }
36b707e7f3SMarshall Clow {
37b707e7f3SMarshall Clow typedef std::map<int, double, transparent_less_not_referenceable> M;
3883252766SBilly Robert O'Neal III M example;
3983252766SBilly Robert O'Neal III assert(example.upper_bound(C2Int{5}) == example.end());
40b707e7f3SMarshall Clow }
412df59c50SJF Bastien
422df59c50SJF Bastien return 0;
43b707e7f3SMarshall Clow }
44