Am I the only one that just cringed reading the keyword replacement section? To me the example given seemed absolutely crazy. Can anyone validate this usage of the "feature"? It just seems so off.
It's considered bad practice, yep. I would absolutely reject any code review that abused the preprocessor like that.
The only legitimate way to use it I've seen is for "white box" testing... when you have a nontrivial amount of private helper code and you want to be able to test it. Then defining "private" to be "public" for only that test compilation cuts down on the amount of work needed with basically no risk.
That being said, I prefer refactoring out all that private data and code into utilities and such. There are other ways to get good encapsulation in C++, if that's the concern.
It works though, "works" as in "it will compile".