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-09 14:10 GMT+02:00 Jonathan Wakely <jwakely@redhat.com>:
> Sorry, I didn't realise that PR needs authorisation.
> It's basically the same code as the 808590.cc testcase saying it works
> with GCC 4.5+ but not GCC 4.4, so you're not missing anything
> interesting.

If I understand (guessing somewhat on my side) the bug report and the
corresponding test case correctly, it should ensure that in this
scenario the template constructor is not used during the resize
operation in this line:

cbs[fd] = cb;

nor during the default argument evaluation nor within the vector
internals of the resize operation, right? (I'm not sure whether one of
these aspects where considered more important than the other).

The least invasive one would be to (unconditionally) add the throw()
to the copy constructor as you suggested, because this did not affect
C++03 at all. But it seems to me that adding the conditional defaulted
move constructor is more appropriate, because it points more clearly
to the change of semantics during the language update.

- Daniel


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