stl_deque.h (deque<>::push_back(_Args&&...), [...]): Remove.
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 13 Jun 2008 12:03:13 +0000 (12:03 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 13 Jun 2008 12:03:13 +0000 (12:03 +0000)
2008-06-13  Paolo Carlini  <paolo.carlini@oracle.com>

* include/bits/stl_deque.h (deque<>::push_back(_Args&&...),
deque<>::push_front(_Args&&...)): Remove.
(deque<>::push_back(value_type&&),
deque<>::push_front(value_type&&)): Add.
(deque<>::push_back(const value_type&),
deque<>::push_front(const value_type&)): Add back.
(deque<>::emplace_back(_Args&&...),
deque<>::emplace_front(_Args&&...)): Declare...
* include/bits/deque.tcc: ... and define.
* include/bits/stl_list.h (list<>::push_back(_Args&&...),
list<>::push_front(_Args&&...)): Remove.
(list<>::push_back(value_type&&), list<>::push_front(value_type&&),
list<>::emplace_back(_Args&&...), list<>::emplace_front(_Args&&...)):
Add.
(list<>::push_back(const value_type&),
list<>::push_front(const value_type&)): Add back.
* include/bits/stl_vector.h (vector<>::push_back(_Args&&...)): Remove.
(vector<>::push_back(value_type&&)): Add.
(vector<>::push_back(const value_type&)): Add back.
(vector<>::emplace_back(_Args&&...)): Declare...
* include/bits/vector.tcc: ... and define.
* include/bits/stl_queue.h (queue<>::push(_Args&&...),
priority_queue<>::push(_Args&&...)): Remove.
(queue<>::push(value_type&&), queue<>::emplace(_Args&&...),
priority_queue<>::push(value_type&&),
priority_queue<>::emplace(_Args&&...)): Add.
(queue<>::push(const value_type&),
priority_queue<>::push(const value_type&)): Add back.
* include/bits/stl_stack.h (stack<>::push(_Args&&...)): Remove.
(stack<>::push(value_type&&), stack<>::emplace(_Args&&...)): Add.
(stack<>::push(const value_type&)): Add back.
* include/debug/deque (deque<>::push_back(_Args&&...),
deque<>::push_front(_Args&&...)): Remove.
(deque<>::push_back(value_type&&), deque<>::push_front(value_type&&),
deque<>::emplace_back(_Args&&...), deque<>::emplace_front(_Args&&...)):
Add.
(deque<>::push_back(const value_type&),
deque<>::push_front(const value_type&)): Add back.
* include/debug/list (list<>::push_back(_Args&&...),
list<>::push_front(_Args&&...)): Remove.
(list<>::push_back(value_type&&), list<>::push_front(value_type&&),
list<>::emplace_back(_Args&&...), list<>::emplace_front(_Args&&...)):
Add.
(list<>::push_back(const value_type&),
list<>::push_front(const value_type&)): Add back.
* include/debug/vector (vector<>::push_back(_Args&&...)): Remove.
(vector<>::push_back(value_type&&),
vector<>::emplace_back(_Args&&...)): Add.
(vector<>::push_back(const value_type&)): Add back.
* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
Adjust dg-error line numbers.
* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/deque/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/deque/requirements/dr438/
constructor_2_neg.cc: Likewise.
* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
Adjust dg-error line numbers.
* testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
Likewise.
* testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
Adjust dg-error line numbers.
* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Likewise.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Likewise.

From-SVN: r136750

23 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/deque.tcc
libstdc++-v3/include/bits/stl_deque.h
libstdc++-v3/include/bits/stl_list.h
libstdc++-v3/include/bits/stl_queue.h
libstdc++-v3/include/bits/stl_stack.h
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/include/bits/vector.tcc
libstdc++-v3/include/debug/deque
libstdc++-v3/include/debug/list
libstdc++-v3/include/debug/vector
libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc
libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc
libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc
libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc
libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc
libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc

index 2d1681c5646468535621b6aa35348a646d4da048..ebfca51c964b6cdbc4bcd7cdcf24233980a06b98 100644 (file)
@@ -1,3 +1,79 @@
+2008-06-13  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * include/bits/stl_deque.h (deque<>::push_back(_Args&&...),
+       deque<>::push_front(_Args&&...)): Remove.
+       (deque<>::push_back(value_type&&),
+       deque<>::push_front(value_type&&)): Add.
+       (deque<>::push_back(const value_type&),
+       deque<>::push_front(const value_type&)): Add back.
+       (deque<>::emplace_back(_Args&&...),
+       deque<>::emplace_front(_Args&&...)): Declare...
+       * include/bits/deque.tcc: ... and define.       
+       * include/bits/stl_list.h (list<>::push_back(_Args&&...),
+       list<>::push_front(_Args&&...)): Remove.
+       (list<>::push_back(value_type&&), list<>::push_front(value_type&&),
+       list<>::emplace_back(_Args&&...), list<>::emplace_front(_Args&&...)):
+       Add.
+       (list<>::push_back(const value_type&),
+       list<>::push_front(const value_type&)): Add back.
+       * include/bits/stl_vector.h (vector<>::push_back(_Args&&...)): Remove.
+       (vector<>::push_back(value_type&&)): Add.
+       (vector<>::push_back(const value_type&)): Add back.
+       (vector<>::emplace_back(_Args&&...)): Declare...
+       * include/bits/vector.tcc: ... and define.
+       * include/bits/stl_queue.h (queue<>::push(_Args&&...),
+       priority_queue<>::push(_Args&&...)): Remove.
+       (queue<>::push(value_type&&), queue<>::emplace(_Args&&...),
+       priority_queue<>::push(value_type&&),
+       priority_queue<>::emplace(_Args&&...)): Add.
+       (queue<>::push(const value_type&),
+       priority_queue<>::push(const value_type&)): Add back.
+       * include/bits/stl_stack.h (stack<>::push(_Args&&...)): Remove.
+       (stack<>::push(value_type&&), stack<>::emplace(_Args&&...)): Add.
+       (stack<>::push(const value_type&)): Add back.
+       * include/debug/deque (deque<>::push_back(_Args&&...),
+       deque<>::push_front(_Args&&...)): Remove.
+       (deque<>::push_back(value_type&&), deque<>::push_front(value_type&&),
+       deque<>::emplace_back(_Args&&...), deque<>::emplace_front(_Args&&...)):
+       Add.
+       (deque<>::push_back(const value_type&),
+       deque<>::push_front(const value_type&)): Add back.
+       * include/debug/list (list<>::push_back(_Args&&...),
+       list<>::push_front(_Args&&...)): Remove.
+       (list<>::push_back(value_type&&), list<>::push_front(value_type&&),
+       list<>::emplace_back(_Args&&...), list<>::emplace_front(_Args&&...)):
+       Add.
+       (list<>::push_back(const value_type&),
+       list<>::push_front(const value_type&)): Add back.
+       * include/debug/vector (vector<>::push_back(_Args&&...)): Remove.
+       (vector<>::push_back(value_type&&),
+       vector<>::emplace_back(_Args&&...)): Add.
+       (vector<>::push_back(const value_type&)): Add back.
+       * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
+       Adjust dg-error line numbers.
+       * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
+       Likewise.
+       * testsuite/23_containers/deque/requirements/dr438/
+       constructor_1_neg.cc: Likewise.
+       * testsuite/23_containers/deque/requirements/dr438/
+       constructor_2_neg.cc: Likewise.
+       * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
+       Adjust dg-error line numbers.
+       * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
+       Likewise.
+       * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
+       Likewise.
+       * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
+       Likewise.
+       * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
+       Adjust dg-error line numbers.
+       * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
+       Likewise.
+       * testsuite/23_containers/vector/requirements/dr438/
+       constructor_1_neg.cc: Likewise.
+       * testsuite/23_containers/vector/requirements/dr438/
+       constructor_2_neg.cc: Likewise.
+
 2008-06-13  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * include/tr1_impl/array (array<>::assign): Do not define in
index 08b7adeeb6577c8d9eaca194b2d4e29808a0af03..9c1096f77bacaf7a33d1d3a2ba3b613c57806617 100644 (file)
@@ -1,6 +1,6 @@
 // Deque implementation (out of line) -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -85,6 +85,41 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
       return *this;
     }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _Tp, typename _Alloc>
