U++ framework
Do not panic. Ask here before giving up.

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: 14291
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: Tue Jun 23 01:00:42 GMT+2 2026

Total time taken to generate the page: 0.00549 seconds