1 | <html> |
---|
2 | <head> |
---|
3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
---|
4 | <title>Reference</title> |
---|
5 | <link rel="stylesheet" href="../boostbook.css" type="text/css"> |
---|
6 | <meta name="generator" content="DocBook XSL Stylesheets V1.69.1"> |
---|
7 | <link rel="start" href="../index.html" title="The Boost C++ Libraries"> |
---|
8 | <link rel="up" href="../variant.html" title="Chapter 15. Boost.Variant"> |
---|
9 | <link rel="prev" href="tutorial.html" title="Tutorial"> |
---|
10 | <link rel="next" href="../BOOST_VARIANT_LIMIT_TYPES.html" title="Macro BOOST_VARIANT_LIMIT_TYPES"> |
---|
11 | </head> |
---|
12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
---|
13 | <table cellpadding="2" width="100%"> |
---|
14 | <td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td> |
---|
15 | <td align="center"><a href="../../../index.htm">Home</a></td> |
---|
16 | <td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td> |
---|
17 | <td align="center"><a href="../../../people/people.htm">People</a></td> |
---|
18 | <td align="center"><a href="../../../more/faq.htm">FAQ</a></td> |
---|
19 | <td align="center"><a href="../../../more/index.htm">More</a></td> |
---|
20 | </table> |
---|
21 | <hr> |
---|
22 | <div class="spirit-nav"> |
---|
23 | <a accesskey="p" href="tutorial.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../variant.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../BOOST_VARIANT_LIMIT_TYPES.html"><img src="../images/next.png" alt="Next"></a> |
---|
24 | </div> |
---|
25 | <div class="section" lang="en"> |
---|
26 | <div class="titlepage"><div><div><h3 class="title"> |
---|
27 | <a name="variant.reference"></a>Reference</h3></div></div></div> |
---|
28 | <div class="toc"><dl> |
---|
29 | <dt><span class="section"><a href="reference.html#variant.concepts">Concepts</a></span></dt> |
---|
30 | <dt><span class="section"><a href="reference.html#header.boost.variant.hpp">Header <boost/variant.hpp></a></span></dt> |
---|
31 | <dt><span class="section"><a href="reference.html#id2654455">Header <boost/variant/variant_fwd.hpp></a></span></dt> |
---|
32 | <dt><span class="section"><a href="reference.html#id2540137">Header <boost/variant/variant.hpp></a></span></dt> |
---|
33 | <dt><span class="section"><a href="reference.html#id2551122">Header <boost/variant/recursive_variant.hpp></a></span></dt> |
---|
34 | <dt><span class="section"><a href="reference.html#id2644455">Header <boost/variant/recursive_wrapper.hpp></a></span></dt> |
---|
35 | <dt><span class="section"><a href="reference.html#id2660594">Header <boost/variant/apply_visitor.hpp></a></span></dt> |
---|
36 | <dt><span class="section"><a href="reference.html#id2588868">Header <boost/variant/get.hpp></a></span></dt> |
---|
37 | <dt><span class="section"><a href="reference.html#id2634493">Header <boost/variant/bad_visit.hpp></a></span></dt> |
---|
38 | <dt><span class="section"><a href="reference.html#id2645589">Header <boost/variant/static_visitor.hpp></a></span></dt> |
---|
39 | <dt><span class="section"><a href="reference.html#id2551546">Header <boost/variant/visitor_ptr.hpp></a></span></dt> |
---|
40 | </dl></div> |
---|
41 | <div class="section" lang="en"> |
---|
42 | <div class="titlepage"><div><div><h4 class="title"> |
---|
43 | <a name="variant.concepts"></a>Concepts</h4></div></div></div> |
---|
44 | <div class="toc"><dl> |
---|
45 | <dt><span class="section"><a href="reference.html#variant.concepts.bounded-type"><span class="emphasis"><em>BoundedType</em></span></a></span></dt> |
---|
46 | <dt><span class="section"><a href="reference.html#variant.concepts.static-visitor"><span class="emphasis"><em>StaticVisitor</em></span></a></span></dt> |
---|
47 | <dt><span class="section"><a href="reference.html#variant.concepts.output-streamable"><span class="emphasis"><em>OutputStreamable</em></span></a></span></dt> |
---|
48 | </dl></div> |
---|
49 | <div class="section" lang="en"> |
---|
50 | <div class="titlepage"><div><div><h5 class="title"> |
---|
51 | <a name="variant.concepts.bounded-type"></a><span class="emphasis"><em>BoundedType</em></span></h5></div></div></div> |
---|
52 | <p>The requirements on a <span class="bold"><strong>bounded type</strong></span> |
---|
53 | are as follows:</p> |
---|
54 | <div class="itemizedlist"><ul type="disc"> |
---|
55 | <li> |
---|
56 | <a href="../CopyConstructible.html" title="Concept CopyConstructible">CopyConstructible</a> [20.1.3].</li> |
---|
57 | <li>Destructor upholds the no-throw exception-safety |
---|
58 | guarantee.</li> |
---|
59 | <li>Complete at the point of <code class="computeroutput">variant</code> template |
---|
60 | instantiation. (See |
---|
61 | <code class="computeroutput"><a href="../recursive_wrapper.html" title="Class template recursive_wrapper">boost::recursive_wrapper</a><T></code> |
---|
62 | for a type wrapper that accepts incomplete types to enable recursive |
---|
63 | <code class="computeroutput">variant</code> types.)</li> |
---|
64 | </ul></div> |
---|
65 | <p>Every type specified as a template argument to |
---|
66 | <code class="computeroutput"><a href="../boost/variant.html" title="Class template variant">variant</a></code> must at minimum fulfill the |
---|
67 | above requirements. In addition, certain features of <code class="computeroutput">variant</code> |
---|
68 | are available only if its bounded types meet the requirements of these |
---|
69 | following additional concepts:</p> |
---|
70 | <div class="itemizedlist"><ul type="disc"> |
---|
71 | <li> |
---|
72 | <a href="../Assignable.html" title="Concept Assignable">Assignable</a>: |
---|
73 | <code class="computeroutput">variant</code> is itself <span class="emphasis"><em>Assignable</em></span> if and |
---|
74 | only if every one of its bounded types meets the requirements of the |
---|
75 | concept. (Note that top-level <code class="computeroutput">const</code>-qualified types and |
---|
76 | reference types do <span class="emphasis"><em>not</em></span> meet these |
---|
77 | requirements.)</li> |
---|
78 | <li> |
---|
79 | <a href="../DefaultConstructible.html" title="Concept DefaultConstructible">DefaultConstructible</a> [20.1.4]: |
---|
80 | <code class="computeroutput">variant</code> is itself |
---|
81 | <a href="../DefaultConstructible.html" title="Concept DefaultConstructible">DefaultConstructible</a> if and only if its first |
---|
82 | bounded type (i.e., <code class="computeroutput">T1</code>) meets the requirements of the |
---|
83 | concept.</li> |
---|
84 | <li> |
---|
85 | <a href="../EqualityComparable.html" title="Concept EqualityComparable">EqualityComparable</a>: |
---|
86 | <code class="computeroutput">variant</code> is itself <a href="../EqualityComparable.html" title="Concept EqualityComparable">EqualityComparable</a> |
---|
87 | if and only if every one of its bounded types meets the requirements |
---|
88 | of the concept.</li> |
---|
89 | <li> |
---|
90 | <a href="../LessThanComparable.html" title="Concept LessThanComparable">LessThanComparable</a>: |
---|
91 | <code class="computeroutput">variant</code> is itself <a href="../LessThanComparable.html" title="Concept LessThanComparable">LessThanComparable</a> |
---|
92 | if and only if every one of its bounded types meets the requirements |
---|
93 | of the concept.</li> |
---|
94 | <li> |
---|
95 | <a href="reference.html#variant.concepts.output-streamable" title="OutputStreamable"><span class="emphasis"><em>OutputStreamable</em></span></a>: |
---|
96 | <code class="computeroutput">variant</code> is itself <span class="emphasis"><em>OutputStreamable</em></span> |
---|
97 | if and only if every one of its bounded types meets the requirements |
---|
98 | of the concept.</li> |
---|
99 | </ul></div> |
---|
100 | </div> |
---|
101 | <div class="section" lang="en"> |
---|
102 | <div class="titlepage"><div><div><h5 class="title"> |
---|
103 | <a name="variant.concepts.static-visitor"></a><span class="emphasis"><em>StaticVisitor</em></span></h5></div></div></div> |
---|
104 | <div class="toc"><dl><dt><span class="section"><a href="reference.html#variant.concepts.static-visitor.examples">Examples</a></span></dt></dl></div> |
---|
105 | <p>The requirements on a <span class="bold"><strong>static |
---|
106 | visitor</strong></span> of a type <code class="computeroutput">T</code> are as follows:</p> |
---|
107 | <div class="itemizedlist"><ul type="disc"> |
---|
108 | <li>Must allow invocation as a function by overloading |
---|
109 | <code class="computeroutput">operator()</code>, unambiguously accepting any value of type |
---|
110 | <code class="computeroutput">T</code>.</li> |
---|
111 | <li>Must expose inner type <code class="computeroutput">result_type</code>. (See |
---|
112 | <code class="computeroutput"><a href="../visitor_ptr.html" title="Function template visitor_ptr">boost::visitor_ptr</a></code> for a |
---|
113 | solution to using functions as visitors.)</li> |
---|
114 | <li>If <code class="computeroutput">result_type</code> is not <code class="computeroutput">void</code>, then |
---|
115 | each operation of the function object must return a value implicitly |
---|
116 | convertible to <code class="computeroutput">result_type</code>.</li> |
---|
117 | </ul></div> |
---|
118 | <div class="section" lang="en"> |
---|
119 | <div class="titlepage"><div><div><h6 class="title"> |
---|
120 | <a name="variant.concepts.static-visitor.examples"></a>Examples</h6></div></div></div> |
---|
121 | <p>The following class satisfies the requirements of a static visitor |
---|
122 | of several types (i.e., explicitly: <code class="computeroutput">int</code> and |
---|
123 | <code class="computeroutput">std::string</code>; or, e.g., implicitly: <code class="computeroutput">short</code> and |
---|
124 | <code class="computeroutput">const char *</code>; etc.):</p> |
---|
125 | <pre class="programlisting">class my_visitor |
---|
126 | : public <code class="computeroutput"><a href="../static_visitor.html" title="Class template static_visitor">boost::static_visitor</a></code><int> |
---|
127 | { |
---|
128 | public: |
---|
129 | |
---|
130 | int operator()(int i) |
---|
131 | { |
---|
132 | return i * 2; |
---|
133 | } |
---|
134 | |
---|
135 | int operator()(const std::string& s) |
---|
136 | { |
---|
137 | return s.length(); |
---|
138 | } |
---|
139 | |
---|
140 | };</pre> |
---|
141 | <p>Another example is the following class, whose function-call |
---|
142 | operator is a member template, allowing it to operate on values of many |
---|
143 | types. Thus, the following class is a visitor of any type that supports |
---|
144 | streaming output (e.g., <code class="computeroutput">int</code>, <code class="computeroutput">double</code>, |
---|
145 | <code class="computeroutput">std::string</code>, etc.):</p> |
---|
146 | <pre class="programlisting">class printer |
---|
147 | : public <code class="computeroutput"><a href="../static_visitor.html" title="Class template static_visitor">boost::static_visitor</a></code><> |
---|
148 | { |
---|
149 | template <typename T> |
---|
150 | void operator()(const T& t) |
---|
151 | { |
---|
152 | std::cout << t << std::endl; |
---|
153 | } |
---|
154 | };</pre> |
---|
155 | </div> |
---|
156 | </div> |
---|
157 | <div class="section" lang="en"> |
---|
158 | <div class="titlepage"><div><div><h5 class="title"> |
---|
159 | <a name="variant.concepts.output-streamable"></a><span class="emphasis"><em>OutputStreamable</em></span></h5></div></div></div> |
---|
160 | <p>The requirements on an <span class="bold"><strong>output |
---|
161 | streamable</strong></span> type <code class="computeroutput">T</code> are as follows:</p> |
---|
162 | <div class="itemizedlist"><ul type="disc"><li>For any object <code class="computeroutput">t</code> of type <code class="computeroutput">T</code>, |
---|
163 | <code class="computeroutput">std::cout << t</code> must be a valid |
---|
164 | expression.</li></ul></div> |
---|
165 | </div> |
---|
166 | </div> |
---|
167 | <div class="section" lang="en"> |
---|
168 | <div class="titlepage"><div><div><h4 class="title"> |
---|
169 | <a name="header.boost.variant.hpp"></a>Header <<a href="../../../boost/variant.hpp" target="_top">boost/variant.hpp</a>></h4></div></div></div> |
---|
170 | <div class="toc"><dl><dt><span class="section"><a href="reference.html#variant.header.include-all"></a></span></dt></dl></div> |
---|
171 | <div class="section" lang="en"> |
---|
172 | <div class="titlepage"></div> |
---|
173 | <p>This header exists simply as a convenience to the user, including |
---|
174 | all of the headers in the <code class="computeroutput">boost/variant</code> directory.</p> |
---|
175 | </div> |
---|
176 | </div> |
---|
177 | <div class="section" lang="en"> |
---|
178 | <div class="titlepage"><div><div><h4 class="title"> |
---|
179 | <a name="id2654455"></a>Header <<a href="../../../boost/variant/variant_fwd.hpp" target="_top">boost/variant/variant_fwd.hpp</a>></h4></div></div></div> |
---|
180 | <p>Provides forward declarations of the |
---|
181 | <code class="computeroutput"><a href="../boost/variant.html" title="Class template variant">boost::variant</a></code>, |
---|
182 | <code class="computeroutput"><a href="../make_variant_over.html" title="Class template make_variant_over">boost::make_variant_over</a></code>, |
---|
183 | <code class="computeroutput"><a href="../make_recursive_variant.html" title="Class template make_recursive_variant">boost::make_recursive_variant</a></code>, and |
---|
184 | <code class="computeroutput"><a href="../id2655704.html" title="Class template make_recursive_variant_over">boost::make_recursive_variant_over</a></code> |
---|
185 | class templates and the <code class="computeroutput">boost::recursive_variant_</code> tag type. |
---|
186 | Also defines several preprocessor symbols, as described below.</p> |
---|
187 | <pre class="synopsis"> |
---|
188 | |
---|
189 | <a href="../BOOST_VARIANT_LIMIT_TYPES.html" title="Macro BOOST_VARIANT_LIMIT_TYPES">BOOST_VARIANT_LIMIT_TYPES</a> |
---|
190 | <a href="../BOOST_VARIANT_ENUM_PARAMS.html" title="Macro BOOST_VARIANT_ENUM_PARAMS">BOOST_VARIANT_ENUM_PARAMS</a>(param) |
---|
191 | <a href="../id2652694.html" title="Macro BOOST_VARIANT_ENUM_SHIFTED_PARAMS">BOOST_VARIANT_ENUM_SHIFTED_PARAMS</a>(param) |
---|
192 | <a href="../id2667605.html" title="Macro BOOST_VARIANT_NO_REFERENCE_SUPPORT">BOOST_VARIANT_NO_REFERENCE_SUPPORT</a> |
---|
193 | <a href="../id2648190.html" title="Macro BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT">BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT</a> |
---|
194 | <a href="../id2404411.html" title="Macro BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT">BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT</a></pre> |
---|
195 | </div> |
---|
196 | <div class="section" lang="en"> |
---|
197 | <div class="titlepage"><div><div><h4 class="title"> |
---|
198 | <a name="id2540137"></a>Header <<a href="../../../boost/variant/variant.hpp" target="_top">boost/variant/variant.hpp</a>></h4></div></div></div> |
---|
199 | <pre class="synopsis"><span class="bold"><strong>namespace</strong></span> boost { |
---|
200 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T1, <span class="bold"><strong>typename</strong></span> T2 = <span class="emphasis"><em>unspecified</em></span>, ..., |
---|
201 | <span class="bold"><strong>typename</strong></span> TN = <span class="emphasis"><em>unspecified</em></span>> |
---|
202 | <span class="bold"><strong>class</strong></span> <a href="../boost/variant.html" title="Class template variant">variant</a>; |
---|
203 | |
---|
204 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Sequence> <span class="bold"><strong>class</strong></span> <a href="../make_variant_over.html" title="Class template make_variant_over">make_variant_over</a>; |
---|
205 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T1, <span class="bold"><strong>typename</strong></span> T2, ..., <span class="bold"><strong>typename</strong></span> TN> |
---|
206 | <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="../id2629621.html" title="Function template swap">swap</a>(<a href="../boost/variant.html" title="Class template variant">variant</a><T1, T2, ..., TN> &, <a href="../boost/variant.html" title="Class template variant">variant</a><T1, T2, ..., TN> &); |
---|
207 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> ElemType, <span class="bold"><strong>typename</strong></span> Traits, <span class="bold"><strong>typename</strong></span> T1, <span class="bold"><strong>typename</strong></span> T2, ..., |
---|
208 | <span class="bold"><strong>typename</strong></span> TN> |
---|
209 | <span class="type">std::basic_ostream<ElemType,Traits> &</span> |
---|
210 | <a href="../id2630804.html" title="Function template operator<<"><span class="bold"><strong>operator</strong></span><<</a>(std::basic_ostream<ElemType,Traits> &, |
---|
211 | <span class="bold"><strong>const</strong></span> <a href="../boost/variant.html" title="Class template variant">variant</a><T1, T2, ..., TN> &); |
---|
212 | }</pre> |
---|
213 | </div> |
---|
214 | <div class="section" lang="en"> |
---|
215 | <div class="titlepage"><div><div><h4 class="title"> |
---|
216 | <a name="id2551122"></a>Header <<a href="../../../boost/variant/recursive_variant.hpp" target="_top">boost/variant/recursive_variant.hpp</a>></h4></div></div></div> |
---|
217 | <pre class="synopsis"><span class="bold"><strong>namespace</strong></span> boost { |
---|
218 | <span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> recursive_variant_; |
---|
219 | |
---|
220 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T1, <span class="bold"><strong>typename</strong></span> T2 = <span class="emphasis"><em>unspecified</em></span>, ..., |
---|
221 | <span class="bold"><strong>typename</strong></span> TN = <span class="emphasis"><em>unspecified</em></span>> |
---|
222 | <span class="bold"><strong>class</strong></span> <a href="../make_recursive_variant.html" title="Class template make_recursive_variant">make_recursive_variant</a>; |
---|
223 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Sequence> <span class="bold"><strong>class</strong></span> <a href="../id2655704.html" title="Class template make_recursive_variant_over">make_recursive_variant_over</a>; |
---|
224 | }</pre> |
---|
225 | </div> |
---|
226 | <div class="section" lang="en"> |
---|
227 | <div class="titlepage"><div><div><h4 class="title"> |
---|
228 | <a name="id2644455"></a>Header <<a href="../../../boost/variant/recursive_wrapper.hpp" target="_top">boost/variant/recursive_wrapper.hpp</a>></h4></div></div></div> |
---|
229 | <pre class="synopsis"><span class="bold"><strong>namespace</strong></span> boost { |
---|
230 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T> <span class="bold"><strong>class</strong></span> <a href="../recursive_wrapper.html" title="Class template recursive_wrapper">recursive_wrapper</a>; |
---|
231 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T> <span class="bold"><strong>class</strong></span> <a href="../is_recursive_wrapper.html" title="Class template is_recursive_wrapper">is_recursive_wrapper</a>; |
---|
232 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T> <span class="bold"><strong>class</strong></span> <a href="../unwrap_recursive_wrapper.html" title="Class template unwrap_recursive_wrapper">unwrap_recursive_wrapper</a>; |
---|
233 | }</pre> |
---|
234 | </div> |
---|
235 | <div class="section" lang="en"> |
---|
236 | <div class="titlepage"><div><div><h4 class="title"> |
---|
237 | <a name="id2660594"></a>Header <<a href="../../../boost/variant/apply_visitor.hpp" target="_top">boost/variant/apply_visitor.hpp</a>></h4></div></div></div> |
---|
238 | <pre class="synopsis"><span class="bold"><strong>namespace</strong></span> boost { |
---|
239 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Visitor> <span class="bold"><strong>class</strong></span> <a href="../apply_visitor_delayed_t.html" title="Class template apply_visitor_delayed_t">apply_visitor_delayed_t</a>; |
---|
240 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Visitor, <span class="bold"><strong>typename</strong></span> Variant> |
---|
241 | <span class="type"><span class="bold"><strong>typename</strong></span> Visitor::result_type</span> <a href="../apply_visitor.html" title="Function apply_visitor">apply_visitor</a>(Visitor &, Variant &); |
---|
242 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Visitor, <span class="bold"><strong>typename</strong></span> Variant> |
---|
243 | <span class="type"><span class="bold"><strong>typename</strong></span> Visitor::result_type</span> <a href="../apply_visitor.html" title="Function apply_visitor">apply_visitor</a>(<span class="bold"><strong>const</strong></span> Visitor &, Variant &); |
---|
244 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> BinaryVisitor, <span class="bold"><strong>typename</strong></span> Variant1, <span class="bold"><strong>typename</strong></span> Variant2> |
---|
245 | <span class="type"><span class="bold"><strong>typename</strong></span> BinaryVisitor::result_type</span> |
---|
246 | <a href="../apply_visitor.html" title="Function apply_visitor">apply_visitor</a>(BinaryVisitor &, Variant1 &, Variant2 &); |
---|
247 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> BinaryVisitor, <span class="bold"><strong>typename</strong></span> Variant1, <span class="bold"><strong>typename</strong></span> Variant2> |
---|
248 | <span class="type"><span class="bold"><strong>typename</strong></span> BinaryVisitor::result_type</span> |
---|
249 | <a href="../apply_visitor.html" title="Function apply_visitor">apply_visitor</a>(<span class="bold"><strong>const</strong></span> BinaryVisitor &, Variant1 &, Variant2 &); |
---|
250 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Visitor> |
---|
251 | <span class="type"><a href="../apply_visitor_delayed_t.html" title="Class template apply_visitor_delayed_t">apply_visitor_delayed_t</a><Visitor></span> <a href="../apply_visitor.html" title="Function apply_visitor">apply_visitor</a>(Visitor &); |
---|
252 | }</pre> |
---|
253 | </div> |
---|
254 | <div class="section" lang="en"> |
---|
255 | <div class="titlepage"><div><div><h4 class="title"> |
---|
256 | <a name="id2588868"></a>Header <<a href="../../../boost/variant/get.hpp" target="_top">boost/variant/get.hpp</a>></h4></div></div></div> |
---|
257 | <pre class="synopsis"><span class="bold"><strong>namespace</strong></span> boost { |
---|
258 | <span class="bold"><strong>class</strong></span> <a href="../bad_get.html" title="Class bad_get">bad_get</a>; |
---|
259 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> U, <span class="bold"><strong>typename</strong></span> T1, <span class="bold"><strong>typename</strong></span> T2, ..., <span class="bold"><strong>typename</strong></span> TN> |
---|
260 | <span class="type">U *</span> <a href="../get.html" title="Function get">get</a>(<a href="../boost/variant.html" title="Class template variant">variant</a><T1, T2, ..., TN> *); |
---|
261 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> U, <span class="bold"><strong>typename</strong></span> T1, <span class="bold"><strong>typename</strong></span> T2, ..., <span class="bold"><strong>typename</strong></span> TN> |
---|
262 | <span class="type"><span class="bold"><strong>const</strong></span> U *</span> <a href="../get.html" title="Function get">get</a>(<span class="bold"><strong>const</strong></span> <a href="../boost/variant.html" title="Class template variant">variant</a><T1, T2, ..., TN> *); |
---|
263 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> U, <span class="bold"><strong>typename</strong></span> T1, <span class="bold"><strong>typename</strong></span> T2, ..., <span class="bold"><strong>typename</strong></span> TN> |
---|
264 | <span class="type">U &</span> <a href="../get.html" title="Function get">get</a>(<a href="../boost/variant.html" title="Class template variant">variant</a><T1, T2, ..., TN> &); |
---|
265 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> U, <span class="bold"><strong>typename</strong></span> T1, <span class="bold"><strong>typename</strong></span> T2, ..., <span class="bold"><strong>typename</strong></span> TN> |
---|
266 | <span class="type"><span class="bold"><strong>const</strong></span> U &</span> <a href="../get.html" title="Function get">get</a>(<span class="bold"><strong>const</strong></span> <a href="../boost/variant.html" title="Class template variant">variant</a><T1, T2, ..., TN> &); |
---|
267 | }</pre> |
---|
268 | </div> |
---|
269 | <div class="section" lang="en"> |
---|
270 | <div class="titlepage"><div><div><h4 class="title"> |
---|
271 | <a name="id2634493"></a>Header <<a href="../../../boost/variant/bad_visit.hpp" target="_top">boost/variant/bad_visit.hpp</a>></h4></div></div></div> |
---|
272 | <pre class="synopsis"><span class="bold"><strong>namespace</strong></span> boost { |
---|
273 | <span class="bold"><strong>class</strong></span> <a href="../bad_visit.html" title="Class bad_visit">bad_visit</a>; |
---|
274 | }</pre> |
---|
275 | </div> |
---|
276 | <div class="section" lang="en"> |
---|
277 | <div class="titlepage"><div><div><h4 class="title"> |
---|
278 | <a name="id2645589"></a>Header <<a href="../../../boost/variant/static_visitor.hpp" target="_top">boost/variant/static_visitor.hpp</a>></h4></div></div></div> |
---|
279 | <pre class="synopsis"><span class="bold"><strong>namespace</strong></span> boost { |
---|
280 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> ResultType> <span class="bold"><strong>class</strong></span> <a href="../static_visitor.html" title="Class template static_visitor">static_visitor</a>; |
---|
281 | }</pre> |
---|
282 | </div> |
---|
283 | <div class="section" lang="en"> |
---|
284 | <div class="titlepage"><div><div><h4 class="title"> |
---|
285 | <a name="id2551546"></a>Header <<a href="../../../boost/variant/visitor_ptr.hpp" target="_top">boost/variant/visitor_ptr.hpp</a>></h4></div></div></div> |
---|
286 | <pre class="synopsis"><span class="bold"><strong>namespace</strong></span> boost { |
---|
287 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> T, <span class="bold"><strong>typename</strong></span> R> <span class="bold"><strong>class</strong></span> <a href="../visitor_ptr_t.html" title="Class template visitor_ptr_t">visitor_ptr_t</a>; |
---|
288 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> R, <span class="bold"><strong>typename</strong></span> T> <span class="type"><a href="../visitor_ptr_t.html" title="Class template visitor_ptr_t">visitor_ptr_t</a><T,R></span> <a href="../visitor_ptr.html" title="Function template visitor_ptr">visitor_ptr</a>(R (*)(T)); |
---|
289 | }</pre> |
---|
290 | </div> |
---|
291 | </div> |
---|
292 | <table width="100%"><tr> |
---|
293 | <td align="left"></td> |
---|
294 | <td align="right"><small>Copyright © 2002, 2003 Eric Friedman, Itay Maman</small></td> |
---|
295 | </tr></table> |
---|
296 | <hr> |
---|
297 | <div class="spirit-nav"> |
---|
298 | <a accesskey="p" href="tutorial.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../variant.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../BOOST_VARIANT_LIMIT_TYPES.html"><img src="../images/next.png" alt="Next"></a> |
---|
299 | </div> |
---|
300 | </body> |
---|
301 | </html> |
---|