1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
3 struct A { typedef int type; };
4 template<typename T> using X = A; // expected-note {{declared here}}
5 struct X<int>* p2; // expected-error {{type alias template 'X' cannot be referenced with a struct specifier}}
8 template<typename T> using Id = T; // expected-note {{declared here}}
9 template<template<typename> class F>
11 struct F<int> i; // expected-error {{type alias template 'Id' cannot be referenced with a struct specifier}}
12 typename F<A>::type j; // ok
14 // FIXME: don't produce the diagnostic both for the definition and the instantiation.
15 template<typename T> using U = F<char>; // expected-note 2{{declared here}}
16 struct Y<F>::template U<char> k; // expected-error 2{{type alias template 'U' cannot be referenced with a struct specifier}}
17 typename Y<F>::template U<char> l; // ok
19 template struct Y<Id>; // expected-note {{requested here}}