Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Boost.ProgramOptions not header-only? [closed]

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).

like image 814
Giovanni Funchal Avatar asked Mar 15 '17 13:03

Giovanni Funchal


People also ask

Are all Boost libraries header-only?

Most Boost libraries are header-only: they consist entirely of header files containing templates and inline functions, and require no separately-compiled library binaries or special treatment when linking. The only Boost libraries that must be built separately are: Boost.

Is Boost format header-only?

"Boost, but only the header files." This repo is meant to provide a lightweight, minimal Boost distribution to satisfy SciPy's limited set of Boost dependencies. No binaries are features relying on compiled libraries are available through this header-only package.

Where is Boost header?

The headers should be in /usr/local/include/boost and the libs should be in /usr/local/lib.

What is Boost program options?

Boost Program Options is one of the Boost C++ Libraries. It is a very powerful library to handle command-line options. You define all the options of the program and then Boost Program Options takes care of all. It parses the command line, handles errors, gets values and even displays help.


1 Answers

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.

like image 105
CHKingsley Avatar answered Sep 22 '22 08:09

CHKingsley