diff --git a/archive_exception.cpp b/archive_exception.cpp index 4955d32..2215f4c 100644 --- a/archive_exception.cpp +++ b/archive_exception.cpp @@ -30,8 +30,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace ns_archive { -archive_exception::archive_exception(const std::string& what) noexcept : - _what(what) +archive_exception::archive_exception(std::string&& what) noexcept : + _what(std::forward(what)) { // } diff --git a/archive_exception.hpp b/archive_exception.hpp index 1fcaa50..5c77ec4 100644 --- a/archive_exception.hpp +++ b/archive_exception.hpp @@ -37,7 +37,7 @@ namespace ns_archive { class archive_exception : public std::exception { public: - archive_exception(const std::string& what) noexcept; + archive_exception(std::string&& what) noexcept; const char* what() const noexcept override;