Using BoostΒΆ
Certain Boost libraries are recommended; they should be used whenever applicable in preference to any other method of accomplishing the same effect. In general, any library that is tagged with “Standard .... {something}” in the Boost library listing falls into this category, unless the feature is already supported by the currently-mandated LSST g++
version.
Among others, this category includes:
current_function
format
regex
(until we adoptgcc
4.9 as our minimum compiler version, at which point usestd::regex
)test
Libraries that were accepted before we switched to C++11 (in particular made gcc
4.8 our minimum supported compiler), but have been or are being replaced by std::
equivalents include:
array
: usestd::array
from<array>
cstdint
: use<cstdint>
filesystem
: use<filesystem>
noncopyable
: use= delete
on the copy constructor and assignment operatorsmart_ptr
: usestd::shared_ptr
andstd::unique_ptr
from<memory>
instead ofboost::shared_ptr
andboost::scoped_ptr
static_assert
: usestatic_assert
type_traits
: use<type_traits>
unordered_map
: usestd::unordered_map
from<unordered_map>
Additional Boost libraries are considered safe; they may be used freely where applicable.
any
GIL
iterator
MPI
multi_index
numeric
tokenizer
variant
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 (is not listed on the above page as “Build & Link .... Header-only”). Among others, the following libraries fall into the extra-caution category:
Fusion
MPL
serialization
Certain Boost libraries conflict with LSST-standard ways of doing things, are inappropriate for LSST code, are insufficiently developed or well-maintained, or have been found to be excessively complicated. These are not allowed without special permission.
config
preprocessor
python
throw_exception