Changed __config to react to all of clang's currently documented has_feature flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@113086 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/set b/include/set
index 2ee4044..110f599 100644
--- a/include/set
+++ b/include/set
@@ -365,10 +365,10 @@
insert(__s.begin(), __s.end());
}
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
set(set&& __s)
: __tree_(_STD::move(__s.__tree_)) {}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
explicit set(const allocator_type& __a)
: __tree_(__a) {}
@@ -379,7 +379,7 @@
insert(__s.begin(), __s.end());
}
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
set(set&& __s, const allocator_type& __a);
#endif
@@ -402,13 +402,13 @@
return *this;
}
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
set& operator=(set&& __s)
{
__tree_ = _STD::move(__s.__tree_);
return *this;
}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
iterator begin() {return __tree_.begin();}
const_iterator begin() const {return __tree_.begin();}
@@ -430,26 +430,26 @@
size_type max_size() const {return __tree_.max_size();}
// modifiers:
-#ifdef _LIBCPP_MOVE
+#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
template <class... _Args>
pair<iterator, bool> emplace(_Args&&... __args)
{return __tree_.__emplace_unique(_STD::forward<_Args>(__args)...);}
template <class... _Args>
iterator emplace_hint(const_iterator __p, _Args&&... __args)
{return __tree_.__emplace_hint_unique(__p, _STD::forward<_Args>(__args)...);}
-#endif // _LIBCPP_MOVE
+#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
pair<iterator,bool> insert(const value_type& __v)
{return __tree_.__insert_unique(__v);}
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
pair<iterator,bool> insert(value_type&& __v)
{return __tree_.__insert_unique(_STD::move(__v));}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
iterator insert(const_iterator __p, const value_type& __v)
{return __tree_.__insert_unique(__p, __v);}
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
iterator insert(const_iterator __p, value_type&& __v)
{return __tree_.__insert_unique(__p, _STD::move(__v));}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _InputIterator>
void insert(_InputIterator __f, _InputIterator __l)
{
@@ -492,7 +492,7 @@
{return __tree_.__equal_range_unique(__k);}
};
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Key, class _Compare, class _Allocator>
set<_Key, _Compare, _Allocator>::set(set&& __s, const allocator_type& __a)
@@ -506,7 +506,7 @@
}
}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Key, class _Compare, class _Allocator>
inline
@@ -631,10 +631,10 @@
insert(__s.begin(), __s.end());
}
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
multiset(multiset&& __s)
: __tree_(_STD::move(__s.__tree_)) {}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
explicit multiset(const allocator_type& __a)
: __tree_(__a) {}
multiset(const multiset& __s, const allocator_type& __a)
@@ -642,7 +642,7 @@
{
insert(__s.begin(), __s.end());
}
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
multiset(multiset&& __s, const allocator_type& __a);
#endif
@@ -665,13 +665,13 @@
return *this;
}
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
multiset& operator=(multiset&& __s)
{
__tree_ = _STD::move(__s.__tree_);
return *this;
}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
iterator begin() {return __tree_.begin();}
const_iterator begin() const {return __tree_.begin();}
@@ -693,26 +693,26 @@
size_type max_size() const {return __tree_.max_size();}
// modifiers:
-#ifdef _LIBCPP_MOVE
+#if !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
template <class... _Args>
iterator emplace(_Args&&... __args)
{return __tree_.__emplace_multi(_STD::forward<_Args>(__args)...);}
template <class... _Args>
iterator emplace_hint(const_iterator __p, _Args&&... __args)
{return __tree_.__emplace_hint_multi(__p, _STD::forward<_Args>(__args)...);}
-#endif // _LIBCPP_MOVE
+#endif // !defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !defined(_LIBCPP_HAS_NO_VARIADICS)
iterator insert(const value_type& __v)
{return __tree_.__insert_multi(__v);}
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
iterator insert(value_type&& __v)
{return __tree_.__insert_multi(_STD::move(__v));}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
iterator insert(const_iterator __p, const value_type& __v)
{return __tree_.__insert_multi(__p, __v);}
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
iterator insert(const_iterator __p, value_type&& __v)
{return __tree_.__insert_multi(_STD::move(__v));}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _InputIterator>
void insert(_InputIterator __f, _InputIterator __l)
{
@@ -754,7 +754,7 @@
{return __tree_.__equal_range_multi(__k);}
};
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Key, class _Compare, class _Allocator>
multiset<_Key, _Compare, _Allocator>::multiset(multiset&& __s, const allocator_type& __a)
@@ -768,7 +768,7 @@
}
}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
template <class _Key, class _Compare, class _Allocator>
inline