Boost logo

Boost :

Subject: Re: [boost] [system] virtual ~error_category
From: Richard Hodges (hodges.r_at_[hidden])
Date: 2018-02-12 19:38:02

On Mon, 2018-02-12 at 21:13 +0200, Peter Dimov via Boost wrote:
> The virtual destructor of error_category creates problems for
> constexpr-ification because it makes the class non-literal.
> I can't think of a scenario in which we need the destructor to be
> virtual.
> It's probably virtual for "guideline" reasons - the class has
> virtual
> functions. But does it really need to be? Error categories aren't
> destroyed
> via a pointer to base. They are, in fact, static instances, not
> destroyed at
> all, except on program exit.
> Can anyone think of a case in which error_category needs the virtual
> destructor?

None at all.

> _______________________________________________
> Unsubscribe & other changes:
> cgi/boost

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