This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: noexcept move on containers (e.g. list)
- From: Daniel Krügler <daniel dot kruegler at gmail dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: Kenny Simpson <theonetruekenny at yahoo dot com>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 18 Sep 2013 12:46:35 +0200
- Subject: Re: noexcept move on containers (e.g. list)
- Authentication-results: sourceware.org; auth=none
- References: <1379479322 dot 84313 dot YahooMailNeo at web142405 dot mail dot bf1 dot yahoo dot com> <CAH6eHdQtm4m9Unrxeue-UZWMPvi6n0BKvmyVg8tKYqBr9RWbpA at mail dot gmail dot com> <CAH6eHdS8XA8iok5YCRjE_CswdiuLMn01OW+8MC-y-1M8aAc9-A at mail dot gmail dot com>
> On 18 September 2013 09:58, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
[..]
> Although as you're asking specifically about move constructors (which
> I don't think we check any preconditions on anyway) I don't know why
> the standard considers them to have narrow contracts.
I'm pretty sure that this wasn't the intention of N3279 to imply. To
my knowledge the reason why the move constructors of containers are
not noexcept, is because the default constructors aren't and this
again was due to some existing implementations that could throw (in
rare situations). I'm very unsatisfied with that being a valid
implementation, but I guess we would need a paper that would impose
stronger requirements.
- Daniel