OSDN Git Service

2012-12-15 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / cpp0x / collapse-bug.C
1 // { dg-options "--std=c++0x" }
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 }