The result of typeid is a const type_info&. The value is a reference to a type_info object that represents either the type-id or the type of the expression, depending on which form of typeid is used
It compares the adresses of the type_info.
2) The bool operator is overwritten by smart pointer so you can use them within an if clause
Yes, dynamic_pointer_cast is what usually is used in such a case. It returns null if it's not the required type. if it's not null you usually want to access that object.
The example above compares two pointers to the type_info which is somewhat faster than a dynamic_pointer_cast. The issue is: is the type_info of an object of the same type always on the same memory address? Regarding libraries and inheritance.
If x is a bultin integral type or pointer then if (x) is equivalent to if ( x != 0 ).
This behavior is mimicked by shared_ptr, as it is convertible to bool :
So if (m_node) and if (m_node.get() != 0) is equivalent.