Molassembler  1.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
AddToContainer.h File Reference

Central interface to add elements to many types of containers. More...

Include dependency graph for AddToContainer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Scine
 
 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...
 

Detailed Description

Central interface to add elements to many types of containers.

  • insert
  • emplace
  • push_back
  • emplace_back