Time complexity of debug/checked iterators<p>Hi.</p> <p>I've heard that the C++ iterators in Visual Studio 2005 (checked iterators and debug iterators), do not meet to time complexity (big-O) specifications required by the C++ standard. I tried to find some documentation about it, but found nothing. Is there some paper describing this nonconformance, or maybe I'm wrong and the iterators are fully confomant?</p> <p>Thanks,<br>Yuval<br></p>© 2009 Microsoft Corporation. All rights reserved.Thu, 19 Jun 2008 00:15:52 Zadca2338-ef5b-480d-96d3-647b06e9b214http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/adca2338-ef5b-480d-96d3-647b06e9b214#adca2338-ef5b-480d-96d3-647b06e9b214http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/adca2338-ef5b-480d-96d3-647b06e9b214#adca2338-ef5b-480d-96d3-647b06e9b214Yuval Ronenhttp://social.msdn.microsoft.com/Profile/en-US/?user=Yuval%20RonenTime complexity of debug/checked iterators<p>Hi.</p> <p>I've heard that the C++ iterators in Visual Studio 2005 (checked iterators and debug iterators), do not meet to time complexity (big-O) specifications required by the C++ standard. I tried to find some documentation about it, but found nothing. Is there some paper describing this nonconformance, or maybe I'm wrong and the iterators are fully confomant?</p> <p>Thanks,<br>Yuval<br></p>Sun, 18 Jun 2006 20:24:28 Z2006-06-19T21:20:20Zhttp://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/adca2338-ef5b-480d-96d3-647b06e9b214#6bcd4d45-42b5-4332-916d-80549e2a168chttp://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/adca2338-ef5b-480d-96d3-647b06e9b214#6bcd4d45-42b5-4332-916d-80549e2a168cJonathan Caves - MSFThttp://social.msdn.microsoft.com/Profile/en-US/?user=Jonathan%20Caves%20-%20MSFTTime complexity of debug/checked iterators<p>Hi: I passed your question on to Bill Plauger who is the author of the C++ Standard Library that ships with Visual C++. Here is his response.</p> <p class=MsoPlainText style="margin:0in 0in 0pt"><font face="Times New Roman">&quot;MS tried pretty hard to ensure that checked iterators were reasonably</font></p> <p class=MsoPlainText style="margin:0in 0in 0pt"><font face="Times New Roman">fast and, more importantly, had proper time complexity. Debug iterators also</font></p> <p class=MsoPlainText style="margin:0in 0in 0pt"><font face="Times New Roman">meet time complexity requirements, but the algorithms that use them (in the</font></p> <p class=MsoPlainText style="margin:0in 0in 0pt"><font face="Times New Roman">container member functions and the headers &lt;algorithm&gt; and &lt;numeric&gt;) don't.</font></p> <p class=MsoPlainText style="margin:0in 0in 0pt"><font face="Times New Roman">It's a fine point, perhaps, but an important one.&quot;</font></p> <p> </p>Mon, 19 Jun 2006 20:41:34 Z2006-06-19T21:20:20Zhttp://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/adca2338-ef5b-480d-96d3-647b06e9b214#47114ef2-e2f3-4fe3-9978-d83d6e756727http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/adca2338-ef5b-480d-96d3-647b06e9b214#47114ef2-e2f3-4fe3-9978-d83d6e756727Yuval Ronenhttp://social.msdn.microsoft.com/Profile/en-US/?user=Yuval%20RonenTime complexity of debug/checked iterators<p>Thanks for the answer.</p> <p>When you say &quot;MS tried pretty hard to ensure that checked iterators ... had proper time complexity&quot;, do you mean &quot;tried and succeeded&quot;, or &quot;tried and failed&quot;? I couldn't quite figure it out from the answer...</p> <p>And I really think that adding a similar explanation to the relevant MSDN pages is a good idea...<br></p>Mon, 19 Jun 2006 22:15:39 Z2006-06-19T22:15:39Zhttp://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/adca2338-ef5b-480d-96d3-647b06e9b214#ba305219-d837-4aa7-af78-464e37732e99http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/adca2338-ef5b-480d-96d3-647b06e9b214#ba305219-d837-4aa7-af78-464e37732e99Jonathan Caves - MSFThttp://social.msdn.microsoft.com/Profile/en-US/?user=Jonathan%20Caves%20-%20MSFTTime complexity of debug/checked iteratorsWe mean &quot;Tried and succeeded&quot;. Of course if you have examples of cases where this is not the case we'd love to hear about them.Tue, 20 Jun 2006 00:02:10 Z2006-06-20T00:02:10Z