// { dg-do compile { target c++14 } } template struct same_type; template struct same_type {}; struct A { static int b; int c; template decltype(auto) f() { return A::c; } template decltype(auto) g() { return (A::c); } }; A a; template decltype(auto) f() { return A::b; } template decltype(auto) g() { return (A::b); } int main() { same_type()), int>(); same_type()), int&>(); same_type()), int>(); same_type()), int&>(); }