1 // PR c++/51199 2 3 typedef void FC() const; 4 5 template<class T> 6 struct add_ref { 7 typedef T& type; // { dg-error "forming reference" } 8 }; 9 10 typedef add_ref<FC>::type ref_type; 11 12 template<class T> 13 struct add_ptr { 14 typedef T* type; // { dg-error "forming pointer" } 15 }; 16 17 typedef add_ptr<FC>::type ptr_type; 18