Boost logo

Boost Users :

From: Igor R. (igor_rubinov_at_[hidden])
Date: 2008-05-06 12:31:43


> At least what I read here is following:
> All instances v of type variant<T1,T2,...,TN> guarantee that v has constructed content of !!!one!!! of the types !!!Ti!!!, even if an operation on v has previously failed.
> For me it means that it can be T2 or TN as well.
 
Right, but the 1st link says:
"boost::variant< int, std::string > v;
By default, a variant default-constructs its first bounded type, so v initially contains int(0). If this is not desired, or if the first bounded type is not default-constructible, a variant can be constructed directly from any value convertible to one of its bounded types. "
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us



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