Visual Computing Library
Loading...
Searching...
No Matches
vcl::OutputRange Concept Reference

Utility concept that is evaluated true the Range R is an Output Range and has a value_type that is T. More...

#include <vclib/concepts/ranges/range.h>

Concept definition

template<typename R, typename T>
concept vcl::OutputRange = Range<R> && std::ranges::output_range<R, T> &&
std::same_as<std::ranges::range_value_t<R>, T>
Utility concept that is evaluated true the Range R is an Output Range and has a value_type that is T.
Definition range.h:113
Utility concept that is evaluated true if T is a range, e.g. if has a begin and an end.
Definition range.h:39

Detailed Description

Utility concept that is evaluated true the Range R is an Output Range and has a value_type that is T.

This concept is useful when you need to check that a range has a value_type that is exactly T, and it can be modified. When this concept is satisfied the following code will always compile:

for (T& value : range) {
// do something with value
...
}
Template Parameters
RThe range type.
TThe value type.