Added range concepts
This commit is contained in:
parent
57f1af36aa
commit
82385541a9
@ -14,6 +14,16 @@ namespace gz::util {
|
|||||||
/// Forward range holding integers
|
/// Forward range holding integers
|
||||||
template<typename T>
|
template<typename T>
|
||||||
concept IntegralForwardRange = std::ranges::forward_range<T> and std::integral<std::ranges::range_value_t<T>>;
|
concept IntegralForwardRange = std::ranges::forward_range<T> and std::integral<std::ranges::range_value_t<T>>;
|
||||||
|
|
||||||
|
/// Forward range holding ValueType
|
||||||
|
template<typename T, typename ValueType>
|
||||||
|
concept ForwardRange = std::ranges::forward_range<T> and std::same_as<std::ranges::range_value_t<T>, ValueType>;
|
||||||
|
|
||||||
|
/// Contiguous range holding ValueType
|
||||||
|
template<typename T, typename ValueType>
|
||||||
|
concept ContiguousRange = std::ranges::contiguous_range<T> and std::same_as<std::ranges::range_value_t<T>, ValueType>;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user