mirror of
https://github.com/boostorg/config.git
synced 2025-07-31 21:04:28 +02:00
Apply BOOST_FORCE_INLINE patch.
Regenerate docs. [SVN r74917]
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||||
<title>Acknowledgements</title>
|
<title>Acknowledgements</title>
|
||||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
<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="home" href="../index.html" title="Boost.Config">
|
||||||
<link rel="up" href="../index.html" title="Boost.Config">
|
<link rel="up" href="../index.html" title="Boost.Config">
|
||||||
<link rel="prev" href="rationale.html" title="Rationale">
|
<link rel="prev" href="rationale.html" title="Rationale">
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||||
<title>Boost Macro Reference</title>
|
<title>Boost Macro Reference</title>
|
||||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
<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="home" href="../index.html" title="Boost.Config">
|
||||||
<link rel="up" href="../index.html" title="Boost.Config">
|
<link rel="up" href="../index.html" title="Boost.Config">
|
||||||
<link rel="prev" href="../index.html" title="Boost.Config">
|
<link rel="prev" href="../index.html" title="Boost.Config">
|
||||||
@@ -341,6 +341,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<p>
|
<p>
|
||||||
Template value parameters cannot have a dependent type, for example:
|
Template value parameters cannot have a dependent type, for example:
|
||||||
|
|
||||||
</p>
|
</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"><</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">></span>
|
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span><span class="special"><</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">></span>
|
||||||
<span class="keyword">class</span> <span class="identifier">X</span> <span class="special">{</span> <span class="special">...</span> <span class="special">};</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>
|
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>
|
on those compilers, and <code class="computeroutput"><span class="identifier">constexpr</span></code>
|
||||||
elsewhere. For example, when defining const expr variables replace:
|
elsewhere. For example, when defining const expr variables replace:
|
||||||
|
|
||||||
</p>
|
</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 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>
|
</pre>
|
||||||
@@ -2980,6 +2982,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">BOOST_NOEXCEPT</span>
|
<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>
|
<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>
|
</p>
|
||||||
<div class="blockquote"><blockquote class="blockquote">
|
<div class="blockquote"><blockquote class="blockquote">
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
</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>
|
<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>
|
<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>
|
</p>
|
||||||
<div class="blockquote"><blockquote class="blockquote">
|
<div class="blockquote"><blockquote class="blockquote">
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
</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>
|
<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>
|
<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>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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"><</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">></span>
|
||||||
|
<span class="identifier">BOOST_FORCEINLINE</span> <span class="identifier">T</span><span class="special">&</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">T</span><span class="special">&</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>
|
</tbody>
|
||||||
</table></div>
|
</table></div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||||
<title>Guidelines for Boost Authors</title>
|
<title>Guidelines for Boost Authors</title>
|
||||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
<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="home" href="../index.html" title="Boost.Config">
|
||||||
<link rel="up" 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">
|
<link rel="prev" href="boost_macro_reference.html" title="Boost Macro Reference">
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||||
<title>Rationale</title>
|
<title>Rationale</title>
|
||||||
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
|
<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="home" href="../index.html" title="Boost.Config">
|
||||||
<link rel="up" 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">
|
<link rel="prev" href="guidelines_for_boost_authors.html" title="Guidelines for Boost Authors">
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||||
<title>Boost.Config</title>
|
<title>Boost.Config</title>
|
||||||
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
|
<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="home" href="index.html" title="Boost.Config">
|
||||||
<link rel="next" href="boost_config/boost_macro_reference.html" title="Boost Macro Reference">
|
<link rel="next" href="boost_config/boost_macro_reference.html" title="Boost Macro Reference">
|
||||||
</head>
|
</head>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<div><p class="copyright">Copyright © 2001-2007 Beman Dawes, Vesa Karvonen, John
|
<div><p class="copyright">Copyright © 2001-2007 Beman Dawes, Vesa Karvonen, John
|
||||||
Maddock</p></div>
|
Maddock</p></div>
|
||||||
<div><div class="legalnotice">
|
<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
|
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>)
|
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>
|
</p>
|
||||||
@@ -949,7 +949,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
<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>
|
<td align="right"><div class="copyright-footer"></div></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
<hr>
|
<hr>
|
||||||
|
@@ -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
|
used to create a mangled name in combination with a predefined macro such a
|
||||||
\_\_LINE__.
|
\_\_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]
|
[endsect]
|
||||||
|
@@ -688,5 +688,17 @@ namespace std{ using ::type_info; }
|
|||||||
|
|
||||||
#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST
|
#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
|
#endif
|
||||||
|
|
||||||
|
@@ -1111,6 +1111,8 @@ void print_boost_macros()
|
|||||||
PRINT_MACRO(BOOST_CONSTEXPR);
|
PRINT_MACRO(BOOST_CONSTEXPR);
|
||||||
PRINT_MACRO(BOOST_CONSTEXPR_OR_CONST);
|
PRINT_MACRO(BOOST_CONSTEXPR_OR_CONST);
|
||||||
PRINT_MACRO(BOOST_STATIC_CONSTEXPR);
|
PRINT_MACRO(BOOST_STATIC_CONSTEXPR);
|
||||||
|
PRINT_MACRO(BOOST_NOEXCEPT);
|
||||||
|
PRINT_MACRO(BOOST_FORCEINLINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_separator()
|
void print_separator()
|
||||||
|
Reference in New Issue
Block a user