aboutsummaryrefslogtreecommitdiff
path: root/system/include/libcxx/regex
diff options
context:
space:
mode:
Diffstat (limited to 'system/include/libcxx/regex')
-rw-r--r--system/include/libcxx/regex43
1 files changed, 23 insertions, 20 deletions
diff --git a/system/include/libcxx/regex b/system/include/libcxx/regex
index bde3af7e..ffe39cf1 100644
--- a/system/include/libcxx/regex
+++ b/system/include/libcxx/regex
@@ -925,7 +925,7 @@ public:
};
template <class _CharT>
-struct _LIBCPP_TYPE_VIS regex_traits
+struct _LIBCPP_TYPE_VIS_ONLY regex_traits
{
public:
typedef _CharT char_type;
@@ -970,7 +970,7 @@ public:
bool isctype(char_type __c, char_class_type __m) const;
_LIBCPP_INLINE_VISIBILITY
int value(char_type __ch, int __radix) const
- {return __value(__ch, __radix);}
+ {return __regex_traits_value(__ch, __radix);}
locale_type imbue(locale_type __l);
_LIBCPP_INLINE_VISIBILITY
locale_type getloc()const {return __loc_;}
@@ -1001,11 +1001,11 @@ private:
__lookup_classname(_ForwardIterator __f, _ForwardIterator __l,
bool __icase, wchar_t) const;
- static int __value(unsigned char __ch, int __radix);
+ static int __regex_traits_value(unsigned char __ch, int __radix);
_LIBCPP_INLINE_VISIBILITY
- int __value(char __ch, int __radix) const
- {return __value(static_cast<unsigned char>(__ch), __radix);}
- int __value(wchar_t __ch, int __radix) const;
+ int __regex_traits_value(char __ch, int __radix) const
+ {return __regex_traits_value(static_cast<unsigned char>(__ch), __radix);}
+ int __regex_traits_value(wchar_t __ch, int __radix) const;
};
template <class _CharT>
@@ -1100,7 +1100,7 @@ regex_traits<_CharT>::__transform_primary(_ForwardIterator __f,
// lookup_collatename is very FreeBSD-specific
-string __get_collation_name(const char* __s);
+_LIBCPP_FUNC_VIS string __get_collation_name(const char* __s);
template <class _CharT>
template <class _ForwardIterator>
@@ -1161,7 +1161,7 @@ regex_traits<_CharT>::__lookup_collatename(_ForwardIterator __f,
// lookup_classname
-ctype_base::mask __get_classname(const char* __s, bool __icase);
+ctype_base::mask _LIBCPP_FUNC_VIS __get_classname(const char* __s, bool __icase);
template <class _CharT>
template <class _ForwardIterator>
@@ -1207,7 +1207,7 @@ regex_traits<_CharT>::isctype(char_type __c, char_class_type __m) const
template <class _CharT>
int
-regex_traits<_CharT>::__value(unsigned char __ch, int __radix)
+regex_traits<_CharT>::__regex_traits_value(unsigned char __ch, int __radix)
{
if ((__ch & 0xF8u) == 0x30) // '0' <= __ch && __ch <= '7'
return __ch - '0';
@@ -1228,18 +1228,18 @@ regex_traits<_CharT>::__value(unsigned char __ch, int __radix)
template <class _CharT>
inline _LIBCPP_INLINE_VISIBILITY
int
-regex_traits<_CharT>::__value(wchar_t __ch, int __radix) const
+regex_traits<_CharT>::__regex_traits_value(wchar_t __ch, int __radix) const
{
- return __value(static_cast<unsigned char>(__ct_->narrow(__ch, char_type())), __radix);
+ return __regex_traits_value(static_cast<unsigned char>(__ct_->narrow(__ch, char_type())), __radix);
}
template <class _CharT> class __node;
-template <class _BidirectionalIterator> class _LIBCPP_TYPE_VIS sub_match;
+template <class _BidirectionalIterator> class _LIBCPP_TYPE_VIS_ONLY sub_match;
template <class _BidirectionalIterator,
class _Allocator = allocator<sub_match<_BidirectionalIterator> > >
-class _LIBCPP_TYPE_VIS match_results;
+class _LIBCPP_TYPE_VIS_ONLY match_results;
template <class _CharT>
struct __state
@@ -2014,6 +2014,9 @@ public:
virtual void __exec(__state&) const;
};
+template <> _LIBCPP_FUNC_VIS void __match_any_but_newline<char>::__exec(__state&) const;
+template <> _LIBCPP_FUNC_VIS void __match_any_but_newline<wchar_t>::__exec(__state&) const;
+
// __match_char
template <class _CharT>
@@ -2415,7 +2418,7 @@ __exit:
template <class _CharT, class _Traits> class __lookahead;
template <class _CharT, class _Traits = regex_traits<_CharT> >
-class _LIBCPP_TYPE_VIS basic_regex
+class _LIBCPP_TYPE_VIS_ONLY basic_regex
{
public:
// types:
@@ -3782,7 +3785,7 @@ basic_regex<_CharT, _Traits>::__parse_expression_term(_ForwardIterator __first,
}
__ml->__add_range(_VSTD::move(__start_range), _VSTD::move(__end_range));
}
- else
+ else if (!__start_range.empty())
{
if (__start_range.size() == 1)
__ml->__add_char(__start_range[0]);
@@ -3790,7 +3793,7 @@ basic_regex<_CharT, _Traits>::__parse_expression_term(_ForwardIterator __first,
__ml->__add_digraph(__start_range[0], __start_range[1]);
}
}
- else
+ else if (!__start_range.empty())
{
if (__start_range.size() == 1)
__ml->__add_char(__start_range[0]);
@@ -4781,7 +4784,7 @@ typedef basic_regex<wchar_t> wregex;
// sub_match
template <class _BidirectionalIterator>
-class _LIBCPP_TYPE_VIS sub_match
+class _LIBCPP_TYPE_VIS_ONLY sub_match
: public pair<_BidirectionalIterator, _BidirectionalIterator>
{
public:
@@ -5204,7 +5207,7 @@ operator<<(basic_ostream<_CharT, _ST>& __os, const sub_match<_BiIter>& __m)
}
template <class _BidirectionalIterator, class _Allocator>
-class _LIBCPP_TYPE_VIS match_results
+class _LIBCPP_TYPE_VIS_ONLY match_results
{
public:
typedef _Allocator allocator_type;
@@ -6007,7 +6010,7 @@ regex_match(const basic_string<_CharT, _ST, _SA>& __s,
template <class _BidirectionalIterator,
class _CharT = typename iterator_traits<_BidirectionalIterator>::value_type,
class _Traits = regex_traits<_CharT> >
-class _LIBCPP_TYPE_VIS regex_iterator
+class _LIBCPP_TYPE_VIS_ONLY regex_iterator
{
public:
typedef basic_regex<_CharT, _Traits> regex_type;
@@ -6119,7 +6122,7 @@ typedef regex_iterator<wstring::const_iterator> wsregex_iterator;
template <class _BidirectionalIterator,
class _CharT = typename iterator_traits<_BidirectionalIterator>::value_type,
class _Traits = regex_traits<_CharT> >
-class _LIBCPP_TYPE_VIS regex_token_iterator
+class _LIBCPP_TYPE_VIS_ONLY regex_token_iterator
{
public:
typedef basic_regex<_CharT, _Traits> regex_type;