Remove the user-provided ~error_category in C++03 mode, to fix use after main

This commit is contained in:
Peter Dimov
2018-09-22 16:15:49 +03:00
parent 08dc402e77
commit 349fb30e8e

View File

@ -196,9 +196,12 @@ protected:
#else
~error_category()
{
}
// We'd like to make the destructor protected, to make code that deletes
// an error_category* not compile; unfortunately, doing the below makes
// the destructor user-provided and hence breaks use after main, as the
// categories may get destroyed before code that uses them
// ~error_category() {}
#endif