mardi 10 octobre 2017

Should I prefer Boost or the C++11 standard library, if I'm already using Boost? [on hold]

In my project I'm using boost::asio for networking and thread management. I would like to use some features of modern C++, for example shared pointers.

There are two choices: boost::shared_ptr, since I'm already using Boost, and std::shared_ptr since I'm using a C++11 compiler. As far as I understand those are basically equivalent, however they are incompatible with each other.

I've read that I should prefer the standard library components over Boost, to not use an external dependency pointlessly. However I will still be using Boost (at least until and if they decide to integrate ASIO into the standard library), so I still require that dependency.

Shared pointers are just an example, this question applies to all features that the standard library took over from Boost, such as function, bind, thread, etc.

Given my situation, which is the preferred implementation of the feature? Are there any gotchas regarding the choice, where I would be required to use either the Boost or standard library version specifically, when using some of the other Boost or standard library components?

Aucun commentaire:

Enregistrer un commentaire