error C2440: =: невозможно преобразовать 'const char *' в 'char *'
Вот полный код
template <bool is_index, typename Base>
static void walk_single_base(lua_State* L, bool& found, int& ret, string_view&) {
if (found)
return;
const char* metakey = &usertype_traits<Base>::metatable()[0];
const char* gcmetakey = &usertype_traits<Base>::gc_table()[0];
char* basewalkkey = is_index ? detail::base_class_index_propogation_key() : detail::base_class_new_index_propogation_key();
luaL_getmetatable(L, metakey);
if (type_of(L, -1) == type::lua_nil) {
lua_pop(L, 1);
return;
}
stack::get_field(L, basewalkkey);
if (type_of(L, -1) == type::lua_nil) {
lua_pop(L, 2);
return;
}
lua_CFunction basewalkfunc = stack::pop<lua_CFunction>(L);
lua_pop(L, 1);
stack::get_field<true>(L, gcmetakey);
int value = basewalkfunc(L);
if (value > -1) {
found = true;
ret = value;
}
}
Выдает ошибку error C2440: инициализация: невозможно преобразовать "const char8_t *" в "char *" (компилируется исходный файл lua\Clua.cpp)