https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58074

--- Comment #10 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
(In reply to Jonathan Wakely from comment #9)
> (In reply to Daniel Krügler from comment #0)
> > The deleted default constructor should not prevent type Trivial of being
> > trivial (Maybe this part of the problem is related to bug 52707, but I'm not
> > sure).
> 
> I think DR 1363 changed that (and DR 1496 reconfirmed it) so the first test
> is wrong. But G++ now passes that assertion, so that's also wrong (that is
> Bug 85723 though).

I agree in regard to DR 1496. The history behind that was that during the
Portland 2012 CWG drafting of that issue the following wording suggestion was
provided:

"A trivial class is a class that is trivially copyable and has either
a trivial default constructor or no default constructor (12.1 class.ctor)."

That wording had the effect that classes with either deleted or no default
constructor could be trivial and made these two cases consistent as pointed out
by DR 1496. That P/R was then later rejected and modified to the now accepted
wording at the Kona 2015 meeting, which also had the effect of making the two
cases consistent in a now a different way, by imposing the requirement that at
least one non-deleted default constructor exists. I don't think that DR 1363
changed the situation, because the meaning of the 1363 wording still didn't
exclude deleted constructors from being trivial.

Reply via email to