I tried a template specialization like bellow.
#include<iostream>
using namespace std;
template<class T1, class T2>
T1 something(T2 a);
template<class T2>
double something(T2 a){
double b;
return b;
}
int main(){
something<double, double>(0.0);
}
However, this gives me a compilatoin error:
In function `main':
test.cpp:(.text+0x9): undefined reference to `double something<double, double>(double)'
Could you tell me how to fix it?