diff options
Diffstat (limited to 'libs/variant/doc/reference/variant.xml')
-rw-r--r-- | libs/variant/doc/reference/variant.xml | 205 |
1 files changed, 197 insertions, 8 deletions
diff --git a/libs/variant/doc/reference/variant.xml b/libs/variant/doc/reference/variant.xml index 8c6cb8463..ba67fbeab 100644 --- a/libs/variant/doc/reference/variant.xml +++ b/libs/variant/doc/reference/variant.xml @@ -508,6 +508,12 @@ <method name="type" cv="const"> <type>const std::type_info &</type> + <notes> + <simpara><code>boost::variant</code> usues Boost.TypeIndex library so actually + <code>const boost::typeindex::type_info &</code> is returned. + This method is available even if RTTI is off.</simpara> + </notes> + <returns> <simpara><code>typeid(x)</code>, where <code>x</code> is the the content of <code>*this</code>.</simpara> @@ -515,10 +521,6 @@ <throws>Will not throw.</throws> - <notes> - <simpara>Not available when <code>BOOST_NO_TYPEID</code> is - defined.</simpara> - </notes> </method> </method-group> @@ -534,7 +536,7 @@ <paramtype>const variant &</paramtype> </parameter> </signature> - + <signature cv="const"> <type>void</type> <template> @@ -560,14 +562,60 @@ </requires> <returns> - <simpara><code>true</code> iff <code>which() == rhs.which()</code> + <simpara><code>true</code> if <code>which() == rhs.which()</code> <emphasis>and</emphasis> <code>content_this == content_rhs</code>, where <code>content_this</code> is the content of <code>*this</code> and <code>content_rhs</code> is the content of <code>rhs</code>.</simpara> </returns> - + + <throws> + <simpara>If <code>which() == rhs.which()</code> then may fail with + any exceptions arising from <code>operator==(T,T)</code>, where + <code>T</code> is the contained type of + <code>*this</code>.</simpara> + </throws> + </overloaded-method> + + <overloaded-method name="operator!=" cv="const"> + <purpose>InEquality comparison.</purpose> + + <signature cv="const"> + <type>bool</type> + <parameter name="rhs"> + <paramtype>const variant &</paramtype> + </parameter> + </signature> + + <signature cv="const"> + <type>void</type> + <template> + <template-type-parameter name="U"/> + </template> + <parameter> + <paramtype>const U &</paramtype> + </parameter> + </signature> + + <notes> + <simpara>The overload returning <code>void</code> exists only to + prohibit implicit conversion of the operator's right-hand side + to <code>variant</code>; thus, its use will (purposefully) + result in a compile-time error.</simpara> + </notes> + + <requires> + <simpara>Every bounded type of the <code>variant</code> must + fulfill the requirements of the + <conceptname>EqualityComparable</conceptname> + concept.</simpara> + </requires> + + <returns> + <simpara><code>true</code> if <code>!(*this == rhs)</code>.</simpara> + </returns> + <throws> <simpara>If <code>which() == rhs.which()</code> then may fail with any exceptions arising from <code>operator==(T,T)</code>, where @@ -585,7 +633,7 @@ <paramtype>const variant &</paramtype> </parameter> </signature> - + <signature cv="const"> <type>void</type> <template> @@ -626,6 +674,147 @@ </throws> </overloaded-method> + + <overloaded-method name="operator>"> + <purpose>GreaterThan comparison.</purpose> + + <signature cv="const"> + <type>bool</type> + <parameter name="rhs"> + <paramtype>const variant &</paramtype> + </parameter> + </signature> + + <signature cv="const"> + <type>void</type> + <template> + <template-type-parameter name="U"/> + </template> + <parameter> + <paramtype>const U &</paramtype> + </parameter> + </signature> + + <notes> + <simpara>The overload returning <code>void</code> exists only to + prohibit implicit conversion of the operator's right-hand side + to <code>variant</code>; thus, its use will (purposefully) + result in a compile-time error.</simpara> + </notes> + + <requires> + <simpara>Every bounded type of the <code>variant</code> must + fulfill the requirements of the + <conceptname>LessThanComparable</conceptname> + concept.</simpara> + </requires> + + <returns> + <simpara>true if <code>rhs < *this</code>.</simpara> + </returns> + + <throws> + <simpara>May fail with + any exceptions arising from <code>operator<(T,T)</code>, + where <code>T</code> is the contained type of + <code>*this</code>.</simpara> + </throws> + </overloaded-method> + + + <overloaded-method name="operator<="> + <purpose>LessThan or Equal comparison.</purpose> + + <signature cv="const"> + <type>bool</type> + <parameter name="rhs"> + <paramtype>const variant &</paramtype> + </parameter> + </signature> + + <signature cv="const"> + <type>void</type> + <template> + <template-type-parameter name="U"/> + </template> + <parameter> + <paramtype>const U &</paramtype> + </parameter> + </signature> + + <notes> + <simpara>The overload returning <code>void</code> exists only to + prohibit implicit conversion of the operator's right-hand side + to <code>variant</code>; thus, its use will (purposefully) + result in a compile-time error.</simpara> + </notes> + + <requires> + <simpara>Every bounded type of the <code>variant</code> must + fulfill the requirements of the + <conceptname>LessThanComparable</conceptname> + concept.</simpara> + </requires> + + <returns> + <simpara>true if <code>!(*this > rhs)</code>.</simpara> + </returns> + + <throws> + <simpara>May fail with + any exceptions arising from <code>operator<(T,T)</code>, + where <code>T</code> is the contained type of + <code>*this</code>.</simpara> + </throws> + </overloaded-method> + + + <overloaded-method name="operator>="> + <purpose>GreaterThan or Equal comparison.</purpose> + + <signature cv="const"> + <type>bool</type> + <parameter name="rhs"> + <paramtype>const variant &</paramtype> + </parameter> + </signature> + + <signature cv="const"> + <type>void</type> + <template> + <template-type-parameter name="U"/> + </template> + <parameter> + <paramtype>const U &</paramtype> + </parameter> + </signature> + + <notes> + <simpara>The overload returning <code>void</code> exists only to + prohibit implicit conversion of the operator's right-hand side + to <code>variant</code>; thus, its use will (purposefully) + result in a compile-time error.</simpara> + </notes> + + <requires> + <simpara>Every bounded type of the <code>variant</code> must + fulfill the requirements of the + <conceptname>LessThanComparable</conceptname> + concept.</simpara> + </requires> + + <returns> + <simpara>true if <code>!(*this < lhs)</code>.</simpara> + </returns> + + <throws> + <simpara>May fail with + any exceptions arising from <code>operator<(T,T)</code>, + where <code>T</code> is the contained type of + <code>*this</code>.</simpara> + </throws> + </overloaded-method> + </method-group> </class> |