Enumerate all elements in iterators recursively. More...
Go to the source code of this file.
Namespaces | |
| namespace | bbm |
Functions | |
| template<typename VALUE , typename T , typename CALLBACK > requires (std::convertible_to<T&, VALUE> && std::invocable<CALLBACK, VALUE>) | |
| void | enumerate (T &&value, CALLBACK &&callback) |
| Convertible to VALUE => callback. | |
| template<typename VALUE , typename T , typename CALLBACK > requires (std::ranges::range<T> && !std::convertible_to<T&, VALUE> && std::invocable<CALLBACK, VALUE>) | |
| void | enumerate (T &&obj, CALLBACK &&callback) |
| iterable object => enumerate(begin(), ..., end()) | |
is_enumerable | |
| template<typename VALUE , typename T > | |
| using | is_enumerable = bbm::detail::is_enumerable_impl< VALUE, T > |
| template<typename VALUE , typename T > | |
| constexpr bool | is_enumerable_v = is_enumerable<VALUE,T>::value |
Enumerate all elements in iterators recursively.
Enumerate all elements of in an iterable type recursively until the element can be cast to a given VALUE type. The value is than passed into a provided callback function:
will enumerate all elements in data, and push them onto 'some_vector'.