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.16k stars 504 forks source link

BOOL to bool? #1389

Open deTylmarande opened 2 years ago

deTylmarande commented 2 years ago

This is not exactly a SOL2 problem, but rather a whole Lua and its inverted boolean type concept. Perhaps the founders of Lua had reasons for this, but.. anyway. My question is - it is possible to convert a function type BOOL to bool in runtime without a wrapper function? I need the response from the function to be returned as bool and not BOOL (int) in the lua script. Maybe some kind of type overload?