+    template<typename... _Args>
+      void
+      deque<_Tp, _Alloc>::
+      emplace_front(_Args&&... __args)
+      {
+       if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first)
+         {
+           this->_M_impl.construct(this->_M_impl._M_start._M_cur - 1,
+                                   std::forward<_Args>(__args)...);
+           --this->_M_impl._M_start._M_cur;
+         }
+       else
+         _M_push_front_aux(std::forward<_Args>(__args)...);
+      }
+
+  template<typename _Tp, typename _Alloc>
+    template<typename... _Args>
+      void
+      deque<_Tp, _Alloc>::
+      emplace_back(_Args&&... __args)
+      {
+       if (this->_M_impl._M_finish._M_cur
+           != this->_M_impl._M_finish._M_last - 1)
+         {
+           this->_M_impl.construct(this->_M_impl._M_finish._M_cur,
+                                   std::forward<_Args>(__args)...);
+           ++this->_M_impl._M_finish._M_cur;
+         }
+       else
+         _M_push_back_aux(std::forward<_Args>(__args)...);
+      }
+#endif
+
   template <typename _Tp, typename _Alloc>
     typename deque<_Tp, _Alloc>::iterator
     deque<_Tp, _Alloc>::
index 6032765ed0c051431348006c1c9fff78292906fb..b778f15a0755280c2c36d17c44e066d64d7636d5 100644 (file)
@@ -1117,7 +1117,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        *  data to it.  Due to the nature of a %deque this operation
        *  can be done in constant time.
        */
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
       void
       push_front(const value_type& __x)
       {
@@ -1129,20 +1128,15 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        else
          _M_push_front_aux(__x);
       }
