diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-11 11:46:10 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-11 11:46:10 +0000 |
commit | 28d4f5d262ae9d43999545bbdfe4c1f228a72683 (patch) | |
tree | 0184e79d28fd8a7efea4d00614f785f17738456f /libstdc++-v3/include/bits/list.tcc | |
parent | f0c48ecc7783d07ebe5c769549161774cbcf83c3 (diff) | |
download | ppe42-gcc-28d4f5d262ae9d43999545bbdfe4c1f228a72683.tar.gz ppe42-gcc-28d4f5d262ae9d43999545bbdfe4c1f228a72683.zip |
2007-11-11 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_list.h (list<>::_M_create_node<>(_Args&&...),
_M_insert<>(iterator, _Args&&...), push_front<>(_Args&&...),
push_back<>(_Args&&...)): Add.
(list<>::emplace<>(iterator, _Args&&...), insert(iterator,
value_type&&)): Declare.
(splice(iterator, list&&), splice(iterator, list&&, iterator),
splice(iterator, list&&, iterator, iterator), merge(list&&),
merge(list&&, _StrictWeakOrdering)): Add C++0x signatures.
* include/bits/list.tcc (list<>::emplace<>(iterator, _Args&&...),
insert(iterator, value_type&&)): Define.
* include/debug/list (list<>::emplace<>(iterator, _Args&&...),
insert(iterator, value_type&&)): Add.
(splice(iterator, list&&), splice(iterator, list&&, iterator),
splice(iterator, list&&, iterator, iterator), merge(list&&),
merge(list&&, _StrictWeakOrdering)): Add C++0x signatures, use
_GLIBCXX_MOVE.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130082 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/list.tcc')
-rw-r--r-- | libstdc++-v3/include/bits/list.tcc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/list.tcc b/libstdc++-v3/include/bits/list.tcc index 3fdc5bbac55..a7fcfb395ff 100644 --- a/libstdc++-v3/include/bits/list.tcc +++ b/libstdc++-v3/include/bits/list.tcc @@ -80,6 +80,19 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) } } +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + template<typename _Tp, typename _Alloc> + template<typename... _Args> + typename list<_Tp, _Alloc>::iterator + list<_Tp, _Alloc>:: + emplace(iterator __position, _Args&&... __args) + { + _Node* __tmp = _M_create_node(std::forward<_Args>(__args)...); + __tmp->hook(__position._M_node); + return iterator(__tmp); + } +#endif + template<typename _Tp, typename _Alloc> typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>:: @@ -90,6 +103,18 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) return iterator(__tmp); } +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + template<typename _Tp, typename _Alloc> + typename list<_Tp, _Alloc>::iterator + list<_Tp, _Alloc>:: + insert(iterator __position, value_type&& __x) + { + _Node* __tmp = _M_create_node(std::move(__x)); + __tmp->hook(__position._M_node); + return iterator(__tmp); + } +#endif + template<typename _Tp, typename _Alloc> typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>:: @@ -220,7 +245,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) template<typename _Tp, typename _Alloc> void list<_Tp, _Alloc>:: +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + merge(list&& __x) +#else merge(list& __x) +#endif { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 300. list::merge() specification incomplete @@ -250,7 +279,11 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D) template <typename _StrictWeakOrdering> void list<_Tp, _Alloc>:: +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + merge(list&& __x, _StrictWeakOrdering __comp) +#else merge(list& __x, _StrictWeakOrdering __comp) +#endif { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 300. list::merge() specification incomplete |