Update argument_parser.hpp

This commit is contained in:
Abdüssamet ERSOYLU
2025-07-02 16:03:16 +04:00
committed by GitHub
parent d9944e2927
commit ef0a0c06f8

View File

@@ -224,6 +224,7 @@ namespace argument_parser {
invoked(other.invoked) invoked(other.invoked)
{} {}
argument& operator=(argument const& other) { argument& operator=(argument const& other) {
if (this == &other) return *this;
this->~argument(); this->~argument();
new(this) argument{other}; new(this) argument{other};
return *this; return *this;
@@ -503,4 +504,4 @@ namespace argument_parser {
}; };
} }
#endif // ARGUMENT_PARSER_HPP #endif // ARGUMENT_PARSER_HPP