#include <pgs/pgs.hpp>
#include <gtest/gtest.h>
namespace {
struct E_const {
int i;
E_const (int i) : i (i) {}
};
struct E_add;
struct E_sub;
struct E_mul;
struct E_div;
E_const
>;
struct op {
xpr_t l, r;
template <class U, class V>
op (U&& l, V&& r) : l {std::forward<U> (l)}, r {std::forward<V> (r)}
{}
};
struct E_add : op {
template <class U, class V>
E_add (U&& l, V&& r) : op {std::forward<U> (l), std::forward<V> (r)}
{}
};
struct E_sub : op{
template <class U, class V>
E_sub (U&& l, V&& r) : op {std::forward<U> (l), std::forward<V> (r)}
{}
};
struct E_mul : op {
template <class U, class V>
E_mul (U&& l, V&& r) : op {std::forward<U> (l), std::forward<V> (r)}
{}
};
struct E_div : op {
template <class U, class V>
E_div (U&& l, V&& r) : op {std::forward<U> (l), std::forward<V> (r)}
{}
};
inline xpr_t cst (int i) {
}
template <class L, class R>
inline xpr_t add (L&& l, R&& r) {
}
template <class L, class R>
inline xpr_t sub (L&& l, R&& r) {
}
template <class L, class R>
inline xpr_t mul (L&& l, R&& r) {
}
template <class L, class R>
inline xpr_t
div (L&& l, R&& r) {
}
return os << e.i;
},
return os << e.l << "*" << e.r; }
,
return os << e.l << "/" << e.r;
},
return os << "(" << e.l << " + " << e.r << ")";
},
return os << "(" << e.l << " - " << e.r << ")";
}
);
}
}
xpr_t n = add (cst (2), cst (3));
xpr_t d = cst (5);
os << xpr;
}