template<typename T>
struct Test{
void memberfunc(){
}
}
template<typename T>
int func(T value){
std::cout<<value<<std::endl;
}
/// may be the class template POI
////some code here
int main(){
Test<int> v;
func(12.0);
}
/// may be the template function POI
////some code here
when I used the command "clang++ -Xclang -ast-print -fsyntax-only main.cpp" and the printed result show the complier generated the code
template<>
struct Test<int>{
void memberfunc(){
}
}
template<>
int func<dobule>(double value){
std::cout<<value<<std::endl;
}
after their primary template,These code looks like User defined explicite Specilization code
So
Question 1:
what the code the complier generated looks like at the point of instantiation?
Question 2:
what the difference between the code at the POI and the code explicite Specialization