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: PR 57779 New debug check


On 07/24/2013 10:41 PM, François Dumont wrote:
On 07/24/2013 10:49 AM, Paolo Carlini wrote:
Hi,

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...)

Paolo.

The -1 +1 trick only take place if begin() != end().
Ah good.
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.

Paolo.


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