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@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Gennadiy Rozental Sent: Wednesday, March 16, 2005 1:02 PM To: boost-users@lists.boost.org 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@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users