CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
is_incrementable.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
12
13#include <type_traits>
14
15namespace CeresEngine::traits {
16
18 template<class I, class = void> struct is_incrementable : std::false_type {};
19
20 template<class I>
21 struct is_incrementable<I,
22 std::void_t<
23 // clang-format off
24 decltype(std::declval<I>()++)
25 // clang-format on
26 >>
27 : std::conjunction<
28 // clang-format off
29 is_regular<I>,
30 is_weakly_incrementable<I>,
31 std::is_same<decltype(std::declval<I>()++), I>
32 // clang-format on
33 > {};
34
36 template<class I> bool constexpr is_incrementable_v = is_incrementable<I>::value;
37
39 template<class I>
41
42} // namespace CeresEngine::traits
Definition is_incrementable.hpp:40
Definition Partitioner.hpp:146
bool constexpr is_incrementable_v
A C++17 type trait equivalent to the C++20 incrementable concept.
Definition is_incrementable.hpp:36
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 incrementable concept.
Definition is_incrementable.hpp:18