Dispatching on a variant

Jarrett Billingsley jarrett.billingsley at gmail.com
Sat Sep 26 09:34:44 PDT 2009


On Sat, Sep 26, 2009 at 10:36 AM, Justin Johansson
<procode at adam-dott-com.au> wrote:

> I've got about 2 dozen types in the variant so the O(n) really hurts.
> The variant thing seemed like a really cool idea at the time but now ...
> Without something like suggested above or a computed goto on typeid or Andrei's visitator,
> it almost pushes me to backout from using variants and having to redesign around some common base class or interface and using virtual function dispatch. :-(

Ouch. 2 dozen types? No offense, but that sounds like "you're doing it
wrong." Revising your strategy is probably for the best.

What are you doing, anyway?



More information about the Digitalmars-d mailing list