Parser_default: Move temporary variable instead of copying (#362)

This commit is contained in:
Heiko Lewin
2025-02-25 21:01:39 +01:00
committed by GitHub
parent c3764e83ce
commit e825b236ee
2 changed files with 29 additions and 1 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ struct Parser {
using ReflectionType = std::remove_cvref_t<typename T::ReflectionType>;
const auto wrap_in_t = [](auto _named_tuple) -> Result<T> {
try {
return T{_named_tuple};
return T{std::move(_named_tuple)};
} catch (std::exception& e) {
return error(e.what());
}