| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> | 
|---|
| 2 |  | 
|---|
| 3 | <html> | 
|---|
| 4 | <head> | 
|---|
| 5 |     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | 
|---|
| 6 |     <title>Boost.Range Portability </title> | 
|---|
| 7 |     <link rel="stylesheet" href="style.css" type="text/css"> | 
|---|
| 8 | </head> | 
|---|
| 9 |  | 
|---|
| 10 |     <body> | 
|---|
| 11 |  | 
|---|
| 12 |     <table border="0" > | 
|---|
| 13 |         <tr> | 
|---|
| 14 |             <td ><img src="../../../boost.png" border="0" ></td> | 
|---|
| 15 |             <td ><h1 align="center">Boost.Range</h1></td> | 
|---|
| 16 |         </tr> | 
|---|
| 17 |     </table> | 
|---|
| 18 |  | 
|---|
| 19 |     <h2>Portability</h2><a name="Portability" ></a> | 
|---|
| 20 |  | 
|---|
| 21 |     <p> | 
|---|
| 22 |     A huge effort has been made to port the library to as many compilers as possible.  | 
|---|
| 23 | <!--    The results of the test-suites can be found <a  | 
|---|
| 24 | href="http://boost.sourceforge.net/regression-logs/developer/range.html">here</a | 
|---|
| 25 | >.--> </p> | 
|---|
| 26 |  | 
|---|
| 27 |     <p> | 
|---|
| 28 |     Full support for built-in arrays require that the compiler supports class  | 
|---|
| 29 |     template partial specialization. For non-conforming compilers there might be a  | 
|---|
| 30 |     chance that it works anyway thanks to workarounds in the type traits library. | 
|---|
| 31 |     </p> | 
|---|
| 32 |     <pp> | 
|---|
| 33 |     Visual C++ 6/7.0 has a limited support for arrays: as long as the arrays are  | 
|---|
| 34 |     of built-in type it should work. | 
|---|
| 35 |     </p> | 
|---|
| 36 |     <p  > | 
|---|
| 37 |     Notice also that some compilers cannot do function template ordering properly.  | 
|---|
| 38 |     In that case one must rely of <a | 
|---|
| 39 |       href="boost_range.html#range_result_iterator"><code >range_result_iterator</code></a>  | 
|---|
| 40 |       and a single function definition instead of overloaded versions for const and  | 
|---|
| 41 |       non-const arguments. | 
|---|
| 42 |  | 
|---|
| 43 |     So if one cares about old compilers, one should not pass rvalues to the  | 
|---|
| 44 |     functions. | 
|---|
| 45 |     </p> | 
|---|
| 46 |  | 
|---|
| 47 |     <p> | 
|---|
| 48 |     For maximum portability you should follow these guidelines: | 
|---|
| 49 |  | 
|---|
| 50 |     <ol> | 
|---|
| 51 |         <li> | 
|---|
| 52 |             do not use built-in arrays, | 
|---|
| 53 |         <li> | 
|---|
| 54 |             do not pass rvalues to <a | 
|---|
| 55 |            href="boost_range.html#begin"><code>begin()</code></a>, <a | 
|---|
| 56 |            href="boost_range.html#end"><code>end()</code></a> and <a href="utility_class.html#iter_range"> | 
|---|
| 57 |             <code>iterator_range</code></a> Range constructors and assignment operators, | 
|---|
| 58 |         <li> | 
|---|
| 59 |             use <a href="boost_range.html#const_begin"><code>const_begin()</code></a>  | 
|---|
| 60 |             and <a href="boost_range.html#const_begin"><code>const_end()</code></a> | 
|---|
| 61 |             whenever your code by intention is read-only; this will also solve | 
|---|
| 62 |             most rvalue problems, | 
|---|
| 63 |          <li> | 
|---|
| 64 |             do not rely on ADL: | 
|---|
| 65 |             <ul> | 
|---|
| 66 |                 <li> | 
|---|
| 67 |                     if you overload functions, include that header <i>before</i> the headers in this  | 
|---|
| 68 |                     library, | 
|---|
| 69 |                 <li> | 
|---|
| 70 |                     put all overloads in namespace <code>boost</code>. | 
|---|
| 71 |             </ul> | 
|---|
| 72 |              | 
|---|
| 73 |     </ol> | 
|---|
| 74 |     </p> | 
|---|
| 75 |  | 
|---|
| 76 |     <hr> | 
|---|
| 77 |     <p> | 
|---|
| 78 |     (C) Copyright Thorsten Ottosen 2003-2004 | 
|---|
| 79 |     </p> | 
|---|
| 80 |  | 
|---|
| 81 |     <br> | 
|---|
| 82 |     <br> | 
|---|
| 83 |     <br> | 
|---|
| 84 |     <br> | 
|---|
| 85 |     <br> | 
|---|
| 86 |     <br> | 
|---|
| 87 |     <br> | 
|---|
| 88 |     <br> | 
|---|
| 89 |     <br> | 
|---|
| 90 |     <br> | 
|---|
| 91 |     <br> | 
|---|
| 92 |     <br> | 
|---|
| 93 |  | 
|---|
| 94 |  | 
|---|
| 95 |     </body> | 
|---|
| 96 | </html> | 
|---|
| 97 |  | 
|---|