Since I have started using this site, I keep hearing about the Boost library. I am wondering what are some of the major benefits of the Boost library (hence why should I use it) and how portable is the Boost library?
Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work well with the C++ Standard Library. Boost libraries are intended to be widely useful, and usable across a broad spectrum of applications.
Include Boost headers and link with Boost librarieshpp> in your source file. In your project's build options, highlight the root of your project, select the "Linker settings" tab, and add "boost_*-mgwXX-mt-1_47" to your Link libraries.
Boost is licensed under its own free, open-source license, known as the Boost Software License.
Boost is organized by several members of the standard committee.
So it is a breeding ground for libraries that will be in the next standard.
With tr1 coming up soon it is nice to know that boost already has a lot of the ground covered. A lot of the libraries in tr1 are basically adapted directly from boost originals and thus have been tried and tested. The difference is that they have been moved into the std::tr1 namespace (rather than boost).
All that you need to do is add the following to your compilers default include search path:
<boost-install-path>/boost/tr1/tr1
Then when you include the standard headers boost will automatically import all the required stuff into the namespace std::tr1
To use std::tr1::share_ptr you just need to include <memory>. This will give you all the smart pointers with one file.
You can simply read the Boost Background Information page to get a quick overview of why you should use Boost and what you can use it for. Worth the few minutes it takes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With