-/* I'd rather have overloads with different slots, but that creates an
-ambiguity because slots have template constructors. */
-BooleanEvaluator::BooleanEvaluator(const Slot &s, bool allow_compare):
- slot(s),
- ops(allow_compare ? "&|!=^" : "&|!")
+BooleanEvaluator::BooleanEvaluator(const ValueFunction &f):
+ func([f](const string &value, const string *){ return f(value); }),
+ ops("&|!")
+{ }
+
+BooleanEvaluator::BooleanEvaluator(const CompareFunction &f):
+ func(f),
+ ops("&|!=^")