Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Vector<int>::At does not return a default constructed value
Re: Vector<int>::At does not return a default constructed value [message #44033 is a reply to message #44032] Tue, 16 December 2014 15:16 Go to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
Well, the disadvantage of such "involuntary" initialization is fact that in some cases, compiler is not able to optimize out the zero assignment, thus resulting in negligibly lower performance. IMO, same reasoning is true for local variables...

And then, estetically, I really dislike the anomaly that

int x;

and

int x = int();

are different things...

Mirek

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stack tracing
Next Topic: Ideographic Character Handling
Goto Forum:
  


Current Time: Mon May 20 22:21:07 CEST 2024

Total time taken to generate the page: 0.01261 seconds