{
    T operator()(const T& x, const T& y)
    {
        return x * y;
    }
};

template<typename T>
requires(MultiplicativeSemigroup(T))
struct input_type< multiplies<T>, 0 >
{
    typedef T type;
};

template<typename T0, typename T1>
requires(Regular(T0) && Regular(T1))
struct pair
{
    T0 m0;
    T1 m1;
    pair() {} // default constructor
    pair(const T0& m0, const T1& m1) : m0(m0), m1(m1) { }
};

template<typename T0, typename T1>
requires(Regular(T0) && Regular(T1))
bool operator==(const pair<T0, T1>& x, const pair<T0, T1>& y)
{
    return x.m0 == y.m0 && x.m1 == y.m1;
}
Esempio n. 2
0
int IsLarger(BinaryOperator B1, BinaryOperator B2) //b1_outside
{
	int result_b2 = static_cast<int>(B2);
	int result_b1 = static_cast<int>(B1);
	return Regular(result_b2) - Regular(result_b1);
}