CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
SegmentedVector.hpp
Go to the documentation of this file.
1#pragma once
2
5
6#include <sfl/segmented_vector.hpp>
7
8namespace CeresEngine {
9
30 template<typename T, std::size_t N, typename RawAllocator = DefaultAllocator>
31 using SegmentedVector = sfl::segmented_vector<T, N, StdAllocator<T, RawAllocator>>;
32
33} // namespace CeresEngine
34
35template<typename T, size_t N, class RawAllocator> struct std::hash<CeresEngine::SegmentedVector<T, N, RawAllocator>> {
37 constexpr size_t operator()(const Type& obj) const {
38 size_t seed = 0;
39 for(const T& value : obj) {
40 CeresEngine::combine(seed, value);
41 }
42 return seed;
43 }
44};
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::segmented_vector< T, N, StdAllocator< T, RawAllocator > > SegmentedVector
SegmentedVector is a sequence container similar to Vector but with the different storage model.
Definition SegmentedVector.hpp:31