Hello guys.
I wrote my driver in C++ but I can't move my templates away from my main project .cpp file. If I put them in a separate file (.h / .cpp) everything blows up. It signals me about syntactic errors which are not "correct" since they compile correctly with the same structure in a user space application.
Any recommendation about this?
Examples:
template.h:
Thank you very much!
I wrote my driver in C++ but I can't move my templates away from my main project .cpp file. If I put them in a separate file (.h / .cpp) everything blows up. It signals me about syntactic errors which are not "correct" since they compile correctly with the same structure in a user space application.
Any recommendation about this?
Examples:
template.h:
Code: Select all
template.cpp:template <bool reversed>
UINT32 Load(UINT32 x);
Code: Select all
template <>
UINT32 Load<true>(UINT32 x) {
return x;
}
template <>
UINT32 Load<false>(UINT32 x) {
return _byteswap_ulong(x);
}
Thank you very much!