|
Boost Users : |
Subject: Re: [Boost-users] [variant] Efficiency
From: Maxim Koshelev (chuchelo_at_[hidden])
Date: 2009-04-21 03:21:16
there is great disadvantage of variant in performance terms. One can't
create instance of variant with proper type inside without calling
copy costructor. Even if you want to create default constructed
instance of a class, you need to call copy costructor. It's very bad
for complex classes.
On Sat, Apr 4, 2009 at 8:21 PM, Olivier Tournaire <olitour_at_[hidden]> wrote:
> Thank you Steven,
>
>
> On Sat, Apr 4, 2009 at 4:41 PM, Steven Watanabe <watanabesj_at_[hidden]>
> wrote:
>>
>> AMDG
>> The cost is apply_visitor is approximately that of a switch statement.
>
> Suppose I have 2 variant<type1,type2>. Is there something to help
> implementing a dispatcher ?
>
> Regards,
>
> Oivier
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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