Linked by anonymous on Tue 29th Mar 2011 16:05 UTC
General Development The C++ programming language is about to be updated, as the ISO steering committee for the language has approved the final draft specifying its next version. The ISO/IEC Information Technology Task Force will review the steering committee's Final Draft International Standard will review and, barring any complications, publish the draft later this year. It will be known as C++ 2011.
Permalink for comment 468309
To read all comments associated with this story, please click here.
RE: Features
by phreck on Wed 30th Mar 2011 08:48 UTC in reply to "Features"
phreck
Member since:
2009-08-13

The new auto is even better than C#'s var in that it allows multiple declarations. That can be very handy depending on code-style:

auto inprecise_pi = 3.14159,
inprecise_pi2 = 2 * inprecise_pi,
inprecise_sqrt_pi = sqrt (inprecise_pi);

whereas in C# you are forced to:

var inprecise_pi = 3.14159;
var inprecise_pi2 = 2 * inprecise_pi;
var inprecise_sqrt_pi = sqrt (inprecise_pi);

Reply Parent Score: 2