mirror of
https://github.com/boostorg/regex.git
synced 2025-07-17 06:12:10 +02:00
HP aCC patches.
[SVN r23147]
This commit is contained in:
@ -379,7 +379,7 @@ int BOOST_REGEX_CALL cpp_regex_traits<char>::toi(char c)const
|
|||||||
|
|
||||||
int BOOST_REGEX_CALL cpp_regex_traits<char>::toi(const char*& first, const char* last, int radix)const
|
int BOOST_REGEX_CALL cpp_regex_traits<char>::toi(const char*& first, const char* last, int radix)const
|
||||||
{
|
{
|
||||||
pmd->sbuf.pubsetbuf(const_cast<char*>(first), static_cast<std::streamsize>(last-first));
|
pmd->sbuf.pubsetbuf(const_cast<char*>(static_cast<const char*>(first)), static_cast<std::streamsize>(last-first));
|
||||||
pmd->is.clear();
|
pmd->is.clear();
|
||||||
if(std::abs(radix) == 16) pmd->is >> std::hex;
|
if(std::abs(radix) == 16) pmd->is >> std::hex;
|
||||||
else if(std::abs(radix) == 8) pmd->is >> std::oct;
|
else if(std::abs(radix) == 8) pmd->is >> std::oct;
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <boost/cregex.hpp>
|
#include <boost/cregex.hpp>
|
||||||
#include <boost/regex.hpp>
|
#include <boost/regex.hpp>
|
||||||
|
#include <boost/integer_traits.hpp>
|
||||||
#if !defined(BOOST_NO_STD_STRING)
|
#if !defined(BOOST_NO_STD_STRING)
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <list>
|
#include <list>
|
||||||
@ -113,7 +114,7 @@ void RegExData::update()
|
|||||||
for(unsigned int i = 0; i < m.size(); ++i)
|
for(unsigned int i = 0; i < m.size(); ++i)
|
||||||
{
|
{
|
||||||
if(m[i].matched) strings[i] = std::string(m[i].first, m[i].second);
|
if(m[i].matched) strings[i] = std::string(m[i].first, m[i].second);
|
||||||
positions[i] = m[i].matched ? m[i].first - pbase : -1;
|
positions[i] = m[i].matched ? m[i].first - pbase : RegEx::npos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef BOOST_REGEX_NO_FILEITER
|
#ifndef BOOST_REGEX_NO_FILEITER
|
||||||
@ -122,7 +123,7 @@ void RegExData::update()
|
|||||||
for(unsigned int i = 0; i < fm.size(); ++i)
|
for(unsigned int i = 0; i < fm.size(); ++i)
|
||||||
{
|
{
|
||||||
if(fm[i].matched) strings[i] = to_string(fm[i].first, fm[i].second);
|
if(fm[i].matched) strings[i] = to_string(fm[i].first, fm[i].second);
|
||||||
positions[i] = fm[i].matched ? fm[i].first - fbase : -1;
|
positions[i] = fm[i].matched ? fm[i].first - fbase : RegEx::npos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -585,8 +586,13 @@ std::string RegEx::What(int i)const
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
const unsigned int RegEx::npos = ~0u;
|
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||||
|
const std::size_t RegEx::npos = ::boost::integer_traits<std::size_t>::const_max;
|
||||||
|
#elif defined(BOOST_HAS_LONG_LONG)
|
||||||
|
const std::size_t RegEx::npos = ~0ULL;
|
||||||
|
#else
|
||||||
|
const std::size_t RegEx::npos = ~0UL;
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user