#include <iostream>
#define IS_INSTANCE_OF(INSTANCE,CLS) (typeid (INSTANCE) == typeid(CLS))
class A{};
class B{};
int main()
{
A a;
std::cout <<IS_INSTANCE_OF(a, A)<<std::endl;
std::cout <<IS_INSTANCE_OF(a, B);
}
#include <iostream>
#include<vector>
#include<memory>
#define IS_INSTANCE_OF(INSTANCE,CLS) (typeid (INSTANCE) == typeid(CLS))
class A {};
class B {};
int main()
{
std::shared_ptr<A> a = std::make_shared<A>();
std::cout << IS_INSTANCE_OF(*a ,B) << std::endl;
}