Boost logo

Boost :

Subject: Re: [boost] [review] The review of Boost.DoubleEnded starts today: September 21 - September 30
From: Chris Glover (c.d.glover_at_[hidden])
Date: 2017-10-04 13:32:57

> I think you have a way to turn these into pointers again in
> Boost.Container, By defining some preprocessor symbol, right? Having
> pointers matters when interfacing with other types, because this is the
> only case where the iterators are seen as contiguous.
> I would much rather see that in debug mode the iterator type is a class
> and in release mode it is a pointer compared to having extra
> preprocessor symbols.

This is a bad idea. Early std library implementations did this and it
caused several problems, including code that compiled in release, but not
debug, or worse, different overload resolution between debug and release

There should be a way to get at the pointers, of course, but it should
require specific action by the programmer and not create different types
automatically between debug and release builds, as that is surprising.

-- chris

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