// PR c++/49156 // { dg-do compile { target c++11 } } template T declval(); template struct S { template static U get(const volatile T&); template static decltype(*declval()) get(...); // { dg-error "operator*" } typedef decltype(get(declval())) type; // { dg-error "no match" } }; struct X { }; S::type x; // { dg-prune-output "note" }