mirror of
https://github.com/boostorg/config.git
synced 2025-10-04 19:50:57 +02:00
Applies a few patches to the quickbook source and regenerated docs. Changed image location to boost-root/doc/images. [SVN r37915]
2786 lines
114 KiB
HTML
2786 lines
114 KiB
HTML
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
<title>Boost Macro Reference</title>
|
||
<link rel="stylesheet" href="../boostbook.css" type="text/css">
|
||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
|
||
<link rel="start" 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="next" href="guidelines_for_boost_authors.html" title="Guidelines for Boost Authors">
|
||
</head>
|
||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||
<table cellpadding="2" width="100%">
|
||
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
|
||
<td align="center"><a href="../../../../../index.htm">Home</a></td>
|
||
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
|
||
<td align="center"><a href="../../../../../people/people.htm">People</a></td>
|
||
<td align="center"><a href="../../../../../more/faq.htm">FAQ</a></td>
|
||
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
|
||
</table>
|
||
<hr>
|
||
<div class="spirit-nav">
|
||
<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="guidelines_for_boost_authors.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
|
||
</div>
|
||
<div class="section" lang="en">
|
||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||
<a name="boost_config.boost_macro_reference"></a><a href="boost_macro_reference.html" title="Boost Macro Reference">Boost Macro Reference</a></h2></div></div></div>
|
||
<div class="toc"><dl>
|
||
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_defects">Macros
|
||
that describe 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
|
||
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_c__0x_features">Macros
|
||
that describe C++0x features</a></span></dt>
|
||
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.boost_helper_macros">Boost
|
||
Helper Macros</a></span></dt>
|
||
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.boost_informational_macros">Boost
|
||
Informational Macros</a></span></dt>
|
||
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code">Macros
|
||
for libraries with separate source code</a></span></dt>
|
||
</dl></div>
|
||
<a name="config_defects"></a><p>
|
||
</p>
|
||
<div class="section" lang="en">
|
||
<div class="titlepage"><div><div><h3 class="title">
|
||
<a name="boost_config.boost_macro_reference.macros_that_describe_defects"></a><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_defects" title="Macros that describe defects">Macros
|
||
that describe defects</a></h3></div></div></div>
|
||
<p>
|
||
The following macros all describe features that are required by the C++ standard,
|
||
if one of the following macros is defined, then it represents a defect in
|
||
the compiler's conformance with the standard.
|
||
</p>
|
||
<div class="informaltable"><table class="table">
|
||
<colgroup>
|
||
<col>
|
||
<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_BCB_PARTIAL_SPECIALIZATION_BUG</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler exibits certain partial specialisation bug - probably
|
||
Borland C++ Builder specific.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Argument dependent lookup fails if there is a using declaration for
|
||
the symbol being looked up in the current scope. For example, using
|
||
<code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">get_pointer</span></code>; prevents ADL from
|
||
finding overloads of <code class="computeroutput"><span class="identifier">get_pointer</span></code>
|
||
in namespaces nested inside boost (but not elsewhere). Probably Borland
|
||
specific.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler does not implement argument-dependent lookup (also named
|
||
Koenig lookup); see std::3.4.2 [basic.koenig.lookup]
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_AUTO_PTR</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
If the compiler / library supplies non-standard or broken <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">auto_ptr</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_CTYPE_FUNCTIONS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The Platform does not provide functions for the character-classifying
|
||
operations <code class="computeroutput"><span class="special"><</span><span class="identifier">ctype</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code> and <code class="computeroutput"><span class="special"><</span><span class="identifier">cctype</span><span class="special">></span></code>,
|
||
only macros.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_CV_SPECIALIZATIONS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
If template specialisations for cv-qualified types conflict with
|
||
a specialisation for a cv-unqualififed type.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_CV_VOID_SPECIALIZATIONS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
If template specialisations for cv-void types conflict with a specialisation
|
||
for void.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_CWCHAR</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The Platform does not provide <code class="computeroutput"><span class="special"><</span><span class="identifier">wchar</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code>
|
||
and <code class="computeroutput"><span class="special"><</span><span class="identifier">cwchar</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_CWCTYPE</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The Platform does not provide <code class="computeroutput"><span class="special"><</span><span class="identifier">wctype</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code>
|
||
and <code class="computeroutput"><span class="special"><</span><span class="identifier">cwctype</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_DEPENDENT_NESTED_DERIVATIONS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler fails to compile a nested class that has a dependent
|
||
base class:
|
||
</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>
|
||
<span class="keyword">struct</span> <span class="identifier">foo</span> <span class="special">:</span> <span class="special">{</span>
|
||
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">U</span><span class="special">></span>
|
||
<span class="keyword">struct</span> <span class="identifier">bar</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">U</span> <span class="special">{};</span>
|
||
</pre>
|
||
<p>
|
||
};
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Template value parameters cannot have a dependent type, for example:
|
||
|
||
</p>
|
||
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting">
|
||
<span class="keyword">template</span><span class="special"><</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>
|
||
</pre>
|
||
<p>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_EXCEPTION_STD_NAMESPACE</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard Library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The standard library does not put some or all of the contents of
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">exception</span><span class="special">></span></code> in namespace std.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_EXCEPTIONS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler does not support exception handling (this setting is
|
||
typically required by many C++ compilers for embedded platforms).
|
||
Note that there is no requirement for boost libraries to honor this
|
||
configuration setting - indeed doing so may be impossible in some
|
||
cases. Those libraries that do honor this will typically abort if
|
||
a critical error occurs - you have been warned!
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Can only use deduced template arguments when calling function template
|
||
instantiations.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_FUNCTION_TEMPLATE_ORDERING</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler does not perform function template ordering or its function
|
||
template ordering is incorrect.
|
||
</p>
|
||
<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="comment">// #2
|
||
</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">class</span> <span class="identifier">U</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="identifier">U</span><span class="special">));</span>
|
||
|
||
<span class="keyword">void</span> <span class="identifier">bar</span><span class="special">(</span><span class="keyword">int</span><span class="special">);</span>
|
||
|
||
<span class="identifier">f</span><span class="special">(&</span><span class="identifier">bar</span><span class="special">);</span> <span class="comment">// should choose #2.
|
||
</span></pre>
|
||
<p>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_INCLASS_MEMBER_INITIALIZATION</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler violates std::9.4.2/4.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_INTRINSIC_WCHAR_T</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The C++ implementation does not provide <code class="computeroutput"><span class="keyword">wchar_t</span></code>,
|
||
or it is really a synonym for another integral type. Use this symbol
|
||
to decide whether it is appropriate to explicitly specialize a template
|
||
on <code class="computeroutput"><span class="keyword">wchar_t</span></code> if there
|
||
is already a specialization for other integer types.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_IS_ABSTRACT</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The C++ compiler does not support SFINAE with abstract types, this
|
||
is covered by <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#337" target="_top">Core
|
||
Language DR337</a>, but is not part of the current standard.
|
||
Fortunately most compilers that support SFINAE also support this
|
||
DR.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_LIMITS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The C++ implementation does not provide the <code class="computeroutput"><span class="special"><</span><span class="identifier">limits</span><span class="special">></span></code>
|
||
header. Never check for this symbol in library code; always include
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">limits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>, which guarantees to provide
|
||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Constants such as <code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special"><</span><span class="identifier">T</span><span class="special">>::</span><span class="identifier">is_signed</span></code>
|
||
are not available for use at compile-time.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_LONG_LONG_NUMERIC_LIMITS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
There is no specialization for <code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special"><</span><span class="keyword">long</span>
|
||
<span class="keyword">long</span><span class="special">></span></code>
|
||
and <code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special"><</span><span class="keyword">unsigned</span>
|
||
<span class="keyword">long</span> <span class="keyword">long</span><span class="special">></span></code>. <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">limits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||
will then add these specializations as a standard library "fix"
|
||
only if the compiler supports the <code class="computeroutput"><span class="keyword">long</span>
|
||
<span class="keyword">long</span></code> datatype.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler does not support the specialization of individual member
|
||
functions of template classes.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_MEMBER_TEMPLATE_KEYWORD</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
If the compiler supports member templates, but not the template keyword
|
||
when accessing member template classes.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_MEMBER_TEMPLATE_FRIENDS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Member template friend syntax (<code class="computeroutput"><span class="keyword">template</span><span class="special"><</span><span class="keyword">class</span>
|
||
<span class="identifier">P</span><span class="special">></span>
|
||
<span class="keyword">friend</span> <span class="keyword">class</span>
|
||
<span class="identifier">frd</span><span class="special">;</span></code>)
|
||
described in the C++ Standard, 14.5.3, not supported.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_MEMBER_TEMPLATES</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Member template functions not fully supported.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_MS_INT64_NUMERIC_LIMITS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
There is no specialization for <code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special"><</span><span class="identifier">__int64</span><span class="special">></span></code> and <code class="computeroutput"><span class="identifier">numeric_limits</span><span class="special"><</span><span class="keyword">unsigned</span>
|
||
<span class="identifier">__int64</span><span class="special">></span></code>.
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">limits</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> will then add these specializations
|
||
as a standard library "fix", only if the compiler supports
|
||
the <code class="computeroutput"><span class="identifier">__int64</span></code> datatype.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_OPERATORS_IN_NAMESPACE</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler requires inherited operator friend functions to be defined
|
||
at namespace scope, then using'ed to boost. Probably GCC specific.
|
||
See <a href="../../../../../boost/operators.hpp" target="_top"><code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">operators</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
|
||
for example.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_POINTER_TO_MEMBER_CONST</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler does not correctly handle pointers to const member functions,
|
||
preventing use of these in overloaded function templates. See <a href="../../../../../boost/functional.hpp" target="_top"><code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">functional</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a>
|
||
for example.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Pointers to members don't work when used as template parameters.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_PRIVATE_IN_AGGREGATE</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler misreads 8.5.1, treating classes as non-aggregate if
|
||
they contain private or protected member functions.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_SFINAE</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler does not support the "Substitution Failure Is Not
|
||
An Error" meta-programming idiom.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_STD_ALLOCATOR</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The C++ standard library does not provide a standards conforming
|
||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_STD_DISTANCE</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform does not have a conforming version of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">distance</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_STD_ITERATOR</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The C++ implementation fails to provide the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iterator</span></code>
|
||
class.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_STD_ITERATOR_TRAITS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler does not provide a standard compliant implementation
|
||
of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iterator_traits</span></code>. Note that the
|
||
compiler may still have a non-standard implementation.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_STD_LOCALE</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The standard library lacks <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">locale</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_STD_MESSAGES</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The standard library lacks a conforming <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">messages</span></code>
|
||
facet.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_STD_MIN_MAX</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The C++ standard library does not provide the <code class="computeroutput"><span class="identifier">min</span><span class="special">()</span></code> and <code class="computeroutput"><span class="identifier">max</span><span class="special">()</span></code> template functions that should
|
||
be in <code class="computeroutput"><span class="special"><</span><span class="identifier">algorithm</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Defined if the standard library's output iterators are not assignable.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_STD_USE_FACET</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The standard library lacks a conforming <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">use_facet</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_STD_WSTREAMBUF</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The standard library's implementation of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_streambuf</span><span class="special"><</span><span class="keyword">wchar_t</span><span class="special">></span></code> is either missing, incomplete,
|
||
or buggy.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_STD_WSTRING</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The standard library lacks <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">wstring</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_STDC_NAMESPACE</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler, Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The contents of C++ standard headers for C library functions (the
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">c</span><span class="special">...></span></code> headers) have not been placed
|
||
in namespace std. This test is difficult - some libraries "fake"
|
||
the std C functions by adding using declarations to import them into
|
||
namespace std, unfortunately they don't necessarily catch all of
|
||
them...
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_STRINGSTREAM</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The C++ implementation does not provide the <code class="computeroutput"><span class="special"><</span><span class="identifier">sstream</span><span class="special">></span></code>
|
||
header.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_SWPRINTF</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform does not have a conforming version of <code class="computeroutput"><span class="identifier">swprintf</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Class template partial specialization (14.5.4 [temp.class.spec])
|
||
not supported.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The standard library does not provide templated iterator constructors
|
||
for its containers.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_TEMPLATE_TEMPLATES</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler does not support template template parameters.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_UNREACHABLE_RETURN_DETECTION</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
If a return is unreachable, then no return statement should be required,
|
||
however some compilers insist on it, while other issue a bunch of
|
||
warnings if it is in fact present.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler will not accept a using declaration that brings a function
|
||
from a typename used as a base class into a derived class if functions
|
||
of the same name are present in the derived class.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_USING_TEMPLATE</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler will not accept a using declaration that imports a template
|
||
class or function from another namespace. Originally a Borland specific
|
||
problem with imports to/from the global namespace, extended to MSVC6
|
||
which has a specific issue with importing template classes (but not
|
||
functions).
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_VOID_RETURNS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler does not allow a void function to return the result
|
||
of calling another void function.
|
||
</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>
|
||
<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>
|
||
</pre>
|
||
<p>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<a name="config_features"></a><p>
|
||
</p>
|
||
<div class="section" lang="en">
|
||
<div class="titlepage"><div><div><h3 class="title">
|
||
<a name="boost_config.boost_macro_reference.macros_that_describe_optional_features"></a><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_optional_features" title="Macros that describe optional features">Macros
|
||
that describe optional features</a></h3></div></div></div>
|
||
<p>
|
||
The following macros describe features that are not required by the C++ standard.
|
||
The macro is only defined if the feature is present.
|
||
</p>
|
||
<div class="informaltable"><table class="table">
|
||
<colgroup>
|
||
<col>
|
||
<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_HAS_BETHREADS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform supports BeOS style threads.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_CLOCK_GETTIME</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform has the POSIX API <code class="computeroutput"><span class="identifier">clock_gettime</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_DECLSPEC</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler uses <code class="computeroutput"><span class="identifier">__declspec</span><span class="special">(</span><span class="identifier">dllexport</span><span class="special">)</span></code> and <code class="computeroutput"><span class="identifier">__declspec</span><span class="special">(</span><span class="identifier">dllimport</span><span class="special">)</span></code> to export/import symbols from dll's.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_DIRENT_H</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform has the POSIX header <code class="computeroutput"><span class="special"><</span><span class="identifier">dirent</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_EXPM1</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform has the functions <code class="computeroutput"><span class="identifier">expm1</span></code>,
|
||
<code class="computeroutput"><span class="identifier">expm1f</span></code> and <code class="computeroutput"><span class="identifier">expm1l</span></code> in <code class="computeroutput"><span class="special"><</span><span class="identifier">math</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_FTIME</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform has the Win32 API <code class="computeroutput"><span class="identifier">GetSystemTimeAsFileTime</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_GETTIMEOFDAY</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform has the POSIX API <code class="computeroutput"><span class="identifier">gettimeofday</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_HASH</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The C++ implementation provides the (SGI) hash_set and hash_map classes.
|
||
When defined, <code class="computeroutput"><span class="identifier">BOOST_HASH_SET_HEADER</span></code>
|
||
and <code class="computeroutput"><span class="identifier">BOOST_HASH_LIST_HEADER</span></code>
|
||
will contain the names of the header needed to access hash_set and
|
||
hash_map; <code class="computeroutput"><span class="identifier">BOOST_STD_EXTENSION_NAMESPACE</span></code>
|
||
will provide the namespace in which the two class templates reside.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_LOG1P</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform has the functions <code class="computeroutput"><span class="identifier">log1p</span></code>,
|
||
<code class="computeroutput"><span class="identifier">log1pf</span></code> and <code class="computeroutput"><span class="identifier">log1pl</span></code> in <code class="computeroutput"><span class="special"><</span><span class="identifier">math</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_MACRO_USE_FACET</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The standard library lacks a conforming <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">use_facet</span></code>,
|
||
but has a macro <code class="computeroutput"><span class="identifier">_USE</span><span class="special">(</span><span class="identifier">loc</span><span class="special">,</span> <span class="identifier">Type</span><span class="special">)</span></code> that does the job. This is primarily
|
||
for the Dinkumware std lib.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_MS_INT64</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler supports the <code class="computeroutput"><span class="identifier">__int64</span></code>
|
||
data type.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_NANOSLEEP</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform has the POSIX API nanosleep.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_NL_TYPES_H</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform has an <code class="computeroutput"><span class="special"><</span><span class="identifier">nl_types</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_NRVO</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Indicated that the compiler supports the named return value optimization
|
||
(NRVO). Used to select the most efficient implementation for some
|
||
function. See <a href="../../../../../boost/operators.hpp" target="_top"><code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">operators</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code></a> for example.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_PARTIAL_STD_ALLOCATOR</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard Library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The standard library has a partially conforming <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span></code>
|
||
class, but without any of the member templates.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_PTHREAD_DELAY_NP</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform has the POSIX API <code class="computeroutput"><span class="identifier">pthread_delay_np</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform has the POSIX API <code class="computeroutput"><span class="identifier">pthread_mutexattr_settype</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_PTHREAD_YIELD</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform has the POSIX API <code class="computeroutput"><span class="identifier">pthread_yield</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_PTHREADS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform support POSIX style threads.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_SCHED_YIELD</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform has the POSIX API <code class="computeroutput"><span class="identifier">sched_yield</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_SGI_TYPE_TRAITS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler, Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler has native support for SGI style type traits.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_STDINT_H</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform has a <code class="computeroutput"><span class="special"><</span><span class="identifier">stdint</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_SLIST</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The C++ implementation provides the (SGI) slist class. When defined,
|
||
<code class="computeroutput"><span class="identifier">BOOST_SLIST_HEADER</span></code>
|
||
will contain the name of the header needed to access <code class="computeroutput"><span class="identifier">slist</span></code> and <code class="computeroutput"><span class="identifier">BOOST_STD_EXTENSION_NAMESPACE</span></code>
|
||
will provide the namespace in which <code class="computeroutput"><span class="identifier">slist</span></code>
|
||
resides.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_STLP_USE_FACET</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The standard library lacks a conforming <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">use_facet</span></code>,
|
||
but has a workaround class-version that does the job. This is primarily
|
||
for the STLport std lib.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_ARRAY</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a TR1 conforming version of <code class="computeroutput"><span class="special"><</span><span class="identifier">array</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_COMPLEX_OVERLOADS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a version of <code class="computeroutput"><span class="special"><</span><span class="identifier">complex</span><span class="special">></span></code>
|
||
that supports passing scalars to the complex number algorithms.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a version of <code class="computeroutput"><span class="special"><</span><span class="identifier">complex</span><span class="special">></span></code>
|
||
that includes the new inverse trig functions from TR1.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_REFERENCE_WRAPPER</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has TR1 conforming reference wrappers in <code class="computeroutput"><span class="special"><</span><span class="identifier">functional</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_RESULT_OF</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a TR1 conforming result_of template in <code class="computeroutput"><span class="special"><</span><span class="identifier">functional</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_MEM_FN</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a TR1 conforming mem_fn function template in <code class="computeroutput"><span class="special"><</span><span class="identifier">functional</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_BIND</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a TR1 conforming bind function template in <code class="computeroutput"><span class="special"><</span><span class="identifier">functional</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_FUNCTION</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a TR1 conforming function class template in <code class="computeroutput"><span class="special"><</span><span class="identifier">functional</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_HASH</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a TR1 conforming hash function template in <code class="computeroutput"><span class="special"><</span><span class="identifier">functional</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_SHARED_PTR</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a TR1 conforming <code class="computeroutput"><span class="identifier">shared_ptr</span></code>
|
||
class template in <code class="computeroutput"><span class="special"><</span><span class="identifier">memory</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_RANDOM</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a TR1 conforming version of <code class="computeroutput"><span class="special"><</span><span class="identifier">random</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_REGEX</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a TR1 conforming version of <code class="computeroutput"><span class="special"><</span><span class="identifier">regex</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_TUPLE</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a TR1 conforming version of <code class="computeroutput"><span class="special"><</span><span class="identifier">tuple</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_TYPE_TRAITS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a TR1 conforming version of <code class="computeroutput"><span class="special"><</span><span class="identifier">type_traits</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_UTILITY</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has the TR1 additions to <code class="computeroutput"><span class="special"><</span><span class="identifier">utility</span><span class="special">></span></code>
|
||
(tuple interface to <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code>).
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_UNORDERED_MAP</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a TR1 conforming version of <code class="computeroutput"><span class="special"><</span><span class="identifier">unordered_map</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_UNORDERED_SET</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The library has a TR1 conforming version of <code class="computeroutput"><span class="special"><</span><span class="identifier">unordered_set</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TR1</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Implies all the other <code class="computeroutput"><span class="identifier">BOOST_HAS_TR1_</span><span class="special">*</span></code> macros should be set.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_THREADS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform, Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Defined if the compiler, in its current translation mode, supports
|
||
multiple threads of execution.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_TWO_ARG_USE_FACET</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The standard library lacks a conforming std::use_facet, but has a
|
||
two argument version that does the job. This is primarily for the
|
||
Rogue Wave std lib.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_UNISTD_H</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The Platform provides <code class="computeroutput"><span class="special"><</span><span class="identifier">unistd</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_WINTHREADS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The platform supports MS Windows style threads.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_MSVC_STD_ITERATOR</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Standard library
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Microsoft's broken version of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iterator</span></code>
|
||
is being used. This implies that <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iterator</span></code>
|
||
takes no more than two template parameters.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_MSVC6_MEMBER_TEMPLATES</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Compiler
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Microsoft Visual C++ 6.0 has enough member template idiosyncrasies
|
||
(being polite) that <code class="computeroutput"><span class="identifier">BOOST_NO_MEMBER_TEMPLATES</span></code>
|
||
is defined for this compiler. <code class="computeroutput"><span class="identifier">BOOST_MSVC6_MEMBER_TEMPLATES</span></code>
|
||
is defined to allow compiler specific workarounds. This macro gets
|
||
defined automatically if <code class="computeroutput"><span class="identifier">BOOST_NO_MEMBER_TEMPLATES</span></code>
|
||
is not defined - in other words this is treated as a strict subset
|
||
of the features required by the standard.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_STDINT_H</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Platform
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
There are no 1998 C++ Standard headers <code class="computeroutput"><span class="special"><</span><span class="identifier">stdint</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code>
|
||
or <code class="computeroutput"><span class="special"><</span><span class="identifier">cstdint</span><span class="special">></span></code>, although the 1999 C Standard
|
||
does include <code class="computeroutput"><span class="special"><</span><span class="identifier">stdint</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code>. If <code class="computeroutput"><span class="special"><</span><span class="identifier">stdint</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code>
|
||
is present, <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stdint</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code> can make good use of it, so a
|
||
flag is supplied (signalling presence; thus the default is not present,
|
||
conforming to the current C++ standard).
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="section" lang="en">
|
||
<div class="titlepage"><div><div><h3 class="title">
|
||
<a name="boost_config.boost_macro_reference.macros_that_describe_c__0x_features"></a><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_that_describe_c__0x_features" title="Macros that describe C++0x features">Macros
|
||
that describe C++0x features</a></h3></div></div></div>
|
||
<p>
|
||
The following macros describe features that are likely to be included in
|
||
the upcoming ISO C++ standard, C++0x.
|
||
</p>
|
||
<div class="informaltable"><table class="table">
|
||
<colgroup>
|
||
<col>
|
||
<col>
|
||
</colgroup>
|
||
<thead><tr>
|
||
<th>
|
||
<p>
|
||
Macro
|
||
</p>
|
||
</th>
|
||
<th>
|
||
<p>
|
||
Description
|
||
</p>
|
||
</th>
|
||
</tr></thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_CONCEPTS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler supports concepts. Note: concepts have been proposed
|
||
for C++0x, but have not yet been approved for inclusion in the language.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_LONG_LONG</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler supports the long long data type.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_RVALUE_REFS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler supports rvalue references.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_STATIC_ASSERT</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler supports static assertions.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_VARIADIC_TMPL</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The compiler supports variadic templates. Note: variadic templates
|
||
have been proposed for C++0x, but have not yet been approved for
|
||
inclusion in the language.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<a name="config_helpers"></a><p>
|
||
</p>
|
||
<div class="section" lang="en">
|
||
<div class="titlepage"><div><div><h3 class="title">
|
||
<a name="boost_config.boost_macro_reference.boost_helper_macros"></a><a href="boost_macro_reference.html#boost_config.boost_macro_reference.boost_helper_macros" title="Boost Helper Macros">Boost
|
||
Helper Macros</a></h3></div></div></div>
|
||
<p>
|
||
The following macros are either simple helpers, or macros that provide workarounds
|
||
for compiler/standard library defects.
|
||
</p>
|
||
<div class="informaltable"><table class="table">
|
||
<colgroup>
|
||
<col>
|
||
<col>
|
||
</colgroup>
|
||
<thead><tr>
|
||
<th>
|
||
<p>
|
||
Macro
|
||
</p>
|
||
</th>
|
||
<th>
|
||
<p>
|
||
Description
|
||
</p>
|
||
</th>
|
||
</tr></thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_DEDUCED_TYPENAME</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Some compilers don't support the use of typename for dependent types
|
||
in deduced contexts. This macro expands to nothing on those compilers,
|
||
and typename elsewhere. For example, replace: <code class="computeroutput"><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">typename</span>
|
||
<span class="identifier">T</span><span class="special">::</span><span class="identifier">type</span><span class="special">);</span></code>
|
||
with: <code class="computeroutput"><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="identifier">BOOST_DEDUCED_TYPENAME</span> <span class="identifier">T</span><span class="special">::</span><span class="identifier">type</span><span class="special">);</span></code>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HASH_MAP_HEADER</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The header to include to get the SGI <code class="computeroutput"><span class="identifier">hash_map</span></code>
|
||
class. This macro is only available if <code class="computeroutput"><span class="identifier">BOOST_HAS_HASH</span></code>
|
||
is defined.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HASH_SET_HEADER</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The header to include to get the SGI <code class="computeroutput"><span class="identifier">hash_set</span></code>
|
||
class. This macro is only available if <code class="computeroutput"><span class="identifier">BOOST_HAS_HASH</span></code>
|
||
is defined.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_SLIST_HEADER</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The header to include to get the SGI <code class="computeroutput"><span class="identifier">slist</span></code>
|
||
class. This macro is only available if <code class="computeroutput"><span class="identifier">BOOST_HAS_SLIST</span></code>
|
||
is defined.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_STD_EXTENSION_NAMESPACE</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
The namespace used for std library extensions (hashtable classes
|
||
etc).
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_STATIC_CONSTANT</span><span class="special">(</span><span class="identifier">Type</span><span class="special">,</span> <span class="identifier">assignment</span><span class="special">)</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
On compilers which don't allow in-class initialization of static
|
||
integral constant members, we must use enums as a workaround if we
|
||
want the constants to be available at compile-time. This macro gives
|
||
us a convenient way to declare such constants. For example instead
|
||
of:
|
||
</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>
|
||
<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>
|
||
</pre>
|
||
<p>
|
||
use:
|
||
</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>
|
||
<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="special">};</span>
|
||
</pre>
|
||
<p>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_UNREACHABLE_RETURN</span><span class="special">(</span><span class="identifier">result</span><span class="special">)</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Normally evaluates to nothing, but evaluates to return x; if the
|
||
compiler requires a return, even when it can never be reached.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_EXPLICIT_TEMPLATE_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span></code> <code class="computeroutput"><span class="identifier">BOOST_EXPLICIT_TEMPLATE_NON_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">,</span><span class="identifier">v</span><span class="special">)</span></code> <code class="computeroutput"><span class="identifier">BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span></code> <code class="computeroutput"><span class="identifier">BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">,</span><span class="identifier">v</span><span class="special">)</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Some compilers silently "fold" different function template
|
||
instantiations if some of the template parameters don't appear in
|
||
the function parameter list. For instance:
|
||
</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>
|
||
<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">typeinfo</span><span class="special">></span>
|
||
|
||
<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="special">{</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">n</span> <span class="special"><<</span> <span class="char">' '</span><span class="special">;</span> <span class="special">}</span>
|
||
|
||
<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">void</span> <span class="identifier">g</span><span class="special">()</span> <span class="special">{</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="keyword">typeid</span><span class="special">(</span><span class="identifier">T</span><span class="special">).</span><span class="identifier">name</span><span class="special">()</span> <span class="special"><<</span> <span class="char">' '</span><span class="special">;</span> <span class="special">}</span>
|
||
|
||
<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
|
||
<span class="identifier">f</span><span class="special"><</span><span class="number">1</span><span class="special">>();</span>
|
||
<span class="identifier">f</span><span class="special"><</span><span class="number">2</span><span class="special">>();</span>
|
||
|
||
<span class="identifier">g</span><span class="special"><</span><span class="keyword">int</span><span class="special">>();</span>
|
||
<span class="identifier">g</span><span class="special"><</span><span class="keyword">double</span><span class="special">>();</span>
|
||
<span class="special">}</span>
|
||
</pre>
|
||
<p>
|
||
incorrectly outputs <code class="literal">2 2 double double</code> on VC++
|
||
6. These macros, to be used in the function parameter list, fix the
|
||
problem without effects on the calling syntax. For instance, in the
|
||
case above write:
|
||
</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>
|
||
<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">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
|
||
<span class="keyword">void</span> <span class="identifier">g</span><span class="special">(</span><span class="identifier">BOOST_EXPLICIT_TEMPLATE_TYPE</span><span class="special">(</span><span class="identifier">T</span><span class="special">))</span> <span class="special">{</span> <span class="special">...</span> <span class="special">}</span>
|
||
</pre>
|
||
<p>
|
||
Beware that they can declare (for affected compilers) a dummy defaulted
|
||
parameter, so they
|
||
</p>
|
||
<p>
|
||
<span class="bold"><strong>a)</strong></span> should be always invoked <span class="bold"><strong>at the end</strong></span> of the parameter list
|
||
</p>
|
||
<p>
|
||
<span class="bold"><strong>b)</strong></span> can't be used if your function
|
||
template is multiply declared.
|
||
</p>
|
||
<p>
|
||
Furthermore, in order to add any needed comma separator, an <code class="computeroutput"><span class="identifier">APPEND_</span><span class="special">*</span></code>
|
||
version must be used when the macro invocation appears after a normal
|
||
parameter declaration or after the invocation of another macro of
|
||
this same group.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_USE_FACET</span><span class="special">(</span><span class="identifier">Type</span><span class="special">,</span>
|
||
<span class="identifier">loc</span><span class="special">)</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
When the standard library does not have a comforming <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">use_facet</span></code> there are various workarounds
|
||
available, but they differ from library to library. This macro provides
|
||
a consistent way to access a locale's facets. For example, replace:
|
||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">use_facet</span><span class="special"><</span><span class="identifier">Type</span><span class="special">>(</span><span class="identifier">loc</span><span class="special">);</span></code>
|
||
with: <code class="computeroutput"><span class="identifier">BOOST_USE_FACET</span><span class="special">(</span><span class="identifier">Type</span><span class="special">,</span> <span class="identifier">loc</span><span class="special">);</span></code> Note do not add a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span></code>
|
||
prefix to the front of <code class="computeroutput"><span class="identifier">BOOST_USE_FACET</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_HAS_FACET</span><span class="special">(</span><span class="identifier">Type</span><span class="special">,</span>
|
||
<span class="identifier">loc</span><span class="special">)</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
When the standard library does not have a comforming <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">has_facet</span></code> there are various workarounds
|
||
available, but they differ from library to library. This macro provides
|
||
a consistent way to check a locale's facets. For example, replace:
|
||
<code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">has_facet</span><span class="special"><</span><span class="identifier">Type</span><span class="special">>(</span><span class="identifier">loc</span><span class="special">);</span></code>
|
||
with: <code class="computeroutput"><span class="identifier">BOOST_HAS_FACET</span><span class="special">(</span><span class="identifier">Type</span><span class="special">,</span> <span class="identifier">loc</span><span class="special">);</span></code> Note do not add a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span></code>
|
||
prefix to the front of <code class="computeroutput"><span class="identifier">BOOST_HAS_FACET</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NESTED_TEMPLATE</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Member templates are supported by some compilers even though they
|
||
can't use the <code class="computeroutput"><span class="identifier">A</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">member</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span></code> syntax, as a workaround replace:
|
||
<code class="computeroutput"><span class="keyword">typedef</span> <span class="keyword">typename</span>
|
||
<span class="identifier">A</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">rebind</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span> <span class="identifier">binder</span><span class="special">;</span></code> with: <code class="computeroutput"><span class="keyword">typedef</span>
|
||
<span class="keyword">typename</span> <span class="identifier">A</span><span class="special">::</span><span class="identifier">BOOST_NESTED_TEMPLATE</span>
|
||
<span class="identifier">rebind</span><span class="special"><</span><span class="identifier">U</span><span class="special">></span>
|
||
<span class="identifier">binder</span><span class="special">;</span></code>
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_STRINGIZE</span><span class="special">(</span><span class="identifier">X</span><span class="special">)</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Converts the parameter <code class="computeroutput"><span class="identifier">X</span></code>
|
||
to a string after macro replacement on <code class="computeroutput"><span class="identifier">X</span></code>
|
||
has been performed.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_JOIN</span><span class="special">(</span><span class="identifier">X</span><span class="special">,</span><span class="identifier">Y</span><span class="special">)</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
This piece of macro magic joins the two arguments together, even
|
||
when one of the arguments is itself a macro (see 16.3.1 in C++ standard).
|
||
This is normally used to create a mangled name in combination with
|
||
a predefined macro such a __LINE__.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<a name="config_info_macros"></a><p>
|
||
</p>
|
||
<div class="section" lang="en">
|
||
<div class="titlepage"><div><div><h3 class="title">
|
||
<a name="boost_config.boost_macro_reference.boost_informational_macros"></a><a href="boost_macro_reference.html#boost_config.boost_macro_reference.boost_informational_macros" title="Boost Informational Macros">Boost
|
||
Informational Macros</a></h3></div></div></div>
|
||
<p>
|
||
The following macros describe boost features; these are, generally speaking
|
||
the only boost macros that should be tested in user code.
|
||
</p>
|
||
<div class="informaltable"><table class="table">
|
||
<colgroup>
|
||
<col>
|
||
<col>
|
||
<col>
|
||
</colgroup>
|
||
<thead><tr>
|
||
<th>
|
||
<p>
|
||
Macro
|
||
</p>
|
||
</th>
|
||
<th>
|
||
<p>
|
||
Header
|
||
</p>
|
||
</th>
|
||
<th>
|
||
<p>
|
||
Description
|
||
</p>
|
||
</th>
|
||
</tr></thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_VERSION</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">version</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Describes the boost version number in XXYYZZ format such that: <code class="computeroutput"><span class="special">(</span><span class="identifier">BOOST_VERSION</span>
|
||
<span class="special">%</span> <span class="number">100</span><span class="special">)</span></code> is the sub-minor version, <code class="computeroutput"><span class="special">((</span><span class="identifier">BOOST_VERSION</span>
|
||
<span class="special">/</span> <span class="number">100</span><span class="special">)</span> <span class="special">%</span> <span class="number">1000</span><span class="special">)</span></code>
|
||
is the minor version, and <code class="computeroutput"><span class="special">(</span><span class="identifier">BOOST_VERSION</span> <span class="special">/</span>
|
||
<span class="number">100000</span><span class="special">)</span></code>
|
||
is the major version.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_INT64_T</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cstdint</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stdint</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Defined if there are no 64-bit integral types: <code class="computeroutput"><span class="identifier">int64_t</span></code>,
|
||
<code class="computeroutput"><span class="identifier">uint64_t</span></code> etc.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_INTEGRAL_INT64_T</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cstdint</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">stdint</span><span class="special">.</span><span class="identifier">h</span><span class="special">></span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Defined if <code class="computeroutput"><span class="identifier">int64_t</span></code>
|
||
as defined by <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cstdint</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code> is not usable in integral constant
|
||
expressions.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_MSVC</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Defined if the compiler is really Microsoft Visual C++, as opposed
|
||
to one of the many other compilers that also define <code class="computeroutput"><span class="identifier">_MSC_VER</span></code>.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_INTEL</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Defined if the compiler is an Intel compiler, takes the same value
|
||
as the compiler version macro.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_WINDOWS</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Defined if the Windows platfrom API is available.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_DINKUMWARE_STDLIB</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Defined if the dinkumware standard library is in use, takes the same
|
||
value as the Dinkumware library version macro <code class="computeroutput"><span class="identifier">_CPPLIB_VER</span></code>
|
||
if defined, otherwise 1.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_NO_WREGEX</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">regex</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Defined if the regex library does not support wide character regular
|
||
expressions.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_COMPILER</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Defined as a string describing the name and version number of the
|
||
compiler in use. Mainly for debugging the configuration.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_STDLIB</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Defined as a string describing the name and version number of the
|
||
standard library in use. Mainly for debugging the configuration.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="identifier">BOOST_PLATFORM</span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
<code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||
</p>
|
||
</td>
|
||
<td>
|
||
<p>
|
||
Defined as a string describing the name of the platform. Mainly for
|
||
debugging the configuration.
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="section" lang="en">
|
||
<div class="titlepage"><div><div><h3 class="title">
|
||
<a name="boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code"></a><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code" title="Macros for libraries with separate source code">Macros
|
||
for libraries with separate source code</a></h3></div></div></div>
|
||
<div class="toc"><dl>
|
||
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code.abi_fixing">ABI
|
||
Fixing</a></span></dt>
|
||
<dt><span class="section"><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code.automatic_library_selection">Automatic
|
||
library selection</a></span></dt>
|
||
</dl></div>
|
||
<p>
|
||
The following macros and helper headers are of use to authors whose libraries
|
||
include separate source code, and are intended to address two issues: fixing
|
||
the ABI of the compiled library, and selecting which compiled library to
|
||
link against based upon the compilers settings.
|
||
</p>
|
||
<div class="section" lang="en">
|
||
<div class="titlepage"><div><div><h4 class="title">
|
||
<a name="boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code.abi_fixing"></a><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code.abi_fixing" title="ABI Fixing">ABI
|
||
Fixing</a></h4></div></div></div>
|
||
<p>
|
||
When linking against a pre-compiled library it vital that the ABI used
|
||
by the compiler when building the library <span class="emphasis"><em>matches exactly</em></span>
|
||
the ABI used by the code using the library. In this case ABI means things
|
||
like the struct packing arrangement used, the name mangling scheme used,
|
||
or the size of some types (enum types for example). This is separate from
|
||
things like threading support, or runtime library variations, which have
|
||
to be dealt with by build variants. To put this in perspective there is
|
||
one compiler (Borland's) that has so many compiler options that make subtle
|
||
changes to the ABI, that at least in theory there 3200 combinations, and
|
||
that's without considering runtime library variations. Fortunately these
|
||
variations can be managed by <code class="computeroutput"><span class="preprocessor">#pragma</span></code>'s
|
||
that tell the compiler what ABI to use for the types declared in your library.
|
||
In order to avoid sprinkling <code class="computeroutput"><span class="preprocessor">#pragma</span></code>'s
|
||
all over the boost headers, there are some prefix and suffix headers that
|
||
do the job. Typical usage is:
|
||
</p>
|
||
<p>
|
||
<span class="bold"><strong>my_library.hpp</strong></span>
|
||
</p>
|
||
<pre class="programlisting">
|
||
<span class="preprocessor">#ifndef</span> <span class="identifier">MY_INCLUDE_GUARD</span>
|
||
<span class="preprocessor">#define</span> <span class="identifier">MY_INCLUDE_GUARD</span>
|
||
|
||
<span class="comment">// all includes go here:
|
||
</span><code class="literal"><span class="bold"><strong>#include <boost/config.hpp></strong></span></code>
|
||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">whatever</span><span class="special">></span>
|
||
|
||
<code class="literal"><span class="bold"><strong>#include <boost/config/abi_prefix.hpp></strong></span></code> <span class="comment">// must be the last #include
|
||
</span>
|
||
<span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span>
|
||
|
||
<span class="comment">// your code goes here
|
||
</span>
|
||
<span class="special">}</span>
|
||
|
||
<code class="literal"><span class="bold"><strong>#include <boost/config/abi_suffix.hpp></strong></span></code> <span class="comment">// pops abi_prefix.hpp pragmas
|
||
</span>
|
||
<span class="preprocessor">#endif</span> <span class="comment">// include guard
|
||
</span></pre>
|
||
<p>
|
||
<span class="bold"><strong>my_library.cpp</strong></span>
|
||
</p>
|
||
<pre class="programlisting">
|
||
<span class="special">...</span>
|
||
<span class="comment">// nothing special need be done in the implementation file
|
||
</span><span class="special">...</span>
|
||
</pre>
|
||
<p>
|
||
The user can disable this mechanism by defining <code class="computeroutput"><span class="identifier">BOOST_DISABLE_ABI_HEADERS</span></code>,
|
||
or they can define <code class="computeroutput"><span class="identifier">BOOST_ABI_PREFIX</span></code>
|
||
and/or <code class="computeroutput"><span class="identifier">BOOST_ABI_SUFFIX</span></code>
|
||
to point to their own prefix/suffix headers if they so wish.
|
||
</p>
|
||
</div>
|
||
<div class="section" lang="en">
|
||
<div class="titlepage"><div><div><h4 class="title">
|
||
<a name="boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code.automatic_library_selection"></a><a href="boost_macro_reference.html#boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code.automatic_library_selection" title="Automatic library selection">Automatic
|
||
library selection</a></h4></div></div></div>
|
||
<p>
|
||
It is essential that users link to a build of a library which was built
|
||
against the same runtime library that their application will be built against
|
||
-if this does not happen then the library will not be binary compatible
|
||
with their own code- and there is a high likelihood that their application
|
||
will experience runtime crashes. These kinds of problems can be extremely
|
||
time consuming and difficult to debug, and often lead to frustrated users
|
||
and authors alike (simply selecting the right library to link against is
|
||
not as easy as it seems when their are 6-8 of them to chose from, and some
|
||
users seem to be blissfully unaware that there even are different runtimes
|
||
available to them).
|
||
</p>
|
||
<p>
|
||
To solve this issue, some compilers allow source code to contain <code class="computeroutput"><span class="preprocessor">#pragma</span></code>'s that instruct the linker
|
||
which library to link against, all the user need do is include the headers
|
||
they need, place the compiled libraries in their library search path, and
|
||
the compiler and linker do the rest. Boost.config supports this via the
|
||
header <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">/</span><span class="identifier">auto_link</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>, before including this header one or
|
||
more of the following macros need to be defined:
|
||
</p>
|
||
<div class="variablelist">
|
||
<p class="title"><b></b></p>
|
||
<dl>
|
||
<dt><span class="term"><code class="computeroutput"><span class="identifier">BOOST_LIB_NAME</span></code></span></dt>
|
||
<dd>
|
||
Required: An identifier containing the basename of the library, for example
|
||
'boost_regex'.
|
||
</dd>
|
||
<dt><span class="term"><code class="computeroutput"><span class="identifier">BOOST_DYN_LINK</span></code></span></dt>
|
||
<dd>
|
||
Optional: when set link to dll rather than static library.
|
||
</dd>
|
||
<dt><span class="term"><code class="computeroutput"><span class="identifier">BOOST_LIB_DIAGNOSTIC</span></code></span></dt>
|
||
<dd>
|
||
Optional: when set the header will print out the name of the library
|
||
selected (useful for debugging).
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
<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 of the library is documented inside <code class="computeroutput"><span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">/</span><span class="identifier">auto_link</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span></code>
|
||
and has to match that used to create the libraries via bjam 's install
|
||
rules.
|
||
</p>
|
||
<p>
|
||
<span class="bold"><strong>my_library.hpp</strong></span>
|
||
</p>
|
||
<pre class="programlisting">
|
||
<span class="special">...</span>
|
||
<span class="comment">//
|
||
</span><span class="comment">// Don't include auto-linking code if the user has disabled it by
|
||
</span><span class="comment">// defining BOOST_ALL_NO_LIB, or BOOST_MY_LIBRARY_NO_LIB, or if this
|
||
</span><span class="comment">// is one of our own source files (signified by BOOST_MY_LIBRARY_SOURCE):
|
||
</span><span class="comment">//
|
||
</span><span class="preprocessor">#if</span> <span class="special">!</span><span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_ALL_NO_LIB</span><span class="special">)</span> <span class="special">&&</span> <span class="special">!</span><span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_MY_LIBRARY_NO_LIB</span><span class="special">)</span> <span class="special">&&</span> <span class="special">!</span><span class="identifier">defined</span><span class="special">(</span><span class="identifier">BOOST_MY_LIBRARY_SOURCE</span><span class="special">)</span>
|
||
<span class="preprocessor"># define</span> <span class="identifier">BOOST_LIB_NAME</span> <span class="identifier">boost_my_library</span>
|
||
<span class="preprocessor"># ifdef</span> <span class="identifier">BOOST_MY_LIBRARY_DYN_LINK</span>
|
||
<span class="preprocessor"># define</span> <span class="identifier">BOOST_DYN_LINK</span>
|
||
<span class="preprocessor"># endif</span>
|
||
<span class="preprocessor"># include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">/</span><span class="identifier">auto_link</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||
<span class="preprocessor">#endif</span>
|
||
<span class="special">...</span>
|
||
</pre>
|
||
<p>
|
||
<span class="bold"><strong>my_library.cpp</strong></span>
|
||
</p>
|
||
<pre class="programlisting">
|
||
<span class="comment">// define BOOST_MY_LIBRARY_SOURCE so that the header knows that the
|
||
</span><span class="comment">// library is being built (possibly exporting rather than importing code)
|
||
</span><span class="comment">//
|
||
</span><span class="preprocessor">#define</span> <span class="identifier">BOOST_MY_LIBRARY_SOURCE</span>
|
||
|
||
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">my_library</span><span class="special">/</span><span class="identifier">my_library</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
|
||
<span class="special">...</span>
|
||
</pre>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||
<td align="left"></td>
|
||
<td align="right"><small>Copyright <20> 2001 -2007 Beman Dawes, Vesa Karvonen, John Maddock</small></td>
|
||
</tr></table>
|
||
<hr>
|
||
<div class="spirit-nav">
|
||
<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="guidelines_for_boost_authors.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
|
||
</div>
|
||
</body>
|
||
</html>
|