Boost C++ Libraries: Ticket #11297: adaptors: Documentation for sliced reports the wrong precondition https://svn.boost.org/trac10/ticket/11297 <p> Currently, the precondition for the sliced adaptor is </p> <p> Precondition: 0 &lt;= n &amp;&amp; n &lt;= m &amp;&amp; m &lt; distance(rng). </p> <p> It should instead be </p> <p> Precondition: 0 &lt;= n &amp;&amp; n &lt;= m &amp;&amp; m &lt;= distance(rng). </p> <p> Notice the &lt;= instead of &lt;. </p> <p> The page in question is <a href="http://www.boost.org/doc/libs/1_58_0/libs/range/doc/html/range/reference/adaptors/reference/sliced.html">http://www.boost.org/doc/libs/1_58_0/libs/range/doc/html/range/reference/adaptors/reference/sliced.html</a>. </p> <p> Nitpicky: Maybe a better upper bound would be m &lt;= size(rng) since boost::size returns a range_size&lt;rng&gt;::type which is the type of n and m (the parameters given to adaptors::sliced). Contrast this to boost::distance which returns a range_difference&lt;rng&gt;::type. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11297 Trac 1.4.3