@@ -1524,7 +1524,7 @@ public:
1524
1524
void _Add_class();
1525
1525
void _Add_char_to_class(_Elem _Ch);
1526
1526
void _Add_range2(_Elem, _Elem);
1527
- void _Add_named_class(_Regex_traits_base ::char_class_type, bool = false );
1527
+ void _Add_named_class(typename _RxTraits ::char_class_type, bool);
1528
1528
void _Add_equiv(_FwdIt, _FwdIt, _Difft);
1529
1529
void _Add_coll(_FwdIt, _FwdIt, _Difft);
1530
1530
_Node_base* _Begin_group();
@@ -1548,7 +1548,7 @@ private:
1548
1548
bool _Beg_expr(_Node_base*) const;
1549
1549
void _Add_char_to_bitmap(_Elem _Ch);
1550
1550
void _Add_char_to_array(_Elem _Ch);
1551
- void _Add_elts(_Node_class<_Elem, _RxTraits>*, _Regex_traits_base ::char_class_type, bool);
1551
+ void _Add_elts(_Node_class<_Elem, _RxTraits>*, typename _RxTraits ::char_class_type, bool);
1552
1552
void _Char_to_elts(_FwdIt, _FwdIt, _Difft, _Sequence<_Elem>**);
1553
1553
1554
1554
_Root_node* _Root;
@@ -2935,7 +2935,7 @@ void _Builder<_FwdIt, _Elem, _RxTraits>::_Add_range2(const _Elem _Arg0, const _E
2935
2935
2936
2936
template <class _FwdIt, class _Elem, class _RxTraits>
2937
2937
void _Builder<_FwdIt, _Elem, _RxTraits>::_Add_elts(
2938
- _Node_class<_Elem, _RxTraits>* _Node, _Regex_traits_base ::char_class_type _Cl, bool _Negate) {
2938
+ _Node_class<_Elem, _RxTraits>* _Node, typename _RxTraits ::char_class_type _Cl, bool _Negate) {
2939
2939
// add characters in named class to set
2940
2940
for (unsigned int _Ch = 0; _Ch < _Bmp_max; ++_Ch) { // add elements or their inverse
2941
2941
bool _Matches = _Traits.isctype(static_cast<_Elem>(_Ch), _Cl);
@@ -2950,12 +2950,12 @@ void _Builder<_FwdIt, _Elem, _RxTraits>::_Add_elts(
2950
2950
}
2951
2951
2952
2952
template <class _FwdIt, class _Elem, class _RxTraits>
2953
- void _Builder<_FwdIt, _Elem, _RxTraits>::_Add_named_class(typename _Regex_traits_base ::char_class_type _Cl,
2953
+ void _Builder<_FwdIt, _Elem, _RxTraits>::_Add_named_class(typename _RxTraits ::char_class_type _Cl,
2954
2954
bool _Negate) { // add contents of named class to bracket expression
2955
2955
_Node_class<_Elem, _RxTraits>* _Node = static_cast<_Node_class<_Elem, _RxTraits>*>(_Current);
2956
2956
_Add_elts(_Node, _Cl, _Negate);
2957
- if (_Bmp_max < static_cast<unsigned int>( _STD _Max_limit<_Elem >()) ) {
2958
- _Node->_Classes = static_cast<_Regex_traits_base ::char_class_type>(_Node->_Classes | _Cl);
2957
+ if (_Bmp_max <= _STD _Max_limit<typename _RxTraits::_Uelem >() && !_Negate ) {
2958
+ _Node->_Classes = static_cast<typename _RxTraits ::char_class_type>(_Node->_Classes | _Cl);
2959
2959
}
2960
2960
}
2961
2961
@@ -4023,7 +4023,7 @@ void _Parser<_FwdIt, _Elem, _RxTraits>::_Do_ex_class(
4023
4023
_Error(regex_constants::error_ctype);
4024
4024
}
4025
4025
4026
- _Nfa._Add_named_class(_Cls);
4026
+ _Nfa._Add_named_class(_Cls, false );
4027
4027
} else if (_End_arg == _Meta_equal) { // process =
4028
4028
if (_Beg == _Pat) {
4029
4029
_Error(regex_constants::error_collate);
0 commit comments