mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-23 19:03:59 +08:00
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.
This commit is contained in:
parent
5494edae83
commit
af06acfc8d
@ -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) { }
|
||||
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)
|
||||
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)) { }
|
||||
|
||||
template<typename _Alloc>
|
||||
_GLIBCXX20_CONSTEXPR
|
||||
_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, _UHead>(__a),
|
||||
std::forward<_UHead>(__head))
|
||||
{ }
|
||||
|
||||
template<typename _Alloc>
|
||||
_GLIBCXX20_CONSTEXPR
|
||||
_Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
|
||||
_Tuple_impl&& __in)
|
||||
const _Tuple_impl& __in)
|
||||
: _Inherited(__tag, __a, _M_tail(__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)
|
||||
: _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)) { }
|
||||
|
||||
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)) { }
|
||||
std::forward<_UHead>(__head))
|
||||
{ }
|
||||
|
||||
template<typename _Alloc>
|
||||
_GLIBCXX20_CONSTEXPR
|
||||
_Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
|
||||
_Tuple_impl&& __in)
|
||||
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)
|
||||
: _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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user