On Jan 16, 2017, at 10:32 AM, Zach Laine
wrote: Ok, I've added an index, explicit sections on evaluations and transformations, and a few other tweaks that you or others have suggested. Thanks for the feedback, Brook.
Great. Thank you for doing that. In the meantime, I have been playing a bit more with the library and would like to reiterate at least one point from my 2017-01-12 email. As far as I can tell, there is no reason to restrict capturing an expression into expression_wrapper<> by moving it. I made another version that copies and it works fine. I have used that with std::reference_wrapper and a special wrapper that I use to wrap rvalues (i.e., it moves those into either itself or onto the heap so that it preserve the reference semantics yet can be copied). Both worked perfectly, can be stored in std::function<>, etc. It would be nice to support the more general use case of an expression_function<> acting as a reference to another expression when constructed from an lvalue. Then it could be used anywhere as a proxy for evaluating any expression. That seems like a really useful feature. Cheers, Brook