From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id 5C4413985822; Thu, 3 Sep 2020 16:02:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C4413985822 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1599148943; bh=fdQiRF4RiIrU1NfSv0lPiy+7ruT9gxikbYrmVNOs1k0=; h=From:To:Subject:Date:From; b=R+kF8FVeZhTOCbAvz+AHkMsUHbnLHksBcPnqw+5d/a0Ci/ackVrMXQmsttPswU0VI L0iVqDJTPeRTXRFd+Wvh7U6Ug/ezWeS9crCRy/hd4/LiQs4WKxBolzSPYapISLVBYm B1bQsgq0rbsIokWVnPojTSYhPNNEIfjScSDO8Q9s= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alexandre Oliva To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] libstdc++: Whitespace changes in X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/users/aoliva/heads/testme X-Git-Oldrev: 5494edae83ad33c769bd1ebc98f0c492453a6417 X-Git-Newrev: af06acfc8de1ddcfd02a4de1200735b5479f086f Message-Id: <20200903160223.5C4413985822@sourceware.org> Date: Thu, 3 Sep 2020 16:02:23 +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: Thu, 03 Sep 2020 16:02:23 -0000 https://gcc.gnu.org/g:af06acfc8de1ddcfd02a4de1200735b5479f086f commit af06acfc8de1ddcfd02a4de1200735b5479f086f Author: Jonathan Wakely Date: Wed Aug 26 19:32:30 2020 +0100 libstdc++: Whitespace changes in libstdc++-v3/ChangeLog: * include/std/tuple (_Tuple_impl): Whitespaces changes for consistent indentation. Also use __enable_if_t alias template. Diff: --- libstdc++-v3/include/std/tuple | 162 ++++++++++++++++++++++++----------------- 1 file changed, 94 insertions(+), 68 deletions(-) diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index 7be9943e34a..1c22d4db788 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -265,16 +265,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr _Tuple_impl() : _Inherited(), _Base() { } - explicit - constexpr _Tuple_impl(const _Head& __head, const _Tail&... __tail) - : _Inherited(__tail...), _Base(__head) { } - - template::type> - explicit - constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail) + explicit constexpr + _Tuple_impl(const _Head& __head, const _Tail&... __tail) + : _Inherited(__tail...), _Base(__head) + { } + + template> + explicit constexpr + _Tuple_impl(_UHead&& __head, _UTail&&... __tail) : _Inherited(std::forward<_UTail>(__tail)...), - _Base(std::forward<_UHead>(__head)) { } + _Base(std::forward<_UHead>(__head)) + { } constexpr _Tuple_impl(const _Tuple_impl&) = default; @@ -285,58 +287,67 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr _Tuple_impl(_Tuple_impl&& __in) noexcept(__and_, - is_nothrow_move_constructible<_Inherited>>::value) + is_nothrow_move_constructible<_Inherited>>::value) : _Inherited(std::move(_M_tail(__in))), - _Base(std::forward<_Head>(_M_head(__in))) { } + _Base(std::forward<_Head>(_M_head(__in))) + { } template - constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in) + constexpr + _Tuple_impl(const _Tuple_impl<_Idx, _UElements...>& __in) : _Inherited(_Tuple_impl<_Idx, _UElements...>::_M_tail(__in)), - _Base(_Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { } + _Base(_Tuple_impl<_Idx, _UElements...>::_M_head(__in)) + { } template - constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) + constexpr + _Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) : _Inherited(std::move (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), _Base(std::forward<_UHead> - (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } + (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) + { } template _GLIBCXX20_CONSTEXPR _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) : _Inherited(__tag, __a), - _Base(__tag, __use_alloc<_Head>(__a)) { } + _Base(__tag, __use_alloc<_Head>(__a)) + { } template _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Head& __head, const _Tail&... __tail) : _Inherited(__tag, __a, __tail...), - _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } + _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) + { } template::type> + typename = __enable_if_t> _GLIBCXX20_CONSTEXPR _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - _UHead&& __head, _UTail&&... __tail) + _UHead&& __head, _UTail&&... __tail) : _Inherited(__tag, __a, std::forward<_UTail>(__tail)...), - _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), - std::forward<_UHead>(__head)) { } + _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), + std::forward<_UHead>(__head)) + { } template _GLIBCXX20_CONSTEXPR - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - const _Tuple_impl& __in) + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + const _Tuple_impl& __in) : _Inherited(__tag, __a, _M_tail(__in)), - _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } + _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) + { } template _GLIBCXX20_CONSTEXPR _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - _Tuple_impl&& __in) + _Tuple_impl&& __in) : _Inherited(__tag, __a, std::move(_M_tail(__in))), _Base(__use_alloc<_Head, _Alloc, _Head>(__a), - std::forward<_Head>(_M_head(__in))) { } + std::forward<_Head>(_M_head(__in))) + { } template _GLIBCXX20_CONSTEXPR @@ -345,23 +356,25 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _Inherited(__tag, __a, _Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in)), _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), - _Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)) { } + _Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)) + { } template _GLIBCXX20_CONSTEXPR _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - _Tuple_impl<_Idx, _UHead, _UTails...>&& __in) + _Tuple_impl<_Idx, _UHead, _UTails...>&& __in) : _Inherited(__tag, __a, std::move (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in))), _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), - std::forward<_UHead> - (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) { } + std::forward<_UHead> + (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in))) + { } template _GLIBCXX20_CONSTEXPR - void - _M_assign(const _Tuple_impl<_Idx, _UElements...>& __in) - { + void + _M_assign(const _Tuple_impl<_Idx, _UElements...>& __in) + { _M_head(*this) = _Tuple_impl<_Idx, _UElements...>::_M_head(__in); _M_tail(*this)._M_assign( _Tuple_impl<_Idx, _UElements...>::_M_tail(__in)); @@ -369,9 +382,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template _GLIBCXX20_CONSTEXPR - void - _M_assign(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) - { + void + _M_assign(_Tuple_impl<_Idx, _UHead, _UTails...>&& __in) + { _M_head(*this) = std::forward<_UHead> (_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)); _M_tail(*this)._M_assign( @@ -404,17 +417,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static constexpr const _Head& _M_head(const _Tuple_impl& __t) noexcept { return _Base::_M_head(__t); } - constexpr _Tuple_impl() + constexpr + _Tuple_impl() : _Base() { } - explicit - constexpr _Tuple_impl(const _Head& __head) - : _Base(__head) { } + explicit constexpr + _Tuple_impl(const _Head& __head) + : _Base(__head) + { } template - explicit - constexpr _Tuple_impl(_UHead&& __head) - : _Base(std::forward<_UHead>(__head)) { } + explicit constexpr + _Tuple_impl(_UHead&& __head) + : _Base(std::forward<_UHead>(__head)) + { } constexpr _Tuple_impl(const _Tuple_impl&) = default; @@ -425,75 +441,85 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION constexpr _Tuple_impl(_Tuple_impl&& __in) noexcept(is_nothrow_move_constructible<_Head>::value) - : _Base(std::forward<_Head>(_M_head(__in))) { } + : _Base(std::forward<_Head>(_M_head(__in))) + { } template - constexpr _Tuple_impl(const _Tuple_impl<_Idx, _UHead>& __in) - : _Base(_Tuple_impl<_Idx, _UHead>::_M_head(__in)) { } + constexpr + _Tuple_impl(const _Tuple_impl<_Idx, _UHead>& __in) + : _Base(_Tuple_impl<_Idx, _UHead>::_M_head(__in)) + { } template - constexpr _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in) + constexpr + _Tuple_impl(_Tuple_impl<_Idx, _UHead>&& __in) : _Base(std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) { } template _GLIBCXX20_CONSTEXPR _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) - : _Base(__tag, __use_alloc<_Head>(__a)) { } + : _Base(__tag, __use_alloc<_Head>(__a)) + { } template _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, const _Head& __head) - : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), __head) { } + : _Base(__use_alloc<_Head, _Alloc, const _Head&>(__a), __head) + { } template _GLIBCXX20_CONSTEXPR _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - _UHead&& __head) + _UHead&& __head) : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), - std::forward<_UHead>(__head)) { } + std::forward<_UHead>(__head)) + { } template _GLIBCXX20_CONSTEXPR - _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - const _Tuple_impl& __in) - : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), _M_head(__in)) { } + _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, + const _Tuple_impl& __in) + : _Base(__use_alloc<_Head, _Alloc, const _Head&>(__a), _M_head(__in)) + { } template _GLIBCXX20_CONSTEXPR _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - _Tuple_impl&& __in) + _Tuple_impl&& __in) : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), - std::forward<_Head>(_M_head(__in))) { } + std::forward<_Head>(_M_head(__in))) + { } template _GLIBCXX20_CONSTEXPR _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - const _Tuple_impl<_Idx, _UHead>& __in) - : _Base(__use_alloc<_Head, _Alloc, _Head>(__a), - _Tuple_impl<_Idx, _UHead>::_M_head(__in)) { } + const _Tuple_impl<_Idx, _UHead>& __in) + : _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a), + _Tuple_impl<_Idx, _UHead>::_M_head(__in)) + { } template _GLIBCXX20_CONSTEXPR _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a, - _Tuple_impl<_Idx, _UHead>&& __in) + _Tuple_impl<_Idx, _UHead>&& __in) : _Base(__use_alloc<_Head, _Alloc, _UHead>(__a), - std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) + std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in))) { } template _GLIBCXX20_CONSTEXPR - void - _M_assign(const _Tuple_impl<_Idx, _UHead>& __in) - { + void + _M_assign(const _Tuple_impl<_Idx, _UHead>& __in) + { _M_head(*this) = _Tuple_impl<_Idx, _UHead>::_M_head(__in); } template _GLIBCXX20_CONSTEXPR - void - _M_assign(_Tuple_impl<_Idx, _UHead>&& __in) - { + void + _M_assign(_Tuple_impl<_Idx, _UHead>&& __in) + { _M_head(*this) = std::forward<_UHead>(_Tuple_impl<_Idx, _UHead>::_M_head(__in)); }