
Hello, #include <iostream> #include <boost/variant/variant.hpp> typedef boost::variant<int, double, char> VT; struct print_type : public boost::static_visitor<const char*> { const char* operator()( int ) { return "int"; } const char* operator()( double ) { return "double"; } const char* operator()( char ) { return "char"; } }; int main() { VT v('c'); std::cout<< v.apply_visitor( print_type() ) <<std::endl;; } If I understood the doc correctly, the visitation is supposed to be compile-time, that is, v.apply_visitor( print_type() ) is already "char" before the program start... Is this right? If so, is there a way to see this in the binary executable file? Maybe viewing symbols? I have access to vs2005 and g++3/4 /linux platforms. It would be so fantastic if compilers output _also_ the C++ source resulting from the template machinery! Best regards,