CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
Pair.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
11
12#include <utility>
13
14namespace CeresEngine {
18 template<typename First, typename Second> using Pair = std::pair<First, Second>;
19} // namespace CeresEngine
20
21template<typename First, typename Second> struct std::hash<CeresEngine::Pair<First, Second>> {
23 inline size_t operator()(const Type& object) const noexcept { return CeresEngine::hash(object.first, object.second); }
24};
Definition Application.hpp:19
std::pair< First, Second > Pair
Pair is a struct template that provides a way to store two heterogeneous objects as a single unit.
Definition Pair.hpp:18
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25