Lines Matching full:code
15 <simpara>The <code>variant</code> class template (inspired by Andrei
22 <code>variant</code> whose bounded types are each convertible to one
23 of the destination <code>variant</code>'s bounded types. As well,
24 through <code><functionname>apply_visitor</functionname></code>,
25 <code>variant</code> supports compile-time checked, type-safe
26 visitation; and through <code><functionname>get</functionname></code>,
27 <code>variant</code> supports run-time checked, type-safe value
32 <listitem>The bounded types of the <code>variant</code> are exposed
33 via the nested typedef <code>types</code>, which is an
37 the <code>variant</code>.</listitem>
38 <listitem>All members of <code>variant</code> satisfy at least the
40 a <code>variant</code> remain defined even after previous
43 <code>variant</code> must meet the requirements of the
47 <code>variant</code> must be distinct after removal of qualifiers.
48 Thus, for instance, both <code>variant<int, int></code> and
49 <code>variant<int, const int></code> have undefined
51 <listitem>Conforming implementations of <code>variant</code> must
54 <code><macroname>BOOST_VARIANT_LIMIT_TYPES</macroname></code>.
55 (See <code><classname>make_variant_over</classname></code> for a
56 means to specify the bounded types of a <code>variant</code> by
79 <simpara>Destroys the content of <code>*this</code>.</simpara>
87 <simpara>The first bounded type of the <code>variant</code> (i.e.,
88 <code>T1</code>) must fulfill the requirements of the
94 <simpara>Content of <code>*this</code> is the default value of the
95 first bounded type (i.e, <code>T1</code>).</simpara>
100 constructor of <code>T1</code>.</simpara>
110 <simpara>Content of <code>*this</code> is a copy of the content of
111 <code>other</code>.</simpara>
116 copy constructor of <code>other</code>'s contained type.</simpara>
130 <simpara>Content of <code>*this</code> is move constructed from the content of
131 <code>other</code>.</simpara>
136 move constructor of <code>other</code>'s contained type.</simpara>
150 <simpara><code>T</code> must be unambiguously convertible to one of
151 the bounded types (i.e., <code>T1</code>, <code>T2</code>,
156 <simpara>Content of <code>*this</code> is the best conversion of
157 <code>operand</code> to one of the bounded types, as determined
163 <code>operand</code> to one of the bounded types.</simpara>
197 move construction if <code>operand</code> is an rvalue.</simpara>
214 <simpara><emphasis>Every</emphasis> one of <code>U1</code>,
215 <code>U2</code>, ..., <code>UN</code> must have an unambiguous
216 conversion to one of the bounded types (i.e., <code>T1</code>,
217 <code>T2</code>, ..., <code>TN</code>).</simpara>
221 <simpara>If <code>variant<U1, U2, ..., UN></code> is itself
222 one of the bounded types, then content of <code>*this</code> is a
223 copy of <code>operand</code>. Otherwise, content of
224 <code>*this</code> is the best conversion of the content of
225 <code>operand</code> to one of the bounded types, as determined
230 <simpara>If <code>variant<U1, U2, ..., UN></code> is itself
233 <code>variant<U1, U2, ..., UN></code>. Otherwise, may fail
235 <code>operand</code> to one of the bounded types.</simpara>
295 <simpara>Interchanges the content of <code>*this</code> and
296 <code>other</code>.</simpara>
300 <simpara>If the contained type of <code>other</code> is the same as
301 the contained type of <code>*this</code>, then may fail with any
302 exceptions arising from the <code>swap</code> of the contents of
303 <code>*this</code> and <code>other</code>. Otherwise, may fail
306 memory, may fail with <code>std::bad_alloc</code>
325 <simpara>If the contained type of <code>rhs</code> is the same as
326 the contained type of <code>*this</code>, then assigns the
327 content of <code>rhs</code> into the content of
328 <code>*this</code>. Otherwise, makes the content of
329 <code>*this</code> a copy of the content of <code>rhs</code>,
330 destroying the previous content of <code>*this</code>.</simpara>
334 <simpara>If the contained type of <code>rhs</code> is the same as
335 the contained type of <code>*this</code>, then may fail with any
337 <code>rhs</code> into the content <code>*this</code>. Otherwise,
339 of the contained type of <code>rhs</code>. Also, in the event of
340 insufficient memory, may fail with <code>std::bad_alloc</code>
362 <simpara>If the contained type of <code>rhs</code> is the same as
363 the contained type of <code>*this</code>, then move assigns the
364 content of <code>rhs</code> into the content of
365 <code>*this</code>. Otherwise, move constructs
366 <code>*this</code> using the content of <code>rhs</code>,
367 destroying the previous content of <code>*this</code>.</simpara>
371 <simpara>If the contained type of <code>rhs</code> is the same as
372 the contained type of <code>*this</code>, then may fail with any
374 <code>rhs</code> into the content <code>*this</code>. Otherwise,
376 of the contained type of <code>rhs</code>. Also, in the event of
377 insufficient memory, may fail with <code>std::bad_alloc</code>
395 <listitem><code>T</code> must be unambiguously convertible to
396 one of the bounded types (i.e., <code>T1</code>,
397 <code>T2</code>, etc.).</listitem>
405 <simpara>If the contained type of <code>*this</code> is
406 <code>T</code>, then assigns <code>rhs</code> into the content
407 of <code>*this</code>. Otherwise, makes the content of
408 <code>*this</code> the best conversion of <code>rhs</code> to
411 <code>*this</code>.</simpara>
415 <simpara>If the contained type of <code>*this</code> is
416 <code>T</code>, then may fail with any exceptions arising from
417 the assignment of <code>rhs</code> into the content
418 <code>*this</code>. Otherwise, may fail with any exceptions
419 arising from the conversion of <code>rhs</code> to one of the
421 fail with <code>std::bad_alloc</code>
440 … <listitem><code>rhs</code> is an rvalue. Otherwise previous operator will be used.</listitem>
441 <listitem><code>T</code> must be unambiguously convertible to
442 one of the bounded types (i.e., <code>T1</code>,
443 <code>T2</code>, etc.).</listitem>
451 <simpara>If the contained type of <code>*this</code> is
452 <code>T</code>, then move assigns <code>rhs</code> into the content
453 of <code>*this</code>. Otherwise, makes the content of
454 <code>*this</code> the best conversion of <code>rhs</code> to
457 <code>*this</code>(conversion is usually done via move construction).</simpara>
461 <simpara>If the contained type of <code>*this</code> is
462 <code>T</code>, then may fail with any exceptions arising from
463 the move assignment of <code>rhs</code> into the content
464 <code>*this</code>. Otherwise, may fail with any exceptions
465 arising from the conversion of <code>rhs</code> to one of the
467 fail with <code>std::bad_alloc</code>
481 of the contained type of <code>*this</code>. (For instance, if
482 called on a <code>variant<int, std::string></code> object
483 containing a <code>std::string</code>, <code>which()</code>
484 would return <code>1</code>.)</simpara>
494 <simpara><code>false</code>: <code>variant</code> always contains
512 <simpara><code>boost::variant</code> usues Boost.TypeIndex library so actually
513 <code>const boost::typeindex::type_info &</code> is returned.
518 <simpara><code>typeid(x)</code>, where <code>x</code> is the the
519 content of <code>*this</code>.</simpara>
551 <simpara>The overload returning <code>void</code> exists only to
553 to <code>variant</code>; thus, its use will (purposefully)
558 <simpara>Every bounded type of the <code>variant</code> must
565 <simpara><code>true</code> if <code>which() == rhs.which()</code>
567 <code>content_this == content_rhs</code>, where
568 <code>content_this</code> is the content of <code>*this</code>
569 and <code>content_rhs</code> is the content of
570 <code>rhs</code>.</simpara>
574 <simpara>If <code>which() == rhs.which()</code> then may fail with
575 any exceptions arising from <code>operator==(T,T)</code>, where
576 <code>T</code> is the contained type of
577 <code>*this</code>.</simpara>
602 <simpara>The overload returning <code>void</code> exists only to
604 to <code>variant</code>; thus, its use will (purposefully)
609 <simpara>Every bounded type of the <code>variant</code> must
616 <simpara><code>true</code> if <code>!(*this == rhs)</code>.</simpara>
620 <simpara>If <code>which() == rhs.which()</code> then may fail with
621 any exceptions arising from <code>operator==(T,T)</code>, where
622 <code>T</code> is the contained type of
623 <code>*this</code>.</simpara>
648 <simpara>The overload returning <code>void</code> exists only to
650 to <code>variant</code>; thus, its use will (purposefully)
655 <simpara>Every bounded type of the <code>variant</code> must
662 <simpara>If <code>which() == rhs.which()</code> then:
663 <code>content_this < content_rhs</code>, where
664 <code>content_this</code> is the content of <code>*this</code>
665 and <code>content_rhs</code> is the content of <code>rhs</code>.
666 Otherwise: <code>which() < rhs.which()</code>.</simpara>
670 <simpara>If <code>which() == rhs.which()</code> then may fail with
671 any exceptions arising from <code>operator<(T,T)</code>,
672 where <code>T</code> is the contained type of
673 <code>*this</code>.</simpara>
699 <simpara>The overload returning <code>void</code> exists only to
701 to <code>variant</code>; thus, its use will (purposefully)
706 <simpara>Every bounded type of the <code>variant</code> must
713 <simpara>true if <code>rhs < *this</code>.</simpara>
718 any exceptions arising from <code>operator<(T,T)</code>,
719 where <code>T</code> is the contained type of
720 <code>*this</code>.</simpara>
746 <simpara>The overload returning <code>void</code> exists only to
748 to <code>variant</code>; thus, its use will (purposefully)
753 <simpara>Every bounded type of the <code>variant</code> must
760 <simpara>true if <code>!(*this > rhs)</code>.</simpara>
765 any exceptions arising from <code>operator<(T,T)</code>,
766 where <code>T</code> is the contained type of
767 <code>*this</code>.</simpara>
793 <simpara>The overload returning <code>void</code> exists only to
795 to <code>variant</code>; thus, its use will (purposefully)
800 <simpara>Every bounded type of the <code>variant</code> must
807 <simpara>true if <code>!(*this < lhs)</code>.</simpara>
812 any exceptions arising from <code>operator<(T,T)</code>,
813 where <code>T</code> is the contained type of
814 <code>*this</code>.</simpara>
840 <simpara>Swaps <code>lhs</code> with <code>rhs</code> by application
841 of <code><methodname>variant::swap</methodname></code>.</simpara>
846 <code><methodname>variant::swap</methodname></code>.</simpara>
851 <purpose>Provides streaming output for <code>variant</code> types.</purpose>
873 <simpara>Every bounded type of the <code>variant</code> must
880 <simpara>Calls <code>out << x</code>, where <code>x</code> is
881 the content of <code>rhs</code>.</simpara>
885 <simpara>Not available when <code>BOOST_NO_IOSTREAM</code> is
892 <purpose>Provides hashing for <code>variant</code> types so
893 that <code>boost::hash</code> may compute hash.</purpose>
909 <simpara>Every bounded type of the <code>variant</code> must
916 <simpara>Calls <code>boost::hash<T>()(x)</code>, where <code>x</code> is
917 the content of <code>rhs</code> and <code>T</code> is its type.</simpara>
922 <code><boost/variant/detail/hash_variant.hpp></code>
930 <simpara>Exposes a <code>variant</code> whose bounded types are the
943 <simpara><code>type</code> has behavior equivalent in every respect to
944 <code><classname>variant</classname>< Sequence[0], Sequence[1], ... ></code>
945 (where <code>Sequence[<emphasis>i</emphasis>]</code> denotes the
946 <emphasis>i</emphasis>-th element of <code>Sequence</code>), except
951 <listitem><code>Sequence</code> must meet the requirements of
955 <code>make_variant_over</code> may not be supported on your
957 <code><macroname>BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT</macroname></code>