SyntaxFix
Write A Post
Hire A Developer
Questions
std::is_same() is only available since C++11. For pre-C++11 you can use typeid():
std::is_same()
typeid()
template <typename T> void foo() { if (typeid(T) == typeid(animal)) { /* ... */ } }