C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: Noexcept specification of basic_string's move assignment operator in C++11 and C++14
From: Daniel Krügler (daniel.kruegler_at_[hidden])
Date: 2020-02-21 04:25:54


Am Fr., 21. Feb. 2020 um 11:00 Uhr schrieb Gennaro Prota
<gennaro.prota_at_[hidden]>:
>
> On Fri, Feb 21, 2020 at 10:38 AM Daniel Krügler
> <daniel.kruegler_at_[hidden]> wrote:
> >
> > Am Fr., 21. Feb. 2020 um 09:55 Uhr schrieb Gennaro Prota
> > <gennaro.prota_at_[hidden]>:
> > >
> > > On Fri, Feb 21, 2020 at 9:29 AM Daniel Krügler
> > > <daniel.kruegler_at_[hidden]> wrote:
> > > >
> > > > Am Fr., 21. Feb. 2020 um 08:40 Uhr schrieb Gennaro Prota via
> > > > Std-Discussion <std-discussion_at_[hidden]>:
> > > > >
> > > > > Hi,
> > > > >
> > > > > considering all the applicable defect reports (in particular, LWG 2063),
> > > > > what noexcept specification, if any, is basic_string's move assignment
> > > > > operator supposed to have in C++11 and C++14?
> > > >
> > > > LWG 2063 is a defect report against C++17, so I'm unsure how to
> > > > interpret your question.
> > >
> > > Hmm. Are you sure?
> >
> > Yes, the issue has status C++17, which is defined (follow the link) as:
> >
> > "C++17 - (C++ Standard, as revised for 2017) - The full WG21/PL22.16
> > committee has voted to accept the Defect Report's Proposed Resolution
> > into the published 2017 revision to the C++ standard, ISO/IEC IS
> > 14882:2017(E)."
>
> OK. Can we say it was *against* C++11 but then it was only resolved for
> C++17?

Yes. AFAIK, there exists no defined process for the standard that
applies fixes made in a later standard to previous standards.

> > > The issue was filed in 2011
> >
> > The date when an issue was created is not necessarily related to the
> > C++ standard it will be agreed being fixed. Of-course a C++-Compiler
> > vendor could decide to consider such a bug fix as something she wishes
> > to backport to older standards.
>
> But what is, *formally*, the situation? That C++11 and C++14 remain
> buggy and that an implementation which applies a fix is non-conforming?

I'm sorry, but I'm not the proper person to answer this question.

> That is, must the operator be noexcept( true ) in C++11 and C++14?

According to the specification of C++11 and C++14: Yes.

- Daniel


STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups