<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Mar 20, 2014, at 1:22 PM, Gonzalo BG <<a href="mailto:gonzalobg88@gmail.com">gonzalobg88@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 20, 2014 at 9:09 PM, Joerg Sonnenberger <span dir="ltr"><<a href="mailto:joerg@britannica.bec.de" target="_blank">joerg@britannica.bec.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Do you have a test case that failed before?</blockquote></div><br>I have an iterator with a difference_type that is only explicitly convertible from int (not implicitly) and thus fails. Its implementation depends on Boost.Iterator (and everything that Boost.Iterator depends on) so I don't think it would be suitable for a test-case.</div></div></blockquote><br></div><div>I’m also wondering about this.</div><div><br></div><div>The standard says that an iterator’s difference_type must be a ‘signed integer type” section 24.2.1 [iterator.requirements.general]</div><div><br></div><div>These types are defined in section 3.9.1 [basic.fundamental], and seems to me to imply that it has to be either one of “signed char”, “short int”, “int”, “long int”, and “long long int”, or an “extended signed integer type” provided by the implementation (which means the compiler and/or standard library). I don’t see any provision here for an iterator having a difference_type that is a user-defined type.</div><div><br></div><div>Off to read the Boost.Iterator documentation….</div><div><br></div><div>— Marshall</div><div><br></div><br></body></html>