Boost logo

Boost Users :

Subject: Re: [Boost-users] large variant performance compared (50 elements)
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-01-08 17:34:51


At Sat, 8 Jan 2011 23:34:47 +0200,
Igor R wrote:
>
> >> If it's really just shared_ptr's in the variant, I would seriously
> >> consider replacing it with shared_ptr<void> (with a type tag if
> >> necessary).  Just a thought.
> >
> > Seriously, could be a big simplification and speedup vs. using using
> > variant.
>
> Could you please elaborate a bit on this? How to replace
> variant<shared_ptr<T> > with shared_ptr<void> and a tag? Wouldn't the
> tags be wrapped in a variant anyway?

No, tags could be an enum or a type_info*, for example

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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