stl_deque.h (deque<>::push_back(_Args&&...), [...]): Remove.
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
This commit is contained in:
parent
ca789c7ff6
commit
4dc3e453c8
|
@ -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>
|
2008-06-13 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
* include/tr1_impl/array (array<>::assign): Do not define in
|
* include/tr1_impl/array (array<>::assign): Do not define in
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Deque implementation (out of line) -*- C++ -*-
|
// 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.
|
// Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// 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;
|
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>
|
template <typename _Tp, typename _Alloc>
|
||||||
typename deque<_Tp, _Alloc>::iterator
|
typename deque<_Tp, _Alloc>::iterator
|
||||||
deque<_Tp, _Alloc>::
|
deque<_Tp, _Alloc>::
|
||||||
|
|
|
@ -1117,7 +1117,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||||
* data to it. Due to the nature of a %deque this operation
|
* data to it. Due to the nature of a %deque this operation
|
||||||
* can be done in constant time.
|
* can be done in constant time.
|
||||||
*/
|
*/
|
||||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
|
||||||
void
|
void
|
||||||
push_front(const value_type& __x)
|
push_front(const value_type& __x)
|
||||||
{
|
{
|
||||||
|
@ -1129,20 +1128,15 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||||
else
|
else
|
||||||
_M_push_front_aux(__x);
|
_M_push_front_aux(__x);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
void
|
||||||
|
push_front(value_type&& __x)
|
||||||
|
{ emplace_front(std::move(__x)); }
|
||||||
|
|
||||||
template<typename... _Args>
|
template<typename... _Args>
|
||||||
void
|
void
|
||||||
push_front(_Args&&... __args)
|
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)...);
|
|
||||||
}
|
|
||||||
#endif
|
#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
|
* to it. Due to the nature of a %deque this operation can be
|
||||||
* done in constant time.
|
* done in constant time.
|
||||||
*/
|
*/
|
||||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
|
||||||
void
|
void
|
||||||
push_back(const value_type& __x)
|
push_back(const value_type& __x)
|
||||||
{
|
{
|
||||||
|
@ -1167,21 +1160,15 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||||
else
|
else
|
||||||
_M_push_back_aux(__x);
|
_M_push_back_aux(__x);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
void
|
||||||
|
push_back(value_type&& __x)
|
||||||
|
{ emplace_back(std::move(__x)); }
|
||||||
|
|
||||||
template<typename... _Args>
|
template<typename... _Args>
|
||||||
void
|
void
|
||||||
push_back(_Args&&... __args)
|
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
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -833,15 +833,19 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||||
* done in constant time, and does not invalidate iterators and
|
* done in constant time, and does not invalidate iterators and
|
||||||
* references.
|
* references.
|
||||||
*/
|
*/
|
||||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
|
||||||
void
|
void
|
||||||
push_front(const value_type& __x)
|
push_front(const value_type& __x)
|
||||||
{ this->_M_insert(begin(), __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>
|
template<typename... _Args>
|
||||||
void
|
void
|
||||||
push_front(_Args&&... __args)
|
emplace_front(_Args&&... __args)
|
||||||
{ this->_M_insert(begin(), std::forward<_Args>(__args)...); }
|
{ this->_M_insert(begin(), std::forward<_Args>(__args)...); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -870,15 +874,19 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||||
* in constant time, and does not invalidate iterators and
|
* in constant time, and does not invalidate iterators and
|
||||||
* references.
|
* references.
|
||||||
*/
|
*/
|
||||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
|
||||||
void
|
void
|
||||||
push_back(const value_type& __x)
|
push_back(const value_type& __x)
|
||||||
{ this->_M_insert(end(), __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>
|
template<typename... _Args>
|
||||||
void
|
void
|
||||||
push_back(_Args&&... __args)
|
emplace_back(_Args&&... __args)
|
||||||
{ this->_M_insert(end(), std::forward<_Args>(__args)...); }
|
{ this->_M_insert(end(), std::forward<_Args>(__args)...); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Queue implementation -*- C++ -*-
|
// 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.
|
// Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// 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
|
* to it. The time complexity of the operation depends on the
|
||||||
* underlying sequence.
|
* underlying sequence.
|
||||||
*/
|
*/
|
||||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
|
||||||
void
|
void
|
||||||
push(const value_type& __x)
|
push(const value_type& __x)
|
||||||
{ c.push_back(__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>
|
template<typename... _Args>
|
||||||
void
|
void
|
||||||
push(_Args&&... __args)
|
emplace(_Args&&... __args)
|
||||||
{ c.push_back(std::forward<_Args>(__args)...); }
|
{ c.emplace_back(std::forward<_Args>(__args)...); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -509,20 +512,26 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||||
* The time complexity of the operation depends on the underlying
|
* The time complexity of the operation depends on the underlying
|
||||||
* sequence.
|
* sequence.
|
||||||
*/
|
*/
|
||||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
|
||||||
void
|
void
|
||||||
push(const value_type& __x)
|
push(const value_type& __x)
|
||||||
{
|
{
|
||||||
c.push_back(__x);
|
c.push_back(__x);
|
||||||
std::push_heap(c.begin(), c.end(), comp);
|
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>
|
template<typename... _Args>
|
||||||
void
|
void
|
||||||
push(_Args&&... __args)
|
emplace(_Args&&... __args)
|
||||||
{
|
{
|
||||||
c.push_back(std::forward<_Args>(__args)...);
|
c.emplace_back(std::forward<_Args>(__args)...);
|
||||||
std::push_heap(c.begin(), c.end(), comp);
|
std::push_heap(c.begin(), c.end(), comp);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Stack implementation -*- C++ -*-
|
// 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.
|
// Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// 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
|
* to it. The time complexity of the operation depends on the
|
||||||
* underlying sequence.
|
* underlying sequence.
|
||||||
*/
|
*/
|
||||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
|
||||||
void
|
void
|
||||||
push(const value_type& __x)
|
push(const value_type& __x)
|
||||||
{ c.push_back(__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>
|
template<typename... _Args>
|
||||||
void
|
void
|
||||||
push(_Args&&... __args)
|
emplace(_Args&&... __args)
|
||||||
{ c.push_back(std::forward<_Args>(__args)...); }
|
{ c.emplace_back(std::forward<_Args>(__args)...); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -681,7 +681,6 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||||
* done in constant time if the %vector has preallocated space
|
* done in constant time if the %vector has preallocated space
|
||||||
* available.
|
* available.
|
||||||
*/
|
*/
|
||||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
|
||||||
void
|
void
|
||||||
push_back(const value_type& __x)
|
push_back(const value_type& __x)
|
||||||
{
|
{
|
||||||
|
@ -693,20 +692,15 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
|
||||||
else
|
else
|
||||||
_M_insert_aux(end(), __x);
|
_M_insert_aux(end(), __x);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
void
|
||||||
|
push_back(value_type&& __x)
|
||||||
|
{ emplace_back(std::move(__x)); }
|
||||||
|
|
||||||
template<typename... _Args>
|
template<typename... _Args>
|
||||||
void
|
void
|
||||||
push_back(_Args&&... __args)
|
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
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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>
|
template<typename _Tp, typename _Alloc>
|
||||||
typename vector<_Tp, _Alloc>::iterator
|
typename vector<_Tp, _Alloc>::iterator
|
||||||
vector<_Tp, _Alloc>::
|
vector<_Tp, _Alloc>::
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Debugging deque implementation -*- C++ -*-
|
// Debugging deque implementation -*- C++ -*-
|
||||||
|
|
||||||
// Copyright (C) 2003, 2004, 2005, 2006, 2007
|
// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
|
||||||
// Free Software Foundation, Inc.
|
// Free Software Foundation, Inc.
|
||||||
//
|
//
|
||||||
// This file is part of the GNU ISO C++ Library. This library is free
|
// 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:
|
// 23.2.1.3 modifiers:
|
||||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
|
||||||
void
|
void
|
||||||
push_front(const _Tp& __x)
|
push_front(const _Tp& __x)
|
||||||
{
|
{
|
||||||
|
@ -268,20 +267,29 @@ namespace __debug
|
||||||
_Base::push_back(__x);
|
_Base::push_back(__x);
|
||||||
this->_M_invalidate_all();
|
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>
|
template<typename... _Args>
|
||||||
void
|
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();
|
this->_M_invalidate_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename... _Args>
|
template<typename... _Args>
|
||||||
void
|
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();
|
this->_M_invalidate_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -280,6 +280,10 @@ namespace __debug
|
||||||
// 23.2.2.3 modifiers:
|
// 23.2.2.3 modifiers:
|
||||||
using _Base::push_front;
|
using _Base::push_front;
|
||||||
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
using _Base::emplace_front;
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
pop_front()
|
pop_front()
|
||||||
{
|
{
|
||||||
|
@ -291,6 +295,10 @@ namespace __debug
|
||||||
|
|
||||||
using _Base::push_back;
|
using _Base::push_back;
|
||||||
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
using _Base::emplace_back;
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
pop_back()
|
pop_back()
|
||||||
{
|
{
|
||||||
|
|
|
@ -289,7 +289,6 @@ namespace __debug
|
||||||
using _Base::data;
|
using _Base::data;
|
||||||
|
|
||||||
// 23.2.4.3 modifiers:
|
// 23.2.4.3 modifiers:
|
||||||
#ifndef __GXX_EXPERIMENTAL_CXX0X__
|
|
||||||
void
|
void
|
||||||
push_back(const _Tp& __x)
|
push_back(const _Tp& __x)
|
||||||
{
|
{
|
||||||
|
@ -299,13 +298,18 @@ namespace __debug
|
||||||
this->_M_invalidate_all();
|
this->_M_invalidate_all();
|
||||||
_M_update_guaranteed_capacity();
|
_M_update_guaranteed_capacity();
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
void
|
||||||
|
push_back(_Tp&& __x)
|
||||||
|
{ emplace_back(std::move(__x)); }
|
||||||
|
|
||||||
template<typename... _Args>
|
template<typename... _Args>
|
||||||
void
|
void
|
||||||
push_back(_Args&&... __args)
|
emplace_back(_Args&&... __args)
|
||||||
{
|
{
|
||||||
bool __realloc = _M_requires_reallocation(this->size() + 1);
|
bool __realloc = _M_requires_reallocation(this->size() + 1);
|
||||||
_Base::push_back(std::forward<_Args>(__args)...);
|
_Base::emplace_back(std::forward<_Args>(__args)...);
|
||||||
if (__realloc)
|
if (__realloc)
|
||||||
this->_M_invalidate_all();
|
this->_M_invalidate_all();
|
||||||
_M_update_guaranteed_capacity();
|
_M_update_guaranteed_capacity();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
|
// 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
|
// 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
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
// USA.
|
// USA.
|
||||||
|
|
||||||
// { dg-do compile }
|
// { dg-do compile }
|
||||||
// { dg-error "no matching" "" { target *-*-* } 1449 }
|
// { dg-error "no matching" "" { target *-*-* } 1436 }
|
||||||
// { dg-excess-errors "" }
|
// { dg-excess-errors "" }
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// USA.
|
// USA.
|
||||||
|
|
||||||
// { dg-do compile }
|
// { dg-do compile }
|
||||||
// { dg-error "no matching" "" { target *-*-* } 1388 }
|
// { dg-error "no matching" "" { target *-*-* } 1375 }
|
||||||
// { dg-excess-errors "" }
|
// { dg-excess-errors "" }
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// USA.
|
// USA.
|
||||||
|
|
||||||
// { dg-do compile }
|
// { dg-do compile }
|
||||||
// { dg-error "no matching" "" { target *-*-* } 1388 }
|
// { dg-error "no matching" "" { target *-*-* } 1375 }
|
||||||
// { dg-excess-errors "" }
|
// { dg-excess-errors "" }
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// USA.
|
// USA.
|
||||||
|
|
||||||
// { dg-do compile }
|
// { dg-do compile }
|
||||||
// { dg-error "no matching" "" { target *-*-* } 1533 }
|
// { dg-error "no matching" "" { target *-*-* } 1520 }
|
||||||
// { dg-excess-errors "" }
|
// { dg-excess-errors "" }
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// USA.
|
// USA.
|
||||||
|
|
||||||
// { dg-do compile }
|
// { dg-do compile }
|
||||||
// { dg-error "no matching" "" { target *-*-* } 1317 }
|
// { dg-error "no matching" "" { target *-*-* } 1325 }
|
||||||
// { dg-excess-errors "" }
|
// { dg-excess-errors "" }
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// USA.
|
// USA.
|
||||||
|
|
||||||
// { dg-do compile }
|
// { dg-do compile }
|
||||||
// { dg-error "no matching" "" { target *-*-* } 1286 }
|
// { dg-error "no matching" "" { target *-*-* } 1294 }
|
||||||
// { dg-excess-errors "" }
|
// { dg-excess-errors "" }
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// USA.
|
// USA.
|
||||||
|
|
||||||
// { dg-do compile }
|
// { dg-do compile }
|
||||||
// { dg-error "no matching" "" { target *-*-* } 1286 }
|
// { dg-error "no matching" "" { target *-*-* } 1294 }
|
||||||
// { dg-excess-errors "" }
|
// { dg-excess-errors "" }
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// USA.
|
// USA.
|
||||||
|
|
||||||
// { dg-do compile }
|
// { dg-do compile }
|
||||||
// { dg-error "no matching" "" { target *-*-* } 1286 }
|
// { dg-error "no matching" "" { target *-*-* } 1294 }
|
||||||
// { dg-excess-errors "" }
|
// { dg-excess-errors "" }
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// USA.
|
// USA.
|
||||||
|
|
||||||
// { dg-do compile }
|
// { dg-do compile }
|
||||||
// { dg-error "no matching" "" { target *-*-* } 992 }
|
// { dg-error "no matching" "" { target *-*-* } 986 }
|
||||||
// { dg-excess-errors "" }
|
// { dg-excess-errors "" }
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// USA.
|
// USA.
|
||||||
|
|
||||||
// { dg-do compile }
|
// { dg-do compile }
|
||||||
// { dg-error "no matching" "" { target *-*-* } 932 }
|
// { dg-error "no matching" "" { target *-*-* } 926 }
|
||||||
// { dg-excess-errors "" }
|
// { dg-excess-errors "" }
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// USA.
|
// USA.
|
||||||
|
|
||||||
// { dg-do compile }
|
// { dg-do compile }
|
||||||
// { dg-error "no matching" "" { target *-*-* } 932 }
|
// { dg-error "no matching" "" { target *-*-* } 926 }
|
||||||
// { dg-excess-errors "" }
|
// { dg-excess-errors "" }
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// 2007-04-27 Paolo Carlini <pcarlini@suse.de>
|
// 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
|
// 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
|
// software; you can redistribute it and/or modify it under the
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
// USA.
|
// USA.
|
||||||
|
|
||||||
// { dg-do compile }
|
// { dg-do compile }
|
||||||
// { dg-error "no matching" "" { target *-*-* } 1033 }
|
// { dg-error "no matching" "" { target *-*-* } 1027 }
|
||||||
// { dg-excess-errors "" }
|
// { dg-excess-errors "" }
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
Loading…
Reference in New Issue