$ cat test.cc
#include <stdio.h>
#ifdef USE_GA
#include <ga/ga.h>
#endif
class A
{
public:
bool operator==(const A &other)
{
return 0;
}
};
class B : public A
{ };
int main()
{
B x, y;
return x == y;
}
$ g++ test.cc && echo $?
0
$ g++ -DUSE_GA test.cc
/tmp/cchkaUHs.o: In function `main':
test.cc:(.text+0x7b): undefined reference to `int operator==<B>(B const&, B const&)'
collect2: ld returned 1 exit status
To work around this bug/misfeature I needed to forcibly undefine
GALIB_USE_COMP_OPERATOR_TEMPLATES.