Allow match_results::position() to return a valid value for partial matches.

[SVN r34324]
This commit is contained in:
John Maddock
2006-06-17 12:48:03 +00:00
parent c666793a92
commit 4f90cd5c91
5 changed files with 21 additions and 13 deletions

View File

@ -94,7 +94,7 @@ public:
if(sub < m_subs.size())
{
const sub_match<BidiIterator>& s = m_subs[sub];
if(s.matched)
if(s.matched || (sub == 2))
{
return ::boost::re_detail::distance((BidiIterator)(m_base), (BidiIterator)(s.first));
}