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