https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68190
--- Comment #9 from Howard Hinnant <howard.hinnant at gmail dot com> --- Untested fix suggested: #if __cplusplus > 201103L template<typename _Kt> auto find(const _Kt& __x) -> decltype(iterator{_M_t._M_find_tr(__x)}) { return iterator{_M_t._M_find_tr(__x)}; } template<typename _Kt> auto find(const _Kt& __x) const -> decltype(const_iterator{_M_t._M_find_tr(__x)}) { return const_iterator{_M_t._M_find_tr(__x)}; } #endif