19 #ifndef UNOP_BINOP_FUNCS
20 #define UNOP_BINOP_FUNCS
23 #include "valuevar.hpp"
29 constexpr
double pow(
double d1,
double d2) {
return std::isnan(d2) ? d2 : std::pow(d1, d2); }
32 struct power :
public binary_function<T, T, T> {
33 constexpr T operator()(
const T& x,
const T& y)
const {
return pow(x, y); }
39 constexpr
bool operator()(
const T& x,
const T& y)
const {
return !(x == y); }
42 val::Value evalunop(val::Value v,
int op);
43 val::Value evalbinop(val::Value v1,
const val::Value& v2,
int op,
const val::Value& attrib);