Contribute To Boost


I found a Boost memory pool bug and got a chance to contribute to Boost C++ library. However, because there is probably no technical contribution guidance, it was less clear to me on how to create pull requests to Boost C++ library.

In this blog post, I would like to document my experience of contributing code to Boost C++ library.

Contribute to Boost C++ Library

It turns out that although the Boost C++ library release consists of multiple different modules, the code managements for different modules are independent from each other and each module has an independent GitHub repository. But when it comes to unit testing, a full Boost C++ library is required, as some unit tests will have to use the other Boost modules.

Personal Boost Contribution Guideline

Given all these complexity and a lack of contribution guidance, this is what I figured out for how to contribute to Boost, which might still be a little bit awkward though.

  1. Download the latest Boost library from the Boost website or the Boost GitHub repository.
  2. Make changes to the modules from the Boost library directory.
  3. Run unit test from the Boost library directory.
  4. Copy the changes or files to the Boost module repository.
  5. Create pull requests.

Personal Boost Unit Test Guideline

There is also a lack of guidance on how to run unit tests. This is what I figured out, even though there could be better ways.

  1. Build b2 at the Boost root directory by running ./ --prefix=/usr/local.
  2. Run unit tests at the Boost root directory by running ./b2 libs/boost_module/test/ where boost_module is a Boost module, such as pool.


In my opinion, instead of having a monorepo of having all the modules, separating different modules into individual GitHub repositories makes contributions and bug fixes less straightforward.



Lei Mao

Posted on


Updated on


Licensed under