Boost logo

Boost :

Subject: Re: [boost] [variant2] Comments on documentation
From: Peter Dimov (pdimov_at_[hidden])
Date: 2019-04-08 14:23:32

Andrzej Krzemienski wrote:
> niedz., 7 kwi 2019 o 14:10 Peter Dimov via Boost <boost_at_[hidden]>
> napisał(a):
> > Bjorn Reese wrote:
> > > The destructor should be marked as noexcept.
> >
> > Destructors are noexcept by default.
> >
> Actually, that is not the case. The noexcept property of a destructor
> without explicit noexcept annotation is determined by inspecting noexcept
> property of destructors of non-static data members of the class and its
> base classes. Since these subobjects are private implementation of your
> class, and we are not aware of how their destructors are implemented, we
> cannot determine whether variant's destructor is noexcept or not.

This is an interesting point. However, the standard doesn't mark the
destructors as noexcept, and I'm not sure I see why this same logic doesn't
apply to it.

Boost list run by bdawes at, gregod at, cpdaniel at, john at