No arg error thrown for bool stack get
Stack<bool>::get does not check whether an actual value exists on stack. This results in LuaBridge silently treating a no value as a valid bool and not throwing any error.
See for example Stack<float> which has a check and reports if a non-float value (or no value) is on stack.
Thanks for reporting, should be pretty trivial to fix.
This poses a question, is LUA_TNIL castable to bool ? Much like how you would cast a pointer to bool to check its validity, this could be debatable.
We might want a strict mode for Stack get, but this will also make it more complex.
Hm, in such case I would always check what the default Lua behavior is.
http://lua-users.org/wiki/ExpressionsTutorial Logical operators
My code expects absent bools (i.e., LUA_TNONE) to get passed into C++ as false. This is LB2 behavior, and it is standard Lua behavior. If you are going to implement a fix, I would request an opt-out.
That said, I have one or two constructors where I would really like to be able to force the programmer to supply the boolean. But I can do that with a proxy constructor.