aboutsummaryrefslogtreecommitdiff
path: root/contrib/libc++/include/regex
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-08-02 17:05:36 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-08-02 17:05:36 +0000
commit42cc09696338406730ddb31d83d0eef9f6ade00d (patch)
tree1e356aecd066d44753fe780182fb33dfe975ec09 /contrib/libc++/include/regex
parent532d8940413fecc52ce0e4df93d1a6fef0cb28bd (diff)
parentf36202620b428c45a1c8d91743727c9313424fb2 (diff)
Merge libc++ trunk r338150, and resolve conflicts.
Notes
Notes: svn path=/projects/clang700-import/; revision=337135
Diffstat (limited to 'contrib/libc++/include/regex')
-rw-r--r--contrib/libc++/include/regex18
1 files changed, 16 insertions, 2 deletions
diff --git a/contrib/libc++/include/regex b/contrib/libc++/include/regex
index ff84b2738b78..84aacc029edc 100644
--- a/contrib/libc++/include/regex
+++ b/contrib/libc++/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;
@@ -963,7 +968,7 @@ public:
};
template <regex_constants::error_type _Ev>
-_LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE
+_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_regex_error()
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -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>
@@ -4013,7 +4027,7 @@ basic_regex<_CharT, _Traits>::__parse_character_class(_ForwardIterator __first,
char_class_type __class_type =
__traits_.lookup_classname(__first, __temp, __flags_ & icase);
if (__class_type == 0)
- __throw_regex_error<regex_constants::error_brack>();
+ __throw_regex_error<regex_constants::error_ctype>();
__ml->__add_class(__class_type);
__first = _VSTD::next(__temp, 2);
return __first;