CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
is_weakly_decrementable.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
19 template<class I, class = void> struct is_weakly_decrementable : std::false_type {};
20
21 template<class I>
23 std::void_t<
24 // clang-format off
25 decltype(std::declval<I>()--),
26 decltype(--std::declval<I>()),
27 iter_difference_t<I>
28 // clang-format on
29 >>
30 : std::conjunction<
31 // clang-format off
32 is_movable<I>,
33 std::is_same<decltype(--std::declval<I>()), I&>
34 // clang-format on
35 > {};
36
39
41 template<class I>
43
44} // namespace CeresEngine::traits
Definition is_weakly_decrementable.hpp:42
Definition Partitioner.hpp:146
bool constexpr is_weakly_decrementable_v
A C++17 type trait equivalent to the C++20 weakly_decrementable concept.
Definition is_weakly_decrementable.hpp:38
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_decrementable concept.
Definition is_weakly_decrementable.hpp:19