bounds checking in bitset.

Paolo Carlini pcarlini@suse.de
Sat Feb 4 09:20:00 GMT 2006


BHARAT JOSHI wrote:

>> Maybe your doubt stems from expections pre-DR 11. In the current
>> standard, C++03, operator[] does *not* throw and requires a valid
>> position (user responsability). See 23.3.5.2/46-47, 49-50.
>
> though this is true of standard containers, its not the case for
> bitset. by standard
>   "The subscript operator throws out_of_range if subscript is out of
>    range. There is *no* unchecked subscript operation."

I have no idea which document you have at hand, certainly it is *not*
the current C++ standard (14882: 2003), which we are implementing. I
pointed you to the exact sections: again, 23.3.5.2/46-47, 49-50. Please
look closer.

Thanks,
Paolo.



More information about the Libstdc++ mailing list