|
Boost Users : |
Subject: Re: [Boost-users] [variant] Efficiency
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-04-04 10:41:07
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
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