templateのインスタンス化で存在しない型を使用している場合

gcc9.2.0でコンパイル

struct TypeTraits
{
    using IntType = int;
};

class A
{
public:
    template<typename T>
    int GetValue(T val);
    
    void SetValue(int val)
    {
        m_Value = val;
    }
private:
    int m_Value;
};

 

#include "A.h"

template<typename T>
int A::GetValue(T val)
{
    return static_cast<int>(val);
}

//template int A::GetValue(int);
template int A::GetValue(float);
template int A::GetValue(double);
template int A::GetValue(TypeTraits::Type);

 

A.cpp:12:42: error: no matching template for 'A::GetValue' found
   12 | template int A::GetValue(TypeTraits::Type);
      |                                          ^
A.cpp:12:25: error: expected ';' before '(' token
   12 | template int A::GetValue(TypeTraits::Type);
      |                         ^
      |                         ;

“no matching template for A::GetValue” この文章の template って何を指しているのか?自分的には TypeTraits::Type 型が無いと言って欲しいのだが。僕はこのエラーメッセージから型が間違っているなんて推測できない。なお、スコープ解決演算子を使わずに型名を間違えた場合は “doesn’t name a type” のエラーになりこれは期待したエラーメッセージ。

因みに、インスタンス化で template パラメータの数が違う場合は “does not match any template declaration” のエラーが出る。