Boost logo

Boost Users :

From: Igor R. (igor_rubinov_at_[hidden])
Date: 2008-05-08 04:28:53


Hmm... how could I miss such a straightforward solution?? :)
Thank you!> Date: Wed, 7 May 2008 22:18:11 -0400> From: nat_at_[hidden]> To: boost-users_at_[hidden]> Subject: Re: [Boost-users] [variant] how to get 1st bounded type> > Igor R. wrote:> > > The reason I wanted to test if the variant contains its 1st> > type is the following: my variant is made of a list> > of shared-pointers to various types; there's a routine that> > initializes it with one of the types depending on some> > conditions, then it applies some visitor on the resulting> > variant and stores it then in a container - however, there's> > no "default" behavior, so if neither condition was met, the> > variant remains "uninitialized" - i.e. it contains 1st type> > "zero" ptr. I want neither apply the visitor on "empty"> > smartpointer nor store it in the container, so I have to> > know whether it was "really" created or not. > > Um, wrap the variant in boost::optional?> _______________________________________________> Boost-users mailing list> Boost-users_at_[hidden]> http://lists.boost.org/
mailman/listinfo.cgi/boost-users
_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE



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