Central interface to add elements to many types of containers. More...
Go to the source code of this file.
Namespaces | |
Scine::Molassembler | |
Central library namespace. | |
Scine::Molassembler::Temple | |
Template shorthands, optimizers and constexpr data types. | |
Functions | |
template<class Container , typename T > | |
void | Scine::Molassembler::Temple::addToContainer (Container &container, const T &value) |
Adds an lvalue element to a container by calling the container's insert or push_back member functions, if one of either exists. | |
template<class Container , typename T > | |
void | Scine::Molassembler::Temple::addToContainer (Container &container, T &&value) |
Adds an rvalue to a container by calling the container's emplace or emplace_back member functions, if one of either exists. | |
template<class TargetContainer , class SourceContainer , class SizeModifierUnary = Functor::Identity> | |
void | Scine::Molassembler::Temple::reserveIfPossible (TargetContainer &target, const SourceContainer &source, SizeModifierUnary &&sourceModifierUnary=SizeModifierUnary{}) |
Rerves the space required in the target container if size can be determined from the source container. More... | |
Central interface to add elements to many types of containers.