+ 2

Should I worry about the language standard version (C++14, C++11,...) that it's implemented when choosing a compiler?

It's there a different in program eficiency between the diferent C++ language standards or is just a matter of code readability and new features implemented?

28th Jul 2016, 11:19 AM
Nelson Urbina
Nelson Urbina - avatar
7 Respostas
+ 2
Maybe "worry" is not the best fitting word as you probably mean "care". Your answer: you should. The newer standards brought significant improvements to the language and companies are using them.
28th Jul 2016, 1:51 PM
Stefan
Stefan - avatar
+ 1
Nope, it's C++03
28th Jul 2016, 5:17 PM
Stefan
Stefan - avatar
+ 1
I just noticed I didn't answer your question fully. Concerning efficiency, the newer C++ standards as C++ 11 and 14 have also improved. C++ 11, for example, introduced a new property on values: movability. This is relevant when you need to copy from a temporary variable or let's say one that's not used after the copy. The only thing this variable must still be able is being destructible. Ergo instead of a full copy you can rip out the guts of the old object (e.g. take control of any pointed to data etc.) and make it yours. Saves memory and time as copying complex objects can become significantly faster. Also, using the type deduction feature of C++ 11 might prevent unnecessary copying. Apart from that, I would assume that modern compiler generate comparable, if not faster code than the old compilers as effort has been put into the code optimizers, too.
28th Jul 2016, 11:05 PM
Stefan
Stefan - avatar
+ 1
Thank you for giving such a positive feedback. :-)
30th Jul 2016, 12:08 AM
Stefan
Stefan - avatar
0
Thanks Stefan... you're right.. I meant "care"... I'm not a native english speaker.. but hope to get better with time... And that is the answer that I was looking for... I'm not sure which language standard is used in this course.. but it seems to me that is C++11... Am'I right?
28th Jul 2016, 4:59 PM
Nelson Urbina
Nelson Urbina - avatar
0
Thank you so much again Stefan for all the informaticion and knowledge shared in your comments. I really appreciate it.
29th Jul 2016, 9:44 PM
Nelson Urbina
Nelson Urbina - avatar
- 2
Yexhghffhdjejejehjwjwjwndndnssssseeexhxhxhxjxjjdhfhfffj
29th Jul 2016, 6:43 PM
graalglitch