Larry Evans writes:
Could you please provide an example implementation of this C++11
implementation? I've no idea how template aliases could be used :(
Actually it is the other way round, the language feature is called alias
template. (N3337, 14.5.7)
template class container;
template <typename A>
using container1 = container<A>;
This is pretty cool because AFAIK from a typization point of view there
is no difference between container<A> and container1<A>. This is
incredibly useful when one uses specialisations instead of explicit
template metaprogramming to optimise in regard to compile-time as it is
being done, for example, in Boost.Spirit. Other than that, the numeric
aliases can easily be generated using the preprocessor and there is no
real overhead imposed to the compilation session.
Even better, one can use template aliases to define the front-end Fusion
container types in terms of a single, shared backend implementation.
This is useful because that way there are way less heavy template
instantiations as the containers now do not built up-on each other any
more.
Christopher