From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1059) id D95573892446; Mon, 29 Jun 2020 21:09:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D95573892446 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593464983; bh=4F3akJvUUcJtqjt0KyP76sJAKA2cdJOriXdu9E8teC8=; h=From:To:Subject:Date:From; b=iy8oAwwx52rUeqGOB7SAQcaRS820po1dsTwQvm4J/BStRxHKjts5/msekbbRVXkw+ HCtXC0QLHD/JhS8hVvmbdd+BD2xw4a6n8IumCYx1cAIve9ew13aJkeRTpQikbdqdgC +qhttUw4dthYNVyu26C0zO26bGmkAKNi94Fhp0tk= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Nathan Sidwell To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc/devel/c++-modules] libstdc++: Remove redundant std:: qualification X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/devel/c++-modules X-Git-Oldrev: abed8b56b92b103275e6871b689862c0495b761b X-Git-Newrev: a7a3932e4b698f205273cfa78c7aa8ab6840542a Message-Id: <20200629210943.D95573892446@sourceware.org> Date: Mon, 29 Jun 2020 21:09:43 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 21:09:44 -0000 https://gcc.gnu.org/g:a7a3932e4b698f205273cfa78c7aa8ab6840542a commit a7a3932e4b698f205273cfa78c7aa8ab6840542a Author: Jonathan Wakely Date: Fri Jun 19 15:02:54 2020 +0100 libstdc++: Remove redundant std:: qualification * include/bits/stl_pair.h (_Index_tuple): Remove redundant namespace qualification. (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)): Likewise. * include/std/tuple (_Head_base, _Tuple_impl, tuple_size) (tuple_element, __get_helper, get, __make_tuple_impl) (__make_1st_indices, __tuple_concater) (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)): Likewise. * include/std/utility (tuple_element, __is_tuple_like_impl) (tuple_size, __pair_get, get): Likewise. Diff: --- libstdc++-v3/include/bits/stl_pair.h | 8 +-- libstdc++-v3/include/std/tuple | 54 ++++++++++---------- libstdc++-v3/include/std/utility | 96 ++++++++++++++++++------------------ 3 files changed, 79 insertions(+), 79 deletions(-) diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h index 491c599076e..e5669d5d7ae 100644 --- a/libstdc++-v3/include/bits/stl_pair.h +++ b/libstdc++-v3/include/bits/stl_pair.h @@ -89,7 +89,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template class tuple; - template + template struct _Index_tuple; // Concept utility functions, reused in conditionally-explicit @@ -446,11 +446,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } private: - template + template _GLIBCXX20_CONSTEXPR pair(tuple<_Args1...>&, tuple<_Args2...>&, - _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); + _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>); #endif // C++11 }; diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index db4872d3a52..726ad0aabbb 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -69,11 +69,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION = typename conditional<__is_final(_Tp), false_type, __is_empty_non_tuple<_Tp>>::type; - template::value> struct _Head_base; - template + template struct _Head_base<_Idx, _Head, true> : public _Head { @@ -120,7 +120,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_head(const _Head_base& __b) noexcept { return __b; } }; - template + template struct _Head_base<_Idx, _Head, false> { constexpr _Head_base() @@ -179,7 +179,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * point in the hierarchy; we use it to implement a constant-time * get() operation. */ - template + template struct _Tuple_impl; /** @@ -187,12 +187,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * and derive from a @c Tuple_impl containing the remaining elements * (which contains the @c Tail). */ - template + template struct _Tuple_impl<_Idx, _Head, _Tail...> : public _Tuple_impl<_Idx + 1, _Tail...>, private _Head_base<_Idx, _Head> { - template friend class _Tuple_impl; + template friend class _Tuple_impl; typedef _Tuple_impl<_Idx + 1, _Tail...> _Inherited; typedef _Head_base<_Idx, _Head> _Base; @@ -337,11 +337,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; // Basis case of inheritance recursion. - template + template struct _Tuple_impl<_Idx, _Head> : private _Head_base<_Idx, _Head> { - template friend class _Tuple_impl; + template friend class _Tuple_impl; typedef _Head_base<_Idx, _Head> _Base; @@ -1244,7 +1244,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// class tuple_size template struct tuple_size> - : public integral_constant { }; + : public integral_constant { }; #if __cplusplus > 201402L template @@ -1255,7 +1255,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Recursive case for tuple_element: strip off the first element in * the tuple and retrieve the (i-1)th element of the remaining tuple. */ - template + template struct tuple_element<__i, tuple<_Head, _Tail...> > : tuple_element<__i - 1, tuple<_Tail...> > { }; @@ -1278,30 +1278,30 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION "tuple index is in range"); }; - template + template constexpr _Head& __get_helper(_Tuple_impl<__i, _Head, _Tail...>& __t) noexcept { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } - template + template constexpr const _Head& __get_helper(const _Tuple_impl<__i, _Head, _Tail...>& __t) noexcept { return _Tuple_impl<__i, _Head, _Tail...>::_M_head(__t); } /// Return a reference to the ith element of a tuple. - template + template constexpr __tuple_element_t<__i, tuple<_Elements...>>& get(tuple<_Elements...>& __t) noexcept { return std::__get_helper<__i>(__t); } /// Return a const reference to the ith element of a const tuple. - template + template constexpr const __tuple_element_t<__i, tuple<_Elements...>>& get(const tuple<_Elements...>& __t) noexcept { return std::__get_helper<__i>(__t); } /// Return an rvalue reference to the ith element of a tuple rvalue. - template + template constexpr __tuple_element_t<__i, tuple<_Elements...>>&& get(tuple<_Elements...>&& __t) noexcept { @@ -1310,7 +1310,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } /// Return a const rvalue reference to the ith element of a const tuple rvalue. - template + template constexpr const __tuple_element_t<__i, tuple<_Elements...>>&& get(const tuple<_Elements...>&& __t) noexcept { @@ -1496,7 +1496,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Tuple, _Nm> { }; - template + template struct __make_tuple_impl<_Nm, tuple<_Tp...>, _Tuple, _Nm> { typedef tuple<_Tp...> __type; @@ -1504,7 +1504,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __do_make_tuple - : __make_tuple_impl<0, tuple<>, _Tuple, std::tuple_size<_Tuple>::value> + : __make_tuple_impl<0, tuple<>, _Tuple, tuple_size<_Tuple>::value> { }; // Returns the std::tuple equivalent of a tuple-like type. @@ -1552,14 +1552,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<> struct __make_1st_indices<> { - typedef std::_Index_tuple<> __type; + typedef _Index_tuple<> __type; }; template struct __make_1st_indices<_Tp, _Tpls...> { - typedef typename std::_Build_index_tuple::type>::value>::__type __type; + typedef typename _Build_index_tuple::type>::value>::__type __type; }; // Performs the actual concatenation by step-wise expanding tuple-like @@ -1568,8 +1568,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __tuple_concater; - template - struct __tuple_concater<_Ret, std::_Index_tuple<_Is...>, _Tp, _Tpls...> + template + struct __tuple_concater<_Ret, _Index_tuple<_Is...>, _Tp, _Tpls...> { template static constexpr _Ret @@ -1584,7 +1584,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template - struct __tuple_concater<_Ret, std::_Index_tuple<>> + struct __tuple_concater<_Ret, _Index_tuple<>> { template static constexpr _Ret @@ -1679,14 +1679,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { } template - template + template _GLIBCXX20_CONSTEXPR inline pair<_T1, _T2>:: pair(tuple<_Args1...>& __tuple1, tuple<_Args2...>& __tuple2, _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>) : first(std::forward<_Args1>(std::get<_Indexes1>(__tuple1))...), - second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...) + second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...) { } #if __cplusplus >= 201703L diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility index 5f1675a7679..cde375259f7 100644 --- a/libstdc++-v3/include/std/utility +++ b/libstdc++-v3/include/std/utility @@ -110,26 +110,26 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : public tuple_size<_Tp> { }; /// Gives the type of the ith element of a given tuple type. - template + template struct tuple_element; // Duplicate of C++14's tuple_element_t for internal use in C++11 mode - template + template using __tuple_element_t = typename tuple_element<__i, _Tp>::type; - template + template struct tuple_element<__i, const _Tp> { typedef typename add_const<__tuple_element_t<__i, _Tp>>::type type; }; - template + template struct tuple_element<__i, volatile _Tp> { typedef typename add_volatile<__tuple_element_t<__i, _Tp>>::type type; }; - template + template struct tuple_element<__i, const volatile _Tp> { typedef typename add_cv<__tuple_element_t<__i, _Tp>>::type type; @@ -141,7 +141,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // of tuple_element> and tuple_element> are defined. #define __cpp_lib_tuple_element_t 201402L - template + template using tuple_element_t = typename tuple_element<__i, _Tp>::type; #endif @@ -149,93 +149,93 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Partial specialization for std::pair template - struct __is_tuple_like_impl> : true_type + struct __is_tuple_like_impl> : true_type { }; /// Partial specialization for std::pair template - struct tuple_size> - : public integral_constant { }; + struct tuple_size> + : public integral_constant { }; /// Partial specialization for std::pair template - struct tuple_element<0, std::pair<_Tp1, _Tp2>> + struct tuple_element<0, pair<_Tp1, _Tp2>> { typedef _Tp1 type; }; /// Partial specialization for std::pair template - struct tuple_element<1, std::pair<_Tp1, _Tp2>> + struct tuple_element<1, pair<_Tp1, _Tp2>> { typedef _Tp2 type; }; - template + template struct __pair_get; template<> struct __pair_get<0> { template - static constexpr _Tp1& - __get(std::pair<_Tp1, _Tp2>& __pair) noexcept - { return __pair.first; } + static constexpr _Tp1& + __get(pair<_Tp1, _Tp2>& __pair) noexcept + { return __pair.first; } template - static constexpr _Tp1&& - __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept - { return std::forward<_Tp1>(__pair.first); } + static constexpr _Tp1&& + __move_get(pair<_Tp1, _Tp2>&& __pair) noexcept + { return std::forward<_Tp1>(__pair.first); } template - static constexpr const _Tp1& - __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept - { return __pair.first; } + static constexpr const _Tp1& + __const_get(const pair<_Tp1, _Tp2>& __pair) noexcept + { return __pair.first; } template - static constexpr const _Tp1&& - __const_move_get(const std::pair<_Tp1, _Tp2>&& __pair) noexcept - { return std::forward(__pair.first); } + static constexpr const _Tp1&& + __const_move_get(const pair<_Tp1, _Tp2>&& __pair) noexcept + { return std::forward(__pair.first); } }; template<> struct __pair_get<1> { template - static constexpr _Tp2& - __get(std::pair<_Tp1, _Tp2>& __pair) noexcept - { return __pair.second; } + static constexpr _Tp2& + __get(pair<_Tp1, _Tp2>& __pair) noexcept + { return __pair.second; } template - static constexpr _Tp2&& - __move_get(std::pair<_Tp1, _Tp2>&& __pair) noexcept - { return std::forward<_Tp2>(__pair.second); } + static constexpr _Tp2&& + __move_get(pair<_Tp1, _Tp2>&& __pair) noexcept + { return std::forward<_Tp2>(__pair.second); } template - static constexpr const _Tp2& - __const_get(const std::pair<_Tp1, _Tp2>& __pair) noexcept - { return __pair.second; } + static constexpr const _Tp2& + __const_get(const pair<_Tp1, _Tp2>& __pair) noexcept + { return __pair.second; } template - static constexpr const _Tp2&& - __const_move_get(const std::pair<_Tp1, _Tp2>&& __pair) noexcept - { return std::forward(__pair.second); } + static constexpr const _Tp2&& + __const_move_get(const pair<_Tp1, _Tp2>&& __pair) noexcept + { return std::forward(__pair.second); } }; - template - constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& - get(std::pair<_Tp1, _Tp2>& __in) noexcept + template + constexpr typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type& + get(pair<_Tp1, _Tp2>& __in) noexcept { return __pair_get<_Int>::__get(__in); } - template - constexpr typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& - get(std::pair<_Tp1, _Tp2>&& __in) noexcept + template + constexpr typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type&& + get(pair<_Tp1, _Tp2>&& __in) noexcept { return __pair_get<_Int>::__move_get(std::move(__in)); } - template - constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type& - get(const std::pair<_Tp1, _Tp2>& __in) noexcept + template + constexpr const typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type& + get(const pair<_Tp1, _Tp2>& __in) noexcept { return __pair_get<_Int>::__const_get(__in); } - template - constexpr const typename tuple_element<_Int, std::pair<_Tp1, _Tp2>>::type&& - get(const std::pair<_Tp1, _Tp2>&& __in) noexcept + template + constexpr const typename tuple_element<_Int, pair<_Tp1, _Tp2>>::type&& + get(const pair<_Tp1, _Tp2>&& __in) noexcept { return __pair_get<_Int>::__const_move_get(std::move(__in)); } #if __cplusplus >= 201402L