Fixed matching template instantiation to templates with variadic params in the middle

This commit is contained in:
Bartek Kryza
2023-04-05 00:44:27 +02:00
parent 425a13ec5b
commit 2b951fe170
2 changed files with 50 additions and 6 deletions

View File

@@ -125,6 +125,20 @@ TEST_CASE(
CHECK(tp2.calculate_specialization_match(tp1));
}
{
auto tp1 = template_parameter::make_argument("tuple");
tp1.add_template_param(
template_parameter::make_template_type("Args", {}, true));
tp1.add_template_param(template_parameter::make_argument("int"));
auto tp2 = template_parameter::make_argument("tuple");
tp2.add_template_param(template_parameter::make_argument("char"));
tp2.add_template_param(template_parameter::make_argument("double"));
tp2.add_template_param(template_parameter::make_argument("int"));
CHECK(tp2.calculate_specialization_match(tp1));
}
{
auto tp1 = template_parameter::make_argument("tuple");
tp1.add_template_param(