12 Feb
2018
12 Feb
'18
7:13 p.m.
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?