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 // <map> 11 12 // class map 13 14 // iterator upper_bound(const key_type& k); 15 // const_iterator upper_bound(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 "is_transparent.h" 26 27 #if _LIBCPP_STD_VER <= 11 28 #error "This test requires is C++14 (or later)" 29 #else 30 31 int main() 32 { 33 { 34 typedef std::map<int, double, transparent_less_private> M; 35 36 M().upper_bound(C2Int{5}); 37 } 38 } 39 #endif 40