Concept Subspace :: sus :: iter :: FromIterator
template <class ToType, class ItemType>concept FromIterator
requires
requires(
__private::IntoIteratorArchetype<ItemType>&& from) {
{
FromIteratorImpl<std::remove_const_t<ToType>>::from_iter(::sus::move(from))
} -> std::same_as<std::remove_const_t<ToType>>;
}
A concept that indicates ToType
can be constructed from an Iterator
, via
sus::iter::from_iter<ToType>(Iterator<IterType>)
.
Any type that matches this concept can be constructed from
Iterator::collect()
.
The from_iter()
is less often called, as the collect()
method provides
the preferred way to construct from an iterator. But in generic template
code especially, the from_iter()
can be more clear.