You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
551 B

// RUN: %clang_cc1 -fsyntax-only -verify %s
class test1 {
template <typename> friend int bar(bool = true) {} // expected-note {{previous declaration is here}}
template <typename> friend int bar(bool); // expected-error {{friend declaration specifying a default argument must be the only declaration}}
};
class test2 {
friend int bar(bool = true) {} // expected-note {{previous declaration is here}}
friend int bar(bool); // expected-error{{friend declaration specifying a default argument must be the only declaration}}
};