I have template class
template <typename T>
class BST {
public:
Node<T>* root;
...
and I would like to modify behaviour of insert function depending on T type.
I look for something like
if(T instanceof Pair){
}
You can use std::is_same
:
if (std::is_same<T, Pair>::value)