PR 57779 New debug check
Wed Jul 24 22:10:00 GMT 2013
On 07/24/2013 10:41 PM, FranÃ§ois Dumont wrote:
> On 07/24/2013 10:49 AM, Paolo Carlini wrote:
>> I didn't follow the finest details of this (Jonathan will be able to
>> provide better comments) but it's not immediately obvious to me what
>> happens of the -1 + 1 trick when begin() == end().
>> In my opinion, we should not add to cpp_type_traits.h, which would
>> become bigger even in normal-mode (in fact we would like to see it
>> going away...)
> The -1 +1 trick only take place if begin() != end().
> Do you want me to make part of the check only active in C++11 mode so
> that I simply rely on C++11 features ?
Well, yes, I didn't consider that, but if it makes things much easier,
it seems a good idea. Given the way the headers are already structured I
think it's possible in c++11 mode to have std::less & co without, eg,
the big std::function, then the idea makes a lot of sense.
More information about the Libstdc++