Free peer-reviewed portable C++ libraries
On Ubuntu this is available by default.
Boost licence which is an open source licence.
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.
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 .