Added TR1 config macro docs.

[SVN r31333]
This commit is contained in:
John Maddock
2005-10-15 09:50:48 +00:00
parent e18411ec4e
commit 8120f048fc

View File

@ -74,8 +74,8 @@
<p>you will see a list of the items being checked as the script works its way <p>you will see a list of the items being checked as the script works its way
through the regression tests. Note that the configure script only really through the regression tests. Note that the configure script only really
auto-detects your compiler if it's called g++, c++ or CC. If you are using some auto-detects your compiler if it's called g++, c++ or CC. If you are using some
other compiler you will need to set one or more of the following other compiler you will need to set one or more of the following environment
environment variables:</p> variables:</p>
<table border="1" cellpadding="7" cellspacing="1" width="624"> <table border="1" cellpadding="7" cellspacing="1" width="624">
<tr> <tr>
<td valign="top" width="50%"><p align="center"><b>Variable</b></p> <td valign="top" width="50%"><p align="center"><b>Variable</b></p>
@ -122,14 +122,15 @@ sh ./configure</pre>
committing a configure-modified user.hpp to the cvs repository (something you committing a configure-modified user.hpp to the cvs repository (something you
will not be thanked for!).</p> will not be thanked for!).</p>
<p>Option 2: give the header a more memorable name, and place it somewhere <p>Option 2: give the header a more memorable name, and place it somewhere
convenient; then, define the macro BOOST_USER_CONFIG to point to it. For example convenient; then, define the macro BOOST_USER_CONFIG to point to it. For
create a new sub-directory &lt;boost-root&gt;/boost/config/user/, and copy the example create a new sub-directory &lt;boost-root&gt;/boost/config/user/, and
header there; for example as "multithread-gcc-config.hpp". Then, when compiling copy the header there; for example as "multithread-gcc-config.hpp". Then, when
add the command line option: compiling add the command line option:
-DBOOST_USER_CONFIG="&lt;boost/config/user/multithread-gcc-config.hpp&gt;", and boost -DBOOST_USER_CONFIG="&lt;boost/config/user/multithread-gcc-config.hpp&gt;", and
will use the new configuration header. This option allows you to generate more boost will use the new configuration header. This option allows you to generate
than one configuration header, and to keep them separate from the boost source more than one configuration header, and to keep them separate from the boost
- so that updates to the source do not interfere with your configuration.</p> source - so that updates to the source do not interfere with your
configuration.</p>
<h4><a name="user_settable"></a>User settable options</h4> <h4><a name="user_settable"></a>User settable options</h4>
<p>There are some configuration-options that represent user choices, rather than <p>There are some configuration-options that represent user choices, rather than
compiler defects or platform specific options. These are listed in compiler defects or platform specific options. These are listed in
@ -844,6 +845,11 @@ void g() { return f(); }</pre>
<td>Platform</td> <td>Platform</td>
<td>The platform has the POSIX header &lt;dirent.h&gt;.</td> <td>The platform has the POSIX header &lt;dirent.h&gt;.</td>
</tr> </tr>
<TR>
<TD>BOOST_HAS_EXPM1</TD>
<TD>Platform</TD>
<TD>The platform has the functions expm1 expm1f and expm1l in &lt;math.h&gt;</TD>
</TR>
<tr> <tr>
<td>BOOST_HAS_FTIME</td> <td>BOOST_HAS_FTIME</td>
<td>Platform</td> <td>Platform</td>
@ -860,6 +866,12 @@ void g() { return f(); }</pre>
<td valign="top" width="37%">The C++ implementation provides the (SGI) hash_set or <td valign="top" width="37%">The C++ implementation provides the (SGI) hash_set or
hash_map classes.</td> hash_map classes.</td>
</tr> </tr>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_LOG1P</TD>
<TD vAlign="top" width="15%">Platform</TD>
<TD vAlign="top" width="37%">The platform has the functions log1p, log1pf and
log1pl in &lt;math.h&gt;.</TD>
</TR>
<tr> <tr>
<td>BOOST_HAS_LONG_LONG</td> <td>BOOST_HAS_LONG_LONG</td>
<td>Compiler</td> <td>Compiler</td>
@ -948,6 +960,114 @@ void g() { return f(); }</pre>
std::use_facet, but has a workaround class-version that does the job. This is std::use_facet, but has a workaround class-version that does the job. This is
primarily for the STLport std lib.</td> primarily for the STLport std lib.</td>
</tr> </tr>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_ARRAY</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a TR1 conforming version of
&lt;array&gt;</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_COMPLEX_OVERLOADS</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a version of &lt;complex&gt; that
supports passing scalars&nbsp;to the complex number algorithms.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a version of &lt;complex&gt; that
includes the new inverse trig functions from TR1.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_REFERENCE_WRAPPER</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has TR1 conforming reference wrappers in
&lt;functional&gt;.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_RESULT_OF</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a TR1 conforming result_of template
in &lt;functional&gt;.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_MEM_FN</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a TR1 conforming mem_fn function
template in &lt;functional&gt;.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_BIND</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a TR1 conforming&nbsp;bind function
template in &lt;functional&gt;.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_FUNCTION</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a TR1 conforming&nbsp;<EM>function</EM>
class template in &lt;functional&gt;.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_HASH</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a TR1 conforming&nbsp;<EM>hash </EM>function
template in &lt;functional&gt;.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_SHARED_PTR</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a TR1 conforming&nbsp;<EM>shared_ptr </EM>
class template in &lt;memory&gt;.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_RANDOM</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a TR1 conforming version of
&lt;random&gt;.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_REGEX</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a TR1 conforming version of
&lt;regex&gt;.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_TUPLE</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a TR1 conforming version of
&lt;tuple&gt;.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_TYPE_TRAITS</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a TR1 conforming version of
&lt;type_traits&gt;.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_UTILITY</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has the TR1 additions to &lt;utility&gt;
(tuple interface to std::pair).</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_UNORDERED_MAP</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a TR1 conforming version of
&lt;unordered_map&gt;.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1_UNORDERED_SET</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">The library has a TR1 conforming version of
&lt;unordered_set&gt;.</TD>
</TR>
<TR>
<TD vAlign="top" width="48%">BOOST_HAS_TR1</TD>
<TD vAlign="top" width="15%">Standard library</TD>
<TD vAlign="top" width="37%">Implies all the other BOOST_HAS_TR1_* macros should
be set.</TD>
</TR>
<tr> <tr>
<td valign="top" width="48%">BOOST_HAS_THREADS</td> <td valign="top" width="48%">BOOST_HAS_THREADS</td>
<td valign="top" width="15%">Platform/compiler</td> <td valign="top" width="15%">Platform/compiler</td>
@ -1136,8 +1256,8 @@ void g() { return f(); }</pre>
</tr> </tr>
</table> </table>
<h4><a name="info_macros"></a>Boost Informational Macros</h4> <h4><a name="info_macros"></a>Boost Informational Macros</h4>
<p>The following macros describe boost features; these are, generally speaking <p>The following macros describe boost features; these are, generally speaking the
the only boost macros that should be tested in user code.</p> only boost macros that should be tested in user code.</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="33%"><p align="center"><b>Macro</b></p> <td valign="top" width="33%"><p align="center"><b>Macro</b></p>
@ -1237,10 +1357,10 @@ void g() { return f(); }</pre>
be managed by #pragma's that tell the compiler what ABI to use for the types be managed by #pragma's that tell the compiler what ABI to use for the types
declared in your library. In order to avoid sprinkling #pragma's all over the declared in your library. In order to avoid sprinkling #pragma's all over the
boost headers, there are some prefix and suffix headers that do the job. boost headers, there are some prefix and suffix headers that do the job.
Typical usage is:</P> Typical usage is:</P>
<P><b>my_library.cpp</b></P> <P><b>my_library.cpp</b></P>
<blockquote> <blockquote>
<PRE>#ifndef MY_INCLUDE_GUARD <PRE>#ifndef MY_INCLUDE_GUARD
#define MY_INCLUDE_GUARD #define MY_INCLUDE_GUARD
// all includes go here: // all includes go here:
@ -1260,7 +1380,7 @@ namespace boost{
</blockquote> </blockquote>
<P><b>my_library.cpp</b></P> <P><b>my_library.cpp</b></P>
<blockquote> <blockquote>
<pre>... <pre>...
<b>// nothing special need be done in the implementation file</b> <b>// nothing special need be done in the implementation file</b>
...</pre> ...</pre>
</blockquote> </blockquote>
@ -1284,23 +1404,23 @@ namespace boost{
search path, and the compiler and linker do the rest.&nbsp; Boost.config search path, and the compiler and linker do the rest.&nbsp; Boost.config
supports this via the header &lt;boost/config/auto_link.hpp&gt;, before supports this via the header &lt;boost/config/auto_link.hpp&gt;, before
including this header one or more of the following macros need to be defined:</P> including this header one or more of the following macros need to be defined:</P>
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="1"> <TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="1">
<TR> <TR>
<TD>BOOST_LIB_NAME</TD> <TD>BOOST_LIB_NAME</TD>
<TD> <TD>
Required: An&nbsp;identifier containing the basename of the library, for Required: An&nbsp;identifier containing the basename of the library, for
example 'boost_regex'.</TD> example 'boost_regex'.</TD>
</TR> </TR>
<TR> <TR>
<TD>BOOST_DYN_LINK</TD> <TD>BOOST_DYN_LINK</TD>
<TD>Optional: when set link to dll rather than static library.</TD> <TD>Optional: when set link to dll rather than static library.</TD>
</TR> </TR>
<TR> <TR>
<TD>BOOST_LIB_DIAGNOSTIC</TD> <TD>BOOST_LIB_DIAGNOSTIC</TD>
<TD>Optional: when set the header will print out the name of the library selected <TD>Optional: when set the header will print out the name of the library selected
(useful for debugging).</TD> (useful for debugging).</TD>
</TR> </TR>
</TABLE> </TABLE>
<P>If the compiler supports this mechanism, then it will be told to link against <P>If the compiler supports this mechanism, then it will be told to link against
the appropriately named library, the actual algorithm used to mangle the name the appropriately named library, the actual algorithm used to mangle the name
of the library is documented inside &lt;boost/config/auto_link.hpp&gt; and has of the library is documented inside &lt;boost/config/auto_link.hpp&gt; and has
@ -1308,7 +1428,7 @@ namespace boost{
<P>Typical usage is:</P> <P>Typical usage is:</P>
<P><b>my_library.hpp</b></P> <P><b>my_library.hpp</b></P>
<blockquote> <blockquote>
<PRE>... <PRE>...
// //
// Don't include auto-linking code if the user has disabled it by // Don't include auto-linking code if the user has disabled it by
// defining BOOST_ALL_NO_LIB, or BOOST_MY_LIBRARY_NO_LIB, or if this // defining BOOST_ALL_NO_LIB, or BOOST_MY_LIBRARY_NO_LIB, or if this
@ -1326,7 +1446,7 @@ namespace boost{
</blockquote> </blockquote>
<p><b>my_library.cpp</b></p> <p><b>my_library.cpp</b></p>
<blockquote> <blockquote>
<pre>// define BOOST_MY_LIBRARY_SOURCE so that the header knows that the <pre>// define BOOST_MY_LIBRARY_SOURCE so that the header knows that the
// library is being built (possibly exporting rather than importing code) // library is being built (possibly exporting rather than importing code)
// //
<b>#define BOOST_MY_LIBRARY_SOURCE</b> <b>#define BOOST_MY_LIBRARY_SOURCE</b>
@ -1535,4 +1655,3 @@ int test()
<p>&nbsp;</p> <p>&nbsp;</p>
</body> </body>
</html> </html>