diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 754918672b5..05a21602909 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,13 @@ +2007-10-17 Paolo Carlini + + * include/bits/stl_iterator.h (back_insert_iterator<>::operator= + (typename _Container::value_type&&), front_insert_iterator<>:: + operator=(typename _Container::value_type&&), insert_iterator<>:: + operator=(typename _Container::value_type&&)): Add. + + * include/bits/stl_iterator.h (insert_iterator<>::operator= + (typename _Container::const_reference)): Fix typo in signature. + 2007-10-17 Paolo Carlini * include/tr1_impl/array: Correct macro guarding cbegin, cend, diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h index ac561eee351..280f7028720 100644 --- a/libstdc++-v3/include/bits/stl_iterator.h +++ b/libstdc++-v3/include/bits/stl_iterator.h @@ -68,6 +68,7 @@ #include #include +#include _GLIBCXX_BEGIN_NAMESPACE(std) @@ -414,6 +415,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return *this; } +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + back_insert_iterator& + operator=(typename _Container::value_type&& __value) + { + container->push_back(std::move(__value)); + return *this; + } +#endif + /// Simply returns *this. back_insert_iterator& operator*() @@ -488,6 +498,15 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return *this; } +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + front_insert_iterator& + operator=(typename _Container::value_type&& __value) + { + container->push_front(std::move(__value)); + return *this; + } +#endif + /// Simply returns *this. front_insert_iterator& operator*() @@ -577,13 +596,23 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * @endcode */ insert_iterator& - operator=(const typename _Container::const_reference __value) + operator=(typename _Container::const_reference __value) { iter = container->insert(iter, __value); ++iter; return *this; } +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + insert_iterator& + operator=(typename _Container::value_type&& __value) + { + iter = container->insert(iter, std::move(__value)); + ++iter; + return *this; + } +#endif + /// Simply returns *this. insert_iterator& operator*()