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

Yup, which is why a project that is serious about compilation time splits off type-independent parts into .cpp files that can be compiled separately, improving the speed of compilation for users of that template.

I consider being a header-only "library" a code smell. It's purely for convenience, at the cost of compilation speed.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: