As I understood all types of boost.variant are parsed into real types (meaning as if boost variant would after compilation t
You can use the following that both result in std::type_info objects:
together with the member function std::type_info::operator==, to check which type the boost::variant is currently storing. For example,
boost::variant container;
container = "Hello world";
if (container.type() == typeid(std::string)) {
std::cout << "Found a string: " << boost::get(container);
}
else if (container.type() == typeid(int)) {
std::cout << "Found an int: " << boost::get(container);
}