Search code examples
c++boostboost-program-optionsheader-only

Why is Boost.ProgramOptions not header-only?


Some boost libraries are header-only, some are not, and for various reasons etc.

Is there a specific reason/design decision why Boost.ProgramOptions is not header-only?

I'm wondering because it claims to be a "small" library in its the documentation and I don't see any system-related reason (like threads or asio).


Solution

  • Program Options claims to be small, but it turns out to be the second largest library we were building, after Regex. (It is bigger than boost Filesystem and Thread libraries.) I believe that you should be glad they're building a library for it instead of choking your project with a ton of included headers. Perhaps the author thought it would be small when he started and forgot to change the comment when it continued to grow and add features.