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

You can't reliably refactor members in a template because T might be any class. Example: template <typename T> void foo(T bar) { bar.buzz(); }

Try renaming buzz in this context, you really don't know how many other classes that need the same rename. In Java and C# you know because of generic constraints and IDEs can leverage this information. Concepts in c++20 should hopefully solve this.



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

Search: