Fixed comparison of Key with Symbol (had ambiguous overload)

release/4.3a0
Richard Roberts 2012-03-02 23:11:33 +00:00
parent 857e651032
commit 1f03052e0c
1 changed files with 6 additions and 0 deletions

View File

@ -113,9 +113,15 @@ public:
bool operator==(const Symbol& comp) const {
return comp.c_ == c_ && comp.j_ == j_;
}
bool operator==(Key comp) const {
return comp == (Key)(*this);
}
bool operator!=(const Symbol& comp) const {
return comp.c_ != c_ || comp.j_ != j_;
}
bool operator!=(Key comp) const {
return comp != (Key)(*this);
}
/** Return a filter function that returns true when evaluated on a Key whose
* character (when converted to a Symbol) matches \c c. Use this with the