2 Mar
2018
2 Mar
'18
8:27 p.m.
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.