diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2011-01-17 17:35:55 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2011-01-17 17:35:55 +0000 |
commit | 999209d01b7a327359f0fd890a48b60c979d7eb7 (patch) | |
tree | 16246c9c8e2d07bb9c8d96787bb752dbb3403770 | |
parent | 6c7d1b312d78b52d0516d8f2967d5ac856e110ee (diff) | |
download | gcc-999209d01b7a327359f0fd890a48b60c979d7eb7.zip gcc-999209d01b7a327359f0fd890a48b60c979d7eb7.tar.gz gcc-999209d01b7a327359f0fd890a48b60c979d7eb7.tar.bz2 |
stl_queue.h (queue<>::swap, [...]): Implement DR 1198.
2011-01-17 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/stl_queue.h (queue<>::swap, priority_queue<>::swap):
Implement DR 1198.
* include/bits/stl_stack.h (stack<>::swap): Likewise.
From-SVN: r168914
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_queue.h | 10 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_stack.h | 8 |
3 files changed, 19 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index de63ca7..11ae49e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2011-01-17 Paolo Carlini <paolo.carlini@oracle.com> + + * include/bits/stl_queue.h (queue<>::swap, priority_queue<>::swap): + Implement DR 1198. + * include/bits/stl_stack.h (stack<>::swap): Likewise. + 2011-01-16 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/47323 diff --git a/libstdc++-v3/include/bits/stl_queue.h b/libstdc++-v3/include/bits/stl_queue.h index fa40245..2f8853a 100644 --- a/libstdc++-v3/include/bits/stl_queue.h +++ b/libstdc++-v3/include/bits/stl_queue.h @@ -1,6 +1,7 @@ // Queue implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, +// 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -240,7 +241,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #ifdef __GXX_EXPERIMENTAL_CXX0X__ void swap(queue& __q) - { c.swap(__q.c); } + { + using std::swap; + swap(c, __q.c); + } #endif }; @@ -526,7 +530,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) swap(priority_queue& __pq) { using std::swap; - c.swap(__pq.c); + swap(c, __pq.c); swap(comp, __pq.comp); } #endif diff --git a/libstdc++-v3/include/bits/stl_stack.h b/libstdc++-v3/include/bits/stl_stack.h index a5c25d4..7f7ad9d 100644 --- a/libstdc++-v3/include/bits/stl_stack.h +++ b/libstdc++-v3/include/bits/stl_stack.h @@ -1,6 +1,7 @@ // Stack implementation -*- C++ -*- -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, +// 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -214,7 +215,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) #ifdef __GXX_EXPERIMENTAL_CXX0X__ void swap(stack& __s) - { c.swap(__s.c); } + { + using std::swap; + swap(c, __s.c); + } #endif }; |