
On 25/02/2011 13:31, Mathias Gaunard wrote:
Phoenix doesn't really help with things like
phoenix::if_(1)[some_expr_in_my_own_domain]
To be more explicit, phoenix::if_(a) [ b = c + d ](); fails to compile if a, b, c and d are all Proto terminals of a placeholder type (i.e. a type that doesn't itself have an operator+ and is not convertible to bool), because it tries to evaluate "a" and "b = c + d" with the default transform. It would be nice if it had the same effect as if(evaluate<domain_of<decltype(a)>::type>(a)) { evaluate<domain_of<decltype(b = c + d)>::type>(b = c + d); } i.e. whenever Phoenix encounters an expression not within the Phoenix domain, I would like if it called an evaluation function specific to that domain.