1 | <?xml version="1.0" encoding="utf-8" ?> |
---|
2 | <header name="boost/variant/variant_fwd.hpp"> |
---|
3 | <using-namespace name="boost"/> |
---|
4 | |
---|
5 | <para>Provides forward declarations of the |
---|
6 | <code><classname>boost::variant</classname></code>, |
---|
7 | <code><classname>boost::make_variant_over</classname></code>, |
---|
8 | <code><classname>boost::make_recursive_variant</classname></code>, and |
---|
9 | <code><classname>boost::make_recursive_variant_over</classname></code> |
---|
10 | class templates and the <code>boost::recursive_variant_</code> tag type. |
---|
11 | Also defines several preprocessor symbols, as described below.</para> |
---|
12 | |
---|
13 | <macro name="BOOST_VARIANT_LIMIT_TYPES"> |
---|
14 | <purpose> |
---|
15 | <simpara>Expands to the length of the |
---|
16 | template parameter list for |
---|
17 | <code><classname>variant</classname></code>.</simpara> |
---|
18 | </purpose> |
---|
19 | |
---|
20 | <description> |
---|
21 | <para><emphasis role="bold">Note</emphasis>: Conforming |
---|
22 | implementations of <code>variant</code> must allow at least ten |
---|
23 | template arguments. That is, BOOST_VARIANT_LIMIT_TYPES must be greater |
---|
24 | or equal to <code>10</code>.</para> |
---|
25 | </description> |
---|
26 | </macro> |
---|
27 | |
---|
28 | <macro name="BOOST_VARIANT_ENUM_PARAMS" kind="functionlike"> |
---|
29 | <macro-parameter name="param"/> |
---|
30 | |
---|
31 | <purpose> |
---|
32 | <simpara>Enumerate parameters for use with |
---|
33 | <code><classname>variant</classname></code>.</simpara> |
---|
34 | </purpose> |
---|
35 | |
---|
36 | <description> |
---|
37 | <para>Expands to a comma-separated sequence of length |
---|
38 | <code><macroname>BOOST_VARIANT_LIMIT_TYPES</macroname></code>, where |
---|
39 | each element in the sequence consists of the concatenation of |
---|
40 | <emphasis>param</emphasis> with its zero-based index into the |
---|
41 | sequence. That is, |
---|
42 | <code>param ## 0, param ## 1, ..., param ## BOOST_VARIANT_LIMIT_TYPES - 1</code>.</para> |
---|
43 | |
---|
44 | <para><emphasis role="bold">Rationale</emphasis>: This macro greatly |
---|
45 | simplifies for the user the process of declaring |
---|
46 | <code><classname>variant</classname></code> types |
---|
47 | in function templates or explicit partial specializations of class |
---|
48 | templates, as shown in the |
---|
49 | <link linkend="variant.tutorial.preprocessor">tutorial</link>.</para> |
---|
50 | </description> |
---|
51 | </macro> |
---|
52 | |
---|
53 | <macro name="BOOST_VARIANT_ENUM_SHIFTED_PARAMS" kind="functionlike"> |
---|
54 | <macro-parameter name="param"/> |
---|
55 | |
---|
56 | <purpose> |
---|
57 | <simpara>Enumerate all but the first parameter for use with |
---|
58 | <code><classname>variant</classname></code>.</simpara> |
---|
59 | </purpose> |
---|
60 | |
---|
61 | <description> |
---|
62 | <para>Expands to a comma-separated sequence of length |
---|
63 | <code><macroname>BOOST_VARIANT_LIMIT_TYPES</macroname> - 1</code>, |
---|
64 | where each element in the sequence consists of the concatenation of |
---|
65 | <emphasis>param</emphasis> with its one-based index into the sequence. |
---|
66 | That is, |
---|
67 | <code>param ## 1, ..., param ## BOOST_VARIANT_LIMIT_TYPES - 1</code>.</para> |
---|
68 | |
---|
69 | <para><emphasis role="bold">Note</emphasis>: This macro results in the |
---|
70 | same expansion as |
---|
71 | <code><macroname>BOOST_VARIANT_ENUM_PARAMS</macroname></code> -- but |
---|
72 | without the first term.</para> |
---|
73 | </description> |
---|
74 | </macro> |
---|
75 | |
---|
76 | <macro name="BOOST_VARIANT_NO_REFERENCE_SUPPORT"> |
---|
77 | <purpose> |
---|
78 | <simpara>Indicates <code><classname>variant</classname></code> does not |
---|
79 | support references as bounded types.</simpara> |
---|
80 | </purpose> |
---|
81 | |
---|
82 | <description> |
---|
83 | <para>Defined only if <code><classname>variant</classname></code> does |
---|
84 | not support references as bounded types.</para> |
---|
85 | </description> |
---|
86 | </macro> |
---|
87 | |
---|
88 | <macro name="BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT"> |
---|
89 | <purpose> |
---|
90 | <simpara>Indicates absence of support for specifying the bounded types |
---|
91 | of a <code><classname>variant</classname></code> by the elements of a |
---|
92 | type sequence.</simpara> |
---|
93 | </purpose> |
---|
94 | |
---|
95 | <description> |
---|
96 | <para>Defined only if |
---|
97 | <code><classname>make_variant_over</classname></code> and |
---|
98 | <code><classname>make_recursive_variant_over</classname></code> |
---|
99 | are not supported for some reason on the target compiler.</para> |
---|
100 | </description> |
---|
101 | </macro> |
---|
102 | |
---|
103 | <macro name="BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT"> |
---|
104 | <purpose> |
---|
105 | <simpara>Indicates |
---|
106 | <code><classname>make_recursive_variant</classname></code> operates in |
---|
107 | an implementation-defined manner.</simpara> |
---|
108 | </purpose> |
---|
109 | |
---|
110 | <description> |
---|
111 | <para>Defined only if |
---|
112 | <code><classname>make_recursive_variant</classname></code> does not |
---|
113 | operate as documented on the target compiler, but rather in an |
---|
114 | implementation-defined manner.</para> |
---|
115 | |
---|
116 | <para><emphasis role="bold">Implementation Note</emphasis>: If |
---|
117 | <code>BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT</code> is |
---|
118 | defined for the target compiler, the current implementation uses the |
---|
119 | <libraryname>MPL</libraryname> lambda mechanism to approximate the |
---|
120 | desired behavior. (In most cases, however, such compilers do not have |
---|
121 | full lambda support either.)</para> |
---|
122 | </description> |
---|
123 | </macro> |
---|
124 | </header> |
---|