Container Utils

vtr_hash

namespace vtr

Functions

template<class T>
inline void hash_combine(std::size_t &seed, const T &v)

Hashes v and combines it with seed (as in boost)

This is typically used to implement std::hash for composite types.

struct hash_pair
#include <vtr_hash.h>

Public Functions

template<class T1, class T2>
inline std::size_t operator()(const std::pair<T1, T2> &pair) const noexcept

vtr_memory

namespace vtr

Functions

template<typename Container>
void release_memory(Container &container)

This function will force the container to be cleared.

It releases its held memory. For efficiency, STL containers usually don’t release their actual heap-allocated memory until destruction (even if Container::clear() is called).