// PR c++/120756 // { dg-do compile { target c++11 } } struct A { template [[deprecated]] void foo (); }; template [[deprecated]] auto bar () -> decltype (&A::foo); void foo () { bar<0> (); // { dg-warning "deprecated" } }