4 ms·
Sometimes I wonder why projects are either "single header only" or tens to hundreds of separate modules. One header and one source module would be a nice compro
by _pmf_ 7y ago
Sometimes I wonder why projects are either "single header only" or tens to hundreds of separate modules. One header and one source module would be a nice compromise regarding compile time vs. ease of use.
Yes, I realize that some header only libraries support using the header as either header or implementation, but this still blows up compile time.
- mehrdadn 7y agoHeader-only libraries aren't generally single-header-only. That's a bit of an extreme.
- BubRoss 7y agoDoes it really blow up compile time? Translation units and optimization are usually where compile time is spent. Having fewer but fatter translation units helps compile times tremendously while most of the time per translation unit is spent in stages beyond the source compiling in LLVM. Boost is really the only example I can think of where small utility comes at the expense of huge compile time increases.