Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Question about transformation of template parameter

Hi Markus,
Consider the following code:

template <typename T>
struct A {};

template <class U>
struct B {
  template <typename T>
  static A<T> f();
};

What should be the return type of B<int>::f ?

Existing code produces a CPPMethodTemplateSpecialization  A<#10000>, but shouldn't it be A<#0> instead since the type has been taken out of the enclosing template? Is there any function that would perform this kind of transformation?

This is related to my attempt to fix AST2TemplateTests.testTemplateConversionOperator_271948_2 in a clean way.

-sergey

Back to the top