1 // PR c++/49389
2 // { dg-do compile { target c++11 } }
3 
4 template<class T> T&& val();
5 
6 struct A {};
7 
8 typedef decltype(val<A>().*val<int A::*>()) type;
9 
10 template<class> struct assert_type;
11 template<> struct assert_type<int&&> {};
12 
13 assert_type<type> test;
14