File: portability.html

package info (click to toggle)
boost 1.34.1-14
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 116,412 kB
  • ctags: 259,566
  • sloc: cpp: 642,395; xml: 56,450; python: 17,612; ansic: 14,520; sh: 2,265; yacc: 858; perl: 481; makefile: 478; lex: 94; sql: 74; csh: 6
file content (97 lines) | stat: -rw-r--r-- 2,992 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Boost.Range Portability </title>
    <link rel="stylesheet" href="style.css" type="text/css">
</head>

    <body>

    <table border="0" >
        <tr>
            <td ><img src="../../../boost.png" border="0" ></td>
            <td ><h1 align="center">Boost.Range</h1></td>
        </tr>
    </table>

    <h2>Portability</h2><a name="Portability" ></a>

    <p>
    A huge effort has been made to port the library to as many compilers as possible. 
<!--    The results of the test-suites can be found <a 
href="http://boost.sourceforge.net/regression-logs/developer/range.html">here</a
>.--> </p>

    <p>
    Full support for built-in arrays require that the compiler supports class 
    template partial specialization. For non-conforming compilers there might be a 
    chance that it works anyway thanks to workarounds in the type traits library.
    </p>
    <pp>
    Visual C++ 6/7.0 has a limited support for arrays: as long as the arrays are 
    of built-in type it should work.
    </p>
    <p  >
    Notice also that some compilers cannot do function template ordering properly. 
    In that case one must rely of <a
      href="boost_range.html#range_result_iterator"><code >range_result_iterator</code></a> 
      and a single function definition instead of overloaded versions for const and 
      non-const arguments.

    So if one cares about old compilers, one should not pass rvalues to the 
    functions.
    </p>

    <p>
    For maximum portability you should follow these guidelines:

    <ol>
        <li>
            do not use built-in arrays,
        <li>
            do not pass rvalues to <a
           href="boost_range.html#begin"><code>begin()</code></a>, <a
           href="boost_range.html#end"><code>end()</code></a> and <a href="utility_class.html#iter_range">
            <code>iterator_range</code></a> Range constructors and assignment operators,
        <li>
            use <a href="boost_range.html#const_begin"><code>const_begin()</code></a> 
            and <a href="boost_range.html#const_begin"><code>const_end()</code></a>
            whenever your code by intention is read-only; this will also solve
            most rvalue problems,
         <li>
            do not rely on ADL:
            <ul>
                <li>
                    if you overload functions, include that header <i>before</i> the headers in this 
                    library,
                <li>
                    put all overloads in namespace <code>boost</code>.
            </ul>
            
    </ol>
    </p>

    <hr>
    <p>
    (C) Copyright Thorsten Ottosen 2003-2004. Use, modification and distribution is subject to the Boost Software License, Version 1.0.
    </p>

    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>


    </body>
</html>