1 // { dg-do compile { target c++11 } }
2 template<typename T, typename U> struct same_type;
3 template<typename T> struct same_type<T, T> {};
4 
5 template <typename T>
6 struct S
7 {
8   typedef T const (&type)();
9 };
10 
11 void f()
12 {
13   // initial implementation didn't ignore const qualifier on
14   // reference, resulting in a typedef of 'const int& (&)()'
15   same_type<S<int &>::type, int&(&)()>();
16 }
17