From 5c9b16bdced1b6bc5cae34a326dcbf23fe50f7fd Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Tue, 30 May 2017 08:34:17 -0600 Subject: [PATCH] Fix handling of const return types #430 --- include/chaiscript/dispatchkit/handle_return.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/chaiscript/dispatchkit/handle_return.hpp b/include/chaiscript/dispatchkit/handle_return.hpp index 8243333b..8570c8d0 100644 --- a/include/chaiscript/dispatchkit/handle_return.hpp +++ b/include/chaiscript/dispatchkit/handle_return.hpp @@ -181,9 +181,9 @@ namespace chaiscript template struct Handle_Return { - static Boxed_Value handle(const Ret &r) + static Boxed_Value handle(Ret r) { - return Boxed_Value(std::cref(r)); + return Boxed_Value(std::move(r)); } };