|
@@ -208,6 +208,8 @@ public:
|
|
|
|
|
|
bool matched;
|
|
bool matched;
|
|
|
|
|
|
|
|
+ constexpr sub_match();
|
|
|
|
+
|
|
difference_type length() const;
|
|
difference_type length() const;
|
|
operator string_type() const;
|
|
operator string_type() const;
|
|
string_type str() const;
|
|
string_type str() const;
|
|
@@ -452,6 +454,8 @@ public:
|
|
match_results& operator=(match_results&& m);
|
|
match_results& operator=(match_results&& m);
|
|
~match_results();
|
|
~match_results();
|
|
|
|
|
|
|
|
+ bool ready() const;
|
|
|
|
+
|
|
// size:
|
|
// size:
|
|
size_type size() const;
|
|
size_type size() const;
|
|
size_type max_size() const;
|
|
size_type max_size() const;
|
|
@@ -4683,6 +4687,9 @@ public:
|
|
|
|
|
|
bool matched;
|
|
bool matched;
|
|
|
|
|
|
|
|
+ _LIBCPP_INLINE_VISIBILITY
|
|
|
|
+ /*constexpr*/ sub_match() : matched() {}
|
|
|
|
+
|
|
_LIBCPP_INLINE_VISIBILITY
|
|
_LIBCPP_INLINE_VISIBILITY
|
|
difference_type length() const
|
|
difference_type length() const
|
|
{return matched ? _STD::distance(this->first, this->second) : 0;}
|
|
{return matched ? _STD::distance(this->first, this->second) : 0;}
|
|
@@ -5104,6 +5111,7 @@ private:
|
|
value_type __unmatched_;
|
|
value_type __unmatched_;
|
|
value_type __prefix_;
|
|
value_type __prefix_;
|
|
value_type __suffix_;
|
|
value_type __suffix_;
|
|
|
|
+ bool __ready_;
|
|
public:
|
|
public:
|
|
_BidirectionalIterator __position_start_;
|
|
_BidirectionalIterator __position_start_;
|
|
typedef const value_type& const_reference;
|
|
typedef const value_type& const_reference;
|
|
@@ -5123,6 +5131,9 @@ public:
|
|
// match_results& operator=(match_results&& __m) = default;
|
|
// match_results& operator=(match_results&& __m) = default;
|
|
// ~match_results() = default;
|
|
// ~match_results() = default;
|
|
|
|
|
|
|
|
+ _LIBCPP_INLINE_VISIBILITY
|
|
|
|
+ bool ready() const {return __ready_;}
|
|
|
|
+
|
|
// size:
|
|
// size:
|
|
_LIBCPP_INLINE_VISIBILITY
|
|
_LIBCPP_INLINE_VISIBILITY
|
|
size_type size() const {return __matches_.size();}
|
|
size_type size() const {return __matches_.size();}
|
|
@@ -5224,6 +5235,7 @@ public:
|
|
__suffix_.matched = __m.suffix().matched;
|
|
__suffix_.matched = __m.suffix().matched;
|
|
if (!__no_update_pos)
|
|
if (!__no_update_pos)
|
|
__position_start_ = __prefix_.first;
|
|
__position_start_ = __prefix_.first;
|
|
|
|
+ __ready_ = __m.ready();
|
|
}
|
|
}
|
|
|
|
|
|
private:
|
|
private:
|
|
@@ -5254,7 +5266,8 @@ match_results<_BidirectionalIterator, _Allocator>::match_results(
|
|
__unmatched_(),
|
|
__unmatched_(),
|
|
__prefix_(),
|
|
__prefix_(),
|
|
__suffix_(),
|
|
__suffix_(),
|
|
- __position_start_()
|
|
|
|
|
|
+ __position_start_(),
|
|
|
|
+ __ready_(false)
|
|
{
|
|
{
|
|
}
|
|
}
|
|
|
|
|
|
@@ -5274,6 +5287,7 @@ match_results<_BidirectionalIterator, _Allocator>::__init(unsigned __s,
|
|
__suffix_ = __unmatched_;
|
|
__suffix_ = __unmatched_;
|
|
if (!__no_update_pos)
|
|
if (!__no_update_pos)
|
|
__position_start_ = __prefix_.first;
|
|
__position_start_ = __prefix_.first;
|
|
|
|
+ __ready_ = true;
|
|
}
|
|
}
|
|
|
|
|
|
template <class _BidirectionalIterator, class _Allocator>
|
|
template <class _BidirectionalIterator, class _Allocator>
|
|
@@ -5379,6 +5393,7 @@ match_results<_BidirectionalIterator, _Allocator>::swap(match_results& __m)
|
|
swap(__prefix_, __m.__prefix_);
|
|
swap(__prefix_, __m.__prefix_);
|
|
swap(__suffix_, __m.__suffix_);
|
|
swap(__suffix_, __m.__suffix_);
|
|
swap(__position_start_, __m.__position_start_);
|
|
swap(__position_start_, __m.__position_start_);
|
|
|
|
+ swap(__ready_, __m.__ready_);
|
|
}
|
|
}
|
|
|
|
|
|
typedef match_results<const char*> cmatch;
|
|
typedef match_results<const char*> cmatch;
|
|
@@ -5391,10 +5406,13 @@ bool
|
|
operator==(const match_results<_BidirectionalIterator, _Allocator>& __x,
|
|
operator==(const match_results<_BidirectionalIterator, _Allocator>& __x,
|
|
const match_results<_BidirectionalIterator, _Allocator>& __y)
|
|
const match_results<_BidirectionalIterator, _Allocator>& __y)
|
|
{
|
|
{
|
|
|
|
+ if (__x.__ready_ != __y.__ready_)
|
|
|
|
+ return false;
|
|
|
|
+ if (!__x.__ready_)
|
|
|
|
+ return true;
|
|
return __x.__matches_ == __y.__matches_ &&
|
|
return __x.__matches_ == __y.__matches_ &&
|
|
__x.__prefix_ == __y.__prefix_ &&
|
|
__x.__prefix_ == __y.__prefix_ &&
|
|
- __x.__suffix_ == __y.__suffix_ &&
|
|
|
|
- __x.__position_start_ == __y.__position_start_;
|
|
|
|
|
|
+ __x.__suffix_ == __y.__suffix_;
|
|
}
|
|
}
|
|
|
|
|
|
template <class _BidirectionalIterator, class _Allocator>
|
|
template <class _BidirectionalIterator, class _Allocator>
|