struct D : B {};
-template <int (D::*fun)() const> int Get();
+template <int (D::*fun)() const> int Get(); // { dg-message "note" }
int main ()
{
- Get<&B::I>(); // { dg-error "no matching function" }
- Get<&D::I>(); // { dg-error "no matching function" }
+ Get<&B::I>(); // { dg-error "not a valid template argument" "not valid" }
+ // { dg-error "no match" "no match" { target *-*-* } 18 }
+ // { dg-message "note" "note" { target *-*-* } 18 }
+ Get<&D::I>(); // { dg-error "not a valid template argument" "not valid" }
+ // { dg-error "no match" "no match" { target *-*-* } 21 }
+ // { dg-message "note" "note" { target *-*-* } 21 }
}