<br><div class="gmail_quote">On Tue, May 6, 2008 at 6:31 PM, Igor R. &lt;<a href="mailto:igor_rubinov@hotmail.com" target="_blank">igor_rubinov@hotmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">





<div>
<br>
<blockquote><div>&gt; At least what I read here is following:<br></div><div>
&gt; All instances <code>v</code> of type <code><a title="Class template variant" href="http://www.boost.org/doc/libs/1_35_0/doc/html/boost/variant.html" target="_blank">variant</a>&lt;T1,T2,...,TN&gt;</code> guarantee that <code>v</code> has constructed content of !!!one!!! of the types <code>!!!T<span><i>i!!!</i></span></code>, even if an operation on <code>v</code> has previously failed.<br>


&gt; For me it means that it can be T2 or TN as well.<br>
&nbsp;<br></div>
Right, but the 1st link says:<br>
&quot;<a title="Class template variant" href="http://www.boost.org/doc/libs/1_35_0/doc/html/boost/variant.html" target="_blank"><u><font color="#800080">boost::variant</font></u></a>&lt; int, std::string &gt; v;<br>
By default, a <code>variant</code> default-constructs its first bounded type, so <code>v</code> initially contains <code>int(0)</code>. If this is not desired, or if the first bounded type is not default-constructible, a <code>variant</code> can be constructed directly from any value convertible to one of its bounded types. &quot;<br>

</blockquote></div></blockquote></div>Igor, I assume the following:<br>If
the first type throws an exception while creation the second is created
and so forth and the exception is probably not reported to you. Your
pointer can be NULL in your previous example. Why don&#39;t you like
visitor to dispatch the type stored in the variant?<br>
<br><br>Regards,<br><font color="#888888">Ovanes</font>