I don't know if this can be resolved, but operator[char* k] is automaticaly push k value to stack, because there is no way to find out if user wants to set value or get value.
Can be resolved by providing to operations for getting and setting or maybe by lot of template magic...
Example:
state["var"] = 100
lua::Value value = state["var"];
// Stack is: `var` 100
I don't know if this can be resolved, but
operator[char* k]
is automaticaly pushk
value to stack, because there is no way to find out if user wants to set value or get value.Can be resolved by providing to operations for getting and setting or maybe by lot of template magic...
Example: