forked from boostorg/config
Add BOOST_PREVENT_MACRO_SUBSTITUTION and regenerate docs.
Fixes #5349. [SVN r71029]
This commit is contained in:
1 parent
86102c32ef
commit
371171ef97
3 files changed
+37
-2
No files matched your search
@@ -2894,6 +2894,30 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">BOOST_PREVENT_MACRO_SUBSTITUTION</span></code>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Sometimes you have a function name with the same name as a C macro,
|
||||
for example "min" and "max" member functions,
|
||||
in which case one can prevent the function being expanded as a
|
||||
macro using:
|
||||
</p>
|
||||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">someclass</span><span class="special">.</span><span class="identifier">min</span> <span class="identifier">BOOST_PREVENT_MACRO_SUBSTITUTION</span><span class="special">(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">arg2</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
The following also works in most, but not all, contexts:
|
||||
</p>
|
||||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="special">(</span><span class="identifier">someclass</span><span class="special">.</span><span class="identifier">max</span><span class="special">)(</span><span class="identifier">arg1</span><span class="special">,</span> <span class="identifier">arg2</span><span class="special">);</span>
|
||||
</pre>
|
||||
<p>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<code class="computeroutput"><span class="identifier">BOOST_DEDUCED_TYPENAME</span></code>
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@
|
||||
</h3></div></div></div>
|
||||
<div><p class="copyright">Copyright © 2001 -2007 Beman Dawes, Vesa Karvonen, John Maddock</p></div>
|
||||
<div><div class="legalnotice">
|
||||
<a name="id1029206"></a><p>
|
||||
<a name="id1006373"></a><p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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>)
|
||||
</p>
|
||||
@@ -946,7 +946,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><p><small>Last revised: March 15, 2011 at 13:01:43 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: April 06, 2011 at 10:49:30 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
Reference in new issue
Block a user