| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- /*
- * Copyright (c) 2012-2023 Daniele Bartolini et al.
- * SPDX-License-Identifier: MIT
- */
- #pragma once
- #include "core/types.h"
- namespace crown
- {
- template<typename T>
- struct equal_to
- {
- bool operator()(const T &a, const T &b) const;
- };
- template<typename T>
- struct not_equal_to
- {
- bool operator()(const T &a, const T &b) const;
- };
- template<typename T>
- struct greater
- {
- bool operator()(const T &a, const T &b) const;
- };
- template<typename T>
- struct less
- {
- bool operator()(const T &a, const T &b) const;
- };
- template<typename T>
- struct greater_equal
- {
- bool operator()(const T &a, const T &b) const;
- };
- template<typename T>
- struct less_equal
- {
- bool operator()(const T &a, const T &b) const;
- };
- template<typename T>
- struct hash;
- template<>
- struct hash<bool>
- {
- u32 operator()(const bool val) const;
- };
- template<>
- struct hash<s8>
- {
- u32 operator()(const s8 val) const;
- };
- template<>
- struct hash<u8>
- {
- u32 operator()(const u8 val) const;
- };
- template<>
- struct hash<s16>
- {
- u32 operator()(const s16 val) const;
- };
- template<>
- struct hash<u16>
- {
- u32 operator()(const u16 val) const;
- };
- template<>
- struct hash<s32>
- {
- u32 operator()(const s32 val) const;
- };
- template<>
- struct hash<u32>
- {
- u32 operator()(const u32 val) const;
- };
- template<>
- struct hash<s64>
- {
- u32 operator()(const s64 val) const;
- };
- template<>
- struct hash<u64>
- {
- u32 operator()(const u64 val) const;
- };
- template<>
- struct hash<f32>
- {
- u32 operator()(const f32 val) const;
- };
- template<>
- struct hash<f64>
- {
- u32 operator()(const f64 val) const;
- };
- template<typename T>
- struct hash<T *>
- {
- u32 operator()(const T *val) const;
- };
- } // namespace crown
|