Talk:More C++ Idioms/Multi-statement Macro

Warnings
I'm not sure if this belongs; but with that code when set to Level 4 warnings enabled you might have warning C4127: conditional expression is constant.

You might be tempted to #pragma warning disable out the warning like the following:

However on use the warning still persists; this is because of how #pragma works.

Microsoft has created a nice little guy specifically for this use case having to do with pragma inside of a macro; it is __pragma! So you could create the following:

Though useful and good to know; you do not get the warning if you write your macro like the following: