chromium / subspace

A concept-centered standard library for C++20, enabling safer and more reliable products and a more modern feel for C++ code.; Also home of Subdoc the code-documentation generator.
https://suslib.cc
Apache License 2.0
89 stars 15 forks source link

DynIterator type erasure #422

Open danakj opened 10 months ago

danakj commented 10 months ago

Allow a fn to receive an iterator without being templated by receiving a DynIterator<Thing> which dispatches through virtual or otherwise (Stack or Heap erasure like for DynFn and friends).

This seems a bit less straightforward because iterators all inherit IteratorBase, but maybe that's neither here nor there.