diff --git a/Library/include/playrho/InvalidArgument.hpp b/Library/include/playrho/InvalidArgument.hpp index bf625c678..4f8a89dd3 100644 --- a/Library/include/playrho/InvalidArgument.hpp +++ b/Library/include/playrho/InvalidArgument.hpp @@ -26,6 +26,7 @@ #include #include +#include // for std::move namespace playrho { @@ -49,10 +50,10 @@ struct WasDestroyed: public InvalidArgument using type = T; ///< Type of the argument that was destroyed. /// @brief Initializing constructor. - WasDestroyed(type v, const std::string& msg): InvalidArgument{msg}, value{v} {} + WasDestroyed(type v, const std::string& msg): InvalidArgument{msg}, value{std::move(v)} {} /// @brief Initializing constructor. - WasDestroyed(type v, const char* msg): InvalidArgument{msg}, value{v} {} + WasDestroyed(type v, const char* msg): InvalidArgument{msg}, value{std::move(v)} {} type value{}; ///< Value of the type that was destroyed. };