Home | History | Annotate | Download | only in map.ops
      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 map
     15 
     16 //       iterator lower_bound(const key_type& k);
     17 // const_iterator lower_bound(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 
     29 int main()
     30 {
     31     {
     32     typedef std::map<int, double, transparent_less> M;
     33     M example;
     34     assert(example.lower_bound(C2Int{5}) == example.end());
     35     }
     36     {
     37     typedef std::map<int, double, transparent_less_not_referenceable> M;
     38     M example;
     39     assert(example.lower_bound(C2Int{5}) == example.end());
     40     }
     41 }
     42