Adding member function returning 'void*'



First of all, thank you for your awesome project.

I faced with just one issue: I cannot add member function, which has return type of ‘void*’

Minimal example:

class MyClass
    void* GetVoid() { return nullptr; }

int main()
    chaiscript::ChaiScript chai;
    chai.add(chaiscript::fun(&MyClass::GetVoid), "GetVoid");

static_cast also doesn’t work (MSVC 2015 says ‘illegal indirection’).

Any help would be highly appreciated. Thanks in advance!


Don’t think there’s a void* for ChaiScript, but you could wrap it with an anonymous function. It’s usually better to avoid dealing with void* in ChaiScript though.

Just don’t expose that function to scripts?