mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
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:
parent
7be51ebbef
commit
855d480049
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue
Block a user