Is there some way to find out whether a type can be iterated? I'm looking
for something like `isiterator(IterType)`, that would return `false` from a
default implementation and which any type that actually supports the
standard iterator interface would return `true`.

 

If we had that, we could actually define a SimpleTrait ``IsIterator`` and
use method dispatch to have methods that operate on iterators, which would
be really powerful.

 

Cheers,

David

Reply via email to