--- At Mon, 3 Feb 2003 17:37:19 -0800, Duane Murphy wrote:
I'm trying to build a member function iterator adaptor. (Maybe there already is one and I'm not finding it?) This would be an iterator adaptor where the adaptor returns the result of calling a member function of the base iterator.
I think this is a pretty straightforward iterator adaptor. What I am missing is the ability to work out the value_type of the iterator. This would be the return type of the member function being used.
I thought I could use boost::call_traits< MemberFunction >::value_type, but that returns the entire type of the member function. I think call_traits<> is not what I am looking for.
Pointers or suggests would be greatly welcomed.
Naturally one has to ask the question before one can find the answer. No iterator adaptor is needed. Use transform_iterator_adaptor with mem_fn(). Much easier. ...Duane