Remove external template instantiation.

This commit is contained in:
jzmaddock
2020-11-26 17:00:04 +00:00
parent 72da1fdc29
commit 1bb29f2134
10 changed files with 0 additions and 1540 deletions

View File

@ -131,76 +131,6 @@ void test_deprecated(const char&, const test_regex_search_tag&)
// clean up whatever:
boost::regfreeA(&re);
//
// now try the RegEx class:
//
if(test_info<char>::syntax_options() & ~boost::regex::icase)
return;
#ifndef BOOST_NO_EXCEPTIONS
try
#endif
{
boost::RegEx e(expression, (test_info<char>::syntax_options() & boost::regex::icase) != 0);
if(e.error_code())
{
BOOST_REGEX_TEST_ERROR("Expression did not compile when it should have done, error code = " << e.error_code(), char);
}
if(e.Search(search_text, test_info<char>::match_options()))
{
int i = 0;
while(results[i*2] != -2)
{
if(e.Matched(i))
{
if(results[2*i] != static_cast<int>(e.Position(i)))
{
BOOST_REGEX_TEST_ERROR("Mismatch in start of subexpression " << i << " found with the RegEx class (found " << e.Position(i) << " expected " << results[2*i] << ").", char);
}
if(results[2*i+1] != static_cast<int>(e.Position(i) + e.Length(i)))
{
BOOST_REGEX_TEST_ERROR("Mismatch in end of subexpression " << i << " found with the RegEx class (found " << e.Position(i) + e.Length(i) << " expected " << results[2*i+1] << ").", char);
}
}
else
{
if(results[2*i] >= 0)
{
BOOST_REGEX_TEST_ERROR("Mismatch in start of subexpression " << i << " found with the RegEx class (found " << e.Position(i) << " expected " << results[2*i] << ").", char);
}
if(results[2*i+1] >= 0)
{
BOOST_REGEX_TEST_ERROR("Mismatch in end of subexpression " << i << " found with the RegEx class (found " << e.Position(i) + e.Length(i) << " expected " << results[2*i+1] << ").", char);
}
}
++i;
}
}
else
{
if(results[0] >= 0)
{
BOOST_REGEX_TEST_ERROR("Expression : \"" << expression.c_str() << "\" was not found with class RegEx.", char);
}
}
}
#ifndef BOOST_NO_EXCEPTIONS
catch(const boost::bad_expression& r)
{
BOOST_REGEX_TEST_ERROR("Expression did not compile with RegEx class: " << r.what(), char);
}
catch(const std::runtime_error& r)
{
BOOST_REGEX_TEST_ERROR("Unexpected std::runtime_error : " << r.what(), char);
}
catch(const std::exception& r)
{
BOOST_REGEX_TEST_ERROR("Unexpected std::exception: " << r.what(), char);
}
catch(...)
{
BOOST_REGEX_TEST_ERROR("Unexpected exception of unknown type", char);
}
#endif
}
void test_deprecated(const wchar_t&, const test_regex_search_tag&)
@ -300,46 +230,6 @@ void test_deprecated(const char&, const test_invalid_regex_tag&)
}
}
}
//
// now try the RegEx class:
//
if(test_info<char>::syntax_options() & ~boost::regex::icase)
return;
bool have_catch = false;
#ifndef BOOST_NO_EXCEPTIONS
try
#endif
{
boost::RegEx e(expression, (test_info<char>::syntax_options() & boost::regex::icase) != 0);
if(e.error_code())
have_catch = true;
}
#ifndef BOOST_NO_EXCEPTIONS
catch(const boost::bad_expression&)
{
have_catch = true;
}
catch(const std::runtime_error& r)
{
have_catch = true;
BOOST_REGEX_TEST_ERROR("Expected a bad_expression exception, but a std::runtime_error instead: " << r.what(), char);
}
catch(const std::exception& r)
{
have_catch = true;
BOOST_REGEX_TEST_ERROR("Expected a bad_expression exception, but a std::exception instead: " << r.what(), char);
}
catch(...)
{
have_catch = true;
BOOST_REGEX_TEST_ERROR("Expected a bad_expression exception, but got an exception of unknown type instead", char);
}
#endif
if(!have_catch)
{
// oops expected exception was not thrown:
BOOST_REGEX_TEST_ERROR("Expected an exception, but didn't find one.", char);
}
}
void test_deprecated(const wchar_t&, const test_invalid_regex_tag&)