Solves Issue #42's underlying problem (member-function defined operator overloads still work). Return values which are const should be converted to values so that they can be put into the lua system. Lua has no concept of const, and thusly anything returned const should be copied and made into a value.
Also, moved userdata<T> initialization for meta variable names and meta function names, as they were being instantiated multiple times for various T even though the values were exactly the same.
Also adds a header to make for easy solving of Issue #43, due to overloaded functions on userdata.
Solves Issue #42's underlying problem (member-function defined operator overloads still work). Return values which are const should be converted to values so that they can be put into the lua system. Lua has no concept of
const
, and thusly anything returnedconst
should be copied and made into a value.Also, moved
userdata<T>
initialization for meta variable names and meta function names, as they were being instantiated multiple times for variousT
even though the values were exactly the same.Also adds a header to make for easy solving of Issue #43, due to overloaded functions on userdata.