The std::type_info
class is non-copyable. This makes it hard to store it in an object for later use. What should I do?
There is a much better solution in C++11. A new copyable wrapper called std::type_index. You need to include header "typeindex" to use it.