#include <iostream>

using namespace std;

class figure
{
};

class Pawn : public figure
{
};

void value(figure fi)
{
    cout << "val typeid check: " << (typeid(fi) == typeid(Pawn)) << endl;
}

void refer(figure& fi)
{
    cout << "ref typeid check: " << (typeid(fi) == typeid(Pawn)) << endl;
}

int main()
{
    Pawn p;
    value(p);
    refer(p);
}

