Open Flamefire opened 8 years ago
I guess weakTypeTest means: isConvertible and typeTest means isType
Yes. that's right.
void
, void*
and const void*
are distinguish, like a char
and, char*
. and void*
is not specialized.
I want lua_type_traits<void>::push(L,void);
, but it ill-formed at current C++(Maybe it allow since C++17) because push type used void pointer.
Please add documentation to
lua_type_traits
. I'm not really sure what the members mean, especiallyweakTypeTest
andtypeTest
(their difference). Probably rename them (I guessweakTypeTest
means:isConvertible
andtypeTest
meansisType
)Especially confusing is the implementation of
template<> struct lua_type_traits<void>
of which I assume is taken when avoid*
is pushed or retrieved. Is it actually possible to dostate["value"] = (void*) 0xDEAD;
and retrieve it? If so, can you outline what happens/which traits are used?