summaryrefslogtreecommitdiffstats
path: root/test/CXX/temp/temp.type/p1-0x.cpp
blob: 35d00c2fab204166ab297d322f833632166da7c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s

namespace Old {
  template<template<class> class TT> struct X { };
  template<class> struct Y { };
  template<class T> using Z = Y<T>;
  X<Y> y;
  X<Z> z;

  using SameType = decltype(y); // expected-note {{here}}
  using SameType = decltype(z); // expected-error {{different types}}
}

namespace New {
  template<class T> struct X { };
  template<class> struct Y { };
  template<class T> using Z = Y<T>;
  X<Y<int>> y;
  X<Z<int>> z;

  using SameType = decltype(y);
  using SameType = decltype(z); // ok
}