Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2011-08-13 01:56:02 +0400
committerHoward Hinnant <hhinnant@apple.com>2011-08-13 01:56:02 +0400
commit54976f2619ab9ccd321acf46dde4c15baeb84694 (patch)
tree43d2d54cc7b628da57bae18fb1031d29fb32896f /libcxx/include/map
parentc53dd2ac01eb3044da996ad5b8d30ef85a18cda5 (diff)
Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574
llvm-svn: 137522
Diffstat (limited to 'libcxx/include/map')
-rw-r--r--libcxx/include/map53
1 files changed, 35 insertions, 18 deletions
diff --git a/libcxx/include/map b/libcxx/include/map
index 2bb352376b96..886aecf2c9f4 100644
--- a/libcxx/include/map
+++ b/libcxx/include/map
@@ -774,6 +774,18 @@ public:
map(map&& __m, const allocator_type& __a);
_LIBCPP_INLINE_VISIBILITY
+ map& operator=(map&& __m)
+ _NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
+ {
+ __tree_ = _VSTD::move(__m.__tree_);
+ return *this;
+ }
+
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
+ _LIBCPP_INLINE_VISIBILITY
map(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
: __tree_(__vc(__comp))
{
@@ -788,21 +800,13 @@ public:
}
_LIBCPP_INLINE_VISIBILITY
- map& operator=(map&& __m)
- _NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
- {
- __tree_ = _VSTD::move(__m.__tree_);
- return *this;
- }
-
- _LIBCPP_INLINE_VISIBILITY
map& operator=(initializer_list<value_type> __il)
{
__tree_.__assign_unique(__il.begin(), __il.end());
return *this;
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
explicit map(const allocator_type& __a)
@@ -943,10 +947,14 @@ public:
insert(__e.__i_, *__f);
}
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
_LIBCPP_INLINE_VISIBILITY
void insert(initializer_list<value_type> __il)
{insert(__il.begin(), __il.end());}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
_LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);}
_LIBCPP_INLINE_VISIBILITY
@@ -1523,6 +1531,18 @@ public:
multimap(multimap&& __m, const allocator_type& __a);
_LIBCPP_INLINE_VISIBILITY
+ multimap& operator=(multimap&& __m)
+ _NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
+ {
+ __tree_ = _VSTD::move(__m.__tree_);
+ return *this;
+ }
+
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
+ _LIBCPP_INLINE_VISIBILITY
multimap(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
: __tree_(__vc(__comp))
{
@@ -1537,20 +1557,13 @@ public:
}
_LIBCPP_INLINE_VISIBILITY
- multimap& operator=(multimap&& __m)
- _NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
- {
- __tree_ = _VSTD::move(__m.__tree_);
- return *this;
- }
-
- _LIBCPP_INLINE_VISIBILITY
multimap& operator=(initializer_list<value_type> __il)
{
__tree_.__assign_multi(__il.begin(), __il.end());
return *this;
}
-#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
+
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
explicit multimap(const allocator_type& __a)
@@ -1679,10 +1692,14 @@ public:
__tree_.__insert_multi(__e.__i_, *__f);
}
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
_LIBCPP_INLINE_VISIBILITY
void insert(initializer_list<value_type> __il)
{insert(__il.begin(), __il.end());}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
_LIBCPP_INLINE_VISIBILITY
iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);}
_LIBCPP_INLINE_VISIBILITY