skip to content
 

Free peer-reviewed portable C++ libraries

Availability: 
Instructions for users: 

On Ubuntu this is available by default.

Licence Details: 

Boost licence which is an open source licence.

Documentation: 

Have a look in /usr/share/doc/libboost1.71-doc on 20.04 focal and /usr/share/doc/libboost1.65-doc on 18.04 bionic.

Admin notes: 

This comes as a package in SuSE 11.1 but has a dependency on SuSE's OpenMPI package, which we choose not to install because it hides our richer set of locally built MPIs. We therefore chose to install it on the NFS server. I also chose not to actually build any of it but just to supply headers. Apparently boost can be useful in that state. It has a module which sets CPATH and BOOST_ROOT.

A quick test, taken from the boost documentation:

#include <boost/lambda/lambda.hpp>
#include <iostream>
#include <iterator>
#include <algorithm>
int main() {
     using namespace boost::lambda;
     typedef std::istream_iterator<int> in;
     std::for_each(         in(std::cin), in(), std::cout << (_1 * 3) << " " );
}

To test this:

$ g++ -o boost boost.cpp
$ echo 1 2 3 | ./boost 3 6 9

The test is really whether it finds the headers OK at compile time.

On Ubuntu the packages are more split up and so we can get away with just installing libboost-math-dev and libboost-doc .

System status 

System monitoring page

Can't find what you're looking for?

Then you might find our A-Z site index useful. Or, you can search the site using the box at the top of the page, or by clicking here.