Added BOOST_REGEX_V3 compatibilty workarounds.

[SVN r21288]
This commit is contained in:
John Maddock
2003-12-16 13:06:01 +00:00
parent 2c3ff62e1b
commit b84b17b3c4
6 changed files with 22 additions and 2 deletions

View File

@ -449,6 +449,10 @@ unsigned int RegEx::FindFiles(FindFilesCallback cb, const char* files, bool recu
}
#endif
#ifdef BOOST_REGEX_V3
#define regex_replace regex_merge
#endif
std::string RegEx::Merge(const std::string& in, const std::string& fmt,
bool copy, match_flag_type flags)
{

View File

@ -61,7 +61,9 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA* expression, const char
if(f & REG_NOCOLLATE)
{
flags |= regex::nocollate;
#ifndef BOOST_REGEX_V3
flags &= ~regex::collate;
#endif
}
if(f & REG_NOSUB)

View File

@ -60,6 +60,7 @@ namespace re_detail{
//
BOOST_REGEX_DECL void BOOST_REGEX_CALL verify_options(boost::regex::flag_type /*ef*/, match_flag_type mf)
{
#ifndef BOOST_REGEX_V3
//
// can't mix match_extra with POSIX matching rules:
//
@ -68,6 +69,7 @@ BOOST_REGEX_DECL void BOOST_REGEX_CALL verify_options(boost::regex::flag_type /*
std::logic_error msg("Usage Error: Can't mix regular expression captures with POSIX matching rules");
throw_exception(msg);
}
#endif
}
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD

View File

@ -69,7 +69,9 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW* expression, const wcha
if(f & REG_NOCOLLATE)
{
flags |= wregex::nocollate;
#ifndef BOOST_REGEX_V3
flags &= ~wregex::collate;
#endif
}
if(f & REG_NOSUB)