PR libstdc++/86963 Remove use of __tuple_base in std::tuple
commita71ee1d840b5f3ee6e87e1dcea953c88f8727902
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Aug 2018 13:53:56 +0000 (20 13:53 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Aug 2018 13:53:56 +0000 (20 13:53 +0000)
tree02e1aebc861f087b2cc513bd35717069a19b42f4
parent51e9526b9c1dbef342e1e51c31b51d66b5456982
PR libstdc++/86963 Remove use of __tuple_base in std::tuple

The _Tuple_impl base class can be used to disable copy/move assignment,
without requiring an extra base class.

Exception specifications on std::tuple assignment and swap functions can
be defined directly using is_nothrow_swappable, instead of querying the
base classes.

PR libstdc++/86963
* include/std/tuple (_Tuple_impl::operator=): Define as deleted.
(_Tuple_impl::_M_assign): New functions to perform assignment instead
of assignment operators.
(_Tuple_impl::_M_swap): Remove exception specification.
(_Tuple_impl<_Idx, _Head>): Likewise.
(_TC::_NonNestedTuple, _TC::_NotSameTuple): Use __remove_cvref_t.
(__tuple_base): Remove.
(tuple, tuple<_T1, _T2>): Remove inheritance from __tuple_base.
(tuple::operator=, tuple<_T1, _T2>::operator=): Call _M_assign.
(tuple::swap, tuple<_T1, _T2>::swap): Define exception specification
using __is_nothrow_swappable.
(tuple<_T1, _T2>::tuple(_U1&&, _U2&&)): Use __remove_cvref_t.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263661 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/tuple