[patch] Apply DR434 resolution to <debug/bitset>

Paolo Carlini pcarlini@suse.de
Tue May 10 17:48:00 GMT 2005


Jonathan Wakely wrote:

>>Then, let's figure out the cleanest solution string/element_access...
>>I'm tempted to go with my simple #ifdef but want to give this a little
>>more thought...
>>    
>>
>It seems obvious now I look at it:
>
>      reference
>      operator[](size_type __pos)
>      {
>        _GLIBCXX_DEBUG_PEDASSERT(__pos < size());
>        // allow v3 extension when not in pedantic mode:
>        _GLIBCXX_DEBUG_ASSERT(__pos <= size());
>        _M_leak();
>        return _M_data()[__pos];
>      }
>
>This does the check twice in pedantic mode, but that's not a problem.
>  
>
Ah, ah, great idea! Often it's surprising how much on can do better if only
can think a little more about something ;)

Please proceed with this idea...

>2005-05-10  Jonathan Wakely
>
>	* include/debug/debug.h: Fix typo in macro name.
>
>OK for mainline and 4.0 ?  What about 3.4 ?
>  
>
... and many thanks from me too for this nice catch. Shame on us ;)

Paolo.



More information about the Libstdc++ mailing list