https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59498
--- Comment #7 from Louis Dionne <ldionne.2 at gmail dot com> ---
I ran into this problem in another context, and I think it justifies some
thinking about how this issue is going to be handled by the language. I
_really_ think the following should be valid C++. This is a C++11
implementation of the `quote` utility of the Boost.MPL. Unfortunately,
it won't compile when given an alias:
#include <type_traits>
template <template <typename ...> class f>
struct quote {
template <typename ...x>
using apply = f<x...>;
};
using test = quote<std::add_pointer_t>::apply<int>;
It is very important for this kind of code to be valid to enable a generic
handling of aliases in metaprograms. Without this, I see two solutions:
1. Use metafunctions instead of aliases, i.e.
`quote<std::add_pointer>::apply<int>::type`.
2. Do not use variadic templates and have numbered forms for `quote` for
each number of arguments up to some number. This is basically returning
to C++03.
Tested on gcc 4.9.1 and clang 3.5.0 (trunk).