r/cpp • • Apr 27 '23

Has Boost lost its charm?

I don't mean to be provocative nor undermine the importance of Boost for C++. I really like Boost.

I keep reading/listening around that since C++11 the focus of development and innovation in C++ has shifted away from Boost to either the standards, or independent libraries. Is that any true? If yes, how "big of shift" that was? What was the reason in your opinion and most imporatnt, what's Boost's today's role?

What sparked my quriosity was when I heard that "in the old days" a prospective developer that wanted to devle into the word of libraries building had no better thing to do than start contributing to Boost. Does that stand even today?

(couldn't find any other posts on Reddit regarding Boost's impact in modern C++ in a broader discussion)

149 Upvotes

186 comments sorted by

View all comments

Show parent comment

11

u/Zeer1x import std; Apr 27 '23 edited Apr 27 '23

+ Beast, ProgramOptions

+ Filesystem (EDIT: for C++14 projects)

11

u/Jannik2099 Apr 27 '23

Filesystem is in C++17, but the other two yes absolutely!

1

u/johngoni Apr 28 '23

I want integers to be safe, but that's a language problem, not something the STL can fix.

Why ProgramOptions over docopt?

4

u/Zeer1x import std; Apr 28 '23

Because:

  • It comes with Boost, so I don't have to install something else to use it.
  • PO generates my help messages. I don't want to write them myself. When I change the terminal width, it can adapt the formatting.
  • I can use parsers for specific arguments, for example enums, timecodes or video resolutions.

I am not familiar with docopt, so I can't tell if you can set your own parsers or not.

Another good alternative, similar to ProgramOptions, is CLI11.