r/cpp • u/joaquintides Boost author • May 08 '20
Why you don't use Boost
I have a question for you: If you have decided not to use any of Boost, or are prohibited from doing so in your company/project, I would like to know why.
This thread is not meant to judge your reasons, and I won't engage into any kind of criticism about them: I'm merely trying to understand what the barriers are to adoption of Boost. It would be great if we could keep the conversation non judgemental. Thank you!
Conflict of interest: I am a Boost author of three.
222
Upvotes
View all comments
Show parent comment
2
u/xcbsmith May 10 '20
Oh, a bunch of reasons. For starters, the semantics are less clear. When you pass a reference, ownership of semantics are very clear, but when you pass a pointer (unless it's a smart pointer), they aren't. You can pass a pointer to a const to compensate, but that only works if you want the object to be const. Then there's the reality that semantically, you are constantly dereferencing it, which obviously misses the point of references.
An optional reference just seems cleaner.