forked from boostorg/config
Add BOOST_NOEXCEPT and allies. Apply to Boost.Timer. Correct several Boost.timer boo boos detected while testing BOOST_NOEXCEPT.
[SVN r74895]
This commit is contained in:
1 parent
17dcf6492b
commit
2c19eb21d6
7 files changed
+293
-162
No files matched your search
@@ -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.76.1">
|
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||||
<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.76.1">
|
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||||
<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">
|
||||||
@@ -27,14 +27,16 @@
|
|||||||
<a name="boost_config.boost_macro_reference"></a><a class="link" href="boost_macro_reference.html" title="Boost Macro Reference">Boost Macro Reference</a>
|
<a name="boost_config.boost_macro_reference"></a><a class="link" href="boost_macro_reference.html" title="Boost Macro Reference">Boost Macro Reference</a>
|
||||||
</h2></div></div></div>
|
</h2></div></div></div>
|
||||||
<div class="toc"><dl>
|
<div class="toc"><dl>
|
||||||
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_defects">Macros
|
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_c__03_defects">Macros
|
||||||
that describe defects</a></span></dt>
|
that describe C++03 defects</a></span></dt>
|
||||||
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_optional_features">Macros
|
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_optional_features">Macros
|
||||||
that describe optional features</a></span></dt>
|
that describe optional features</a></span></dt>
|
||||||
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_possible_c__0x_features">Macros
|
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_possible_c___future_features">Macros
|
||||||
that describe possible C++0x features</a></span></dt>
|
that describe possible C++ future features</a></span></dt>
|
||||||
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_c__0x_features_not_supported">Macros
|
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_c__11_features_not_supported">Macros
|
||||||
that describe C++0x features not supported</a></span></dt>
|
that describe C++11 features not supported</a></span></dt>
|
||||||
|
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_allow_use_of_c__11_features_with_c__03_compilers">Macros
|
||||||
|
that allow use of C++11 features with C++03 compilers</a></span></dt>
|
||||||
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.boost_helper_macros">Boost
|
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.boost_helper_macros">Boost
|
||||||
Helper Macros</a></span></dt>
|
Helper Macros</a></span></dt>
|
||||||
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.boost_informational_macros">Boost
|
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.boost_informational_macros">Boost
|
||||||
@@ -44,13 +46,13 @@
|
|||||||
</dl></div>
|
</dl></div>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<div class="titlepage"><div><div><h3 class="title">
|
<div class="titlepage"><div><div><h3 class="title">
|
||||||
<a name="boost_config.boost_macro_reference.macros_that_describe_defects"></a><a name="config_defects"></a><a class="link" href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_defects" title="Macros that describe defects">Macros
|
<a name="boost_config.boost_macro_reference.macros_that_describe_c__03_defects"></a><a name="config_defects"></a><a class="link" href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_c__03_defects" title="Macros that describe C++03 defects">Macros
|
||||||
that describe defects</a>
|
that describe C++03 defects</a>
|
||||||
</h3></div></div></div>
|
</h3></div></div></div>
|
||||||
<p>
|
<p>
|
||||||
The following macros all describe features that are required by the C++ standard,
|
The following macros all describe features that are required by the C++03
|
||||||
if one of the following macros is defined, then it represents a defect in
|
standard, if one of the following macros is defined, then it represents a
|
||||||
the compiler's conformance with the standard.
|
defect in the compiler's conformance with the 2003 standard.
|
||||||
</p>
|
</p>
|
||||||
<div class="informaltable"><table class="table">
|
<div class="informaltable"><table class="table">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
@@ -313,7 +315,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<p>
|
<p>
|
||||||
The compiler fails to compile a nested class that has a dependent
|
The compiler fails to compile a nested class that has a dependent
|
||||||
base class:
|
base class:
|
||||||
</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">typename</span> <span class="identifier">T</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">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||||||
<span class="keyword">struct</span> <span class="identifier">foo</span> <span class="special">:</span> <span class="special">{</span>
|
<span class="keyword">struct</span> <span class="identifier">foo</span> <span class="special">:</span> <span class="special">{</span>
|
||||||
@@ -339,9 +341,8 @@
|
|||||||
<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>
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
@@ -420,7 +421,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<p>
|
<p>
|
||||||
The compiler does not perform function template ordering or its
|
The compiler does not perform function template ordering or its
|
||||||
function template ordering is incorrect.
|
function template ordering is incorrect.
|
||||||
</p>
|
</p>
|
||||||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="comment">// #1</span>
|
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="comment">// #1</span>
|
||||||
<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">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">T</span><span class="special">);</span>
|
<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">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">T</span><span class="special">);</span>
|
||||||
@@ -1312,7 +1313,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<p>
|
<p>
|
||||||
The compiler does not allow a void function to return the result
|
The compiler does not allow a void function to return the result
|
||||||
of calling another void function.
|
of calling another void function.
|
||||||
</p>
|
</p>
|
||||||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">()</span> <span class="special">{}</span>
|
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">void</span> <span class="identifier">f</span><span class="special">()</span> <span class="special">{}</span>
|
||||||
<span class="keyword">void</span> <span class="identifier">g</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">f</span><span class="special">();</span> <span class="special">}</span>
|
<span class="keyword">void</span> <span class="identifier">g</span><span class="special">()</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">f</span><span class="special">();</span> <span class="special">}</span>
|
||||||
@@ -2235,13 +2236,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<div class="titlepage"><div><div><h3 class="title">
|
<div class="titlepage"><div><div><h3 class="title">
|
||||||
<a name="boost_config.boost_macro_reference.macros_that_describe_possible_c__0x_features"></a><a class="link" href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_possible_c__0x_features" title="Macros that describe possible C++0x features">Macros
|
<a name="boost_config.boost_macro_reference.macros_that_describe_possible_c___future_features"></a><a class="link" href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_possible_c___future_features" title="Macros that describe possible C++ future features">Macros
|
||||||
that describe possible C++0x features</a>
|
that describe possible C++ future features</a>
|
||||||
</h3></div></div></div>
|
</h3></div></div></div>
|
||||||
<p>
|
<p>
|
||||||
The following macros describe features that are likely to be included in
|
The following macros describe features that may be included in some future
|
||||||
the upcoming ISO C++ standard, C++0x, but have not yet been approved for
|
ISO C++ standard, but have not yet been approved for inclusion in the language.
|
||||||
inclusion in the language.
|
|
||||||
</p>
|
</p>
|
||||||
<div class="informaltable"><table class="table">
|
<div class="informaltable"><table class="table">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
@@ -2276,12 +2276,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<div class="titlepage"><div><div><h3 class="title">
|
<div class="titlepage"><div><div><h3 class="title">
|
||||||
<a name="boost_config.boost_macro_reference.macros_that_describe_c__0x_features_not_supported"></a><a class="link" href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_c__0x_features_not_supported" title="Macros that describe C++0x features not supported">Macros
|
<a name="boost_config.boost_macro_reference.macros_that_describe_c__11_features_not_supported"></a><a class="link" href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_c__11_features_not_supported" title="Macros that describe C++11 features not supported">Macros
|
||||||
that describe C++0x features not supported</a>
|
that describe C++11 features not supported</a>
|
||||||
</h3></div></div></div>
|
</h3></div></div></div>
|
||||||
<p>
|
<p>
|
||||||
The following macros describe features in the upcoming ISO C++ standard,
|
The following macros describe features in the 2011 ISO C++ standard, formerly
|
||||||
C++0x, that are not yet supported by a particular compiler or library.
|
known as C++0x, that are not yet supported by a particular compiler or library.
|
||||||
</p>
|
</p>
|
||||||
<div class="informaltable"><table class="table">
|
<div class="informaltable"><table class="table">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
@@ -2877,6 +2877,155 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<div class="titlepage"><div><div><h3 class="title">
|
<div class="titlepage"><div><div><h3 class="title">
|
||||||
|
<a name="boost_config.boost_macro_reference.macros_that_allow_use_of_c__11_features_with_c__03_compilers"></a><a name="config_11_for_03"></a><a class="link" href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_allow_use_of_c__11_features_with_c__03_compilers" title="Macros that allow use of C++11 features with C++03 compilers">Macros
|
||||||
|
that allow use of C++11 features with C++03 compilers</a>
|
||||||
|
</h3></div></div></div>
|
||||||
|
<p>
|
||||||
|
The following macros allow use of C++11 features even with compilers that
|
||||||
|
do not yet provide compliant C++11 support.
|
||||||
|
</p>
|
||||||
|
<div class="informaltable"><table class="table">
|
||||||
|
<colgroup>
|
||||||
|
<col>
|
||||||
|
<col>
|
||||||
|
</colgroup>
|
||||||
|
<thead><tr>
|
||||||
|
<th>
|
||||||
|
<p>
|
||||||
|
Macro
|
||||||
|
</p>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<p>
|
||||||
|
Section
|
||||||
|
</p>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<p>
|
||||||
|
Description
|
||||||
|
</p>
|
||||||
|
</th>
|
||||||
|
</tr></thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p>
|
||||||
|
<code class="computeroutput"><span class="identifier">BOOST_CONSTEXPR</span></code>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p>
|
||||||
|
Some compilers don't support the use of <code class="computeroutput"><span class="identifier">constexpr</span></code>.
|
||||||
|
This macro expands to nothing on those compilers, and <code class="computeroutput"><span class="identifier">constexpr</span></code> elsewhere. For example,
|
||||||
|
when defining a constexpr function or constructor replace:
|
||||||
|
</p>
|
||||||
|
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">constexpr</span> <span class="identifier">tuple</span><span class="special">();</span>
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
with:
|
||||||
|
</p>
|
||||||
|
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">BOOST_CONSTEXPR</span> <span class="identifier">tuple</span><span class="special">();</span>
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p>
|
||||||
|
<code class="computeroutput"><span class="identifier">BOOST_CONSTEXPR_OR_CONST</span></code>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p>
|
||||||
|
Some compilers don't support the use of <code class="computeroutput"><span class="identifier">constexpr</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>
|
||||||
|
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>
|
||||||
|
<p>
|
||||||
|
with:
|
||||||
|
</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">BOOST_CONSTEXPR_OR_CONST</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>
|
||||||
|
<p>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p>
|
||||||
|
<code class="computeroutput"><span class="identifier">BOOST_STATIC_CONSTEXPR</span></code>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p>
|
||||||
|
This is a shortcut for <code class="computeroutput"><span class="keyword">static</span>
|
||||||
|
<span class="identifier">BOOST_CONSTEXPR_OR_CONST</span></code>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>
|
||||||
|
<p>
|
||||||
|
with:
|
||||||
|
</p>
|
||||||
|
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">BOOST_STATIC_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>
|
||||||
|
<p>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<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>
|
||||||
|
<span class="identifier">BOOST_NOEXCEPT_EXPR</span><span class="special">(</span><span class="identifier">Expression</span><span class="special">)</span>
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p>
|
||||||
|
If <code class="computeroutput"><span class="identifier">BOOST_NO_NOEXCEPT</span></code>
|
||||||
|
is defined (i.e. C++03 compliant compilers) these macros are defined
|
||||||
|
as:
|
||||||
|
</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>
|
||||||
|
<span class="preprocessor">#define</span> <span class="identifier">BOOST_NOEXCEPT_EXPR</span><span class="special">(</span><span class="identifier">Expression</span><span class="special">)</span> <span class="keyword">false</span>
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
</p>
|
||||||
|
</blockquote></div>
|
||||||
|
<p>
|
||||||
|
If <code class="computeroutput"><span class="identifier">BOOST_NO_NOEXCEPT</span></code>
|
||||||
|
is not defined (i.e. C++11 compliant compilers) they are defined
|
||||||
|
as:
|
||||||
|
</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>
|
||||||
|
<span class="preprocessor">#define</span> <span class="identifier">BOOST_NOEXCEPT_EXPR</span><span class="special">(</span><span class="identifier">Expression</span><span class="special">)</span> <span class="identifier">noexcept</span><span class="special">((</span><span class="identifier">Expression</span><span class="special">))</span>
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
</p>
|
||||||
|
</blockquote></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table></div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<div class="titlepage"><div><div><h3 class="title">
|
||||||
<a name="boost_config.boost_macro_reference.boost_helper_macros"></a><a name="config_helpers"></a><a class="link" href="boost_macro_reference.html#boost_config.boost_macro_reference.boost_helper_macros" title="Boost Helper Macros">Boost
|
<a name="boost_config.boost_macro_reference.boost_helper_macros"></a><a name="config_helpers"></a><a class="link" href="boost_macro_reference.html#boost_config.boost_macro_reference.boost_helper_macros" title="Boost Helper Macros">Boost
|
||||||
Helper Macros</a>
|
Helper Macros</a>
|
||||||
</h3></div></div></div>
|
</h3></div></div></div>
|
||||||
@@ -2912,12 +3061,12 @@
|
|||||||
<p>
|
<p>
|
||||||
This macro is used where a compiler specific workaround is required
|
This macro is used where a compiler specific workaround is required
|
||||||
that is not otherwise described by one of the other Boost.Config
|
that is not otherwise described by one of the other Boost.Config
|
||||||
macros. To use the macro you must first
|
macros. To use the macro you must first
|
||||||
</p>
|
</p>
|
||||||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">detail</span><span class="special">/</span><span class="identifier">workaround</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">detail</span><span class="special">/</span><span class="identifier">workaround</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
usage is then:
|
usage is then:
|
||||||
</p>
|
</p>
|
||||||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#if</span> <span class="identifier">BOOST_WORKAROUND</span><span class="special">(</span><span class="identifier">MACRONAME</span><span class="special">,</span> <span class="identifier">CONDITION</span><span class="special">)</span>
|
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#if</span> <span class="identifier">BOOST_WORKAROUND</span><span class="special">(</span><span class="identifier">MACRONAME</span><span class="special">,</span> <span class="identifier">CONDITION</span><span class="special">)</span>
|
||||||
<span class="comment">// workaround code goes here...</span>
|
<span class="comment">// workaround code goes here...</span>
|
||||||
@@ -2960,12 +3109,12 @@
|
|||||||
Sometimes you have a function name with the same name as a C macro,
|
Sometimes you have a function name with the same name as a C macro,
|
||||||
for example "min" and "max" member functions,
|
for example "min" and "max" member functions,
|
||||||
in which case one can prevent the function being expanded as a
|
in which case one can prevent the function being expanded as a
|
||||||
macro using:
|
macro using:
|
||||||
</p>
|
</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 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>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
The following also works in most, but not all, contexts:
|
The following also works in most, but not all, contexts:
|
||||||
</p>
|
</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 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>
|
</pre>
|
||||||
@@ -3060,14 +3209,14 @@
|
|||||||
integral constant members, we must use enums as a workaround if
|
integral constant members, we must use enums as a workaround if
|
||||||
we want the constants to be available at compile-time. This macro
|
we want the constants to be available at compile-time. This macro
|
||||||
gives us a convenient way to declare such constants. For example
|
gives us a convenient way to declare such constants. For example
|
||||||
instead of:
|
instead of:
|
||||||
</p>
|
</p>
|
||||||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">struct</span> <span class="identifier">foo</span><span class="special">{</span>
|
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">struct</span> <span class="identifier">foo</span><span class="special">{</span>
|
||||||
<span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
|
<span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">value</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
|
||||||
<span class="special">};</span>
|
<span class="special">};</span>
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
use:
|
use:
|
||||||
</p>
|
</p>
|
||||||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">struct</span> <span class="identifier">foo</span><span class="special">{</span>
|
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">struct</span> <span class="identifier">foo</span><span class="special">{</span>
|
||||||
<span class="identifier">BOOST_STATIC_CONSTANT</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">value</span> <span class="special">=</span> <span class="number">2</span><span class="special">);</span>
|
<span class="identifier">BOOST_STATIC_CONSTANT</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">value</span> <span class="special">=</span> <span class="number">2</span><span class="special">);</span>
|
||||||
@@ -3100,7 +3249,7 @@
|
|||||||
<p>
|
<p>
|
||||||
Some compilers silently "fold" different function template
|
Some compilers silently "fold" different function template
|
||||||
instantiations if some of the template parameters don't appear
|
instantiations if some of the template parameters don't appear
|
||||||
in the function parameter list. For instance:
|
in the function parameter list. For instance:
|
||||||
</p>
|
</p>
|
||||||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
|
||||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">ostream</span><span class="special">></span>
|
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">ostream</span><span class="special">></span>
|
||||||
@@ -3124,7 +3273,7 @@
|
|||||||
incorrectly outputs <code class="literal">2 2 double double</code> on VC++
|
incorrectly outputs <code class="literal">2 2 double double</code> on VC++
|
||||||
6. These macros, to be used in the function parameter list, fix
|
6. These macros, to be used in the function parameter list, fix
|
||||||
the problem without effects on the calling syntax. For instance,
|
the problem without effects on the calling syntax. For instance,
|
||||||
in the case above write:
|
in the case above write:
|
||||||
</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">int</span> <span class="identifier">n</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">int</span> <span class="identifier">n</span><span class="special">></span>
|
||||||
<span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">BOOST_EXPLICIT_TEMPLATE_NON_TYPE</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">n</span><span class="special">))</span> <span class="special">{</span> <span class="special">...</span> <span class="special">}</span>
|
<span class="keyword">void</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">BOOST_EXPLICIT_TEMPLATE_NON_TYPE</span><span class="special">(</span><span class="keyword">int</span><span class="special">,</span> <span class="identifier">n</span><span class="special">))</span> <span class="special">{</span> <span class="special">...</span> <span class="special">}</span>
|
||||||
@@ -3234,77 +3383,6 @@
|
|||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<p>
|
|
||||||
<code class="computeroutput"><span class="identifier">BOOST_CONSTEXPR</span></code>
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p>
|
|
||||||
Some compilers don't support the use of <code class="computeroutput"><span class="identifier">constexpr</span></code>.
|
|
||||||
This macro expands to nothing on those compilers, and <code class="computeroutput"><span class="identifier">constexpr</span></code> elsewhere. For example,
|
|
||||||
when defining a constexpr function or constructor replace:
|
|
||||||
</p>
|
|
||||||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">constexpr</span> <span class="identifier">tuple</span><span class="special">();</span>
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
with:
|
|
||||||
</p>
|
|
||||||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">BOOST_CONSTEXPR</span> <span class="identifier">tuple</span><span class="special">();</span>
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<p>
|
|
||||||
<code class="computeroutput"><span class="identifier">BOOST_CONSTEXPR_OR_CONST</span></code>
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p>
|
|
||||||
Some compilers don't support the use of <code class="computeroutput"><span class="identifier">constexpr</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>
|
|
||||||
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>
|
|
||||||
<p>
|
|
||||||
with:
|
|
||||||
</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">BOOST_CONSTEXPR_OR_CONST</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>
|
|
||||||
<p>
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<p>
|
|
||||||
<code class="computeroutput"><span class="identifier">BOOST_STATIC_CONSTEXPR</span></code>
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p>
|
|
||||||
This is a shortcut for <code class="computeroutput"><span class="keyword">static</span>
|
|
||||||
<span class="identifier">BOOST_CONSTEXPR_OR_CONST</span></code>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>
|
|
||||||
<p>
|
|
||||||
with:
|
|
||||||
</p>
|
|
||||||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">BOOST_STATIC_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>
|
|
||||||
<p>
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table></div>
|
</table></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -3705,7 +3783,7 @@
|
|||||||
RTTI. Examples include class for objects that will be thrown
|
RTTI. Examples include class for objects that will be thrown
|
||||||
as exceptions or used in dynamic_casts, across shared library
|
as exceptions or used in dynamic_casts, across shared library
|
||||||
boundaries. For example, a header-only exception class might
|
boundaries. For example, a header-only exception class might
|
||||||
look like this:
|
look like this:
|
||||||
</p>
|
</p>
|
||||||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">class</span> <span class="identifier">BOOST_SYMBOL_VISIBLE</span> <span class="identifier">my_exception</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span> <span class="special">{</span> <span class="special">...</span> <span class="special">};</span>
|
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">class</span> <span class="identifier">BOOST_SYMBOL_VISIBLE</span> <span class="identifier">my_exception</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">runtime_error</span> <span class="special">{</span> <span class="special">...</span> <span class="special">};</span>
|
||||||
</pre>
|
</pre>
|
||||||
@@ -3743,7 +3821,7 @@
|
|||||||
<span class="preprocessor">#if</span> <span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_ALL_DYN_LINK</span><span class="special">)</span> <span class="special">||</span> <span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_FOO_DYN_LINK</span><span class="special">)</span>
|
<span class="preprocessor">#if</span> <span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_ALL_DYN_LINK</span><span class="special">)</span> <span class="special">||</span> <span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_FOO_DYN_LINK</span><span class="special">)</span>
|
||||||
<span class="preprocessor"># if</span> <span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_FOO_SOURCE</span><span class="special">)</span>
|
<span class="preprocessor"># if</span> <span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_FOO_SOURCE</span><span class="special">)</span>
|
||||||
<span class="preprocessor"># define</span> <span class="identifier">BOOST_FOO_DECL</span> <span class="identifier">BOOST_SYMBOL_EXPORT</span>
|
<span class="preprocessor"># define</span> <span class="identifier">BOOST_FOO_DECL</span> <span class="identifier">BOOST_SYMBOL_EXPORT</span>
|
||||||
<span class="preprocessor"># else</span>
|
<span class="preprocessor"># else</span>
|
||||||
<span class="preprocessor"># define</span> <span class="identifier">BOOST_FOO_DECL</span> <span class="identifier">BOOST_SYMBOL_IMPORT</span>
|
<span class="preprocessor"># define</span> <span class="identifier">BOOST_FOO_DECL</span> <span class="identifier">BOOST_SYMBOL_IMPORT</span>
|
||||||
<span class="preprocessor"># endif</span>
|
<span class="preprocessor"># endif</span>
|
||||||
<span class="preprocessor">#else</span>
|
<span class="preprocessor">#else</span>
|
||||||
@@ -3765,7 +3843,7 @@
|
|||||||
<span class="bold"><strong>boost/libs/foo/src/foo.cpp</strong></span>
|
<span class="bold"><strong>boost/libs/foo/src/foo.cpp</strong></span>
|
||||||
</p>
|
</p>
|
||||||
<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_FOO_SOURCE</span>
|
<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">BOOST_FOO_SOURCE</span>
|
||||||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">foo</span><span class="special">/</span><span class="identifier">foo</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">foo</span><span class="special">/</span><span class="identifier">foo</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||||||
<span class="special">...</span>
|
<span class="special">...</span>
|
||||||
<span class="keyword">void</span> <span class="identifier">BOOST_FOO_DECL</span> <span class="identifier">f</span><span class="special">()</span>
|
<span class="keyword">void</span> <span class="identifier">BOOST_FOO_DECL</span> <span class="identifier">f</span><span class="special">()</span>
|
||||||
<span class="special">{</span>
|
<span class="special">{</span>
|
||||||
|
|||||||
@@ -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.76.1">
|
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||||
<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.76.1">
|
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||||
<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">
|
||||||
|
|||||||
+12
-10
@@ -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.76.1">
|
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||||
<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="id910601"></a><p>
|
<a name="config.legal"></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>
|
||||||
@@ -58,14 +58,16 @@
|
|||||||
</dl></dd>
|
</dl></dd>
|
||||||
<dt><span class="section"><a href="boost_config/boost_macro_reference.html">Boost Macro Reference</a></span></dt>
|
<dt><span class="section"><a href="boost_config/boost_macro_reference.html">Boost Macro Reference</a></span></dt>
|
||||||
<dd><dl>
|
<dd><dl>
|
||||||
<dt><span class="section"><a href="boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_defects">Macros
|
<dt><span class="section"><a href="boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_c__03_defects">Macros
|
||||||
that describe defects</a></span></dt>
|
that describe C++03 defects</a></span></dt>
|
||||||
<dt><span class="section"><a href="boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_optional_features">Macros
|
<dt><span class="section"><a href="boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_optional_features">Macros
|
||||||
that describe optional features</a></span></dt>
|
that describe optional features</a></span></dt>
|
||||||
<dt><span class="section"><a href="boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_possible_c__0x_features">Macros
|
<dt><span class="section"><a href="boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_possible_c___future_features">Macros
|
||||||
that describe possible C++0x features</a></span></dt>
|
that describe possible C++ future features</a></span></dt>
|
||||||
<dt><span class="section"><a href="boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_c__0x_features_not_supported">Macros
|
<dt><span class="section"><a href="boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_c__11_features_not_supported">Macros
|
||||||
that describe C++0x features not supported</a></span></dt>
|
that describe C++11 features not supported</a></span></dt>
|
||||||
|
<dt><span class="section"><a href="boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_allow_use_of_c__11_features_with_c__03_compilers">Macros
|
||||||
|
that allow use of C++11 features with C++03 compilers</a></span></dt>
|
||||||
<dt><span class="section"><a href="boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.boost_helper_macros">Boost
|
<dt><span class="section"><a href="boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.boost_helper_macros">Boost
|
||||||
Helper Macros</a></span></dt>
|
Helper Macros</a></span></dt>
|
||||||
<dt><span class="section"><a href="boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.boost_informational_macros">Boost
|
<dt><span class="section"><a href="boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.boost_informational_macros">Boost
|
||||||
@@ -275,7 +277,7 @@
|
|||||||
<span class="keyword">export</span> <span class="identifier">CXXFLAGS</span><span class="special">=</span><span class="string">"-Aa -DAportable -D__HPACC_THREAD_SAFE_RB_TREE \
|
<span class="keyword">export</span> <span class="identifier">CXXFLAGS</span><span class="special">=</span><span class="string">"-Aa -DAportable -D__HPACC_THREAD_SAFE_RB_TREE \
|
||||||
-DRWSTD_MULTI_THREAD -DRW_MULTI_THREAD -D_REENTRANT -D_THREAD_SAFE"</span>
|
-DRWSTD_MULTI_THREAD -DRW_MULTI_THREAD -D_REENTRANT -D_THREAD_SAFE"</span>
|
||||||
<span class="keyword">export</span> <span class="identifier">LDFLAGS</span><span class="special">=</span><span class="string">"-DAportable"</span>
|
<span class="keyword">export</span> <span class="identifier">LDFLAGS</span><span class="special">=</span><span class="string">"-DAportable"</span>
|
||||||
<span class="keyword">export</span> <span class="identifier">LIBS</span><span class="special">=</span><span class="string">"-lpthread"</span>
|
<span class="keyword">export</span> <span class="identifier">LIBS</span><span class="special">=</span><span class="string">"-lpthread"</span>
|
||||||
<span class="identifier">sh</span> <span class="special">./</span><span class="identifier">configure</span>
|
<span class="identifier">sh</span> <span class="special">./</span><span class="identifier">configure</span>
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
@@ -947,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: July 13, 2011 at 18:00:55 GMT</small></p></td>
|
<td align="left"><p><small>Last revised: October 10, 2011 at 14:43:27 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>
|
||||||
|
|||||||
+78
-41
@@ -16,11 +16,11 @@
|
|||||||
|
|
||||||
[#config_defects]
|
[#config_defects]
|
||||||
|
|
||||||
[section Macros that describe defects]
|
[section Macros that describe C++03 defects]
|
||||||
|
|
||||||
The following macros all describe features that are required by the C++ standard,
|
The following macros all describe features that are required by the C++03 standard,
|
||||||
if one of the following macros is defined, then it represents a defect in the
|
if one of the following macros is defined, then it represents a defect in the
|
||||||
compiler's conformance with the standard.
|
compiler's conformance with the 2003 standard.
|
||||||
|
|
||||||
|
|
||||||
[table
|
[table
|
||||||
@@ -514,11 +514,10 @@ standard).
|
|||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
|
||||||
[section Macros that describe possible C++0x features]
|
[section Macros that describe possible C++ future features]
|
||||||
|
|
||||||
The following macros describe features that are likely to be included in the
|
The following macros describe features that may be included in some future
|
||||||
upcoming ISO C++ standard, C++0x, but have not yet been approved for inclusion
|
ISO C++ standard, but have not yet been approved for inclusion in the language.
|
||||||
in the language.
|
|
||||||
|
|
||||||
|
|
||||||
[table
|
[table
|
||||||
@@ -531,9 +530,9 @@ The compiler supports concepts.
|
|||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
|
||||||
[section Macros that describe C++0x features not supported]
|
[section Macros that describe C++11 features not supported]
|
||||||
|
|
||||||
The following macros describe features in the upcoming ISO C++ standard, C++0x,
|
The following macros describe features in the 2011 ISO C++ standard, formerly known as C++0x,
|
||||||
that are not yet supported by a particular compiler or library.
|
that are not yet supported by a particular compiler or library.
|
||||||
|
|
||||||
[table
|
[table
|
||||||
@@ -641,6 +640,76 @@ variadic macros.
|
|||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
|
||||||
|
[#config_11_for_03]
|
||||||
|
|
||||||
|
[section Macros that allow use of C++11 features with C++03 compilers]
|
||||||
|
|
||||||
|
The following macros allow use of C++11 features even with compilers that do not yet
|
||||||
|
provide compliant C++11 support.
|
||||||
|
|
||||||
|
[table
|
||||||
|
[[Macro ][Section ][ Description ]]
|
||||||
|
|
||||||
|
[[`BOOST_CONSTEXPR`][
|
||||||
|
Some compilers don't support the use of `constexpr`. This macro expands to nothing on those compilers, and `constexpr`
|
||||||
|
elsewhere. For example, when defining a constexpr function or constructor replace:
|
||||||
|
``
|
||||||
|
constexpr tuple();
|
||||||
|
``
|
||||||
|
with:
|
||||||
|
``
|
||||||
|
BOOST_CONSTEXPR tuple();
|
||||||
|
``
|
||||||
|
]]
|
||||||
|
[[`BOOST_CONSTEXPR_OR_CONST`][
|
||||||
|
Some compilers don't support the use of `constexpr`. This macro expands to `const` on those compilers, and `constexpr`
|
||||||
|
elsewhere. For example, when defining const expr variables replace:
|
||||||
|
``
|
||||||
|
static constexpr UIntType xor_mask = a;
|
||||||
|
``
|
||||||
|
with:
|
||||||
|
``
|
||||||
|
static BOOST_CONSTEXPR_OR_CONST UIntType xor_mask = a;
|
||||||
|
``
|
||||||
|
]]
|
||||||
|
[[`BOOST_STATIC_CONSTEXPR`][
|
||||||
|
This is a shortcut for `static BOOST_CONSTEXPR_OR_CONST`For example, when defining const expr variables replace:
|
||||||
|
``
|
||||||
|
static constexpr UIntType xor_mask = a;
|
||||||
|
``
|
||||||
|
with:
|
||||||
|
``
|
||||||
|
BOOST_STATIC_CONSTEXPR UIntType xor_mask = a;
|
||||||
|
``
|
||||||
|
]]
|
||||||
|
[[
|
||||||
|
``
|
||||||
|
BOOST_NOEXCEPT
|
||||||
|
BOOST_NOEXCEPT_IF(Predicate)
|
||||||
|
BOOST_NOEXCEPT_EXPR(Expression)
|
||||||
|
``
|
||||||
|
][
|
||||||
|
If `BOOST_NO_NOEXCEPT` is defined (i.e. C++03 compliant compilers) these macros are defined as:
|
||||||
|
[:
|
||||||
|
``
|
||||||
|
#define BOOST_NOEXCEPT
|
||||||
|
#define BOOST_NOEXCEPT_IF(Predicate)
|
||||||
|
#define BOOST_NOEXCEPT_EXPR(Expression) false
|
||||||
|
``
|
||||||
|
]
|
||||||
|
If `BOOST_NO_NOEXCEPT` is not defined (i.e. C++11 compliant compilers) they are defined as:
|
||||||
|
[:
|
||||||
|
``
|
||||||
|
#define BOOST_NOEXCEPT noexcept
|
||||||
|
#define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
|
||||||
|
#define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
|
||||||
|
``
|
||||||
|
]
|
||||||
|
]]
|
||||||
|
]
|
||||||
|
|
||||||
|
[endsect]
|
||||||
|
|
||||||
[#config_helpers]
|
[#config_helpers]
|
||||||
|
|
||||||
[section Boost Helper Macros]
|
[section Boost Helper Macros]
|
||||||
@@ -820,38 +889,6 @@ 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_CONSTEXPR`][
|
|
||||||
Some compilers don't support the use of `constexpr`. This macro expands to nothing on those compilers, and `constexpr`
|
|
||||||
elsewhere. For example, when defining a constexpr function or constructor replace:
|
|
||||||
``
|
|
||||||
constexpr tuple();
|
|
||||||
``
|
|
||||||
with:
|
|
||||||
``
|
|
||||||
BOOST_CONSTEXPR tuple();
|
|
||||||
``
|
|
||||||
]]
|
|
||||||
[[`BOOST_CONSTEXPR_OR_CONST`][
|
|
||||||
Some compilers don't support the use of `constexpr`. This macro expands to `const` on those compilers, and `constexpr`
|
|
||||||
elsewhere. For example, when defining const expr variables replace:
|
|
||||||
``
|
|
||||||
static constexpr UIntType xor_mask = a;
|
|
||||||
``
|
|
||||||
with:
|
|
||||||
``
|
|
||||||
static BOOST_CONSTEXPR_OR_CONST UIntType xor_mask = a;
|
|
||||||
``
|
|
||||||
]]
|
|
||||||
[[`BOOST_STATIC_CONSTEXPR`][
|
|
||||||
This is a shortcut for `static BOOST_CONSTEXPR_OR_CONST`For example, when defining const expr variables replace:
|
|
||||||
``
|
|
||||||
static constexpr UIntType xor_mask = a;
|
|
||||||
``
|
|
||||||
with:
|
|
||||||
``
|
|
||||||
BOOST_STATIC_CONSTEXPR UIntType xor_mask = a;
|
|
||||||
``
|
|
||||||
]]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
|||||||
@@ -635,6 +635,20 @@ namespace std{ using ::type_info; }
|
|||||||
#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
|
#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
|
||||||
#define BOOST_DO_JOIN2( X, Y ) X##Y
|
#define BOOST_DO_JOIN2( X, Y ) X##Y
|
||||||
|
|
||||||
|
//
|
||||||
|
// Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR
|
||||||
|
// These aid the transition to C++11 while still supporting C++03 compilers
|
||||||
|
//
|
||||||
|
#ifdef BOOST_NO_NOEXCEPT
|
||||||
|
# define BOOST_NOEXCEPT
|
||||||
|
# define BOOST_NOEXCEPT_IF(Predicate)
|
||||||
|
# define BOOST_NOEXCEPT_EXPR(Expression) false
|
||||||
|
#else
|
||||||
|
# define BOOST_NOEXCEPT noexcept
|
||||||
|
# define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
|
||||||
|
# define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set some default values for compiler/library/platform names.
|
// Set some default values for compiler/library/platform names.
|
||||||
// These are for debugging config setup only:
|
// These are for debugging config setup only:
|
||||||
|
|||||||
Reference in new issue
Block a user