From 0e1aafe4df06d7f9654151e81067cdf508d6e4de Mon Sep 17 00:00:00 2001 From: Intrets Date: Sat, 19 Sep 2020 15:39:26 +0200 Subject: [PATCH] fix bug in checking for const in push_reference std::is_const will always be false if std::is_lvalue_reference is true, we first have to strip off the reference to look at the const-ness. See https://en.cppreference.com/w/cpp/types/is_const --- include/sol/stack_core.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sol/stack_core.hpp b/include/sol/stack_core.hpp index a6f900b1..ebe8dbe6 100644 --- a/include/sol/stack_core.hpp +++ b/include/sol/stack_core.hpp @@ -943,7 +943,7 @@ namespace sol { template int push_reference(lua_State* L, Arg&& arg, Args&&... args) { using use_reference_tag = meta::all, - meta::neg>, + meta::neg>>, meta::neg>>, meta::neg>>>; using Tr = meta::conditional_t>;