Skip to content

Commit

Permalink
The friend declaration of mkLit should not provide a default value:
Browse files Browse the repository at this point in the history
According to ISO C++11 standard: 
"If a friend declaration specifies a default argument expression, that declaration shall be a definition and shall be the only declaration of the function or function template in the translation unit.”

Solved in the same way as the minisat project niklasso/minisat#17.
  • Loading branch information
Matthiasvanderhallen committed Sep 9, 2014
1 parent ac74a4d commit 62750d7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/external/Lit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ struct VarID{
struct Lit {
int x;

// Use this as a constructor:
friend Lit mkLit(Atom var, bool sign = false);

bool operator ==(Lit p) const {
return x == p.x;
}
Expand All @@ -65,7 +62,7 @@ struct Lit {
}
};

inline Lit mkLit(Atom var, bool sign) {
inline Lit mkLit(Atom var, bool sign = false) {
MAssert(var>=0);
Lit p;
p.x = var + var + (int) sign;
Expand Down

0 comments on commit 62750d7

Please sign in to comment.