diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-04 17:28:24 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-04 17:28:24 +0000 |
commit | 1ff5a4ef066ffeb93a56383a880dc8eceb72d651 (patch) | |
tree | 66f681eb19877eb9b646e2ea861d10502c34b8b5 /libstdc++-v3/include/std | |
parent | 70293f47133ca76ba3219e9eaa1bc72ec9226e1a (diff) | |
download | gcc-1ff5a4ef066ffeb93a56383a880dc8eceb72d651.tar.gz |
2010-10-04 Paolo Carlini <paolo.carlini@oracle.com>
* include/std/functional (function<>::swap): Use std::swap.
* include/tr1/functional (function<>::swap): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164952 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std')
-rw-r--r-- | libstdc++-v3/include/std/functional | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index d137f47eb09..dcd7ab83d2e 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -1940,15 +1940,9 @@ namespace std */ void swap(function& __x) { - _Any_data __old_functor = _M_functor; - _M_functor = __x._M_functor; - __x._M_functor = __old_functor; - _Manager_type __old_manager = _M_manager; - _M_manager = __x._M_manager; - __x._M_manager = __old_manager; - _Invoker_type __old_invoker = _M_invoker; - _M_invoker = __x._M_invoker; - __x._M_invoker = __old_invoker; + std::swap(_M_functor, __x._M_functor); + std::swap(_M_manager, __x._M_manager); + std::swap(_M_invoker, __x._M_invoker); } // TODO: needs allocator_arg_t |