fabian-jung/tsmp

Enable forwarde declaration based type matching for tsmp::reflect

fabian-jung opened this issue · 0 comments

Currently the reflect type trait is done via conecpt restrained partial template specialisation and mimics pythons duck typing. This approach was good till overloaded functions are allowed for reflected types.
To my knowledge there is no possible way to check for the existance of overloaded member functions in a generic way (meaning the argument list is not known beforehand). To enable overloaded functions for reflections and proxies the partial specialisation must be done in a different way.

This ticket is about implementing such a way. If the type that shall be reflected is forward declareable (not a nested type, not defined in an unaccessible scope e.g. a function body), then the type shall be forward declared and the tsmp::reflect type trait specialisation should be done via this forward declaration.

It also solves problems regarding the reflect::name() function.