Commit fe960d92 by Chris Fairles

tuple (_Head_base<>::_Head_base(_UHead&&)): Formatting.

2009-02-05  Chris Fairles  <cfairles@gcc.gnu.org>

        * 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.

From-SVN: r143979
parent 6d39673d
2009-02-05 Chris Fairles <cfairles@gcc.gnu.org> 2009-02-05 Chris Fairles <cfairles@gcc.gnu.org>
* 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 <cfairles@gcc.gnu.org>
Benjamin Kosnik <bkoz@redhat.com> Benjamin Kosnik <bkoz@redhat.com>
* include/std/thread (__thread_data_base): Nest class in std::thread. * include/std/thread (__thread_data_base): Nest class in std::thread.
......
...@@ -76,13 +76,13 @@ namespace std ...@@ -76,13 +76,13 @@ namespace std
: _Head(__h) { } : _Head(__h) { }
template<typename _UHead> template<typename _UHead>
_Head_base(_UHead&& __h) _Head_base(_UHead&& __h)
: _Head(std::forward<_UHead>(__h)) { } : _Head(std::forward<_UHead>(__h)) { }
_Head& _M_head() { return *this; } _Head& _M_head() { return *this; }
const _Head& _M_head() const { return *this; } const _Head& _M_head() const { return *this; }
void __swap_impl(_Head&&) { /* no-op */ } void _M_swap_impl(_Head&&) { /* no-op */ }
}; };
template<std::size_t _Idx, typename _Head> template<std::size_t _Idx, typename _Head>
...@@ -95,14 +95,14 @@ namespace std ...@@ -95,14 +95,14 @@ namespace std
: _M_head_impl(__h) { } : _M_head_impl(__h) { }
template<typename _UHead> template<typename _UHead>
_Head_base(_UHead&& __h) _Head_base(_UHead&& __h)
: _M_head_impl(std::forward<_UHead>(__h)) { } : _M_head_impl(std::forward<_UHead>(__h)) { }
_Head& _M_head() { return _M_head_impl; } _Head& _M_head() { return _M_head_impl; }
const _Head& _M_head() const { return _M_head_impl; } const _Head& _M_head() const { return _M_head_impl; }
void void
__swap_impl(_Head&& __h) _M_swap_impl(_Head&& __h)
{ {
using std::swap; using std::swap;
swap(__h, _M_head_impl); swap(__h, _M_head_impl);
...@@ -129,7 +129,8 @@ namespace std ...@@ -129,7 +129,8 @@ namespace std
template<std::size_t _Idx> template<std::size_t _Idx>
struct _Tuple_impl<_Idx> 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 ...@@ -216,11 +217,12 @@ namespace std
return *this; return *this;
} }
protected:
void void
__swap_impl(_Tuple_impl&& __in) _M_swap_impl(_Tuple_impl&& __in)
{ {
_Base::__swap_impl(__in._M_head()); _Base::_M_swap_impl(__in._M_head());
_Inherited::__swap_impl(__in._M_tail()); _Inherited::_M_swap_impl(__in._M_tail());
} }
}; };
...@@ -296,7 +298,7 @@ namespace std ...@@ -296,7 +298,7 @@ namespace std
void void
swap(tuple&& __in) swap(tuple&& __in)
{ _Inherited::__swap_impl(__in); } { _Inherited::_M_swap_impl(__in); }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment