forked from boostorg/config
Updated new macro guide.
[SVN r36558]
This commit is contained in:
96
config.htm
96
config.htm
@ -872,7 +872,7 @@ void g() { return f(); }</pre>
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>BOOST_HAS_LONG_LONG</td>
|
<td>BOOST_HAS_LONG_LONG</td>
|
||||||
<td>Compiler</td>
|
<td>Compiler</td>
|
||||||
<td>The compiler supports the long long data type.</td>
|
<td>The compiler supports the long long data type.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<TR>
|
<TR>
|
||||||
@ -1125,9 +1125,8 @@ void g() { return f(); }</pre>
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<h4><a name="cpp0x"></a>Macros that describe C++0x features</h4>
|
<h4><a name="cpp0x"></a>Macros that describe C++0x features</h4>
|
||||||
<p>The following macros describe features that are likely to be
|
<p>The following macros describe features that are likely to be included in the
|
||||||
included in the upcoming ISO C++ standard, C++0x.</p>
|
upcoming ISO C++ standard, C++0x.</p>
|
||||||
|
|
||||||
<table border="1" cellpadding="7" cellspacing="1" width="100%">
|
<table border="1" cellpadding="7" cellspacing="1" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" width="50%"><p align="center"><b>Macro</b></p>
|
<td valign="top" width="50%"><p align="center"><b>Macro</b></p>
|
||||||
@ -1138,55 +1137,48 @@ void g() { return f(); }</pre>
|
|||||||
<tr>
|
<tr>
|
||||||
<td valign="top" width="50%">BOOST_CXX0X_CONCEPTS</td>
|
<td valign="top" width="50%">BOOST_CXX0X_CONCEPTS</td>
|
||||||
<td valign="top" width="50%">
|
<td valign="top" width="50%">
|
||||||
The compiler supports <a
|
The compiler supports <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2081.pdf">
|
||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2081.pdf">concepts</a>. <b>Note</b>: concepts have been
|
concepts</a>. <b>Note</b>: concepts have been proposed for C++0x, but have
|
||||||
proposed for C++0x, but have not yet been approved for
|
not yet been approved for inclusion in the language.
|
||||||
inclusion in the language.
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" width="50%">BOOST_CXX0X_LONG_LONG</td>
|
<td valign="top" width="50%">BOOST_CXX0X_LONG_LONG</td>
|
||||||
<td valign="top" width="50%">
|
<td valign="top" width="50%">
|
||||||
The compiler supports the long long. Identical to <tt>BOOST_HAS_LONG_LONG</tt>.
|
The compiler supports the long long. Identical to <tt>BOOST_HAS_LONG_LONG</tt>.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" width="50%">BOOST_CXX0X_PREPROCESSOR</td>
|
<td valign="top" width="50%">BOOST_CXX0X_PREPROCESSOR</td>
|
||||||
<td valign="top" width="50%">
|
<td valign="top" width="50%">
|
||||||
The compiler supports the <a
|
The compiler supports the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm">
|
||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm">C99
|
C99 preprocessor</a>, which includes variadic macros, concatenation of wide
|
||||||
preprocessor</a>, which includes variadic macros,
|
string literals, and the <code>_Pragma</code> operator.
|
||||||
concatenation of wide string literals, and the
|
</td>
|
||||||
<code>_Pragma</code> operator.
|
</tr>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" width="50%">BOOST_CXX0X_RVALUE_REFERENCES</td>
|
<td valign="top" width="50%">BOOST_CXX0X_RVALUE_REFERENCES</td>
|
||||||
<td valign="top" width="50%">
|
<td valign="top" width="50%">
|
||||||
The compiler supports <a
|
The compiler supports <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html">
|
||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html">rvalue
|
rvalue references</a>.
|
||||||
references</a>.
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" width="50%">BOOST_CXX0X_STATIC_ASSERT</td>
|
<td valign="top" width="50%">BOOST_CXX0X_STATIC_ASSERT</td>
|
||||||
<td valign="top" width="50%">
|
<td valign="top" width="50%">
|
||||||
The compiler supports <a
|
The compiler supports <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html">
|
||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html">static assertions</a>.
|
static assertions</a>.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" width="50%">BOOST_CXX0X_VARIADIC_TEMPLATES</td>
|
<td valign="top" width="50%">BOOST_CXX0X_VARIADIC_TEMPLATES</td>
|
||||||
<td valign="top" width="50%">
|
<td valign="top" width="50%">
|
||||||
The compiler supports <a
|
The compiler supports <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2080.pdf">
|
||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2080.pdf">variadic
|
variadic templates</a>. <b>Note</b>: variadic templates have been proposed
|
||||||
templates</a>. <b>Note</b>: variadic templates have been
|
for C++0x, but have not yet been approved for inclusion in the language.
|
||||||
proposed for C++0x, but have not yet been approved for
|
|
||||||
inclusion in the language.
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h4><a name="helpers"></a>Boost Helper Macros</h4>
|
<h4><a name="helpers"></a>Boost Helper Macros</h4>
|
||||||
<p>The following macros are either simple helpers, or macros that provide
|
<p>The following macros are either simple helpers, or macros that provide
|
||||||
workarounds for compiler/standard library defects.</p>
|
workarounds for compiler/standard library defects.</p>
|
||||||
@ -1620,12 +1612,36 @@ int test()
|
|||||||
|
|
||||||
}</pre>
|
}</pre>
|
||||||
<p>
|
<p>
|
||||||
Once the test code is in place, build and run the program "generate.cpp" that
|
Once the test code is in place in libs/config/test, updating the configuration
|
||||||
you will find in the boost-root/libs/config/tools/ directory. This generates
|
test system proceeds as:</p>
|
||||||
two .cpp test files from the new test code, and adds the tests to the
|
<UL>
|
||||||
regression test Jamfile, and the config_test.cpp test program. Finally add a
|
<LI>
|
||||||
new entry to config_info.cpp so that the new macro gets printed out when that
|
cd into libs/config/tools and run <EM>bjam --v2 </EM>: this generates the .cpp
|
||||||
program is run.</p>
|
file test cases from the .ipp file, updates the Jamfile, config_test.cpp and
|
||||||
|
config_info.cpp.</LI>
|
||||||
|
<LI>
|
||||||
|
cd into libs/config/test and run <EM>bjam --v2 MACRONAME compiler-list</EM> :
|
||||||
|
where <EM>MACRONAME</EM> is the name of the new macro, and <EM>compiler-list</EM>
|
||||||
|
is the list of compilers to test with. You should see the tests pass with
|
||||||
|
those compilers that don't have the defect, and fail with those that do.</LI>
|
||||||
|
<LI>
|
||||||
|
cd into libs/config/test and run <EM>bjam --v2 config_info config_test
|
||||||
|
compiler-list</EM> : config_info should build and run cleanly for all the
|
||||||
|
compilers in <EM>compiler-list</EM> while config_test should fail for those
|
||||||
|
that have the defect, and pass for those that do not.</LI></UL>
|
||||||
|
<P>Then you should:</P>
|
||||||
|
<UL>
|
||||||
|
<LI>
|
||||||
|
Define the defect macro in those config headers that require it.</LI>
|
||||||
|
<LI>
|
||||||
|
Document the macro in this documentation (please do not forget this step!!)</LI>
|
||||||
|
<LI>
|
||||||
|
Commit everything.</LI>
|
||||||
|
<LI>
|
||||||
|
Keep an eye on the regression tests for new failures in Boost.Config caused by
|
||||||
|
the addition.</LI>
|
||||||
|
<LI>
|
||||||
|
Start using the macro.</LI></UL>
|
||||||
<h4><a name="feature_guidelines"></a>Adding New Feature Test Macros</h4>
|
<h4><a name="feature_guidelines"></a>Adding New Feature Test Macros</h4>
|
||||||
<p>When you need to add a macro that describes a feature that the standard does
|
<p>When you need to add a macro that describes a feature that the standard does
|
||||||
not require, follow the convention for adding a new defect macro (above), but
|
not require, follow the convention for adding a new defect macro (above), but
|
||||||
@ -1732,8 +1748,9 @@ int test()
|
|||||||
<p>Copyright Beman Dawes 2001</p>
|
<p>Copyright Beman Dawes 2001</p>
|
||||||
<p>Copyright Vesa Karvonen 2001</p>
|
<p>Copyright Vesa Karvonen 2001</p>
|
||||||
<p>Copyright John Maddock 2001</p>
|
<p>Copyright John Maddock 2001</p>
|
||||||
<P>Distributed under the Boost Software License, Version 1.0. (See accompanying file <A href="../../LICENSE_1_0.txt">
|
<P>Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
LICENSE_1_0.txt</A> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</A>).</P>
|
file <A href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</A> or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">
|
||||||
|
www.boost.org/LICENSE_1_0.txt</A>).</P>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
@ -1741,4 +1758,3 @@ int test()
|
|||||||
<p> </p>
|
<p> </p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user