Boost is a large collection of high-quality libraries intended for use in C++. Boost is free, and is often considered a "second standard library".
What is Boost?
Boost is a large collection of high-quality libraries intended for use in C++. They are free and cover a large variety of categories. Boost is often considered a "second standard library", and many C++ problems are resolved by using Boost.
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. The Boost license encourages both commercial and non-commercial use.boost.org
What can it do?
Boost covers every corner of programming, and continues to be improved and expanded.
It includes libraries for:
- String and text processing
- Containers
- Iterators
- Algorithms
- Function objects and higher-order programming
- Generic Programming
- Template Metaprogramming
- Preprocessor Metaprogramming
- Concurrent Programming
- Math and numerics
- Correctness and testing
- Data structures
- Image processing
- Input/Output
- Inter-language support
- Memory
- Parsing
- Programming Interfaces
- Miscellaneous
- Broken compiler workarounds
How do I use it?
The best part about Boost is that most of its libraries are header-only, so there's nothing to compile or link to. Simply download it, extract it into your favorite directory, tell your compiler where to find it, and use it!
However, there are some libraries that need to be compiled. These libraries are generally more heavy-weight, and/or rely heavily on platform-specific functionality. The libraries that need to be compiled are:
- Date Time
- Filesystem
- Graph
- Iostreams
- Math/Special Functions*
- MPI
- Program options
- Regular Expressions
- Serialization
- Signals
- System
- Test
- Thread
- Wave
Boost provides instructions on how to do this, and the process is mostly automated. Once built, most libraries will be automatically linked, if possible.
*Only when using the C99 math functions in <boost/math/tr1.hpp>