2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / lookup / decl2.C
blob75ce0967a4b4a30e2119322f41c141fee3ecc7c3
1 // { dg-do compile }
3 // Copyright (C) 2002 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 24 Dec 2002 <nathan@codesourcery.com>
5 // Source Martin Buchholz martin@xemacs.org
7 // PR 9053. Failed to consider templates that are disambiguated by
8 // return type.
10 template <typename T> class bar;
11 template <> struct bar<const char*> { typedef void type; };
12 template <typename T> class qux;
13 template <> struct qux<int> { typedef void type; };
15 template <typename T>
16 typename bar<T>::type foo (T t) { }
18 template <typename T>
19 typename qux<T>::type foo (T t) { }
22 int
23 main (int argc, char *argv[])
25   foo ("foo");
26   foo (7);