mirror of
https://github.com/boostorg/variant.git
synced 2026-02-11 00:12:08 +00:00
81 lines
3.3 KiB
XML
81 lines
3.3 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<header name="boost/variant/variant_fwd.hpp">
|
|
<para>Provides a forward declaration of the
|
|
<code><classname>boost::variant</classname></code> and
|
|
<code><classname>boost::recursive_variant</classname></code> class
|
|
templates and the
|
|
<code><classname>boost::recursive_variant_</classname></code> tag
|
|
type. Also defines several preprocessor symbols.</para>
|
|
|
|
<macro name="BOOST_VARIANT_LIMIT_TYPES">
|
|
<purpose><simpara>Expands to the length of the
|
|
template parameter list for <code><classname
|
|
alt="boost::variant">variant</classname></code>.</simpara></purpose>
|
|
|
|
<description>
|
|
<para><emphasis role="bold">Note</emphasis>: Conforming implementations
|
|
of <code>variant</code> must allow at least ten bounded types. That is,
|
|
<code>BOOST_VARIANT_LIMIT_TYPES >= 10</code> must be
|
|
<code>true</code>.</para>
|
|
</description>
|
|
</macro>
|
|
|
|
<macro name="BOOST_VARIANT_ENUM_PARAMS" kind="functionlike">
|
|
<macro-parameter name="param"/>
|
|
|
|
<purpose><simpara>Enumerate parameters for use with
|
|
<code><classname>boost::variant</classname></code>.</simpara></purpose>
|
|
|
|
<description>
|
|
<para>Expands to a comma-separated sequence of length
|
|
<code><macroname>BOOST_VARIANT_LIMIT_TYPES</macroname></code>,
|
|
where each element in the sequence consists of the concatenation
|
|
of <emphasis>param</emphasis> with its zero-based index into the
|
|
sequence. That is, <code>param ## 0, param ## 1, ..., param ##
|
|
BOOST_VARIANT_LIMIT_TYPES - 1</code>.</para>
|
|
|
|
<para><emphasis role="bold">Rationale</emphasis>: This macro
|
|
greatly simplifies for the user the process of declaring
|
|
<code><classname alt="boost::variant">variant</classname></code>
|
|
types in function templates or explicit partial specializations
|
|
of class templates, as shown in the <link
|
|
linkend="variant.tutorial.preprocessor">tutorial
|
|
section</link>.</para>
|
|
</description>
|
|
</macro>
|
|
|
|
<macro name="BOOST_VARIANT_ENUM_SHIFTED_PARAMS" kind="functionlike">
|
|
<macro-parameter name="param"/>
|
|
|
|
<purpose><simpara>Enumerate all but the first parameter for use
|
|
with
|
|
<code><classname>boost::variant</classname></code>.</simpara></purpose>
|
|
|
|
<description>
|
|
<para>Expands to a comma-separated sequence of length
|
|
<code><macroname>BOOST_VARIANT_LIMIT_TYPES</macroname> -
|
|
1</code>, where each element in the sequence consists of the
|
|
concatenation of <emphasis>param</emphasis> with its one-based
|
|
index into the sequence. That is, <code>param ## 1, ..., param
|
|
## BOOST_VARIANT_LIMIT_TYPES - 1</code>.</para>
|
|
|
|
<para><emphasis role="bold">Note</emphasis>: This macro results
|
|
in the same expansion as
|
|
<code><macroname>BOOST_VARIANT_ENUM_PARAMS</macroname></code> --
|
|
but without the first term.</para>
|
|
</description>
|
|
</macro>
|
|
|
|
<macro name="BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT">
|
|
<purpose><simpara>Indicates absence of type sequence support in
|
|
<code><classname>boost::variant</classname></code>.</simpara></purpose>
|
|
|
|
<description>
|
|
<para>Defined only if the
|
|
<code><classname>boost::variant</classname><
|
|
<emphasis>type-sequence</emphasis> ></code> syntax is not
|
|
supported for some reason on the current platform or
|
|
compiler.</para>
|
|
</description>
|
|
</macro>
|
|
</header> |