Add BOOST_PREVENT_MACRO_SUBSTITUTION and regenerate docs.

Fixes #5349.

[SVN r71029]
This commit is contained in:
John Maddock
2011-04-06 10:52:22 +00:00
parent 86102c32ef
commit 371171ef97
3 changed files with 37 additions and 2 deletions

View File

@ -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>

View File

@ -28,7 +28,7 @@
</h3></div></div></div>
<div><p class="copyright">Copyright &#169; 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>

View File

@ -668,6 +668,17 @@ of `__BORLANDC__` /unless/ the macro `BOOST_DETECT_OUTDATED_WORKAROUNDS` is defi
[*Note]: the ultimate source of documentation for this macro is in [@../../../../boost/detail/workaround.hpp boost/detail/workaround.hpp].
]]
[[`BOOST_PREVENT_MACRO_SUBSTITUTION`][
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:
``
someclass.min BOOST_PREVENT_MACRO_SUBSTITUTION(arg1, arg2);
``
The following also works in most, but not all, contexts:
``
(someclass.max)(arg1, arg2);
``
]]
[[`BOOST_DEDUCED_TYPENAME`][
Some compilers don't support the use of typename for dependent types in deduced
contexts. This macro expands to nothing on those compilers, and typename