diff --git a/microsoft_vcpp.html b/microsoft_vcpp.html index 0096fc3..0b589be 100644 --- a/microsoft_vcpp.html +++ b/microsoft_vcpp.html @@ -126,6 +126,17 @@ int main() Workaround: Enclose the offending for loops in another pair of curly braces. +

+Another possible workaround (brought to my attention by Vesa Karvonen) +is this: +

+#ifndef for
+#define for if (0) {} else for
+#endif
+
+ +Note that platform-specific inline functions in included headers might +depend on the old-style for scoping.

[inclass-member-init] In-class member initialization