You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/patrick/uni/SEA/libs/minisat/mtl/Map.h: In member function ‘uint32_t Minisat::DeepHash<K>::operator()(const K*) const’:
/home/patrick/uni/SEA/libs/minisat/mtl/Map.h:35:103: error: missing template arguments before ‘(’ token
class K> struct DeepHash { uint32_t operator()(const K* k) const { return hash(*k); } };
I could only fix it by replacing those lines as described in the following commit: see changes
I applied the changes after i compiled MiniSAT, but before I compiled my own tool that includes "minisat/core/Solver.h". That way everything works again, but I'm not sure if that's really the way to resolve the problem..
The root-cause is g++ is not able to see declaration of hash() functions used within a templatized struct Hash, Equal, DeepHash and DeepEqual. In the included header also, there is no declaration of hash() function - actually, the functions are defined/declared just after their usage location :) Needless to say, the solution is as simple as ensuring static inline definition of overloaded hash() functions are brought up before their usage so that -std=c++11 compilation is able to find the declaration of hash() function. Thus the solution would be to rearrange the above lines as follows -
My project that uses MiniSat did not compile anymore after
updating from Ubuntu 15.10 to 16.10
The following error message was shown:
and
I could only fix it by replacing those lines as described in the following commit:
see changes
I applied the changes after i compiled MiniSAT, but before I compiled my own tool that includes
"minisat/core/Solver.h"
. That way everything works again, but I'm not sure if that's really the way to resolve the problem..I am using CMake to link everything together
Before upgrading Ubuntu everything worked just fine.
g++ version:
The same in Debian:
gcc version 6.1.1 20160802 (Debian 6.1.1-11)
However, if I switch to clang, everything works as usual.
Any ideas? Thank you in advance for your help!
The text was updated successfully, but these errors were encountered: