Boost logo

Boost Users :

Subject: Re: [Boost-users] boost variant compile time visitation: verification
From: Igor R (boost.lists_at_[hidden])
Date: 2009-04-21 17:23:08


> 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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net