From 348d9921079bfbf655422abf12e7d26697b74231 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Sun, 29 Dec 2002 16:42:30 +0000 Subject: [PATCH] New test. From-SVN: r60604 --- gcc/testsuite/g++.dg/template/template-id-1.C | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/template-id-1.C diff --git a/gcc/testsuite/g++.dg/template/template-id-1.C b/gcc/testsuite/g++.dg/template/template-id-1.C new file mode 100644 index 00000000000..60ce4e7ffb2 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/template-id-1.C @@ -0,0 +1,33 @@ +// Copyright (C) 2002 Free Software Foundation +// Origin: C++/1058 +// Contributed by Gabriel Dos Reis +// { dg-do compile } + +struct A { + typedef int Y; + typedef double Z; +}; + +struct B { + template + void func(typename T::Y, typename T::Z) { } +}; + +template +struct X { + void gunc(); +}; + +template +void X::gunc() +{ + B b; + b.func(0, 3.); +} + +int main() +{ + X x; + x.gunc(); + return 0; +}