Boost logo

Boost :

Subject: Re: [boost] Proposed SG14 <system_error2> ready for feedback
From: Peter Dimov (lists_at_[hidden])
Date: 2018-03-02 20:27:07


Niall Douglas wrote:

> It was fixed by making the category source a constexpr variable, and each
> is given a 64 bit random unique id by its author from random.org. If the
> ids match, the domains are considered equal.

That's something I was considering for Boost.System (literally the same
thing, a random 64 bit ID). Unfortunately, the virtual destructor makes
error_category a non-literal type, so categories can't be constexpr
variables. Hence, my earlier inquiry about the switch to a protected
nonvirtual ~error_category.

There is talk of/hope for language changes allowing constexpr virtuals, but
it's yet unclear whether we'll get that or if so, when.


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