operator== missing on std::__debug::map<>::iterator

Daniel Krügler daniel.kruegler@gmail.com
Tue Dec 11 06:56:00 GMT 2012


2012/12/11 Gabriel Dos Reis <gdr@integrable-solutions.net>:
> On Tue, Dec 11, 2012 at 12:36 AM, Daniel Krügler
> <daniel.kruegler@gmail.com> wrote:
>> 2012/12/11 Gabriel Dos Reis <gdr@integrable-solutions.net>:
>>> On Mon, Dec 10, 2012 at 3:42 PM, Daniel Krügler
>>> <daniel.kruegler@gmail.com> wrote:
>>>> 2012/12/10 Jonathan Wakely <jwakely.gcc@gmail.com>
>>>>>
>>>>> On 10 December 2012 21:29, Marc Glisse wrote:
>>>>> >
>>>>> > By the way, would the standard allow those iterators to be final? (not
>>>>> > suggesting it, just asking, because it doesn't seem forbidden)
>>>>>
>>>>> I have a vague recollection of discussing this in the past somewhere
>>>>> and the consensus was that implementations cannot add 'final' to such
>>>>> types.  But I might be misremembering the discussion.
>>>>
>>>> I think that implementation-provided iterator belong to the "gray zone" where
>>>> declaring them as final would be feasible, see
>>>>
>>>> http://cplusplus.github.com/LWG/lwg-closed.html#2113
>>>>
>>>> - Daniel
>>>
>>> Why should a C++ program care about iterator being final or not?
>>> (I am not talking about conformance testsuites.)
>>
>> I have seen such code and written it ;-): If you have to manage a set
>> of compilers
>
> Ah, but you are talking about using compilers that should not call
>  themselves or should not be called C++ compilers: that does not count!

Personally I agree with you, but real-life pressure can be hard and even in
the year 2012 I have to share some code parts with such a compiler and
"real ones" ;-)

One should also add that the interpretation how far sfinae was possible in
C++03 was not very clear, because it was only an enumerated set of special
cases. It was not really clear whether you could compile-test against
arbitrary expressions in unevaluated sizeof-based expressions under
sfinae. Cute compilers did allow that in many situations, but several didn't.

- Daniel



More information about the Libstdc++ mailing list