diff --git a/include/sol/call.hpp b/include/sol/call.hpp index 2e9ae2d9..2ff17f9b 100644 --- a/include/sol/call.hpp +++ b/include/sol/call.hpp @@ -524,8 +524,8 @@ namespace sol { else { using traits_type = lua_bind_traits; using return_type = typename traits_type::return_type; - constexpr bool is_const = std::is_const_v>; - if constexpr (is_const) { + constexpr bool ret_is_const = std::is_const_v>; + if constexpr (ret_is_const) { (void)fx; (void)detail::swallow{ 0, (static_cast(args), 0)... }; return luaL_error(L, "sol: cannot write to a readonly (const) variable");