Boost logo

Boost :

Subject: Re: [boost] [system] virtual ~error_category
From: Groke, Paul (paul.groke_at_[hidden])
Date: 2018-02-12 19:23:32


> -----Original Message-----
> From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Peter Dimov via Boost
> Sent: Montag, 12. Februar 2018 20:13
> Subject: [boost] [system] virtual ~error_category
>
> Can anyone think of a case in which error_category needs the virtual
> destructor?

I don't know of any reason, but I'm also not really proficient in Boost.System. I would like to suggest to make the dtor protected though if you make it non-virtual. That would lessen the chance of something going wrong. E.g. user-code may contain strange code constructing and destructing error categories for whatever reason. (Of course the dtors of all pre-defined non-final categories should then be made non-virtual protected too.)

Regards,
Paul


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk