How efficient is dispatching on a boost::variant ?
If it's a switch statement, it should only take O(1) time, but as far as I know, template metaprogrammign can only generate if's, which would put boost::variant dispatchs at a runtime overhead of O(n), where n = number of types in the variant.
Can anyone confirm/deny/enlighten me on this?
Thanks!