
21 Apr
2009
21 Apr
'09
9:23 p.m.
Compile-time type-safe value visitation via boost::apply_visitor.
is confusing to me.
It means that the *dispatching* (i.e. the decision where to visit) is made at compile-time. The *execution* of the visitation obviously occurs at runtime, because you define runtime functions in the visitor, not metafunctions. However, in case of trivial function body (like the one in your example), the optimizer does its job and omits the function call - so you get "true" compile-time visitation.