
4 Apr
2009
4 Apr
'09
2:41 p.m.
AMDG Olivier Tournaire wrote:
I need to store in a class an object which type is within a predefined set. As I would like to avoid the overhead of virtual functions, I am wondering if variant could help me. Moreover, I would like to know what is the runtime cost of using such a type (instead of base class pointers), and the cost of the apply_visitor.
The cost is apply_visitor is approximately that of a switch statement. In Christ, Steven Watanabe