From 077448bfc8c405bcac19a8eb462580801c20d2a2 Mon Sep 17 00:00:00 2001 From: Rohlem Date: Thu, 6 Jul 2017 16:05:51 +0200 Subject: [PATCH] enable move semantics when pushing rvalue optional add forward_like-style cast to stack::pusher> --- sol/stack_push.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sol/stack_push.hpp b/sol/stack_push.hpp index a974bc69..a7d690d3 100644 --- a/sol/stack_push.hpp +++ b/sol/stack_push.hpp @@ -26,6 +26,7 @@ #include "raii.hpp" #include "optional.hpp" #include +#include #ifdef SOL_CODECVT_SUPPORT #include #include @@ -703,7 +704,7 @@ namespace sol { if (t == nullopt) { return stack::push(L, nullopt); } - return stack::push(L, t.value()); + return stack::push(L, static_cast::value, O&, O&&>>(t.value())); } };