-#else
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      push_front(value_type&& __x)
+      { emplace_front(std::move(__x)); }
+
       template<typename... _Args>
         void
-        push_front(_Args&&... __args)
-       {
-         if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first)
-           {
-             this->_M_impl.construct(this->_M_impl._M_start._M_cur - 1,
-                                     std::forward<_Args>(__args)...);
-             --this->_M_impl._M_start._M_cur;
-           }
-         else
-           _M_push_front_aux(std::forward<_Args>(__args)...);
-       }
+        emplace_front(_Args&&... __args);
 #endif
 
       /**
@@ -1154,7 +1148,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        *  to it.  Due to the nature of a %deque this operation can be
        *  done in constant time.
        */
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
       void
       push_back(const value_type& __x)
       {
@@ -1167,21 +1160,15 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        else
          _M_push_back_aux(__x);
       }
-#else
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      push_back(value_type&& __x)
+      { emplace_back(std::move(__x)); }
+
       template<typename... _Args>
         void
-        push_back(_Args&&... __args)
-       {
-         if (this->_M_impl._M_finish._M_cur
-             != this->_M_impl._M_finish._M_last - 1)
-           {
-             this->_M_impl.construct(this->_M_impl._M_finish._M_cur,
-                                     std::forward<_Args>(__args)...);
-             ++this->_M_impl._M_finish._M_cur;
-           }
-         else
-           _M_push_back_aux(std::forward<_Args>(__args)...);
-       }
+        emplace_back(_Args&&... __args);
 #endif
 
       /**
index a631b0ef1eff1cf2e258b6a1968312d8c491cc76..08fb89ef11771918b1e94c1aa1b1cd2248e66b1e 100644 (file)
@@ -833,15 +833,19 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        *  done in constant time, and does not invalidate iterators and
        *  references.
        */
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
       void
       push_front(const value_type& __x)
       { this->_M_insert(begin(), __x); }
-#else
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      push_front(value_type&& __x)
+      { this->_M_insert(begin(), std::move(__x)); }
+
       template<typename... _Args>
         void
