From 5b30676162710fa4dc98dd83677fd53650732b46 Mon Sep 17 00:00:00 2001 From: redi Date: Fri, 5 Dec 2014 10:35:51 +0000 Subject: [PATCH] * include/bits/hashtable_policy.h (_Map_base::operator[], _Map_base::at): Simplify definitions with trailing return types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218416 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/bits/hashtable_policy.h | 20 ++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e03879fbdac..450f1c87351 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2014-12-05 Jonathan Wakely + + * include/bits/hashtable_policy.h (_Map_base::operator[], + _Map_base::at): Simplify definitions with trailing return types. + 2014-12-04 Tim Shen PR libstdc++/64140 diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h index 74d1bd011cf..cab25efd6f5 100644 --- a/libstdc++-v3/include/bits/hashtable_policy.h +++ b/libstdc++-v3/include/bits/hashtable_policy.h @@ -584,12 +584,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template - typename _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, - _H1, _H2, _Hash, _RehashPolicy, _Traits, true> - ::mapped_type& + auto _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: operator[](const key_type& __k) + -> mapped_type& { __hashtable* __h = static_cast<__hashtable*>(this); __hash_code __code = __h->_M_hash_code(__k); @@ -610,12 +609,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template - typename _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, - _H1, _H2, _Hash, _RehashPolicy, _Traits, true> - ::mapped_type& + auto _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: operator[](key_type&& __k) + -> mapped_type& { __hashtable* __h = static_cast<__hashtable*>(this); __hash_code __code = __h->_M_hash_code(__k); @@ -636,12 +634,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template - typename _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, - _H1, _H2, _Hash, _RehashPolicy, _Traits, true> - ::mapped_type& + auto _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: at(const key_type& __k) + -> mapped_type& { __hashtable* __h = static_cast<__hashtable*>(this); __hash_code __code = __h->_M_hash_code(__k); @@ -656,12 +653,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template - const typename _Map_base<_Key, _Pair, _Alloc, _Select1st, - _Equal, _H1, _H2, _Hash, _RehashPolicy, - _Traits, true>::mapped_type& + auto _Map_base<_Key, _Pair, _Alloc, _Select1st, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits, true>:: at(const key_type& __k) const + -> const mapped_type& { const __hashtable* __h = static_cast(this); __hash_code __code = __h->_M_hash_code(__k); -- 2.11.4.GIT