On 6/5/2010 6:21 AM, alfC wrote:
On May 31, 3:07 am, Joel de Guzman
wrote: First, I'll start with a phoenix function taking in a higher order phoenix function: _1+1. boost::function
f = divdoub(_1, lambda[_1+1.0]); Hi Joel DG., Eric N. and Steven W., thank you so much for your help after all these posts I can call my little experiment a success,
Great! <snip>
let me explain what it does (in can be a nice case study for Boost.Phoenix3), 1) it takes a phoenix expression [e.g. _1/(_1-3.*si::hertz)], and singles out the denominator which has a singularity at 3.*si::hertz this qawc function stores the numerator and the singular point, it does that by a sort of pattern matching in the function argument: <snip>
To repeat: in Phoenix 3, this will be easier. Rather that writing your own custom pattern matching meta-program, you'll be able to use Proto grammars to find patterns in Phoenix expressions, and you'll use Proto transforms to modify the expressions however you want. -- Eric Niebler BoostPro Computing http://www.boostpro.com