I have a problem; I want to explicitly instantiate a class like Datatype
in:
using Layout = some::namespaces::Meat_Layout<Some,Parameters>;
using Datatype = other::namespaces::Meta_Datatype<Layout>;
For explicit instantiation I need to use elaborated type specifiers. Which do not allow the usage of typedefs. Therefor I can not write:
template class Datatype;
But I have to write:
template class some::namespaces::Meta_Datatype<other::namespaces::Meat_Layout<Some,Parameters>>;
If there are any typedefs left in there I would have to replace them too, which might lead to something like:
template class some::namespaces::Meta_Datatype<other::namespaces::Meta_Meat_Layout<Some,Meta_Parameters<int>,int,int>>;
As you see this becomes really fast unclear.
Is there any trick to avoid the deconstruction of all the typedefs?
It would be best if it is also possible to use the trick when using extern template
.
namespace some::namespaces { template class Meta_Datatype<Meat_Layout<Some,Parameters>>; }
? And you can use type aliases as template parameters. – Dinnage