diff options
author | Howard Hinnant <hhinnant@apple.com> | 2011-08-13 01:56:02 +0400 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2011-08-13 01:56:02 +0400 |
commit | 54976f2619ab9ccd321acf46dde4c15baeb84694 (patch) | |
tree | 43d2d54cc7b628da57bae18fb1031d29fb32896f /libcxx/include/string | |
parent | c53dd2ac01eb3044da996ad5b8d30ef85a18cda5 (diff) |
Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574
llvm-svn: 137522
Diffstat (limited to 'libcxx/include/string')
-rw-r--r-- | libcxx/include/string | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libcxx/include/string b/libcxx/include/string index 8d48e0af7d2f..7fdf0d890614 100644 --- a/libcxx/include/string +++ b/libcxx/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() { |