variable name is_const -> ret_is_const

`is_const` will get some strange messages in VS 2019
maybe it is conflicted with `std::is_const`
This commit is contained in:
Ubpa 2020-08-02 12:57:45 +08:00 committed by The Phantom Derpstorm
parent 7be51ebbef
commit 855d480049

View File

@ -524,8 +524,8 @@ namespace sol {
else {
using traits_type = lua_bind_traits<F>;
using return_type = typename traits_type::return_type;
constexpr bool is_const = std::is_const_v<std::remove_reference_t<return_type>>;
if constexpr (is_const) {
constexpr bool ret_is_const = std::is_const_v<std::remove_reference_t<return_type>>;
if constexpr (ret_is_const) {
(void)fx;
(void)detail::swallow{ 0, (static_cast<void>(args), 0)... };
return luaL_error(L, "sol: cannot write to a readonly (const) variable");