1 // { dg-do compile { target c++14 } }
3 template<class,class> struct same_type;
4 template<class T> struct same_type<T,T> {};
12 decltype(auto) f() { return A::c; }
15 decltype(auto) g() { return (A::c); }
21 decltype(auto) f() { return A::b; }
24 decltype(auto) g() { return (A::b); }
28 same_type<decltype(f<0>()), int>();
29 same_type<decltype(g<0>()), int&>();
31 same_type<decltype(a.f<0>()), int>();
32 same_type<decltype(a.g<0>()), int&>();