Boost logo

Boost :

Subject: Re: [boost] [iterator] UB when implicitly using default constructed counting_iterator<unsigned>
From: Olaf van der Spek (ml_at_[hidden])
Date: 2012-12-07 04:59:44

On Fri, Dec 7, 2012 at 8:57 AM, "Claas H. Köhler" <claas.koehler_at_[hidden]> wrote:
> There has been only one argument which actually speaks against initialising the counting_iterator,
> because it will prevent one from using a simple debugger to identify malformed code. From my point of
> view this argument does not hold, since
> - it helps you only in situations, which could mostly be prevented if the iterator was initialised
> - iterator debugging is preferably done using additional functionality built into most
> implementations of the standard library, as pointed out by Olaf. So if boost wanted to offer this
> kind of debugging capability, it should be implemented in form of a general debug wrapper for iterators.

There are two choices:
1. Undefined Behavior
2. Defined but (probably) wrong behavior that can't be automatically
detected by some tools.

I don't think 2 is better.


Boost list run by bdawes at, gregod at, cpdaniel at, john at