CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
is_forward_iterator.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
15
16#include <type_traits>
17
18namespace CeresEngine::traits {
19
22 template<class I, class = void> struct is_forward_iterator : std::false_type {};
23
24 template<class I>
27 // clang-format off
28 is_input_iterator_v<I> &&
29 is_derived_from_v<iter_concept_t<I>, std::forward_iterator_tag> &&
30 is_incrementable_v<I> &&
31 is_sentinel_for_v<I, I>
32 // clang-format on
33 >> : std::true_type {};
34
36 template<class I> bool constexpr is_forward_iterator_v = is_forward_iterator<I>::value;
37
39 template<class I>
41
42} // namespace CeresEngine::traits
Definition is_forward_iterator.hpp:40
Definition Partitioner.hpp:146
bool constexpr is_forward_iterator_v
A C++17 type trait equivalent to the C++20 forward_iterator concept.
Definition is_forward_iterator.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 forward_iterator concept.
Definition is_forward_iterator.hpp:22