@Bob, you will like this one!
I was interested in your question, so I tried my code. It compiled in g ++, but not with your error in MSVC10. To research, I used Google to find out how to see the output of the preprocessor: you set the parameter "Properties | C ++ | Preprocessor | Preprocess to file" to true. And then I put it together again ... AND THIS WORK! It turns out that if this option is disabled, compilation fails; if it is enabled, compilation works. I believe that MS is not trying to generate LINE records unless the preprocessor output is captured. Oy va voy!
Ernest friedman-hill
source share