I had that same problem. I wrote a C library [1] that has a structure field named "class". It's "class" because the protocol being described (DNS) calls that particular field "class" [2]. And I'm not about to pay lip service to an abomination like C++ [3][4].
[1] https://github.com/spc476/SPCDNS
[2] https://github.com/spc476/SPCDNS/blob/ca5052c3d0c3252071a18e...
[3] I am NOT a fan of C++.
[4] But I had to anyway, but I used the C pre-processor to rename the field.