CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
is_equality_comparable.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
10#include <type_traits>
11
12namespace CeresEngine::traits {
13
16 template<class T, class = void> struct is_equality_comparable : std::false_type {};
17
18 template<class T>
20 std::void_t<
21 // clang-format off
22 decltype(std::declval<const std::remove_reference_t<T>&>() == std::declval<const std::remove_reference_t<T>&>()),
23 decltype(std::declval<const std::remove_reference_t<T>&>() != std::declval<const std::remove_reference_t<T>&>())
24 // clang-format on
25 >> : std::true_type {};
26
29
31 template<class T>
33
34} // namespace CeresEngine::traits
Definition is_equality_comparable.hpp:32
Definition Partitioner.hpp:146
bool constexpr is_equality_comparable_v
A C++17 type trait equivalent to the C++20 equality_comparable concept.
Definition is_equality_comparable.hpp:28
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Definition Span.hpp:668
A C++17 type trait equivalent to the C++20 equality_comparable concept.
Definition is_equality_comparable.hpp:16