Add module support and tests. (#174)

This commit is contained in:
jzmaddock
2024-12-18 19:14:23 +00:00
committed by GitHub
parent f039773693
commit 7af2aadcb8
81 changed files with 3015 additions and 318 deletions

View File

@ -19,11 +19,13 @@
#include <boost/regex/v5/states.hpp>
#include <boost/regex/v5/regex_traits.hpp>
#ifndef BOOST_REGEX_AS_MODULE
#ifndef BOOST_REGEX_STANDALONE
#include <boost/throw_exception.hpp>
#endif
#include <climits>
#endif
#ifdef BOOST_REGEX_MSVC
# pragma warning(push)
@ -578,6 +580,33 @@ private:
#endif
};
template <class Matcher>
inline bool factory_match(Matcher& m)
{
return m.match();
}
template <class Matcher>
inline bool factory_find(Matcher& m)
{
return m.find();
}
#ifdef BOOST_REGEX_AS_MODULE
bool factory_match(perl_matcher<const char*, match_results<const char*>::allocator_type, regex::traits_type>& m);
bool factory_match(perl_matcher<const wchar_t*, match_results<const wchar_t*>::allocator_type, wregex::traits_type>& m);
bool factory_match(perl_matcher<std::string::const_iterator, match_results<std::string::const_iterator>::allocator_type, regex::traits_type>& m);
bool factory_match(perl_matcher<std::wstring::const_iterator, match_results<std::wstring::const_iterator>::allocator_type, wregex::traits_type>& m);
bool factory_match(perl_matcher<std::string::iterator, match_results<std::string::iterator>::allocator_type, regex::traits_type>& m);
bool factory_match(perl_matcher<std::wstring::iterator, match_results<std::wstring::iterator>::allocator_type, wregex::traits_type>& m);
bool factory_find(perl_matcher<const char*, match_results<const char*>::allocator_type, regex::traits_type>& m);
bool factory_find(perl_matcher<const wchar_t*, match_results<const wchar_t*>::allocator_type, wregex::traits_type>& m);
bool factory_find(perl_matcher<std::string::const_iterator, match_results<std::string::const_iterator>::allocator_type, regex::traits_type>& m);
bool factory_find(perl_matcher<std::wstring::const_iterator, match_results<std::wstring::const_iterator>::allocator_type, wregex::traits_type>& m);
bool factory_find(perl_matcher<std::string::iterator, match_results<std::string::iterator>::allocator_type, regex::traits_type>& m);
bool factory_find(perl_matcher<std::wstring::iterator, match_results<std::wstring::iterator>::allocator_type, wregex::traits_type>& m);
#endif
} // namespace BOOST_REGEX_DETAIL_NS
#ifdef BOOST_REGEX_MSVC