Consider an alias template, such as Ain the code below. Now let it be Ban alias template A.
In the code below, these patterns are used as template arguments for a structure Cthat specializes in only one name ( A). clang -std=c++11exists with error: implicit instantiation of undefined template 'C<B>'indicating that another specialization is required for B.
template<int N>
using A = int;
template<int N>
using B = A<N>;
template<template<int> class I>
struct C;
template<>
struct C<A> {};
int main() {
C<A> c;
C<B> d;
}
Why (if even) is it that, despite the fact that specialization of aliases is not allowed - Aand Bare treated as different class templates? Is there a workaround that allows me to rename a long template without causing this problem?