Special handling of splicers as template arguments
Closed this issue · 0 comments
Although not yet documented by P2996, the intent is to follow the example of P1240 and make code like
template <std::meta::info... Rs>
void fn() {
Cls<[:Rs:]...> cls;
}
work correctly, regardless of the kinds of entities reflected by Rs...
. That is, splicers are treated specially when used as template arguments, and whereas a reflection of a type might ordinarily require a leading typename
(e.g., typename [:R:]
), no such qualifier is needed in the case of using a splicer as a template argument. This behavior would allow reflections to be used in situations similar to proposed "universal template parameters."
If I understand correctly, Lock3 implemented this using so-called mystery template arguments. We will probably similarly need to add a new kind of template argument, though I might prefer the name IndeterminateSplice
rather than Mystery
.