Reserved means reserved, damn it
Jun. 7th, 2005 06:42 pmToday's source of immense irritation: people who use C++ reserved keywords in system header files. For example:
struct florp { int foo; int bar; int using; int baz; } florp_t;
Spot the problem yet?
Luckily, there's a dark and nasty hack to get around the problem. Take a copy of the broken header file, modify it to remove the annoying clash, then add an '#include "florp.h"' at the very start of the source file, so that overloads the broken system header file (assuming that the developers didn't mess up the whole idempotent header file thing as well as the keyword thing). Of course, anything that actually uses the variable is going to fail, but hey, that's tough.