Hacker News new | ask | show | jobs
by jgh 4133 days ago
Header libraries are easier to add to your project because there are no build scripts to figure out or cross-compiling to do or whatever. A lot of Boost is header-only, for example. GLM (OpenGL Mathematics), too, is header-only. OTOH if you end up modifying a header that's included in a whole bunch of places, woe unto you.
1 comments

The reason Boost is headers only is you have to be a header to be generic. Implementations outside of headers have to friend / otherwise be not truly generic.
Assuming you mean friend in the standard cpp way, that's not exactly correct.

http://stackoverflow.com/questions/495021/why-can-templates-...

Yes, good point. You're right about that.