view gcc/testsuite/g++.dg/parse/typename11.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/11987

template <int dim> struct X {
  struct I { I(); };
};

template <int dim> struct Y : X<dim> {
  typedef typename X<dim>::I I;
};

// note: I is nested type in X, not Y!
template <int dim>
Y<dim>::I::I () {}		// { dg-error "expected|dependent typedef" "typedef" }
// { dg-error "no type|dependent type" "no type" { target c++17_down } .-1 }

template struct Y<1>;