
On 03/13/09 22:02, Larry Evans wrote: [snip]
Has a test showing apply<op,_1,deref<_2> > fails and, in addition to the lambda<op>::type::apply<_1,deref<_2> > solution, shows another solution which involves changing the apply template to *not* inherit from apply_wrap. Any ideas about which solution is better?
OOPS. The 2nd solution of redefining apply to contain nested typedef apply_wrap<,,> type; instead of inheriting apply_wrap would obviously break existing code. However, to get something similar to the apply<op,_1,deref<_2> > in: http://www.boost.org/doc/libs/1_38_0/libs/mpl/doc/refmanual/fold.html to work, maybe using eval_apply (defined as the app2ok in the vault) would work? Then instead of: apply<op,_1,deref<_2> > use: eval_apply<op,_1,deref<_2> >::type as shown in the vault code. The name eval_apply is modeled after eval_if. Am I missing something or should I file a trac ticket on this? Note, the ticket woul only say there's a bug in fold.html. It would say nothing about bugs in fold.hpp.