]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/function_types/doc/html/boost_functiontypes/reference/macros.html
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / function_types / doc / html / boost_functiontypes / reference / macros.html
CommitLineData
7c673cae
FG
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4<title>Macros</title>
5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.FunctionTypes 2.5">
8<link rel="up" href="../reference.html" title="Reference">
9<link rel="prev" href="tag_types.html" title="Tag Types">
10<link rel="next" href="../rationale.html" title="Rationale">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="tag_types.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../rationale.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h3 class="title">
27<a name="boost_functiontypes.reference.macros"></a><a class="link" href="macros.html" title="Macros">Macros</a>
28</h3></div></div></div>
29<div class="toc"><dl>
30<dt><span class="section"><a href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_MAX_ARITY">BOOST_FT_MAX_ARITY</a></span></dt>
31<dt><span class="section"><a href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_CC_NAMES">BOOST_FT_CC_NAMES</a></span></dt>
32<dt><span class="section"><a href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_CC">BOOST_FT_CC_*</a></span></dt>
33<dt><span class="section"><a href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_COMMON_X86_CCs">BOOST_FT_COMMON_X86_CCs</a></span></dt>
34<dt><span class="section"><a href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_SYNTAX">BOOST_FT_SYNTAX</a></span></dt>
35<dt><span class="section"><a href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_NULLARY_PARAM">BOOST_FT_NULLARY_PARAM</a></span></dt>
36<dt><span class="section"><a href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_NO_CV_FUNC_SUPPORT">BOOST_FT_NO_CV_FUNC_SUPPORT</a></span></dt>
37<dt><span class="section"><a href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_PREPROCESSING_MODE">BOOST_FT_PREPROCESSING_MODE</a></span></dt>
38<dt><span class="section"><a href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_CC_PREPROCESSING">BOOST_FT_CC_PREPROCESSING</a></span></dt>
39</dl></div>
40<div class="section">
41<div class="titlepage"><div><div><h4 class="title">
42<a name="boost_functiontypes.reference.macros.BOOST_FT_MAX_ARITY"></a><a class="link" href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_MAX_ARITY" title="BOOST_FT_MAX_ARITY">BOOST_FT_MAX_ARITY</a>
43</h4></div></div></div>
44<p>
45 Expands to a numeric value that describes the maximum function arity supported
46 by the library.
47 </p>
48<p>
49 Defaults to 20 if not explicitly defined by the user before inclusion of
50 the first library header.
51 </p>
52</div>
53<p>
54 <span class="bold"><strong>The following macros do not need to be defined, unless
55 to configure the library to work with a compiler and/or calling convention
56 not covered by the auto-detection mechanism in <code class="literal">boost/function_types/config/compiler.hpp</code>.</strong></span>
57 </p>
58<div class="section">
59<div class="titlepage"><div><div><h4 class="title">
60<a name="boost_functiontypes.reference.macros.BOOST_FT_CC_NAMES"></a><a class="link" href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_CC_NAMES" title="BOOST_FT_CC_NAMES">BOOST_FT_CC_NAMES</a>
61</h4></div></div></div>
62<p>
63 Expands to a <a href="../../../../../preprocessor/doc/data/sequences.html" target="_top">sequence</a>
64 of ternary <a href="../../../../../preprocessor/doc/data/tuples.html" target="_top">tuples</a>
65 (these data types are defined in the <a href="../../../../../preprocessor/doc/index.html" target="_top">documentation
66 of the Boost Preprocessor library</a>). Each sequence element describes
67 one calling convention specifier. The first element in each tuple is the
68 macro suffix for <a class="link" href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_CC" title="BOOST_FT_CC_*"><code class="literal">BOOST_FT_CC_*</code></a>,
69 the second element is the name of the tag that describes the calling convention
70 and the third is the name of the specifier. The specifier is allowed to
71 be an empty string, so the third tuple element is either <a href="../../../../../preprocessor/doc/ref/empty.html" target="_top"><code class="literal">BOOST_PP_EMPTY</code></a>
72 or <a href="../../../../../preprocessor/doc/ref/identity.html" target="_top"><code class="literal">BOOST_PP_IDENTITY</code></a><code class="literal">(<span class="emphasis"><em>name</em></span>)</code>.
73 </p>
74<p>
75 Define this macro to extend the set of possible names for custom calling
76 conventions. The macro expands to nothing by default.
77 </p>
78<p>
79 The following names are predefined by the library and must not occur in
80 the definition of <code class="literal">BOOST_FT_CC_NAMES</code>:
81 </p>
82<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_FT_BUILTIN_CC_NAMES</span> <span class="special">\</span>
83 <span class="special">((</span> <span class="identifier">IMPLICIT</span> <span class="special">,</span> <span class="identifier">implicit_cc</span> <span class="special">,</span> <span class="identifier">BOOST_PP_EMPTY</span> <span class="special">))\</span>
84 <span class="special">((</span> <span class="identifier">CDECL</span> <span class="special">,</span> <span class="identifier">cdecl_cc</span> <span class="special">,</span> <span class="identifier">BOOST_PP_IDENTITY</span><span class="special">(</span><span class="identifier">__cdecl</span> <span class="special">)</span> <span class="special">))\</span>
85 <span class="special">((</span> <span class="identifier">STDCALL</span> <span class="special">,</span> <span class="identifier">stdcall_cc</span> <span class="special">,</span> <span class="identifier">BOOST_PP_IDENTITY</span><span class="special">(</span><span class="identifier">__stdcall</span> <span class="special">)</span> <span class="special">))\</span>
86 <span class="special">((</span> <span class="identifier">PASCAL</span> <span class="special">,</span> <span class="identifier">pascal_cc</span> <span class="special">,</span> <span class="identifier">BOOST_PP_IDENTITY</span><span class="special">(</span><span class="identifier">pascal</span> <span class="special">)</span> <span class="special">))\</span>
87 <span class="special">((</span> <span class="identifier">FASTCALL</span> <span class="special">,</span> <span class="identifier">fastcall_cc</span> <span class="special">,</span> <span class="identifier">BOOST_PP_IDENTITY</span><span class="special">(</span><span class="identifier">__fastcall</span><span class="special">)</span> <span class="special">))\</span>
88 <span class="special">((</span> <span class="identifier">CLRCALL</span> <span class="special">,</span> <span class="identifier">clrcall_cc</span> <span class="special">,</span> <span class="identifier">BOOST_PP_IDENTITY</span><span class="special">(</span><span class="identifier">__clrcall</span> <span class="special">)</span> <span class="special">))\</span>
89 <span class="special">((</span> <span class="identifier">THISCALL</span> <span class="special">,</span> <span class="identifier">thiscall_cc</span> <span class="special">,</span> <span class="identifier">BOOST_PP_IDENTITY</span><span class="special">(</span><span class="identifier">__thiscall</span><span class="special">)</span> <span class="special">))\</span>
90 <span class="special">((</span> <span class="identifier">IMPLICIT_THISCALL</span> <span class="special">,</span> <span class="identifier">thiscall_cc</span> <span class="special">,</span> <span class="identifier">BOOST_PP_EMPTY</span> <span class="special">))</span>
91<span class="comment">// Don't get confused by the last line, here (thiscall can't be specified
92</span><span class="comment">// explicitly prior to MSVC 8).
93</span></pre>
94</div>
95<div class="section">
96<div class="titlepage"><div><div><h4 class="title">
97<a name="boost_functiontypes.reference.macros.BOOST_FT_CC"></a><a class="link" href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_CC" title="BOOST_FT_CC_*">BOOST_FT_CC_*</a>
98</h4></div></div></div>
99<p>
100 Enables a specific calling convention. * denotes the macro suffix, as defined
101 by <a class="link" href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_CC_NAMES" title="BOOST_FT_CC_NAMES"><code class="literal">BOOST_FT_CC_NAMES</code></a>
102 or <a class="link" href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_CC_NAMES" title="BOOST_FT_CC_NAMES"><code class="literal">BOOST_FT_BUILTIN_CC_NAMES</code></a>.
103 </p>
104<p>
105 The macro expands to a list of restrictions, separated by the <code class="literal">|</code>
106 character. Possible items are:
107 </p>
108<div class="itemizedlist"><ul class="itemizedlist" type="disc">
109<li class="listitem">
110 callable_builtin
111 </li>
112<li class="listitem">
113 member
114 </li>
115<li class="listitem">
116 non_member
117 </li>
118<li class="listitem">
119 variadic
120 </li>
121<li class="listitem">
122 non_variadic
123 </li>
124</ul></div>
125<p>
126 If no such macro is defined for a particular calling convention, it is
127 disabled. Example:
128 </p>
129<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_FT_CC_STDCALL</span> <span class="identifier">non_variadic</span><span class="special">|</span><span class="identifier">callable_builtin</span>
130<span class="comment">// enables stdcall calling convention for all non-variadic,
131</span><span class="comment">// callable, builtin types
132</span></pre>
133</div>
134<div class="section">
135<div class="titlepage"><div><div><h4 class="title">
136<a name="boost_functiontypes.reference.macros.BOOST_FT_COMMON_X86_CCs"></a><a class="link" href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_COMMON_X86_CCs" title="BOOST_FT_COMMON_X86_CCs">BOOST_FT_COMMON_X86_CCs</a>
137</h4></div></div></div>
138<p>
139 Defining this macro causes the following macros to be defined, if not defined
140 already:
141 </p>
142<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_FT_CC_CDECL</span> <span class="identifier">BOOST_FT_COMMON_X86_CCs</span>
143<span class="preprocessor">#define</span> <span class="identifier">BOOST_FT_CC_STDCALL</span> <span class="identifier">non_variadic</span><span class="special">|</span><span class="identifier">BOOST_FT_COMMON_X86_CCs</span>
144<span class="preprocessor">#define</span> <span class="identifier">BOOST_FT_CC_FASTCALL</span> <span class="identifier">non_variadic</span><span class="special">|</span><span class="identifier">BOOST_FT_COMMON_X86_CCs</span>
145</pre>
146</div>
147<div class="section">
148<div class="titlepage"><div><div><h4 class="title">
149<a name="boost_functiontypes.reference.macros.BOOST_FT_SYNTAX"></a><a class="link" href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_SYNTAX" title="BOOST_FT_SYNTAX">BOOST_FT_SYNTAX</a>
150</h4></div></div></div>
151<p>
152 This macro allows to change the syntax of callable builtin types. It is
153 useful to handle the compiler specific placement of the calling convention
154 specifier.
155 </p>
156<p>
157 The default definition is as follows:
158 </p>
159<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_FT_SYNTAX</span><span class="special">(</span><span class="identifier">result</span><span class="special">,</span><span class="identifier">lparen</span><span class="special">,</span><span class="identifier">cc_spec</span><span class="special">,</span><span class="identifier">type_mod</span><span class="special">,</span><span class="identifier">name</span><span class="special">,</span><span class="identifier">rparen</span><span class="special">)</span> <span class="special">\</span>
160 <span class="identifier">result</span><span class="special">()</span> <span class="identifier">lparen</span><span class="special">()</span> <span class="identifier">cc_spec</span><span class="special">()</span> <span class="identifier">type_mod</span><span class="special">()</span> <span class="identifier">name</span><span class="special">()</span> <span class="identifier">rparen</span><span class="special">()</span>
161</pre>
162</div>
163<div class="section">
164<div class="titlepage"><div><div><h4 class="title">
165<a name="boost_functiontypes.reference.macros.BOOST_FT_NULLARY_PARAM"></a><a class="link" href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_NULLARY_PARAM" title="BOOST_FT_NULLARY_PARAM">BOOST_FT_NULLARY_PARAM</a>
166</h4></div></div></div>
167<p>
168 Set to <code class="literal">void</code> for compilers that insist on a <code class="literal">void</code>
169 parameter for nullary function types, empty by default.
170 </p>
171</div>
172<div class="section">
173<div class="titlepage"><div><div><h4 class="title">
174<a name="boost_functiontypes.reference.macros.BOOST_FT_NO_CV_FUNC_SUPPORT"></a><a class="link" href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_NO_CV_FUNC_SUPPORT" title="BOOST_FT_NO_CV_FUNC_SUPPORT">BOOST_FT_NO_CV_FUNC_SUPPORT</a>
175</h4></div></div></div>
176<p>
177 Disables support for cv-qualified function types. Cv-qualified function
178 types are illegal by the current standard version, but there is a pending
179 defect report on that issue. It defaults to <code class="literal">1</code> until
180 the standard changes, setting this macro to <code class="literal">0</code> may not
181 work.
182 </p>
183</div>
184<p>
185 <span class="bold"><strong>The following macros are useful for testing when changing
186 the source code of the library.</strong></span>
187 </p>
188<div class="section">
189<div class="titlepage"><div><div><h4 class="title">
190<a name="boost_functiontypes.reference.macros.BOOST_FT_PREPROCESSING_MODE"></a><a class="link" href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_PREPROCESSING_MODE" title="BOOST_FT_PREPROCESSING_MODE">BOOST_FT_PREPROCESSING_MODE</a>
191</h4></div></div></div>
192<p>
193 Makes the compiler preprocess as much as possible of the library code (rather
194 than loading already-preprocessed header files) if defined.
195 </p>
196</div>
197<div class="section">
198<div class="titlepage"><div><div><h4 class="title">
199<a name="boost_functiontypes.reference.macros.BOOST_FT_CC_PREPROCESSING"></a><a class="link" href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_CC_PREPROCESSING" title="BOOST_FT_CC_PREPROCESSING">BOOST_FT_CC_PREPROCESSING</a>
200</h4></div></div></div>
201<p>
202 Makes the compiler preprocess the loop over possible names for custom calling
203 conventions (rather than loading an already-preprocessed header file) if
204 defined.
205 </p>
206<p>
207 This macro is defined automatically if <a class="link" href="macros.html#boost_functiontypes.reference.macros.BOOST_FT_CC_NAMES" title="BOOST_FT_CC_NAMES"><code class="literal">BOOST_FT_CC_NAMES</code></a>
208 has been defined.
209 </p>
210</div>
211</div>
212<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
213<td align="left"></td>
214<td align="right"><div class="copyright-footer">Copyright &#169; 2004-2007 Tobias
215 Schwinger<p>
216 Distributed under the Boost Software License, Version 1.0. (See accompanying
217 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
218 </p>
219</div></td>
220</tr></table>
221<hr>
222<div class="spirit-nav">
223<a accesskey="p" href="tag_types.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../rationale.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
224</div>
225</body>
226</html>