TheNitesWhoSay / RareCpp

Creating a simpler, more intuitive means of C++ reflection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clang & GCC Support

TheNitesWhoSay opened this issue · comments

As features are finally getting wrapped up ensure everything works on Clang & GCC as well as on visual studios where this was developed, this will most likely primarily be about the LHS/RHS and FOR_EACH macro which involve workarounds for visual studios bugs, will most likely wrap those definitions with workarounds in a precompiler check for VS and put the macro definitions without the workarounds in the else of the precompiler check

One tricky piece in GCC is going to be the type names, in Visual Studios we were able to use FUNCTION as though it was a constexpr, GCC doesn't make such an allowance, losing the constexpr nature of type name means it cannot exist as part of the "Class" structure generated by REFLECT without forcing the existence of static variables which will require instantiation (a second part to the macro that goes in a CPP file), as that would be a substantial loss to the ease of using library... I'll make the constexpr string for GCC "Unresolved" and have a function that can return a resolved type name.

It was possible to setup a constexpr function to resolve the type names, so there was no need to leave the type name strings as unresolved/have a function in any of the supported compilers.

Clang and gcc/g++ are now supported in addition to visual studios.