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: Failing test when run as C++11


2014-05-11 23:12 GMT+02:00 Jonathan Wakely <jwakely.gcc@gmail.com>:
> On 11 May 2014 21:28, Daniel Krügler wrote:
>> Note that we have resize() here and there seem to be no such
>> requirement (compared to push_back for example). This seems to be
>> consistent with the
>> "strong-exception-guarantee-only-for-single-element-inserts".
>
> I don't think I follow. In N3936 resize(size_type) says:
> Remarks: If an exception is thrown other than by the move constructor
> of a non-CopyInsertable T
> there are no effects.

Oops, you are right - somehow I must have looked at the wrong resize() function!

> This says to me that if T is CopyInsertable we must offer the strong
> exception-safety guarantee.

Yes, sure.

- Daniel


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