Failing test when run as C++11

Jonathan Wakely
Sun May 11 18:56:00 GMT 2014

On 11/05/14 19:39 +0100, Jonathan Wakely wrote:
>So my next question is whether they call the copy constructor or the
>potentially-throwing move constructor during the resize operation.
>Either way I think we need to fix libstdc++ so that
>__move_if_noexcept_cond is consistent with what we actually do. The
>question is whether to adjust what we do to match the condition (which
>is what my patch to stl_iterator.h does) or whether to adjust the
>condition to match what we actually do (i.e. replace
>is_copy_constructible<C> with is_constructible<C, C&> in the
>I think I need to try the entire testsuite with both options before
>deciding, to see if that reveals any unintended consequences.

On further reflection, I think the standard does specify this. C is
CopyInsertable into std::vector<C>, therefore we must offer the strong
exception-safety guarantee, so must call the copy constructor.

Which means we need to change what we do (not change the condition) so
I think my patch to stl_iterator.h is correct. I won't be able to test
it until tomorrow though (all the machines I would usually test on are
busy running some benchmarks Howard created).

More information about the Libstdc++ mailing list