I need to implement self contained compile-time function for checking type equality (function template without arguments bool eqTypes<T,S>()
).
self contained means not relying on library.
I'm not good in all this. That's what I tried, but it's not what I need.
template<typename T>
bool eq_types(T const&, T const&) {
return true;
}
template<typename T, typename U>
bool eq_types(T const&, U const&) {
return false;
}