-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Labels
Description
static_truth_table and dynamic_truth_table do not implement operator== and operator!=, so code like tt1 == tt2 does not work. It seems you still can compare truth tables with something like the following (untested) code:
bool eq = true;
for (auto it = tt1.begin(), it2 = tt2.begin(); ; ++it, ++it2) {
if (it == tt1.end()) {
eq &= it2 == tt2.end();
break;
} else if (it2 == tt2.end()) {
eq = false;
break;
}
eq &= *it == *it2;
}Is it possible to implement operator== and operator!= on these classes to avoid having to do this? It should be possible to do some template-based specialization to optimize these too.
OTOH perhaps I've misunderstood something and equality comparison makes no sense on these classes. In which case, I would be interested to learn of this too.