18 Aug
2010
18 Aug
'10
3:23 p.m.
AMDG Rob Platt wrote:
I can successfully instantiate this with, for example, vector_c
. But when I do iterator arithmetic (e.g. prior, next or begin) I run into trouble: struct fails { typedef typename reverse_iter_fold< T, vector_c<long>, push_front<_1, deref< next<_2> > > >::type type; };
-- error messages about arg 3 - I suspect that prior is being applied to the placeholder arg type itself, not to the iterator. I'm wondering if I should be using lambda/apply, but I've tried that without success. What's a would-be template metaprogrammer to do?
After I included all the right headers, it compiled for me. The only problem is that you're dereferencing past the end of the sequence. In Christ, Steven Watanabe