[Core] Fix autoregister macro for mix templated classes #13784
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
This (hopefully) fixes once and for all the auto register macro. Specifically this PR addresses the case of classes that contains a variable number of templates which are a mix between values and other classes (which can recursively be also mixed templates)
The only requirement is that the class cannot contain "," when passing it to the macro, so the old:
becomes:
@ddiezrod, @loumalouomega I've updated the ray-casting processes accordingly so everyone that copy pastes goes to the correct code by default
@rubenzorrilla This is a clean up version of what we tried yesterday.
@pooyan-dadvand, @matekelemen This is the only solution we've found. I am still unable to pass variadric templates with class and values, ping you both because you both told me that there were ways, feel free to suggest changes if we can avoid the demangling by directly instantiating the class/value types.
P.s. I keept it in two different macros because the
typeid(_).name()does not work with incomplete type while they are not templated in the basic version.P.s.2: There is a non-null possibility that this fails on windows.