Boost logo

Boost Users :

Subject: Re: [Boost-users] boost variant question
From: petros (pmamales_at_[hidden])
Date: 2011-09-24 14:41:54


Hi Igor,
Thank you for your response.
I am not sure that I understand it though.
I have seen examples (wrote a couple myself) where, using the
static_visitor,
"dictated" the behavior of public member functions of the variant type.
But which iterator type to associate with the hosted type would require a
variant of iterators to be
maintaned along-side. Is this what you mean? If not, is there an example or
"sketchy" pseudo code
you could point me too.
Thank you very much for your help.
Kind Regards,
Petros

-----Original Message-----
From: Igor R
Sent: Saturday, September 24, 2011 12:48 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] boost variant question

> Is there a mechanism to export the iterator that corresponds to the
> structure hosted in the variant and use it?

Actually, variant has only one (type-safe) observing mechanism -
static_visitor. Using static visitor you can make your own custom
facilities, including the one you mention.
_______________________________________________
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