Boost logo

Boost Users :

Subject: Re: [Boost-users] [Phoenix] Simple if_ issue
From: Nathan Crookston (nathan.crookston_at_[hidden])
Date: 2012-07-02 15:05:06


On Mon, Jul 2, 2012 at 12:51 PM, <Aaron_Wright_at_[hidden]> wrote:
<snip code>
> What do I need to do in the second test to get it to compile? Can I tell
> if_ that its return type is not void?

Sadly no -- this was a point of confusion for me too. The correct way
to do this is with if_else
<http://www.boost.org/doc/libs/1_50_0/libs/spirit/phoenix/doc/html/phoenix/composite.html#phoenix.composite.statement.if__else___statement>.

HTH,
Nate


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net