// { dg-do compile } // Copyright (C) 2002 Free Software Foundation, Inc. // Contributed by Nathan Sidwell 24 Dec 2002 // PR 8702. Failure to match templates. template struct C1{}; template struct C2 { template operator C1(); template operator C2(); }; template template C2::operator C1() { return C1(); } struct A { // { dg-message "defined here" } operator int (); // { dg-message "operator" } operator float (); // { dg-message "operator" } operator float () const; // { dg-message "operator" } template operator T * (); // { dg-message "operator" } }; A::operator short () { // { dg-error "no declaration matches" } return 0; }