Mathieu - wrote:
It bugged me for a while too ... the only fix I can come with is the same as yours joel :
struct equation: proto::or_ < addition ,proto::equal_to<addition, addition>
{};
But it's wrong, as in the grammar is right w/o it ... So I figured out it's a "bug" in proto? Or I'm missing the obvious too...
other "fix" (workaround): struct equation: proto::or_ < proto::terminal<proto::_>, proto::equal_to<addition, addition> > {}; I think the problem is, that proto's operator enable/disable facilities only "saw" the equal_to operator, but obviously no terminal type for it's right and left hand side. It looks to me as a bug in proto as well. because with my "fix" something like this: i == i + i didn't work anymore. So, it looks like proto's enable facilities do not look "deep enough" in the grammar. that is, it somehow misses the template arguments to equal_to.