dlinear  0.0.1
Delta-complete SMT solver for linear programming
Loading...
Searching...
No Matches
definitions.h
1
7#pragma once
8
20#define GENERIC_ARITHMETIC_OPERATOR_DECLARATION(lhs_type, op, rhs_type) lhs_type operator op(const rhs_type o);
31#define ARITHMETIC_OPERATOR_DECLARATION(type, op) GENERIC_ARITHMETIC_OPERATOR_DECLARATION(type, op, type)
45#define GENERIC_ARITHMETIC_OPERATORS_DECLARATION(lhs_type, rhs_type) \
46 GENERIC_ARITHMETIC_OPERATOR_DECLARATION(lhs_type, +=, rhs_type) \
47 GENERIC_ARITHMETIC_OPERATOR_DECLARATION(lhs_type, -=, rhs_type) \
48 GENERIC_ARITHMETIC_OPERATOR_DECLARATION(lhs_type, *=, rhs_type) \
49 GENERIC_ARITHMETIC_OPERATOR_DECLARATION(lhs_type, /=, rhs_type)
62#define ARITHMETIC_OPERATORS_DECLARATION(type) GENERIC_ARITHMETIC_OPERATORS_DECLARATION(type, type)
78#define GENERIC_ARITHMETIC_OPERATOR_DEFINITION(lhs_type, op, rhs_type) \
79 lhs_type operator op(const rhs_type o) const { \
80 lhs_type temp(*this); \
81 temp op## = o; \
82 return temp; \
83 }
98#define ARITHMETIC_OPERATOR_DEFINITION(type, op) GENERIC_ARITHMETIC_OPERATOR_DEFINITION(type, op, type &)
113#define GENERIC_ARITHMETIC_OPERATORS_DEFINITION(lhs_type, rhs_type) \
114 GENERIC_ARITHMETIC_OPERATOR_DEFINITION(lhs_type, +, rhs_type) \
115 GENERIC_ARITHMETIC_OPERATOR_DEFINITION(lhs_type, -, rhs_type) \
116 GENERIC_ARITHMETIC_OPERATOR_DEFINITION(lhs_type, *, rhs_type) \
117 GENERIC_ARITHMETIC_OPERATOR_DEFINITION(lhs_type, /, rhs_type)
131#define ARITHMETIC_OPERATORS_DEFINITION(type) GENERIC_ARITHMETIC_OPERATORS_DEFINITION(type, type &)
145#define GENERIC_ARITHMETIC_OPERATORS(lhs_type, rhs_type) \
146 GENERIC_ARITHMETIC_OPERATORS_DECLARATION(lhs_type &, rhs_type) \
147 GENERIC_ARITHMETIC_OPERATORS_DEFINITION(lhs_type, rhs_type)
161#define ARITHMETIC_OPERATORS(type) \
162 ARITHMETIC_OPERATORS_DECLARATION(type &) \
163 ARITHMETIC_OPERATORS_DEFINITION(type)