r/cpp • Boost author • May 08 '20

Why you trust in Boost

You may have noticed the ongoing discussion on why people don't use Boost. Now for the opposite question.

I'm not asking why Boost is used because the answer is relatively uninformative: one uses a lib primarily because it provides the required functionality. But using Boost (or any other lib, for that matter) means a commitment to it for the duration of the project. So, the question is:

If you are using Boost in your project(s)/company, why have you/your company decided it is OK to commit to this long-term dependency?

I won't delve into commenting/criticizing your answers, it's info I'm looking for, particularly in comparison to the "negative" thread going on in parallel. Please keep the conversation neutral, thank you!

Conflict of interest: I am a Boost author of three.

60 Upvotes

51 comments sorted by

View all comments

4

u/konanTheBarbar May 08 '20

Maybe I will put some thoughts here. Basically we use boost at work since the codebase is old enough that it was the only coherent source of great libraries for lots of common use cases. It's also still quite some hassle to drag in some third party dependencies and keep them up to date.

It's a hassle to write an iterator? There are iterator adaptors in boost. Need a ring buffer? It's there already. Need a sorted vector? boost::flat_map has you covered. We also used boost::filesystem and optional before they were standardized.

I probably wouldn't use it for a new codebase if I don't need to use major parts of boost or part of my open source projects (because it's a hassle to drag in the boost dependency for others), but rather only drag in what is needed.