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
diff --git a/include/regex b/include/regex
index 9eef160..5e19569 100644
--- a/include/regex
+++ b/include/regex
@@ -2478,12 +2478,14 @@
: __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0),
__end_(0)
{__parse(__first, __last);}
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_regex(initializer_list<value_type> __il,
flag_type __f = regex_constants::ECMAScript)
: __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0),
__end_(0)
{__parse(__il.begin(), __il.end());}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
// ~basic_regex() = default;
@@ -2492,9 +2494,11 @@
_LIBCPP_INLINE_VISIBILITY
basic_regex& operator=(const value_type* __p)
{return assign(__p);}
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
_LIBCPP_INLINE_VISIBILITY
basic_regex& operator=(initializer_list<value_type> __il)
{return assign(__il);}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _ST, class _SA>
_LIBCPP_INLINE_VISIBILITY
basic_regex& operator=(const basic_string<value_type, _ST, _SA>& __p)
@@ -2557,11 +2561,15 @@
__parse(__first, __last);
}
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
_LIBCPP_INLINE_VISIBILITY
basic_regex& assign(initializer_list<value_type> __il,
flag_type __f = regex_constants::ECMAScript)
{return assign(__il.begin(), __il.end(), __f);}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
// const operations:
_LIBCPP_INLINE_VISIBILITY
unsigned mark_count() const {return __marked_count_;}
@@ -6069,11 +6077,13 @@
const regex_type& __re, const vector<int>& __submatches,
regex_constants::match_flag_type __m =
regex_constants::match_default);
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
const regex_type& __re,
initializer_list<int> __submatches,
regex_constants::match_flag_type __m =
regex_constants::match_default);
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <size_t _N>
regex_token_iterator(_BidirectionalIterator __a,
_BidirectionalIterator __b,
@@ -6162,6 +6172,8 @@
__init(__a, __b);
}
+#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
template <class _BidirectionalIterator, class _CharT, class _Traits>
regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
@@ -6175,6 +6187,8 @@
__init(__a, __b);
}
+#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
+
template <class _BidirectionalIterator, class _CharT, class _Traits>
template <size_t _N>
regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::