https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68190
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-11-02 Ever confirmed|0 |1 --- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Started with r219888, which implements N3657. The bug depends on LWG 103 only insofar as it wouldn't happen if const_iterator and iterator were different in the set and multiset case. The problem is that the auto return type of find doesn't know that const_iterator and iterator are the same in this case and returns std::_Rb_tree_iterator instead of std::_Rb_tree_const_iterator 693 iterator 694 find(const key_type& __x) 695 { return _M_t.find(__x); } 696 697 const_iterator 698 find(const key_type& __x) const 699 { return _M_t.find(__x); } 700 701 #if __cplusplus > 201103L 702 template<typename _Kt> 703 auto 704 find(const _Kt& __x) -> decltype(_M_t._M_find_tr(__x)) 705 { return _M_t._M_find_tr(__x); } 706 707 template<typename _Kt> 708 auto 709 find(const _Kt& __x) const -> decltype(_M_t._M_find_tr(__x)) 710 711 #endif