public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: William Schmidt <wschmidt@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc(refs/users/wschmidt/heads/builtins3)] libstdc++: Whitespace changes in <tuple> Date: Fri, 28 Aug 2020 20:02:58 +0000 (GMT) [thread overview] Message-ID: <20200828200258.C6C3F3950CB9@sourceware.org> (raw) https://gcc.gnu.org/g:af06acfc8de1ddcfd02a4de1200735b5479f086f commit af06acfc8de1ddcfd02a4de1200735b5479f086f Author: Jonathan Wakely <jwakely@redhat.com> Date: Wed Aug 26 19:32:30 2020 +0100 libstdc++: Whitespace changes in <tuple> 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<typename _UHead, typename... _UTail, typename = typename - enable_if<sizeof...(_Tail) == sizeof...(_UTail)>::type> - explicit - constexpr _Tuple_impl(_UHead&& __head, _UTail&&... __tail) + explicit constexpr + _Tuple_impl(const _Head& __head, const _Tail&... __tail) + : _Inherited(__tail...), _Base(__head) + { } + + template<typename _UHead, typename... _UTail, + typename = __enable_if_t<sizeof...(_Tail) == sizeof...(_UTail)>> + 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<_Head>, - 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<typename... _UElements> - 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<typename _UHead, typename... _UTails> - 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<typename _Alloc> _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<typename _Alloc> _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<typename _Alloc, typename _UHead, typename... _UTail, - typename = typename enable_if<sizeof...(_Tail) - == sizeof...(_UTail)>::type> + typename = __enable_if_t<sizeof...(_Tail) == sizeof...(_UTail)>> _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<typename _Alloc> _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<typename _Alloc> _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<typename _Alloc, typename _UHead, typename... _UTails> _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<typename _Alloc, typename _UHead, typename... _UTails> _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<typename... _UElements> _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<typename _UHead, typename... _UTails> _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<typename _UHead> - 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<typename _UHead> - 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<typename _UHead> - 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<typename _Alloc> _GLIBCXX20_CONSTEXPR _Tuple_impl(allocator_arg_t __tag, const _Alloc& __a) - : _Base(__tag, __use_alloc<_Head>(__a)) { } + : _Base(__tag, __use_alloc<_Head>(__a)) + { } template<typename _Alloc> _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<typename _Alloc, typename _UHead> _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<typename _Alloc> _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<typename _Alloc> _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<typename _Alloc, typename _UHead> _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<typename _Alloc, typename _UHead> _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<typename _UHead> _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<typename _UHead> _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)); }
reply other threads:[~2020-08-28 20:02 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200828200258.C6C3F3950CB9@sourceware.org \ --to=wschmidt@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).