Remove testsuite/23_containers/map/operators/1.cc ?

Jonathan Wakely jwakely@redhat.com
Wed Jun 4 20:52:00 GMT 2014


On 04/06/14 22:32 +0200, Paolo Carlini wrote:
>Hi,
>
>On 06/04/2014 10:22 PM, François Dumont wrote:
>>Hello
>>
>>    Do you see any objection in removing this file ? It doesn't look 
>>like a test at all to me, just send some datas to std::cerr. There 
>>is also a weird comment talking about multiset while code is using 
>>map.
>The comment seems a pasto, which should be fixed. Likewise the uses of 
>the inserters should be either turned into VERIFYs or alternately the 
>testcase changed to do-compile (the original issue was a compile-time 
>issue, but years ago we used to mostly add to the library testsuite 
>do-run testcases). Indeed, we could also move it to where the other 
>insert tests are (I think the reason of the weird directory has to do 
>with the semantics of the operator[] in C++98).

It looks like it only needs to do this, as a compile-only test:

    typedef std::map<int,const int> MapInt;

    MapInt m;
    for (MapInt::const_iterator i=m.begin();i!=m.end();++i)
    { }

    for (MapInt::const_iterator i=m.begin();m.end()!=i;++i)
    { }

The bug that it tests was in iterator comparisons:
https://gcc.gnu.org/ml/libstdc++/2000-11/msg00093.html



More information about the Libstdc++ mailing list