O'Reilly logo
  • Yuriy Chesnokov thinks this is interesting:

Obviously, the preceding code is ugly. Even in this simple example, one has a hard time reading through the class definition. It’s also a bit of a maintenance headache; adding (or subtracting) platforms requires a change to the class, and to the main program. In addition, it breaks the guideline that interfaces not expose which platforms are supported by the API.


Cover of Cross-Platform Development in C++: Building Mac OS X, Linux, and Windows Applications


if defined #endif #if defined #endif ... mixture