CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CompactVector.hpp
Go to the documentation of this file.
1#pragma once
2
5
6#include <sfl/compact_vector.hpp>
7
8namespace CeresEngine {
9
17 template<typename T, typename RawAllocator = DefaultAllocator> using CompactVector = sfl::compact_vector<T, StdAllocator<T, RawAllocator>>;
18
19} // namespace CeresEngine
20
21template<typename T, class RawAllocator> struct std::hash<CeresEngine::CompactVector<T, RawAllocator>> {
23 constexpr size_t operator()(const Type& obj) const {
24 size_t seed = 0;
25 for(const T& value : obj) {
26 CeresEngine::combine(seed, value);
27 }
28 return seed;
29 }
30};
Definition Application.hpp:19
constexpr void combine(std::size_t &seed, const T &v)
Generates a new hash for the provided type using the default standard hasher and combines it with a p...
Definition Hash.hpp:32
sfl::compact_vector< T, StdAllocator< T, RawAllocator > > CompactVector
CompactVector is a sequence container similar to Vector.
Definition CompactVector.hpp:17