Introduction
Boost is a collection of high-quality and peer-reviewed libraries that aims to make C++ development highly productive.
Boost is publicly released three times per year (April, August, and December). Each release has updates to existing libraries, and any new libraries that have passed the rigorous acceptance process. Currently, there are over 180 libraries covering a myriad of programming tasks.
Advantages of using Boost
There are many advantages to using Boost in your C++ projects, the main one being using Boost avoids reinventing the wheel if there is a library that implements functions that you would otherwise have to write yourself. In addition:
-
Boost libraries are peer reviewed, well designed, and extensively tested prior to release.
-
Boost does not compete with the C++ Standard Library. Rather it complements the Standard with exciting additional functionality. Many components of the Standard started as components of Boost libraries.
-
Boost is open-source, and available for you to use in any of your projects. It is free, including for commercial projects. Refer to The Boost Software License.
-
Boost allows for cross-platform development, with single source code. Boost supports Windows, Linux variants, Apple OS X, IOS, Android, and Xbox.
-
The Boost Libraries are designed to be as independent as possible so that users can pick and choose the libraries they need without being forced to include unnecessary code. If a library has dependencies these other libraries are loaded automatically if just a subset of the full collection of libraries is being installed.
-
Particular strengths of the libraries include extensive documentation, ease of installing and updating, many libraries are header-only, and that less-common use cases are often covered.
-
Through template metaprogramming Boost libraries are a good platform for building other libraries.
-
Boost can be used in conjunction with graphics and games SDKs, such as OpenGL, Vulkan, and DirectX, and with game development engines such as the Unreal Engine.
-
It is easy to ask questions and share your Boost experiences with other programmers, via the User Community.
-
A developer can gain knowledge of what is available. A library may be of no current use, but knowledge of its existence can help in future awareness and planning.
-
Bugs, though rare, and other issues can be filed on the library authors, refer to Reporting Issues.
Considerations when using Boost
The libraries implement a modern approach to C++ programming, generally prioritizing performance, correctness, cross-platform portability, efficiency and reusability. Boost offers building blocks, rather than a high-level app framework.
Boost is template-heavy, in order to provide maximum portability and reusability, which can make for dense syntax, which takes some getting used to.
Boost libraries are written by one, or a small team, of independent developers. There will be minor differences in portability, standards, documentation, error reporting, and other aspects, between the libraries. The stringent review process does help minimize these differences.
Library Categories
The current Boost libraries are categorized as follows - the count shows the number of current libraries in the category.
Category | Count | Description |
---|---|---|
13 |
A range of libraries including several for 2D geometry, graphs, performance when iterating, sorting, string efficiency, and miscellaneous utility algorithms. |
|
1 |
Addresses compiler idiosyncrasies, and help for non-conforming standard libraries. |
|
15 |
Libraries that address concurrency, threads, networking, sockets, context switching, memory, and other multi-threading functions. |
|
23 |
Includes coverage of arrays, buffers, graphs, JSON, heaps, properties, stacks, and other storage constructs and issues. |
|
7 |
Includes coverage of asserts, contracting, integer correctness, tracing, and unit testing. |
|
22 |
Supports a wide range of data structures, including maps, containers, heaps, JSON, optional objects, pointers, polygons, properties, and stacks. |
|
5 |
Covers date and time utilities, cyclic redundancy code (CRC), unit analysis, and unique identifiers. |
|
5 |
Covers asserts, error reporting and handling, and an infrastructure for throwing exceptions. |
|
16 |
Covers binding, function wrapping, function overloading, lambda functions, generic functions, and callback functions. |
|
15 |
A range of generalized libraries, including for passing parameters, function template overloads, handling operators and iterators, generic types and templates, and parallel extensions. |
|
1 |
A single library for generic image processing. |
|
13 |
Features include portable networking, conversions for correct byte-ordering, formatting, streams, JSON, serialization, and URL parsing. |
|
1 |
A single library providing a framework for interfacing Python with C++. |
|
6 |
Covers iterations in images, graphs, arithmetic classes, and tokens. |
|
13 |
Covers language features such as reflection, exceptions, semantics, deterministic failure, parameters, scope, types, and |
|
19 |
Covers many math issues, such as statistics, types and conversions, geometry, histograms, trigonometry, common factors, Quaternions, n-dimensional arrays, equations, operators, polygons, vectors, matrices, random numbers, ratios, rational numbers, safe integers, and linear algebra. |
|
3 |
Memory functions including for alignment, allocators, traits, pool management, smart pointers, and non-copyable classes. |
|
4 |
Libraries providing a parsing framework, covering grammars, primitives, directives, and other language features. |
|
6 |
Covers design patterns, empty member optimization, deterministic failure, callbacks, and non-copyable classes. |
|
3 |
Covers macro parameters, repetition, recursion, and macro data. |
|
6 |
Covers object wrappers for deferred calls or callbacks, deterministic failure, parameters, Python bindings, and error reporting. |
|
2 |
Covers high-performance, and arbitrarily complex finite state machines. |
|
16 |
Covers type conversion, string formatting, streams, localization, regular expressions, parsing, tokens, and string algorithms. |
|
11 |
Time utilities, context switching, handling libraries, threads, a smart file system, processes, backtraces, and errors. |
|
15 |
Libraries to support the development of higher-level libraries, with features such as callable traits, reflection, function types, tuples, higher-order functions, parsing, sequences, metafunctions, static assertions, introspection, properties, and expressions. |
|
15 |
Libraries for numerical type and text conversion, byte-ordering, logging, swapping, timing, initialization, and many other utilities. |
- Note
-
One library may appear in more than one category.
Summary
The purpose of the Boost libraries is to evangelize and support C++ development. You can take advantage of thousands of lines of high performance code.