Commit 40d62647 authored by Robert Bradshaw's avatar Robert Bradshaw

Follow template type deduction through multiple specializations.

parent 8559d411
...@@ -3510,14 +3510,17 @@ class CppClassType(CType): ...@@ -3510,14 +3510,17 @@ class CppClassType(CType):
for base in all_bases(parent): for base in all_bases(parent):
yield base yield base
for actual_base in all_bases(actual): for actual_base in all_bases(actual):
if (actual_base.template_type template_type = actual_base
and self_template_type.empty_declaration_code() while getattr(template_type, 'template_type', None):
== actual_base.template_type.empty_declaration_code()): template_type = template_type.template_type
return reduce( if (self_template_type.empty_declaration_code()
merge_template_deductions, == template_type.empty_declaration_code()):
[formal_param.deduce_template_params(actual_param) return reduce(
for (formal_param, actual_param) in zip(self.templates, actual_base.templates)], merge_template_deductions,
{}) [formal_param.deduce_template_params(actual_param)
for (formal_param, actual_param)
in zip(self.templates, actual_base.templates)],
{})
else: else:
return {} return {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment