On Sep 16, 2014, at 2:13 PM, David Blaikie <[email protected]> wrote:

> 
> 
> On Tue, Sep 16, 2014 at 1:38 PM, Marshall Clow <[email protected]> wrote:
> Author: marshall
> Date: Tue Sep 16 15:38:11 2014
> New Revision: 217902
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=217902&view=rev
> Log:
> Create a 'comma_iterator' class that overloads operator, and asserts when 
> it's called. Add tests to mismatch to make sure it can't be blindsided by 
> such an evil iterator. More tests for other algorithms forthcoming. Thanks to 
> STL for pointing this out at CppCon and Yakov Galka for opening LWG issue 
> #2133
> 
> Could it use "= delete" to make this test fail at compile-time?

Sorry I didn’t respond before.

The point here is not that this should fail to compile, but rather that such 
evil iterators should work with the standard algorithms.

See  http://llvm.org/viewvc/llvm-project?rev=217903&view=rev for a change to 
std::mismatch to work correctly.

— Marshall



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to