]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/template/spec23.C
call.c (struct conversion_info): Rename 'from_type' to 'from'.
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / template / spec23.C
1 // Copyright (C) 2005 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 2 Apr 2005 <nathan@codesourcery.com>
3
4 // PR 20723
5 // Origin: Andrew Pinski <pinskia@gcc.gnu.org>
6 // Nathan Sidwell <nathan@gcc.gnu.org>
7
8 struct Foo
9 {
10 template <typename T>
11 Foo (const T &); // { dg-message "T = Bar" }
12 };
13
14 struct Bar
15 {
16 template <typename T>
17 operator T () const; // { dg-message "T = Foo" }
18 };
19
20 Foo Quux (Bar const &b)
21 {
22 return b; // { dg-error "ambiguous" }
23 }
24
25