I want to overload a function to check if a struct object is empty.
Here is my struct definition:
struct Bit128 {
unsigned __int64 H64;
unsigned __int64 L64;
bool operate(what should be here?)(const Bit128 other) {
return H64 > 0 || L64 > 0;
}
}
This is test code:
Bit128 bit128;
bit128.H64 = 0;
bit128.L64 = 0;
if (bit128)
// error
bit128.L64 = 1
if (!bit128)
// error