CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
range_value.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 <iterator>
15#include <type_traits>
16
17namespace CeresEngine::traits {
18
21 template<class R, class = void> struct range_value {};
22
23 template<class R> struct range_value<R, std::enable_if_t<is_range_v<R>>> { using type = iter_value_t<iterator_t<R>>; };
24
26 template<class R> using range_value_t = typename range_value<R>::type;
27
28} // namespace CeresEngine::traits
Definition Partitioner.hpp:146
typename iter_value< T >::type iter_value_t
A C++17 type trait equivalent to the C++20 iter_value concept.
Definition iter_value.hpp:58
typename range_value< R >::type range_value_t
A C++17 type trait equivalent to the C++20 range_value concept.
Definition range_value.hpp:26
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 range_value concept.
Definition range_value.hpp:21