Imported Upstream version 1.64.0
[platform/upstream/boost.git] / doc / html / boost_tr1 / implementation.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5 <title>Implementation</title>
6 <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
7 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
8 <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
9 <link rel="up" href="../boost_tr1.html" title="Chapter&#160;39.&#160;Boost.TR1">
10 <link rel="prev" href="header_list.html" title="TR1 By Header">
11 <link rel="next" href="testing.html" title="Testing">
12 </head>
13 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
14 <table cellpadding="2" width="100%"><tr>
15 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
16 <td align="center"><a href="../../../index.html">Home</a></td>
17 <td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
18 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
19 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
20 <td align="center"><a href="../../../more/index.htm">More</a></td>
21 </tr></table>
22 <hr>
23 <div class="spirit-nav">
24 <a accesskey="p" href="header_list.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost_tr1.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="testing.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
25 </div>
26 <div class="section">
27 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
28 <a name="boost_tr1.implementation"></a><a class="link" href="implementation.html" title="Implementation">Implementation</a>
29 </h2></div></div></div>
30 <p>
31       When Boost.TR1 is <a class="link" href="config.html" title="Configuration">configured</a> to make
32       use of your standard library's native TR1 implementation, then it doesn't do
33       very much: it just includes the appropriate header.
34     </p>
35 <p>
36       When Boost.TR1 is using the Boost implementation of a particular component,
37       then it includes the appropriate Boost header(s) and imports the necessary
38       declarations in <code class="computeroutput"><span class="keyword">namespace</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">tr1</span></code> with
39       using declarations. Note that only those declarations that are part of the
40       standard are imported: the implementation is deliberately quite strict about
41       not including any Boost-specific extensions in <code class="computeroutput"><span class="keyword">namespace</span>
42       <span class="identifier">std</span><span class="special">::</span><span class="identifier">tr1</span></code>, in order to catch any portability errors
43       in user code. If you really need to use Boost-specific extensions then you
44       should include the Boost headers directly and use the declarations in <code class="computeroutput"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span></code> instead. Note that this style of implementation
45       is not completely standards-conforming, in particular it is not possible to
46       add user-defined template specializations of TR1 components into <code class="computeroutput"><span class="keyword">namespace</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">tr1</span></code>. There
47       are also one or two Boost libraries that are not yet fully standards conforming,
48       any such non-conformities are documented in <a class="link" href="subject_list.html" title="TR1 By Subject">the
49       TR1 by subject section</a>. Hopefully, occurrences of non-standard behavior
50       should be extremely rare in practice however.
51     </p>
52 <p>
53       If you use the standard conforming header includes (in <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">tr1</span><span class="special">/</span><span class="identifier">tr1</span></code>) then these header names can sometimes
54       conflict with existing standard library headers (for example <code class="computeroutput"><span class="identifier">shared_ptr</span></code> is added to the existing standard
55       library header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">memory</span><span class="special">&gt;</span></code> rather than it's own header). These headers
56       forward on to your existing standard library header in one of two ways: for
57       gcc it uses <code class="computeroutput"><span class="preprocessor">#include_next</span></code>,
58       and for other compilers it uses the macro <code class="computeroutput"><span class="identifier">BOOST_TR1_STD_HEADER</span><span class="special">(</span><span class="identifier">header</span><span class="special">)</span></code>
59       (defined in <a href="../../../boost/tr1/detail/config.hpp" target="_top">boost/tr1/detail/config.hpp</a>)
60       which evaluates to <code class="computeroutput"><span class="preprocessor">#include</span> <span class="special">&lt;../</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">header</span><span class="special">&gt;</span></code>.
61       This should work "straight out the box" for most compilers, but does
62       mean that these headers should <span class="bold"><strong>never</strong></span> be placed
63       inside a directory called "include" that is already in your compiler's
64       search path.
65     </p>
66 </div>
67 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
68 <td align="left"></td>
69 <td align="right"><div class="copyright-footer">Copyright &#169; 2005 John Maddock<p>
70         Distributed under the Boost Software License, Version 1.0. (See accompanying
71         file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
72       </p>
73 </div></td>
74 </tr></table>
75 <hr>
76 <div class="spirit-nav">
77 <a accesskey="p" href="header_list.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost_tr1.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="testing.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
78 </div>
79 </body>
80 </html>