158113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow//===----------------------------------------------------------------------===//
258113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow//
358113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow//                     The LLVM Compiler Infrastructure
458113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow//
558113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow// This file is dual licensed under the MIT and the University of Illinois Open
658113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow// Source Licenses. See LICENSE.TXT for details.
758113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow//
858113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow//===----------------------------------------------------------------------===//
958113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow//
101575e3e813f7f7cde31e699802fa1fcf8e84531cAsiri Rathnayake// XFAIL: c++98, c++03, c++11
1158113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow
1258113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow// <map>
1358113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow
1458113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow// class map
1558113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow
1658113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow//       iterator lower_bound(const key_type& k);
1758113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow// const_iterator lower_bound(const key_type& k) const;
1884acb1ec3f7d5e0f37d7176697c2fa876c413407Eric Fiselier//
1984acb1ec3f7d5e0f37d7176697c2fa876c413407Eric Fiselier//   The member function templates find, count, lower_bound, upper_bound, and
2084acb1ec3f7d5e0f37d7176697c2fa876c413407Eric Fiselier// equal_range shall not participate in overload resolution unless the
2158113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow// qualified-id Compare::is_transparent is valid and denotes a type
2258113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow
2358113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow
2458113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow#include <map>
2558113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow#include <cassert>
2658113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow
2758113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow#include "is_transparent.h"
2858113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow
2958113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clowint main()
3058113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow{
31246eb897c921e1aee45361d7c10c6fd274cc7f74Marshall Clow    {
3258113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow    typedef std::map<int, double, transparent_less> M;
339ae62c79cc771ff6cefcd2a98f69ecf7b40ebd71Billy Robert O'Neal III    M example;
349ae62c79cc771ff6cefcd2a98f69ecf7b40ebd71Billy Robert O'Neal III    assert(example.lower_bound(C2Int{5}) == example.end());
35246eb897c921e1aee45361d7c10c6fd274cc7f74Marshall Clow    }
36246eb897c921e1aee45361d7c10c6fd274cc7f74Marshall Clow    {
37246eb897c921e1aee45361d7c10c6fd274cc7f74Marshall Clow    typedef std::map<int, double, transparent_less_not_referenceable> M;
389ae62c79cc771ff6cefcd2a98f69ecf7b40ebd71Billy Robert O'Neal III    M example;
399ae62c79cc771ff6cefcd2a98f69ecf7b40ebd71Billy Robert O'Neal III    assert(example.lower_bound(C2Int{5}) == example.end());
40246eb897c921e1aee45361d7c10c6fd274cc7f74Marshall Clow    }
4158113db00cc4bb9c63ccb7b013a3e2b405bfc1cdMarshall Clow}
42