typeid is an operator in C++ which returns a std::type_info object representing dynamic information about an object at runtime
Requires the <typeinfo> header to be included.
class type_info {
public:
virtual ~type_info();
bool operator==(const type_info& rhs) const noexcept;
bool operator!=(const type_info& rhs) const noexcept;
bool before(const type_info& rhs) const noexcept;
size_t hash_code() const noexcept;
const char* name() const noexcept;
type_info(const type_info& rhs) = delete; // cannot be copied
type_info& operator=(const type_info& rhs) = delete; // cannot be copied
};
typeof is a compiler-specific extension (not part of C++) which yields the compile-time type of an object
decltype (Since C++11) is a specifier which can be used to specify a type by inspecting the type of a a given entity or expression.
decltype should be used instead of typeof for portable code.
__declspec is a Microsoft-specific extension, most commonly used to import/export symbols from/to dlls.