diff --git a/test/regress/tests.cpp b/test/regress/tests.cpp index 4fc35c47..95bada72 100644 --- a/test/regress/tests.cpp +++ b/test/regress/tests.cpp @@ -224,7 +224,12 @@ bool grep_test_predicate::operator()(const boost::match_results template void cpp_tests(const basic_regex& e, bool recurse = true) { - typedef typename basic_regex::allocator_type allocator_type; + typedef typename basic_regex::allocator_type base_allocator_type; +#ifdef BOOST_REGEX_V3 + typedef base_allocator_type allocator_type; +#else + typedef typename detail::rebind_allocator >, base_allocator_type>::type allocator_type; +#endif if(flags[4] & REG_MERGE) { // @@ -278,9 +283,9 @@ void cpp_tests(const basic_regex& e, bool recurse = true) { unsigned len = search_text.size(); const std::basic_string& s = search_text; - grep_test_predicate::const_iterator, allocator_type> oi2(s.begin(), s.end()); + grep_test_predicate::const_iterator, base_allocator_type> oi2(s.begin(), s.end()); regex_grep(oi2, s, e, static_cast(flags[3])); - grep_test_predicate oi3(s.c_str(), s.c_str()+s.size()); + grep_test_predicate oi3(s.c_str(), s.c_str()+s.size()); regex_grep(oi3, s.c_str(), e, static_cast(flags[3])); assert(s.size() == len); assert(s.end() - s.begin() == (std::basic_string::difference_type)len);