From ef0a0c06f8c3b3d4974ff620840aaf311a8a8104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abd=C3=BCssamet=20ERSOYLU?= <106186005+sametersoylu@users.noreply.github.com> Date: Wed, 2 Jul 2025 16:03:16 +0400 Subject: [PATCH] Update argument_parser.hpp --- include/argument_parser.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/argument_parser.hpp b/include/argument_parser.hpp index 73f2378..ecd509b 100644 --- a/include/argument_parser.hpp +++ b/include/argument_parser.hpp @@ -224,6 +224,7 @@ namespace argument_parser { invoked(other.invoked) {} argument& operator=(argument const& other) { + if (this == &other) return *this; this->~argument(); new(this) argument{other}; return *this; @@ -503,4 +504,4 @@ namespace argument_parser { }; } -#endif // ARGUMENT_PARSER_HPP \ No newline at end of file +#endif // ARGUMENT_PARSER_HPP