The problem is not boost specific, but probably there is a boost specific solution to it... The usual way of passing and returning elements to/from a function/method is to use a templated function/method, e.g.: template< typename ITER_IN, typename ITER_OUT
void doSomething(
ITER_IN inBegin,
ITER_IN inEnd,
ITER_OUT outIter,
int param1, int param2, ...
) {
while(inBegin != inEnd) {
...
*outIter++ = ...;
}
}
But what to do in case of (pure) virtual methods which can't be templated?
One (neither pretty nor efficient) solution would be something like this:
struct A {
template