1*c87b03e5Sespie // GROUPS passed arg-matching 2*c87b03e5Sespie // arg-matching file 3*c87b03e5Sespie // Message-Id: <9307081747.AA14030@tnt> 4*c87b03e5Sespie // From: mclaugh@tnt.acsys.com (Mark A. McLaughlin) 5*c87b03e5Sespie // Subject: g++ bug 6*c87b03e5Sespie // Date: Thu, 8 Jul 93 11:47:28 MDT 7*c87b03e5Sespie 8*c87b03e5Sespie 9*c87b03e5Sespie #include <iostream> 10*c87b03e5Sespie #include <cstdio> 11*c87b03e5Sespie 12*c87b03e5Sespie // With this declaration the program will not link. 13*c87b03e5Sespie template <class Type> std::ostream & save(std::ostream & os, Type T); 14*c87b03e5Sespie 15*c87b03e5Sespie template <class Type> std::ostream & save(std::ostream & os,Type T)16*c87b03e5Sespiesave(std::ostream & os, Type T) { 17*c87b03e5Sespie return os << T; 18*c87b03e5Sespie } // save 19*c87b03e5Sespie 20*c87b03e5Sespie int main()21*c87b03e5Sespiemain() { 22*c87b03e5Sespie int i = 10; 23*c87b03e5Sespie save((std::ostream &)std::cout, i) << std::endl; 24*c87b03e5Sespie short int s = 5; 25*c87b03e5Sespie save((std::ostream &)std::cout, s) << std::endl; 26*c87b03e5Sespie std::printf ("PASS\n"); 27*c87b03e5Sespie } // main 28