Apply BOOST_FORCE_INLINE patch.

Regenerate docs.

[SVN r74917]
This commit is contained in:
John Maddock
2011-10-11 17:24:22 +00:00
parent 2c19eb21d6
commit 5ae1de8cec
8 changed files with 101 additions and 28 deletions

View File

@@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Acknowledgements</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Config">
<link rel="up" href="../index.html" title="Boost.Config">
<link rel="prev" href="rationale.html" title="Rationale">

View File

@@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Boost Macro Reference</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Config">
<link rel="up" href="../index.html" title="Boost.Config">
<link rel="prev" href="../index.html" title="Boost.Config">
@@ -341,6 +341,7 @@
<td>
<p>
Template value parameters cannot have a dependent type, for example:
</p>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">type</span> <span class="identifier">value</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">X</span> <span class="special">{</span> <span class="special">...</span> <span class="special">};</span>
@@ -2942,6 +2943,7 @@
This macro expands to <code class="computeroutput"><span class="keyword">const</span></code>
on those compilers, and <code class="computeroutput"><span class="identifier">constexpr</span></code>
elsewhere. For example, when defining const expr variables replace:
</p>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">static</span> <span class="identifier">constexpr</span> <span class="identifier">UIntType</span> <span class="identifier">xor_mask</span> <span class="special">=</span> <span class="identifier">a</span><span class="special">;</span>
</pre>
@@ -2980,6 +2982,7 @@
<tr>
<td>
<p>
</p>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">BOOST_NOEXCEPT</span>
<span class="identifier">BOOST_NOEXCEPT_IF</span><span class="special">(</span><span class="identifier">Predicate</span><span class="special">)</span>
@@ -2996,6 +2999,7 @@
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
</p>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_NOEXCEPT</span>
<span class="preprocessor">#define</span> <span class="identifier">BOOST_NOEXCEPT_IF</span><span class="special">(</span><span class="identifier">Predicate</span><span class="special">)</span>
@@ -3011,6 +3015,7 @@
</p>
<div class="blockquote"><blockquote class="blockquote">
<p>
</p>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_NOEXCEPT</span> <span class="identifier">noexcept</span>
<span class="preprocessor">#define</span> <span class="identifier">BOOST_NOEXCEPT_IF</span><span class="special">(</span><span class="identifier">Predicate</span><span class="special">)</span> <span class="identifier">noexcept</span><span class="special">((</span><span class="identifier">Predicate</span><span class="special">))</span>
@@ -3383,6 +3388,40 @@
</p>
</td>
</tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">BOOST_FORCEINLINE</span></code>
</p>
</td>
<td>
<p>
This macro can be used in place of the <code class="computeroutput"><span class="keyword">inline</span></code>
keyword to instruct the compiler that a function should always
be inlined. Overuse of this macro can lead to significant bloat,
while good use can increase performance in certain cases, such
as computation-intensive code built through generative programming
techniques.
</p>
<p>
Usage example:
</p>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="identifier">BOOST_FORCEINLINE</span> <span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">t</span><span class="special">)</span>
<span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">t</span><span class="special">;</span>
<span class="special">}</span>
</pre>
<p>
</p>
<p>
Note that use of this macro can lead to cryptic error messages
with some compilers. Consider defining it to <code class="computeroutput"><span class="keyword">inline</span></code>
before including the Boost.Config header in order to be able to
debug errors more easily.
</p>
</td>
</tr>
</tbody>
</table></div>
</div>

View File

@@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Guidelines for Boost Authors</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Config">
<link rel="up" href="../index.html" title="Boost.Config">
<link rel="prev" href="boost_macro_reference.html" title="Boost Macro Reference">

View File

@@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Rationale</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Boost.Config">
<link rel="up" href="../index.html" title="Boost.Config">
<link rel="prev" href="guidelines_for_boost_authors.html" title="Guidelines for Boost Authors">

View File

@@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Boost.Config</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Boost.Config">
<link rel="next" href="boost_config/boost_macro_reference.html" title="Boost Macro Reference">
</head>
@@ -29,7 +29,7 @@
<div><p class="copyright">Copyright &#169; 2001-2007 Beman Dawes, Vesa Karvonen, John
Maddock</p></div>
<div><div class="legalnotice">
<a name="config.legal"></a><p>
<a name="id988561"></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>
@@ -949,7 +949,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: October 10, 2011 at 14:43:27 GMT</small></p></td>
<td align="left"><p><small>Last revised: October 11, 2011 at 17:21:29 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>

View File

@@ -889,6 +889,26 @@ the arguments is itself a macro (see 16.3.1 in C++ standard). This is normally
used to create a mangled name in combination with a predefined macro such a
\_\_LINE__.
]]
[[`BOOST_FORCEINLINE`][
This macro can be used in place of the `inline` keyword to instruct the compiler
that a function should always be inlined.
Overuse of this macro can lead to significant bloat, while good use can increase
performance in certain cases, such as computation-intensive code built through
generative programming techniques.
Usage example:
``
template<class T>
BOOST_FORCEINLINE T& f(T& t)
{
return t;
}
``
Note that use of this macro can lead to cryptic error messages with some compilers.
Consider defining it to `inline` before including the Boost.Config header in order to be
able to debug errors more easily.
]]
]
[endsect]

View File

@@ -688,5 +688,17 @@ namespace std{ using ::type_info; }
#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST
// BOOST_FORCEINLINE ---------------------------------------------//
// Macro to use in place of 'inline' to force a function to be inline
#if !defined(BOOST_FORCEINLINE)
# if defined(_MSC_VER)
# define BOOST_FORCEINLINE __forceinline
# elif defined(__GNUC__) && __GNUC__ > 3
# define BOOST_FORCEINLINE inline __attribute__ ((always_inline))
# else
# define BOOST_FORCEINLINE inline
# endif
#endif
#endif

View File

@@ -1111,6 +1111,8 @@ void print_boost_macros()
PRINT_MACRO(BOOST_CONSTEXPR);
PRINT_MACRO(BOOST_CONSTEXPR_OR_CONST);
PRINT_MACRO(BOOST_STATIC_CONSTEXPR);
PRINT_MACRO(BOOST_NOEXCEPT);
PRINT_MACRO(BOOST_FORCEINLINE);
}
void print_separator()