dyn: use valueset/value
It seems now stupid to have named the members of the wrappers with different names depending on the nature of the values. For instance for dyn::expression
we have expressionset()
and expression()
, while for dyn::expansion
we have expansionset()
and expansion()
.
As a result we have:
/// Bridge (complement).
template <typename ExpansionSet>
expansion
complement_expansion(const expansion& xpn)
{
const auto& x = xpn->as<ExpansionSet>();
return make_expansion(x.expansionset(),
x.expansionset().complement(x.expansion()));
}
/// Bridge (complement).
template <typename ExpSet>
expression
complement_expression(const expression& exp)
{
const auto& e = exp->as<ExpSet>();
return make_expression(e.expressionset(),
e.expressionset().complement(e.expression()));
}
although we could have only a single bridge implementation. Well, not quite: make_expression
vs. make_expansion
.
Note that currently we rely on these /// Bridge
lines to capture the possible registries types, so more work will be needed elsewhere to signal that a common ValueSet/Value bridge would work for dyn::expression
and dyn::expressionset
.