Skip to content

Commit

Permalink
fix: mingw pipeline
Browse files Browse the repository at this point in the history
Include std::optional in symbol_table.h. Apparently, mingw is the only pipeline that can't figure this out
  • Loading branch information
sillydan1 committed Sep 19, 2022
1 parent 859f8f3 commit de346ee
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
1 change: 1 addition & 0 deletions include/symbol_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <tree>
#include <hashcombine>
#include <overload>
#include <optional>
#include "clock.h"

namespace expr {
Expand Down
6 changes: 0 additions & 6 deletions src/operations/boolean.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,11 @@ symbol_value_t and_(const symbol_value_t& a, const symbol_value_t& b) {
FUNC_IMPL(a, t_and, b, res);
return res;
}
symbol_value_t operator&&(const symbol_value_t& a, const symbol_value_t& b) {
return and_(a,b);
}
symbol_value_t or_(const symbol_value_t& a, const symbol_value_t& b) {
symbol_value_t res{};
FUNC_IMPL(a, t_or, b, res);
return res;
}
symbol_value_t operator||(const symbol_value_t& a, const symbol_value_t& b) {
return and_(a,b);
}
symbol_value_t xor_(const symbol_value_t& a, const symbol_value_t& b) {
symbol_value_t res{};
FUNC_IMPL(a, t_xor, b, res);
Expand Down
27 changes: 14 additions & 13 deletions src/operations/boolean.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,27 @@
#ifndef EXPR_BOOLEAN_H
#define EXPR_BOOLEAN_H
#include "symbol_table.h"
expr::symbol_value_t and_(const expr::symbol_value_t& a, const expr::symbol_value_t& b);
expr::symbol_value_t or_(const expr::symbol_value_t& a, const expr::symbol_value_t& b);
expr::symbol_value_t xor_(const expr::symbol_value_t& a, const expr::symbol_value_t& b);
expr::symbol_value_t not_(const expr::symbol_value_t& a);
expr::symbol_value_t gt_(const expr::symbol_value_t& a, const expr::symbol_value_t& b);
expr::symbol_value_t ge_(const expr::symbol_value_t& a, const expr::symbol_value_t& b);
expr::symbol_value_t ee_(const expr::symbol_value_t& a, const expr::symbol_value_t& b);
expr::symbol_value_t ne_(const expr::symbol_value_t& a, const expr::symbol_value_t& b);
expr::symbol_value_t le_(const expr::symbol_value_t& a, const expr::symbol_value_t& b);
expr::symbol_value_t lt_(const expr::symbol_value_t& a, const expr::symbol_value_t& b);
expr::symbol_value_t implies_(const expr::symbol_value_t& a, const expr::symbol_value_t& b);
auto and_(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto or_(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto xor_(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto not_(const expr::symbol_value_t& a) -> expr::symbol_value_t;
auto gt_(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto ge_(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto ee_(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto ne_(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto le_(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto lt_(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto implies_(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;

auto operator&&(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto operator||(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto operator>(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto operator>=(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto operator<(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto operator<=(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto operator==(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
auto operator!=(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
/// These operators are disabled because gcc are getting confused with them
//auto operator&&(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
//auto operator||(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
//auto operator^(const expr::symbol_value_t& a, const expr::symbol_value_t& b) -> expr::symbol_value_t;
//auto operator!(const expr::symbol_value_t& a) -> expr::symbol_value_t;
#endif //EXPR_BOOLEAN_H

0 comments on commit de346ee

Please sign in to comment.