CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
is_derived_from.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
13
14#include <type_traits>
15
16namespace CeresEngine::traits {
17
19 template<class Derived, class Base>
20 struct is_derived_from : std::conjunction<std::is_base_of<Base, Derived>, std::is_convertible<const volatile Derived*, const volatile Base*>> {};
21
23 template<class Derived, class Base> bool constexpr is_derived_from_v = is_derived_from<Derived, Base>::value;
24
26 template<class Derived, class Base>
28
29} // namespace CeresEngine::traits
Definition is_derived_from.hpp:27
Definition Partitioner.hpp:146
bool constexpr is_derived_from_v
A C++17 type trait equivalent to the C++20 derived_from concept.
Definition is_derived_from.hpp:23
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
A C++17 type trait equivalent to the C++20 derived_from concept.
Definition is_derived_from.hpp:20