Relative Content

Tag Archive for c++structcomparison

Compare const and non-const structs in c++

I have two structs that should compare equal memberwise. I figured the c++ compiler would generate a comparison function by itself, but it doesn’t seem to know how. Here’s the code: