From: cfairles Date: Fri, 6 Feb 2009 06:01:40 +0000 (+0000) Subject: 2009-02-05 Chris Fairles X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e1e15cd09ff0d699019ffc06d51a7857e62940f;p=thirdparty%2Fgcc.git 2009-02-05 Chris Fairles * include/std/tuple (_Head_base<>::_Head_base(_UHead&&)): Formatting. (_Head_base<>::__swap_impl): Rename to _M_swap_impl. (_Tuple_impl<>::__swap_impl): Likewise and make protected to avoid exposing it in public std::tuple interface. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143979 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 341e94df43f3..a54b4d8d26ef 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2009-02-05 Chris Fairles + + * include/std/tuple (_Head_base<>::_Head_base(_UHead&&)): Formatting. + (_Head_base<>::__swap_impl): Rename to _M_swap_impl. + (_Tuple_impl<>::__swap_impl): Likewise and make protected to avoid + exposing it in public std::tuple interface. + 2009-02-05 Chris Fairles Benjamin Kosnik diff --git a/libstdc++-v3/include/std/tuple b/libstdc++-v3/include/std/tuple index 33e8731d3aaf..d8e74f2d97ef 100644 --- a/libstdc++-v3/include/std/tuple +++ b/libstdc++-v3/include/std/tuple @@ -76,13 +76,13 @@ namespace std : _Head(__h) { } template - _Head_base(_UHead&& __h) - : _Head(std::forward<_UHead>(__h)) { } + _Head_base(_UHead&& __h) + : _Head(std::forward<_UHead>(__h)) { } _Head& _M_head() { return *this; } const _Head& _M_head() const { return *this; } - - void __swap_impl(_Head&&) { /* no-op */ } + + void _M_swap_impl(_Head&&) { /* no-op */ } }; template @@ -95,14 +95,14 @@ namespace std : _M_head_impl(__h) { } template - _Head_base(_UHead&& __h) - : _M_head_impl(std::forward<_UHead>(__h)) { } + _Head_base(_UHead&& __h) + : _M_head_impl(std::forward<_UHead>(__h)) { } _Head& _M_head() { return _M_head_impl; } const _Head& _M_head() const { return _M_head_impl; } void - __swap_impl(_Head&& __h) + _M_swap_impl(_Head&& __h) { using std::swap; swap(__h, _M_head_impl); @@ -129,7 +129,8 @@ namespace std template struct _Tuple_impl<_Idx> { - void __swap_impl(_Tuple_impl&&) { /* no-op */ } + protected: + void _M_swap_impl(_Tuple_impl&&) { /* no-op */ } }; /** @@ -216,11 +217,12 @@ namespace std return *this; } + protected: void - __swap_impl(_Tuple_impl&& __in) + _M_swap_impl(_Tuple_impl&& __in) { - _Base::__swap_impl(__in._M_head()); - _Inherited::__swap_impl(__in._M_tail()); + _Base::_M_swap_impl(__in._M_head()); + _Inherited::_M_swap_impl(__in._M_tail()); } }; @@ -296,7 +298,7 @@ namespace std void swap(tuple&& __in) - { _Inherited::__swap_impl(__in); } + { _Inherited::_M_swap_impl(__in); } };