On Thu, 4 Jun 2020, Ville Voutilainen wrote:

On Thu, 4 Jun 2020 at 01:52, Marc Glisse <marc.gli...@inria.fr> wrote:

Hello,

is there any drawback to the attached patch? It changes the code generated for

I don't get it. The noexceptness of the defaulted default constructor
should be a computation
of the noexceptness of the subobjects, and that should boil down to
whether optional's storage
is noexcept-default-constructible. And that thing has a noexcept
default constructor. Why
does this patch change anything?

"noexcept" is a red herring, what matters is defaulted vs user-provided. In one case, we end up zero-initializing the whole buffer, and not in the other.

--
Marc Glisse

Reply via email to