Home | History | Annotate | Download | only in dcl.type.elab
      1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
      2 
      3 struct A { typedef int type; };
      4 template<typename T> using X = A; // expected-note {{declared here}}
      5 struct X<int>* p2; // expected-error {{elaborated type refers to a type alias template}}
      6 
      7 
      8 template<typename T> using Id = T; // expected-note {{declared here}}
      9 template<template<typename> class F>
     10 struct Y {
     11   struct F<int> i; // expected-error {{elaborated type refers to a type alias template}}
     12   typename F<A>::type j; // ok
     13 
     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{{elaborated type refers to a type alias template}}
     17   typename Y<F>::template U<char> l; // ok
     18 };
     19 template struct Y<Id>; // expected-note {{requested here}}
     20