Added range concepts

This commit is contained in:
matthias@arch 2022-11-05 20:45:35 +01:00
parent 57f1af36aa
commit 82385541a9

View File

@ -14,6 +14,16 @@ namespace gz::util {
/// Forward range holding integers
template<typename 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>;
}
/**