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