LuaBridge icon indicating copy to clipboard operation
LuaBridge copied to clipboard

void* problem when addConstructor and addFunction

Open venjin opened this issue 2 years ago • 0 comments

when the return type is void*, addFunction will compile fail in push:

template <class T>
struct StackOpSelector<const T*, false>
{
    using ReturnType = TypeResult<T>;

    static Result push(lua_State* L, const T* value) { return Stack<T>::push(L, *value); }

    static ReturnType get(lua_State* L, int index) { return Stack<T>::get(L, index); }

    static bool isInstance(lua_State* L, int index) { return Stack<T>::isInstance(L, index); }
};

What should i do to solve this problem? I can not modify the return type from void* to another because it is a third library.

venjin avatar Jul 19 '23 00:07 venjin