diff options
Diffstat (limited to 'libstdc++-v3/include/tr1_impl/unordered_set')
-rw-r--r-- | libstdc++-v3/include/tr1_impl/unordered_set | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/libstdc++-v3/include/tr1_impl/unordered_set b/libstdc++-v3/include/tr1_impl/unordered_set index 2292d365979..bdc1575a445 100644 --- a/libstdc++-v3/include/tr1_impl/unordered_set +++ b/libstdc++-v3/include/tr1_impl/unordered_set @@ -85,6 +85,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 __detail::_Default_ranged_hash(), __eql, std::_Identity<_Value>(), __a) { } + +#ifdef _GLIBCXX_INCLUDE_AS_CXX0X + __unordered_set(__unordered_set&& __x) + : _Base(std::forward<_Base>(__x)) { } +#endif }; template<class _Value, @@ -135,6 +140,11 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 __detail::_Default_ranged_hash(), __eql, std::_Identity<_Value>(), __a) { } + +#ifdef _GLIBCXX_INCLUDE_AS_CXX0X + __unordered_multiset(__unordered_multiset&& __x) + : _Base(std::forward<_Base>(__x)) { } +#endif }; template<class _Value, class _Hash, class _Pred, class _Alloc, @@ -187,6 +197,20 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 const allocator_type& __a = allocator_type()) : _Base(__f, __l, __n, __hf, __eql, __a) { } + +#ifdef _GLIBCXX_INCLUDE_AS_CXX0X + unordered_set(unordered_set&& __x) + : _Base(std::forward<_Base>(__x)) { } + + unordered_set& + operator=(unordered_set&& __x) + { + // NB: DR 675. + this->clear(); + this->swap(__x); + return *this; + } +#endif }; template<class _Value, @@ -221,7 +245,59 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 const allocator_type& __a = allocator_type()) : _Base(__f, __l, __n, __hf, __eql, __a) { } + +#ifdef _GLIBCXX_INCLUDE_AS_CXX0X + unordered_multiset(unordered_multiset&& __x) + : _Base(std::forward<_Base>(__x)) { } + + unordered_multiset& + operator=(unordered_multiset&& __x) + { + // NB: DR 675. + this->clear(); + this->swap(__x); + return *this; + } +#endif }; + template<class _Value, class _Hash, class _Pred, class _Alloc> + inline void + swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, + unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) + { __x.swap(__y); } + + template<class _Value, class _Hash, class _Pred, class _Alloc> + inline void + swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, + unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) + { __x.swap(__y); } + +#ifdef _GLIBCXX_INCLUDE_AS_CXX0X + template<class _Value, class _Hash, class _Pred, class _Alloc> + inline void + swap(unordered_set<_Value, _Hash, _Pred, _Alloc>&& __x, + unordered_set<_Value, _Hash, _Pred, _Alloc>& __y) + { __x.swap(__y); } + + template<class _Value, class _Hash, class _Pred, class _Alloc> + inline void + swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, + unordered_set<_Value, _Hash, _Pred, _Alloc>&& __y) + { __x.swap(__y); } + + template<class _Value, class _Hash, class _Pred, class _Alloc> + inline void + swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __x, + unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y) + { __x.swap(__y); } + + template<class _Value, class _Hash, class _Pred, class _Alloc> + inline void + swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, + unordered_multiset<_Value, _Hash, _Pred, _Alloc>&& __y) + { __x.swap(__y); } +#endif + _GLIBCXX_END_NAMESPACE_TR1 } |