Is C++11 Uniform Initialization a replacement for the old style syntax?
Posted
by
Robert Dailey
on Programmers
See other posts from Programmers
or by Robert Dailey
Published on 2012-02-06T02:22:43Z
Indexed on
2012/12/18
5:13 UTC
Read the original article
Hit count: 229
I understand that C++11's uniform initialization solves some syntactical ambiguity in the language, but in a lot of Bjarne Stroustrup's presentations (particularly those during the GoingNative 2012 talks), his examples primarily use this syntax now whenever he is constructing objects.
Is it recommended now to use uniform initialization in all cases? What should the general approach be for this new feature as far as coding style goes and general usage? What are some reasons to not use it?
Note that in my mind I'm thinking primarily of object construction as my use case, but if there are other scenarios to consider please let me know.
© Programmers or respective owner