Hi all,
As we know, if we use the template member function we need to put it in header file, for example
//in test.hpp
template<typename Dtype>
class A{
public:
A(Dtype a, Dtype b)
};
A<Dtype>::A(Dtype a,Dtype b){
.....
}
if we did not put the definiation in the header file, it is likely to get linker error. But when I can caffe code, especially, src/caffe/layers.cpp and include/caffe/layers.hpp, the declaration and definition of template member function in .hpp and .cpp files, how can it be possible?
Does anyone have same concern? or anyone has any thoughts on this?