1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Upgrade from version 1.55</title> 5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../index.html" title="Chapter 1. Range 2.0"> 8<link rel="up" href="../upgrade.html" title="Upgrade version of Boost.Range"> 9<link rel="prev" href="../upgrade.html" title="Upgrade version of Boost.Range"> 10<link rel="next" href="upgrade_from_1_49.html" title="Upgrade from version 1.49"> 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="../upgrade.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../upgrade.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="upgrade_from_1_49.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h3 class="title"> 27<a name="range.upgrade.upgrade_from_1_55"></a><a class="link" href="upgrade_from_1_55.html" title="Upgrade from version 1.55">Upgrade from version 28 1.55</a> 29</h3></div></div></div> 30<div class="orderedlist"><ol class="orderedlist" type="1"> 31<li class="listitem"> 32 <a class="link" href="../reference/utilities/iterator_range.html" title="Class iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a> is now implemented 33 by implementing the member functions <code class="computeroutput"><span class="identifier">size</span><span class="special">()</span></code>, <code class="computeroutput"><span class="keyword">operator</span><span class="special">[]</span></code> via inheritance of base-classes specialized 34 by the traversal type of the underlying iterator. This is normally requires 35 no alteration of code. It does mean that types that derive from iterator_range 36 may need to prefix <code class="computeroutput"><span class="keyword">this</span><span class="special">-></span></code> to the various member functions. 37 Additionally it has been noted that some calling code was relying on 38 member functions such as <code class="computeroutput"><span class="identifier">size</span><span class="special">()</span></code> being present despite the underlying 39 iterators not being random-access due to <code class="computeroutput"><span class="identifier">iterator_reference</span><span class="special"><</span><span class="identifier">Iter</span><span class="special">>::</span><span class="identifier">type</span></code> 40 not being a reference. The suggested refactoring is to use <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">rng</span><span class="special">)</span></code>. 41 </li> 42<li class="listitem"> 43 The undocumented <a class="link" href="../reference/utilities/iterator_range.html" title="Class iterator_range"><code class="computeroutput"><span class="identifier">iterator_range</span></code></a> <code class="computeroutput"><span class="identifier">pop_front</span><span class="special">()</span></code> 44 has been deprecated and is replaced by <code class="computeroutput"><span class="identifier">drop_front</span><span class="special">().</span> <span class="identifier">Similarly</span> 45 </code>pop_back()<code class="computeroutput"> <span class="identifier">has</span> <span class="identifier">been</span> <span class="identifier">replaced</span> 46 <span class="identifier">by</span> </code>drop_back()`. 47 </li> 48</ol></div> 49</div> 50<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 51<td align="left"></td> 52<td align="right"><div class="copyright-footer">Copyright © 2003-2010 Thorsten Ottosen, 53 Neil Groves<p> 54 Distributed under the Boost Software License, Version 1.0. (See accompanying 55 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>) 56 </p> 57</div></td> 58</tr></table> 59<hr> 60<div class="spirit-nav"> 61<a accesskey="p" href="../upgrade.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../upgrade.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="upgrade_from_1_49.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 62</div> 63</body> 64</html> 65