// Copyright (C) 2005 Free Software Foundation, Inc. // Contributed by Nathan Sidwell 2 Apr 2005 // PR 20723 // Origin: Andrew Pinski // Nathan Sidwell template class srp; template struct ptr { template ptr(const srp &other); // { dg-message "ptr::ptr" } }; template struct srp { template operator ptr(void) const; // { dg-message "srp::operator" } }; ptr parent_get() { srp parent; // { dg-message "candidate" } return parent; // { dg-error "is ambiguous" } }