
Zach Laine wrote:
In this case, something like the expression_tag<> scheme Peter recommended helps with this particular ambiguity:
template
auto operator()(expression_tag<Tag>, T &&... t)
What I suggested was rather
template
{ // and it also seems to help with writing targeted transforms in C++17: if (yap::to_kind<Tag>() == yap::expr_kind::terminal) {
Resp.
if (Kind == yap::expr_kind::terminal) {
There's an argument to be made in favor of making Expression take a Tag
first parameter instead of the non-type Kind (`template