19.10.1.  typeid operator

[ fromfile: rtti.xml id: typeid ]

    void f(Person& pRef) {
       if(typeid(pRef) == typeid(Student) {
         // pRef is actually a reference to a Student object.
         // Proceed with Student specific processing.
       }
       else {
         // Nope! the object referred to by pRef is not a Student.
         // Proceed to do whatever alternative stuff is required.
       }
    }