forked from boostorg/system
Remove the user-provided ~error_category in C++03 mode, to fix use after main
This commit is contained in:
1 parent
08dc402e77
commit
349fb30e8e
1 file changed
+6
-3
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user