This seems like a problem in clang (I already opened an error for clang ), but I would like to be sure that I am not mistaken.
Consider the following code:
struct B { };
template<typename...>
struct D;
template<typename T, typename U, typename... A>
struct D<T, U, A...>: D<U, A...> {
using C = D<U, A...>;
using C::D;
};
template<typename T>
struct D<T>: T { using T::T; };
int main() {
D<int, double, B> d{};
}
Lines (2) (if (1) and (4) are commented out) and (3) (if (4) are commented out) work as expected, while (1) (the example above, as it is) gives the following errors:
11: error: depends on the declaration allowed for input without 'typename'
using C :: D;
[...]
11: error: use of declaration refers to 'C ::', which is not a base class of 'D'
using C :: D;
C D<U, A...>, D<T, U, A...>.
, . ?
, GCC v4.8.1 v6.1.