CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
is_weakly_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 U, class = void> struct is_weakly_equality_comparable : std::false_type {};
17
18 template<class T, class U>
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<U>&>()),
23 decltype(std::declval<const std::remove_reference_t<T>&>() != std::declval<const std::remove_reference_t<U>&>()),
24 decltype(std::declval<const std::remove_reference_t<U>&>() == std::declval<const std::remove_reference_t<T>&>()),
25 decltype(std::declval<const std::remove_reference_t<U>&>() != std::declval<const std::remove_reference_t<T>&>())
26 // clang-format on
27 >> : std::true_type {};
28
31
33 template<class T, class U>
35
36} // namespace CeresEngine::traits
Definition is_weakly_equality_comparable.hpp:34
Definition Partitioner.hpp:146
bool constexpr is_weakly_equality_comparable_v
A C++17 type trait equivalent to the C++20 weakly_equality_comparable concept.
Definition is_weakly_equality_comparable.hpp:30
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 weakly_equality_comparable concept.
Definition is_weakly_equality_comparable.hpp:16