Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

To be parametric it needs to be the same body semantically, not just textually. Particularly in C++ with its heavy operator overloading and limited safety, you can very easily write a template whose body will do the right thing for some types and be undefined behaviour for others (e.g. if your template has comparisons in it and then you instantiate it with a pointer or something).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: