I\'m just wondering how boost have implemented BOOST_TYPEOF (in C++03) which seems to be a very useful tool. Anyone has any idea?
Also, I\'m thinking C++03 itself co
It's defined as:
#define BOOST_TYPEOF(Expr) \
boost::type_of::decode_begin::type
I don't know the details, but it seems to look up the type in some sort of table, and expands to (the table entry)::type
No, it's not possible to know the size without knowing the type. It's just that nobody thought to add typeof to C++03.