CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
is_default_initializable.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 <type_traits>
13
14namespace CeresEngine::traits {
15
18 template<class T, class = void> struct is_default_initializable : std::false_type {};
19
20 template<class T>
22 std::void_t<
23 // clang-format off
24 std::enable_if_t<is_constructible_from_v<T>>,
25 decltype(T{})
26 // clang-format on
27 >> : std::true_type {};
28
31
33 template<class T>
35
36} // namespace CeresEngine::traits
Definition is_default_initializable.hpp:34
Definition Partitioner.hpp:146
bool constexpr is_default_initializable_v
A C++17 type trait equivalent to the C++20 default_initializable concept.
Definition is_default_initializable.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 default_initializable concept.
Definition is_default_initializable.hpp:18