mirror of
https://github.com/boostorg/regex.git
synced 2025-07-17 06:12:10 +02:00
Added BOOST_REGEX_V3 compatibilty workarounds.
[SVN r21288]
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user