mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 12:23:59 +08:00
libstdc++: Use const_iterator in std::set::find<K> return type
François noticed that the "wrong" type is used in the return type for a std::set member function template. The iterator for our std::set is the same type as const_iterator, so this doesn't actually matter. But it's clearer if the return type matches the type used in the function body. libstdc++-v3/ChangeLog: * include/bits/stl_set.h (set::find): Use const_iterator in return type, not iterator.
This commit is contained in:
parent
4484945c53
commit
f6f28dc41d
@ -875,7 +875,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
|
||||
template<typename _Kt>
|
||||
auto
|
||||
upper_bound(const _Kt& __x) const
|
||||
-> decltype(iterator(_M_t._M_upper_bound_tr(__x)))
|
||||
-> decltype(const_iterator(_M_t._M_upper_bound_tr(__x)))
|
||||
{ return const_iterator(_M_t._M_upper_bound_tr(__x)); }
|
||||
#endif
|
||||
///@}
|
||||
|
Loading…
Reference in New Issue
Block a user