Hello,
#include <iostream>
#include
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?
The visitation is "compile-time" in the sense that it's type-safe.
"v.apply_visitor( print_type() )" might or might not be substituted by
"char" depending on your optimization switches. In MSVC9, with
optimization (/O2) it produces the following output:
00402B3C push offset string "char" (419368h)
00402B41 push offset std::cout (420BC8h)
00402B46 call std::operator<<
If so, is there a way to see this in the binary executable file? Maybe viewing symbols?
In MSVC - compile the program, step into main (or set breakpoint), then go to Debug-->Windows-->Dissasembly.
participants (2)
-
Hicham Mouline
-
Igor R