Files
boost_range/doc/portability.html

98 lines
2.8 KiB
HTML
Raw Normal View History

2004-08-05 19:37:40 +00:00
<!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>
2004-08-05 19:37:40 +00:00
<td ><h1 align="center">Boost.Range</h1></td>
</tr>
</table>
<h2>Portability</h2><a name="Portability" ></a>
2004-08-24 15:58:01 +00:00
<p>
A huge effort has been made to port the library to as many compilers as possible.
2004-09-16 19:07:04 +00:00
<!-- The results of the test-suites can be found <a
href="http://boost.sourceforge.net/regression-logs/developer/range.html">here</a
>.--> </p>
2004-08-24 15:58:01 +00:00
<p>
2004-08-05 19:37:40 +00:00
Full support for built-in arrays require that the compiler supports class
2004-08-24 15:58:01 +00:00
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>
2005-05-10 17:53:15 +00:00
<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>
2004-08-05 19:37:40 +00:00
<p >
2004-08-24 15:58:01 +00:00
Notice also that some compilers cannot do function template ordering properly.
In that case one must rely of <a
href="boost_range.html#range_iterator"><code >range_iterator</code></a>
2004-08-24 15:58:01 +00:00
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.
2004-08-05 19:37:40 +00:00
</p>
<p>
2004-08-24 15:58:01 +00:00
For maximum portability you should follow these guidelines:
<ol>
<li>
2004-09-16 19:07:04 +00:00
do not use built-in arrays,
2004-08-24 15:58:01 +00:00
<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>
2004-09-16 19:07:04 +00:00
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>
2004-08-24 15:58:01 +00:00
do not rely on ADL:
<ul>
<li>
if you overload functions, include that header <i>before</i> the headers in this
library,
<li>
2004-09-16 19:07:04 +00:00
put all overloads in namespace <code>boost</code>.
2004-08-24 15:58:01 +00:00
</ul>
</ol>
2004-08-05 19:37:40 +00:00
</p>
2004-08-24 15:58:01 +00:00
2004-08-05 19:37:40 +00:00
<hr>
<p>
(C) Copyright Thorsten Ottosen 2003-2004
</p>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>