This is the mail archive of the libstdc++@gcc.gnu.org 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: room for improvement in implementation of "std::advance(InputIterator)": make it more resilient to bugs in user-level code: in particular, negative distances


On 10 December 2012 00:11, Abe wrote:
>
> Since the extra check would incur a tiny amount of run-time overhead,
> maybe the check itself should be surrounded by "#if !NDEBUG" or
> similar, but perhaps a modified version of the above should be put
> into the "debug/" top-level directory of libstdc++ instead.

I think checking for negative values only when _GLIBCXX_DEBUG is
defined would be consistent with checks in the rest of the library.


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