ThePhD / sol2

Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
http://sol2.rtfd.io/
MIT License
4.18k stars 515 forks source link

How to convert on get in overloaded functions? #1543

Open Domain opened 11 months ago

Domain commented 11 months ago

I have a function with multiple overloads. And I hope I can convert one of the parameters from custom type.

void foo(int i);
void foo(int i, int j);

class CMyInt;

CMyInt mi;
foo(mi);

I have implemented the sol_lua_check and sol_lua_get to convert CMyInt to int, but sol fails to resolve the overloads.