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