Skip to content

Specialization of variable templates misses type deduction and template #556

@Ukilele

Description

@Ukilele

The following code:

template<class T> auto Value = 10;
template<> auto Value<char> = 0.0;

generates following output in cppinsights:

template<class T>
int Value = 10;
<> auto Value<char> = 0.0;

There are two issues:

  1. For both, the primary template and the specialization of Value, we use auto. But only in the primary template cppinsights replaces auto by int. But it would be nice if also for the specialization it would replace auto by the according type (double).
  2. In line 3 of the output of cppinsights, it is missing the keyword template in front of the <>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions