
3 Feb
2009
3 Feb
'09
12:08 p.m.
Nigel Stewart wrote:
In addition to the specialised adaptors in the boost iterator library, does it make any sense to add:
static_cast_iterator const_cast_iterator dynamic_cast_iterator
...iterator adaptors providing embedded static_cast<>, const_cast<> or dynamic_cast<> when dereferencing? (Rather than just throwing them straight on the scrap heap...)
Personally, I've had much use of a custom made match<Type>() adaptor (using the Boost.RangeEx pipe syntax), that performs a transform with dynamic_pointer_cast and then filters null results.