This is the mail archive of the mailing list for the libstdc++ project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New istreambuf_iterator debug check

On 31/01/18 18:01 +0100, François Dumont wrote:
On 29/01/2018 14:52, Jonathan Wakely wrote:
On 24/01/18 17:39 +0100, François Dumont wrote:

    I'd like to propose this new debug check. Comparing with non-eos istreambuf_iterator sounds like an obvious coding mistake.

Agreed, but that doesn't mean we can terminate the process. It's still
valid C++, even though it's probably not what the author intended to do.

Maybe we should introduce an extended debug mode to check this kind of mistake even if Standard compliant.

Maybe check the _GLIBCXX_DEBUG value, activating it only if 2. Or introduce yet another macro like _GLIBCXX_CHECK ? Or we could combine _GLIBCXX_DEBUG with another existing macro to activate this check ?

Unless you prefer we simply don't introduce this kind of check.

I certainly don't think we should terminate the process for this kind
of thing. It is the equivalent of a warning ("did you really mean to
do this?") not a fatal error.

Terminating the process is not an option. We have no way to do
anything else, and it's not important enough to spend time on
inventing new library features to do it.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]