-        push_front(_Args&&... __args)
-       { this->_M_insert(begin(), std::forward<_Args>(__args)...); }
+        emplace_front(_Args&&... __args)
+        { this->_M_insert(begin(), std::forward<_Args>(__args)...); }
 #endif
 
       /**
@@ -870,15 +874,19 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        *  in constant time, and does not invalidate iterators and
        *  references.
        */
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
       void
       push_back(const value_type& __x)
       { this->_M_insert(end(), __x); }
-#else
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      push_back(value_type&& __x)
+      { this->_M_insert(end(), std::move(__x)); }
+
       template<typename... _Args>
         void
-        push_back(_Args&&... __args)
-       { this->_M_insert(end(), std::forward<_Args>(__args)...); }
+        emplace_back(_Args&&... __args)
+        { this->_M_insert(end(), std::forward<_Args>(__args)...); }
 #endif
 
       /**
index 4ab3c46c0b890a08bc9542922ab42c9fa091bb96..053a59c1650bcf6c523014256a11ac958667c926 100644 (file)
@@ -1,6 +1,6 @@
 // Queue implementation -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -220,16 +220,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
        *  to it.  The time complexity of the operation depends on the
        *  underlying sequence.
        */
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
       void
       push(const value_type& __x)
       { c.push_back(__x); }
-#else
-      // NB: DR 756.
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      push(value_type&& __x)
+      { c.push_back(std::move(__x)); }
+
       template<typename... _Args>
         void
-        push(_Args&&... __args)
-       { c.push_back(std::forward<_Args>(__args)...); }
+        emplace(_Args&&... __args)
+       { c.emplace_back(std::forward<_Args>(__args)...); }
 #endif
 
       /**
@@ -509,20 +512,26 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
        *  The time complexity of the operation depends on the underlying
        *  sequence.
        */
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
       void
       push(const value_type& __x)
       {
        c.push_back(__x);
        std::push_heap(c.begin(), c.end(), comp);
       }
-#else
-      // NB: DR 756.
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      push(value_type&& __x)
+      {
+       c.push_back(std::move(__x));
+       std::push_heap(c.begin(), c.end(), comp);
+      }
+
       template<typename... _Args>
         void
