summaryrefslogtreecommitdiffstats
path: root/include/string
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2011-08-12 21:56:02 +0000
committerHoward Hinnant <hhinnant@apple.com>2011-08-12 21:56:02 +0000
commite3e3291f3ab4af96b0403cf6e255c833143ae3f1 (patch)
tree5f67c4e0415199e69f6f2a7293f894b7c574e990 /include/string
parent8caf423916fd0d4c3b780a39c28e4b11273a2894 (diff)
downloadexternal_libcxx-e3e3291f3ab4af96b0403cf6e255c833143ae3f1.tar.gz
external_libcxx-e3e3291f3ab4af96b0403cf6e255c833143ae3f1.tar.bz2
external_libcxx-e3e3291f3ab4af96b0403cf6e255c833143ae3f1.zip
Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@137522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/string')
-rw-r--r--include/string18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/string b/include/string
index 8d48e0af7..7fdf0d890 100644
--- a/include/string
+++ b/include/string
@@ -1150,10 +1150,12 @@ public:
template<class _InputIterator>
_LIBCPP_INLINE_VISIBILITY
basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a);
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_string(initializer_list<value_type> __il);
_LIBCPP_INLINE_VISIBILITY
basic_string(initializer_list<value_type> __il, const allocator_type& __a);
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
~basic_string();
@@ -1166,8 +1168,10 @@ public:
#endif
_LIBCPP_INLINE_VISIBILITY basic_string& operator=(const_pointer __s) {return assign(__s);}
basic_string& operator=(value_type __c);
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_string& operator=(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
#ifndef _LIBCPP_DEBUG
_LIBCPP_INLINE_VISIBILITY
@@ -1240,7 +1244,9 @@ public:
_LIBCPP_INLINE_VISIBILITY basic_string& operator+=(const basic_string& __str) {return append(__str);}
_LIBCPP_INLINE_VISIBILITY basic_string& operator+=(const_pointer __s) {return append(__s);}
_LIBCPP_INLINE_VISIBILITY basic_string& operator+=(value_type __c) {push_back(__c); return *this;}
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_string& append(const basic_string& __str);
@@ -1263,8 +1269,10 @@ public:
basic_string&
>::type
append(_ForwardIterator __first, _ForwardIterator __last);
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_string& append(initializer_list<value_type> __il) {return append(__il.begin(), __il.size());}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
void push_back(value_type __c);
_LIBCPP_INLINE_VISIBILITY
@@ -1300,8 +1308,10 @@ public:
basic_string&
>::type
assign(_ForwardIterator __first, _ForwardIterator __last);
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_string& assign(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_string& insert(size_type __pos1, const basic_string& __str);
@@ -1327,9 +1337,11 @@ public:
iterator
>::type
insert(const_iterator __pos, _ForwardIterator __first, _ForwardIterator __last);
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
iterator insert(const_iterator __pos, initializer_list<value_type> __il)
{return insert(__pos, __il.begin(), __il.end());}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
basic_string& erase(size_type __pos = 0, size_type __n = npos);
_LIBCPP_INLINE_VISIBILITY
@@ -1358,9 +1370,11 @@ public:
basic_string&
>::type
replace(const_iterator __i1, const_iterator __i2, _InputIterator __j1, _InputIterator __j2);
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_string& replace(const_iterator __i1, const_iterator __i2, initializer_list<value_type> __il)
{return replace(__i1, __i2, __il.begin(), __il.end());}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
size_type copy(pointer __s, size_type __n, size_type __pos = 0) const;
_LIBCPP_INLINE_VISIBILITY
@@ -1942,6 +1956,8 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator __first,
__init(__first, __last);
}
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_INLINE_VISIBILITY inline
basic_string<_CharT, _Traits, _Allocator>::basic_string(initializer_list<value_type> __il)
@@ -1957,6 +1973,8 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(initializer_list<value_t
__init(__il.begin(), __il.end());
}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
template <class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator>::~basic_string()
{