This is the mail archive of the
mailing list for the libstdc++ project.
Re: Failing test when run as C++11
- From: Daniel Krügler <daniel dot kruegler at gmail dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Fri, 9 May 2014 14:30:51 +0200
- Subject: Re: Failing test when run as C++11
- Authentication-results: sourceware.org; auth=none
- References: <20140509105321 dot GD10556 at redhat dot com> <CAGNvRgBEuc1qSiPA41-AiVifoW0aLXYVwQZK+O-SiODxauQDew at mail dot gmail dot com> <20140509112018 dot GE10556 at redhat dot com> <20140509121054 dot GH10556 at redhat dot com>
2014-05-09 14:10 GMT+02:00 Jonathan Wakely <email@example.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
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.