
On 03/01/2005 08:25 AM, David Abrahams wrote: [snip]
template<typename Sequence, typename Start, typename ForwardOp> struct end<fold<Sequence,Start,ForwardOp>::type> { ... };
which is doomed to fail (AFAICT) because of the non-deduced context.
Or am I missing something again?
Forget about fold. It's just a metafunction that _you_ happen to be using to build the eventual sequence type. The fold algorithm has nothing to do with building sequences, intrinsically, just as std::accumulate (its analogue) has nothing to do with any particular job. You need to focus on the class of types that gets built by your code and stop looking at fold.
The code in vault under cppljevans/mpl/fold_sequence4.zip works for gcc, and the intel problem is due to an intel bug AFAICT. This bug has been reported to intel as issue 287414. The workaround is just to define: template<class Left,class Right> void print_integral_c::operator()(my_node<Left,Right>)const {...}