forked from boostorg/regex
Big workaround removal.
This commit is contained in:
@ -58,11 +58,7 @@ bool regex_search(BidiIterator first, BidiIterator last,
|
||||
|
||||
//
|
||||
// regex_search convenience interfaces:
|
||||
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
//
|
||||
// this isn't really a partial specialisation, but template function
|
||||
// overloading - if the compiler doesn't support partial specialisation
|
||||
// then it really won't support this either:
|
||||
template <class charT, class Allocator, class traits>
|
||||
inline bool regex_search(const charT* str,
|
||||
match_results<const charT*, Allocator>& m,
|
||||
@ -80,56 +76,6 @@ inline bool regex_search(const std::basic_string<charT, ST, SA>& s,
|
||||
{
|
||||
return regex_search(s.begin(), s.end(), m, e, flags);
|
||||
}
|
||||
#else // partial overloads:
|
||||
inline bool regex_search(const char* str,
|
||||
cmatch& m,
|
||||
const regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return regex_search(str, str + regex::traits_type::length(str), m, e, flags);
|
||||
}
|
||||
inline bool regex_search(const char* first, const char* last,
|
||||
const regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
cmatch m;
|
||||
return regex_search(first, last, m, e, flags | regex_constants::match_any);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
inline bool regex_search(const wchar_t* str,
|
||||
wcmatch& m,
|
||||
const wregex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return regex_search(str, str + wregex::traits_type::length(str), m, e, flags);
|
||||
}
|
||||
inline bool regex_search(const wchar_t* first, const wchar_t* last,
|
||||
const wregex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
wcmatch m;
|
||||
return regex_search(first, last, m, e, flags | regex_constants::match_any);
|
||||
}
|
||||
#endif
|
||||
inline bool regex_search(const std::string& s,
|
||||
smatch& m,
|
||||
const regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return regex_search(s.begin(), s.end(), m, e, flags);
|
||||
}
|
||||
#if !defined(BOOST_NO_WREGEX)
|
||||
inline bool regex_search(const std::basic_string<wchar_t>& s,
|
||||
wsmatch& m,
|
||||
const wregex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return regex_search(s.begin(), s.end(), m, e, flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
template <class BidiIterator, class charT, class traits>
|
||||
bool regex_search(BidiIterator first, BidiIterator last,
|
||||
@ -145,8 +91,6 @@ bool regex_search(BidiIterator first, BidiIterator last,
|
||||
return matcher.find();
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
|
||||
template <class charT, class traits>
|
||||
inline bool regex_search(const charT* str,
|
||||
const basic_regex<charT, traits>& e,
|
||||
@ -162,42 +106,6 @@ inline bool regex_search(const std::basic_string<charT, ST, SA>& s,
|
||||
{
|
||||
return regex_search(s.begin(), s.end(), e, flags);
|
||||
}
|
||||
#else // non-template function overloads
|
||||
inline bool regex_search(const char* str,
|
||||
const regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
cmatch m;
|
||||
return regex_search(str, str + regex::traits_type::length(str), m, e, flags | regex_constants::match_any);
|
||||
}
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
inline bool regex_search(const wchar_t* str,
|
||||
const wregex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
wcmatch m;
|
||||
return regex_search(str, str + wregex::traits_type::length(str), m, e, flags | regex_constants::match_any);
|
||||
}
|
||||
#endif
|
||||
inline bool regex_search(const std::string& s,
|
||||
const regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
smatch m;
|
||||
return regex_search(s.begin(), s.end(), m, e, flags | regex_constants::match_any);
|
||||
}
|
||||
#if !defined(BOOST_NO_WREGEX)
|
||||
inline bool regex_search(const std::basic_string<wchar_t>& s,
|
||||
const wregex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
wsmatch m;
|
||||
return regex_search(s.begin(), s.end(), m, e, flags | regex_constants::match_any);
|
||||
}
|
||||
|
||||
#endif // BOOST_NO_WREGEX
|
||||
|
||||
#endif // partial overload
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
|
Reference in New Issue
Block a user