-        push(_Args&&... __args)
-       { 
-         c.push_back(std::forward<_Args>(__args)...);
+        emplace(_Args&&... __args)
+       {
+         c.emplace_back(std::forward<_Args>(__args)...);
          std::push_heap(c.begin(), c.end(), comp);
        }
 #endif
index 932388a7a68b99007ca3bc4101d55e65167a0ced..13e4b7a461500bdafe36439a59d4a33c48c4d681 100644 (file)
@@ -1,6 +1,6 @@
 // Stack implementation -*- C++ -*-
 
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -184,16 +184,19 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
        *  to it.  The time complexity of the operation depends on the
        *  underlying sequence.
        */
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
       void
       push(const value_type& __x)
       { c.push_back(__x); }
-#else
-      // NB: DR 756.
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      push(value_type&& __x)
+      { c.push_back(std::move(__x)); }
+
       template<typename... _Args>
         void
-        push(_Args&&... __args)
-       { c.push_back(std::forward<_Args>(__args)...); }
+        emplace(_Args&&... __args)
+       { c.emplace_back(std::forward<_Args>(__args)...); }
 #endif
 
       /**
index 34bb595d52868c4ac177dc6980d711d1d2f415c9..aa874089d52622c97d92cd72ac289942d09ca1d5 100644 (file)
@@ -681,7 +681,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        *  done in constant time if the %vector has preallocated space
        *  available.
        */
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
       void
       push_back(const value_type& __x)
       {
@@ -693,20 +692,15 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        else
          _M_insert_aux(end(), __x);
       }
-#else
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      push_back(value_type&& __x)
+      { emplace_back(std::move(__x)); }
+
       template<typename... _Args>
         void
-        push_back(_Args&&... __args)
-       {
-         if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
-           {
-             this->_M_impl.construct(this->_M_impl._M_finish,
-                                     std::forward<_Args>(__args)...);
-             ++this->_M_impl._M_finish;
-           }
-         else
-           _M_insert_aux(end(), std::forward<_Args>(__args)...);
-       }
+        emplace_back(_Args&&... __args);
 #endif
 
       /**
index 462d18f6cbb858c9f3c44a71a80d774ae30a72f6..04f76ca2c2c73ea2d7c6bdbd5f91c7e8fa4b0f4e 100644 (file)
@@ -88,6 +88,24 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
        }
     }
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+  template<typename _Tp, typename _Alloc>
+    template<typename... _Args>
+      void
+      vector<_Tp, _Alloc>::
+      emplace_back(_Args&&... __args)
+      {
+       if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage)
+         {
+           this->_M_impl.construct(this->_M_impl._M_finish,
+                                   std::forward<_Args>(__args)...);
+           ++this->_M_impl._M_finish;
+         }
+       else
+         _M_insert_aux(end(), std::forward<_Args>(__args)...);
+      }
+#endif
+
   template<typename _Tp, typename _Alloc>
     typename vector<_Tp, _Alloc>::iterator
     vector<_Tp, _Alloc>::
index 2f967b49f33a7850cb514b10ce1da31aa3dd84cc..c37381f084fd1949cc9a9edfafc6cf02caa5b3fc 100644 (file)
@@ -1,6 +1,6 @@
 // Debugging deque implementation -*- C++ -*-
 
-// Copyright (C) 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -254,7 +254,6 @@ namespace __debug
       }
 
       // 23.2.1.3 modifiers:
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
       void
       push_front(const _Tp& __x)
       {
@@ -268,20 +267,29 @@ namespace __debug
        _Base::push_back(__x);
        this->_M_invalidate_all();
       }
-#else
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      push_front(_Tp&& __x)
+      { emplace_front(std::move(__x)); }
+
+      void
+      push_back(_Tp&& __x)
+      { emplace_back(std::move(__x)); }
+
       template<typename... _Args>
         void
-        push_front(_Args&&... __args)
+        emplace_front(_Args&&... __args)
        {
-         _Base::push_front(std::forward<_Args>(__args)...);
+         _Base::emplace_front(std::forward<_Args>(__args)...);
          this->_M_invalidate_all();
        }
 
       template<typename... _Args>
         void
-        push_back(_Args&&... __args)
+        emplace_back(_Args&&... __args)
        {
-         _Base::push_back(std::forward<_Args>(__args)...);
+         _Base::emplace_back(std::forward<_Args>(__args)...);
          this->_M_invalidate_all();
        }
 
index d0797e9bf469947a7fbde85da0f0cde6c5f5d630..7ab0bddff99354333afcc3ef784b7989f499b27c 100644 (file)
@@ -280,6 +280,10 @@ namespace __debug
       // 23.2.2.3 modifiers:
       using _Base::push_front;
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      using _Base::emplace_front;
+#endif
+
       void
       pop_front()
       {
@@ -291,6 +295,10 @@ namespace __debug
 
       using _Base::push_back;
 
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      using _Base::emplace_back;
+#endif
+
       void
       pop_back()
       {
index 7945b54591e5171153664ff241dc51054479f8fb..12bd52f0b2bf6f07af2b1e4a5e894766de6f1266 100644 (file)
@@ -289,7 +289,6 @@ namespace __debug
       using _Base::data;
 
       // 23.2.4.3 modifiers:
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
       void
       push_back(const _Tp& __x)
       {
@@ -299,13 +298,18 @@ namespace __debug
          this->_M_invalidate_all();
        _M_update_guaranteed_capacity();
       }
-#else
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+      void
+      push_back(_Tp&& __x)
+      { emplace_back(std::move(__x)); }
+
       template<typename... _Args>
         void
-        push_back(_Args&&... __args)
+        emplace_back(_Args&&... __args)
        {
          bool __realloc = _M_requires_reallocation(this->size() + 1);
-         _Base::push_back(std::forward<_Args>(__args)...);
+         _Base::emplace_back(std::forward<_Args>(__args)...);
          if (__realloc)
            this->_M_invalidate_all();
          _M_update_guaranteed_capacity();
index 3d40c00596b71cde42e8eb42433af4d9fb54685e..2cb464cb86ce4791b0aa8810e9f7c81ad69d10ca 100644 (file)
@@ -1,6 +1,6 @@
 // 2007-04-27  Paolo Carlini  <pcarlini@suse.de>
 
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 Free Software Foundation
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1449 }
+// { dg-error "no matching" "" { target *-*-* } 1436 }
 // { dg-excess-errors "" }
 
 #include <deque>
index fb4c40ef8ccc2a185ce474a2b1e2511f90a92656..57c865f34c0e6f8d087a613b69879d6e0d9c09e6 100644 (file)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1388 }
+// { dg-error "no matching" "" { target *-*-* } 1375 }
 // { dg-excess-errors "" }
 
 #include <deque>
index 1f24c98278f322ca2867f17fc581b752be48cf66..a46674c52dc01dc62716aa07217e75602e062bd7 100644 (file)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1388 }
+// { dg-error "no matching" "" { target *-*-* } 1375 }
 // { dg-excess-errors "" }
 
 #include <deque>
index 522022a856db83b142b1b7cc794aaecd0c3eac06..3ae748ca316aad7aa22b017217ad373fb4091ffa 100644 (file)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1533 }
+// { dg-error "no matching" "" { target *-*-* } 1520 }
 // { dg-excess-errors "" }
 
 #include <deque>
index 1478f3de9474b1f5c9de92d406b332934b42bdef..8eeff630927d5a713b704c075bbbeead52c8e448 100644 (file)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1317 }
+// { dg-error "no matching" "" { target *-*-* } 1325 }
 // { dg-excess-errors "" }
 
 #include <list>
index d5dc3908b7cb6477840e358ecd1afb1a3f96eea7..06b71622421083e28720ab968800115907459690 100644 (file)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1286 }
+// { dg-error "no matching" "" { target *-*-* } 1294 }
 // { dg-excess-errors "" }
 
 #include <list>
index 10f726b9f73c830d46291ee1b2c9cef7fcbf89df..bfe871077d71ad8f8a53e9e4de490e5d70b6e390 100644 (file)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1286 }
+// { dg-error "no matching" "" { target *-*-* } 1294 }
 // { dg-excess-errors "" }
 
 #include <list>
index 1a97c4b44362f9ace8dbabd46598567b05b2c127..d75ed067e2429a9ee3343410db4bb3b693cff9b7 100644 (file)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1286 }
+// { dg-error "no matching" "" { target *-*-* } 1294 }
 // { dg-excess-errors "" }
 
 #include <list>
index eb6aa1f0b6bd2e4b46f6946e5a22213b6af25778..64c6a98dfb53dbff45a1aee77da698e536e6b907 100644 (file)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 992 }
+// { dg-error "no matching" "" { target *-*-* } 986 }
 // { dg-excess-errors "" }
 
 #include <vector>
index 6e65a5e80921ef8e92ae23bb5fbba18c44c3835a..34e602da583b4cce5754086e46191de0462407ef 100644 (file)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 932 }
+// { dg-error "no matching" "" { target *-*-* } 926 }
 // { dg-excess-errors "" }
 
 #include <vector>
index dce05ed2cf953becebee966020d2e49a8b8cce03..f1af46c43a25b12eaa4c0443fe77de321417fd48 100644 (file)
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 932 }
+// { dg-error "no matching" "" { target *-*-* } 926 }
 // { dg-excess-errors "" }
 
 #include <vector>
index 3df2fc8b745acf5c3a9c845b5f1d8168317c08c8..a95f57857d814bc35ec1ae76b315074c04b5f514 100644 (file)
@@ -1,6 +1,6 @@
 // 2007-04-27  Paolo Carlini  <pcarlini@suse.de>
 
-// Copyright (C) 2007 Free Software Foundation
+// Copyright (C) 2007, 2008 Free Software Foundation
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -19,7 +19,7 @@
 // USA.
 
 // { dg-do compile }
-// { dg-error "no matching" "" { target *-*-* } 1033 }
+// { dg-error "no matching" "" { target *-*-* } 1027 }
 // { dg-excess-errors "" }
 
 #include <vector>