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

That negates the whole point of templates and constexpr -- they're purely functional subsets and explicitly designed to be so.

(You can argue that purely functional code is useless in real life and that C++ shouldn't strive to be purely functional, but that's another argument.)



C++11 constexpr where purely functional, C++14 adds (controlled) mutation.




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

Search: