@@ -29,6 +29,7 @@ class Expression : public Tree {
2929 virtual bool isConstant () = 0;
3030 virtual ExpI type () = 0;
3131 virtual ExpT apply () = 0;
32+ virtual ~Expression () {}
3233protected:
3334 template <typename T>
3435 inline static const std::unordered_map<Operator,std::function<BoolT(T,T)>> Rel_ops{
@@ -42,22 +43,22 @@ class Expression : public Tree {
4243 inline static const std::unordered_map<Operator,std::function<BoolT(BoolT,BoolT)>> BoolT_ops{
4344 { Operator::OR, [](IntT a, IntT b){ return a | b; } },
4445 { Operator::AND, [](IntT a, IntT b){ return a & b; } },
45- { Operator::NOT, [](IntT a, IntT b){ return ~a; } }
46+ { Operator::NOT, [](IntT a, [[maybe_unused]] IntT b){ return ~a; } }
4647 };
4748 inline static const std::unordered_map<Operator,std::function<IntT(IntT,IntT)>> IntT_ops{
4849 { Operator::plus, [](IntT a, IntT b){ return a + b; } },
4950 { Operator::minus, [](IntT a, IntT b){ return a - b; } },
5051 { Operator::multiply, [](IntT a, IntT b){ return a * b; } },
5152 { Operator::DIV, [](IntT a, IntT b){ return a / b; } },
5253 { Operator::MOD, [](IntT a, IntT b){ return a % b; } },
53- { Operator::negative, [](IntT a, IntT b){ return -a; } }
54+ { Operator::negative, [](IntT a, [[maybe_unused]] IntT b){ return -a; } }
5455 };
5556 inline static const std::unordered_map<Operator,std::function<RealT(RealT,RealT)>> RealT_ops{
5657 { Operator::plus, [](RealT a, RealT b){ return a + b; } },
5758 { Operator::minus, [](RealT a, RealT b){ return a - b; } },
5859 { Operator::multiply, [](RealT a, RealT b){ return a * b; } },
5960 { Operator::divide, [](RealT a, RealT b){ return a / b; } },
60- { Operator::negative, [](RealT a, RealT b){ return -a; } }
61+ { Operator::negative, [](RealT a, [[maybe_unused]] RealT b){ return -a; } }
6162 };
6263 inline static const std::unordered_map<Operator,std::function<StringT(StringT,StringT)>> StringT_ops{
6364 { Operator::plus, [](StringT a, StringT b){ return static_cast <StringT>(a.append (b)); } }
@@ -179,7 +180,7 @@ class Variable : public Expression {
179180 ExpI tp;
180181public:
181182 Variable (ExpI t, std::string_view l)
182- : tp{ t }, label{ l } {}
183+ : label{ l }, tp{ t } {}
183184 virtual bool isConstant () override {
184185 return false ;
185186 }
0 commit comments