| 1 | // { dg-do compile } |
| 2 | |
| 3 | #include <set> |
| 4 | |
| 5 | namespace adl |
| 6 | { |
| 7 | #if __cplusplus < 201103L |
| 8 | template<typename T> void make_pair(const T&, const T&) { } |
| 9 | #else |
| 10 | template<typename T> void make_pair(T&&, T&&) { } |
| 11 | #endif |
| 12 | |
| 13 | struct X { bool operator<(const X&) const { return false; } }; |
| 14 | } |
| 15 | |
| 16 | typedef std::set<adl::X> Set; |
| 17 | |
| 18 | void |
| 19 | test_equal_range(Set& s, const adl::X& x) |
| 20 | { |
| 21 | // _Rb_tree::_M_equal_range was using make_pair unqualified. |
| 22 | (void) s.equal_range(x); |
| 23 | const Set& cs = s; |
| 24 | // Similarly for the const overload. |
| 25 | (void) cs.equal_range(x); |
| 26 | } |