summaryrefslogtreecommitdiffstats
path: root/libcxx/include/regex
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/regex')
-rw-r--r--libcxx/include/regex14
1 files changed, 14 insertions, 0 deletions
diff --git a/libcxx/include/regex b/libcxx/include/regex
index ed0781c91f3..612fa84ce30 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -192,6 +192,11 @@ public:
void swap(basic_regex&);
};
+template<class ForwardIterator>
+basic_regex(ForwardIterator, ForwardIterator,
+ regex_constants::syntax_option_type = regex_constants::ECMAScript)
+ -> basic_regex<typename iterator_traits<ForwardIterator>::value_type>; // C++17
+
typedef basic_regex<char> regex;
typedef basic_regex<wchar_t> wregex;
@@ -2922,6 +2927,15 @@ private:
template <class, class> friend class __lookahead;
};
+#ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES
+template <class _ForwardIterator,
+ class = typename enable_if<__is_forward_iterator<_ForwardIterator>::value, nullptr_t>::type
+>
+basic_regex(_ForwardIterator, _ForwardIterator,
+ regex_constants::syntax_option_type = regex_constants::ECMAScript)
+ -> basic_regex<typename iterator_traits<_ForwardIterator>::value_type>;
+#endif
+
template <class _CharT, class _Traits>
const regex_constants::syntax_option_type basic_regex<_CharT, _Traits>::icase;
template <class _CharT, class _Traits>
OpenPOWER on IntegriCloud