Microsoft Visual Studio C++11 conformance

So, there I was, using Microsoft Visual Studio 2012 Express (MSVS1012Ex). What I wanted to do was test the range-for-statement as provided by Stroustrup in his book The C++ Programming Language, 4th Edition, on page 45, which describes the C++11 standard. The code is as follows:

range-for-statement

On line 16, MSVS1012Ex throws an error, “error C2059: syntax error : ‘{‘”. It does not know how to handle an inline instantiation of a list within the range-for-statement, even though it claims to have included it in its C++11 Enhancements. It included the normal handling of range-for-statements as shown from line 8-13.

So, I decided to download Microsoft Visual Studio Express 2013 RC (MSVS2013ExRC) to test the above, and I am happy to say that MSVS2013ExRC can handle lines 16-19 in the code above.

C

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: