diff options
Diffstat (limited to 'libstdc++-v3/include/bits/stl_multimap.h')
-rw-r--r-- | libstdc++-v3/include/bits/stl_multimap.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h index d48935e56d3..eb6b24bcbc1 100644 --- a/libstdc++-v3/include/bits/stl_multimap.h +++ b/libstdc++-v3/include/bits/stl_multimap.h @@ -822,8 +822,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template<typename _Kt> auto lower_bound(const _Kt& __x) - -> decltype(_M_t._M_lower_bound_tr(__x)) - { return _M_t._M_lower_bound_tr(__x); } + -> decltype(iterator(_M_t._M_lower_bound_tr(__x))) + { return iterator(_M_t._M_lower_bound_tr(__x)); } #endif //@} @@ -847,8 +847,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template<typename _Kt> auto lower_bound(const _Kt& __x) const - -> decltype(_M_t._M_lower_bound_tr(__x)) - { return _M_t._M_lower_bound_tr(__x); } + -> decltype(const_iterator(_M_t._M_lower_bound_tr(__x))) + { return const_iterator(_M_t._M_lower_bound_tr(__x)); } #endif //@} @@ -867,8 +867,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template<typename _Kt> auto upper_bound(const _Kt& __x) - -> decltype(_M_t._M_upper_bound_tr(__x)) - { return _M_t._M_upper_bound_tr(__x); } + -> decltype(iterator(_M_t._M_upper_bound_tr(__x))) + { return iterator(_M_t._M_upper_bound_tr(__x)); } #endif //@} @@ -887,8 +887,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template<typename _Kt> auto upper_bound(const _Kt& __x) const - -> decltype(_M_t._M_upper_bound_tr(__x)) - { return _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 //@} @@ -914,8 +914,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template<typename _Kt> auto equal_range(const _Kt& __x) - -> decltype(_M_t._M_equal_range_tr(__x)) - { return _M_t._M_equal_range_tr(__x); } + -> decltype(pair<iterator, iterator>(_M_t._M_equal_range_tr(__x))) + { return pair<iterator, iterator>(_M_t._M_equal_range_tr(__x)); } #endif //@} @@ -941,8 +941,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template<typename _Kt> auto equal_range(const _Kt& __x) const - -> decltype(_M_t._M_equal_range_tr(__x)) - { return _M_t._M_equal_range_tr(__x); } + -> decltype(pair<const_iterator, const_iterator>( + _M_t._M_equal_range_tr(__x))) + { + return pair<const_iterator, const_iterator>( + _M_t._M_equal_range_tr(__x)); + } #endif //@} |