Using Boost#
A Boost library may be used only if:
the desired effect cannot be accomplished with a C++17 standard language feature,
a C++ standard library equivalent is either unavailable or unusable with minimum required compiler version for a certain C++ project, and
there is no 3rd-party equivalent that is much better comparing with a chosen Boost library.
In particular, the following Boost libraries are no longer accepted as they have standard equivalents in gcc 10.2.1 and above:
anyuse
<any>arrayuse
<array>bindprefer C++14 lambda functions instead, but use
std::bindfrom<functional>if you mustcstdintuse
<cstdint>filesystemuse
<filesystem>formatuse fmtlib/fmt library
lambdause C++14 lambda functions
lexical_castuse
std::to_string,std::stoi,std::stodetc.mathuse
<cmath>wherever possiblenoncopyableuse
= deleteon the copy constructor and assignment operatorpythonuse pybind11 library
randomuse
<random>refuse
std::forwardand universal / forwarding references (orstd::refif you must)smart_ptruse
std::shared_ptrandstd::unique_ptr(and its array specialization) from<memory>instead ofboost::shared_ptr,boost::scoped_ptrandboost::scoped_arraystatic_assertuse C++14
static_asserttupleuse
<tuple>type_traitsuse
<type_traits>unordered_mapuse
<unordered_map>variantuse
<variant>
Certain Boost libraries are recommended: they should be used whenever applicable in preference to any other method of accomplishing the same effect. Among others, this category includes:
current_functionregextestthrow_exception
Most other Boost libraries may be used after appropriate design review. Particular caution should be used when the library involves substantial template metaprogramming or requires linking. Among others, the following libraries fall into the extra-caution category:
FusionHanaMPL
Certain Boost libraries conflict with our standard ways of doing things, are inappropriate for our source code, are insufficiently developed or well-maintained, or have been found to be excessively complicated. These are not allowed without special permission.
configserialization