luaOverloads

A function that wraps around other functions in order to provide runtime overloading support.

Notes: Parameter binding logic is exactly the same as luaCWrapperSmart.

From the 0th Overload to the last, this function will exhaustively call each function until one successfully has its arguments bound.

If no overloads could succesfully be matched, then an exception will be thrown.

All overloads must provide the same return type. I hope to make this more flexible in the future.

To be more specific, a function fails to bind its arguments if it throws LuaTypeException or LuaArgumentException. So please be aware of this when writing overloads.

int
luaOverloads
(
Overloads...
)
(
LuaState* state
)

Meta