mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
fix: call destructor correctly
This commit is contained in:
@@ -434,8 +434,12 @@ struct result
|
|||||||
#if defined(__GNUC__) && ! defined(__clang__)
|
#if defined(__GNUC__) && ! defined(__clang__)
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||||
|
#endif
|
||||||
|
|
||||||
if(this->is_ok_) {this->succ.~success_type();}
|
if(this->is_ok_) {this->succ.~success_type();}
|
||||||
else {this->fail.~failure_type();}
|
else {this->fail.~failure_type();}
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && ! defined(__clang__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user