Boost logo

Boost Users :

From: Delfin Rojas (drojas_at_[hidden])
Date: 2005-03-16 18:04:04


I see, so at compile time there is a "switch" built that will call the
appropriate visitor method. Then at run time the "current" type index is run
through this "switch". Makes sense,

Thanks

-delfin

> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Gennadiy Rozental
> Sent: Wednesday, March 16, 2005 1:02 PM
> To: boost-users_at_[hidden]
> Subject: [Boost-users] Re: How does boost::variant static visitation work?
>
>
> > What I do not understand is, the "current" variant type seems to be
> changed
> > at runtime (at assignment), then how can apply_vistor know which
> operator()
> > to call at compile time?
>
> switch by type index and static cast to appropriate type.
>
> Gennadiy
>
>
>
> _______________________________________________
> 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