Clean up some minor white space issues in trans-decl.c and trans-expr.c
[official-gcc.git] / gcc / testsuite / g++.dg / lookup / decl1.C
blobd9af65604cb2e04aef4f872e023f2446c7d7c949
1 // { dg-do compile }
3 // Copyright (C) 2002 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 24 Dec 2002 <nathan@codesourcery.com>
6 // PR 8702. Failure to match templates.
8 template <typename X> struct C1{};
10 template <typename X>
11 struct C2 {
12   template<typename Y> operator C1<Y>();
13   template<typename Y> operator C2<Y>();
16 template<typename X> template<typename Y>
17 C2<X>::operator C1<Y>()
19   return C1<Y>();
22 struct A
24   operator int ();                      // { dg-error "operator" "" }
25   operator float ();                    // { dg-error "operator" "" }
26   operator float () const;              // { dg-error "operator" "" }
27   template <typename T> operator T * (); // { dg-error "candidates" "" }
30 A::operator short () { // { dg-error "prototype for" "" }
31   return 0;