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 » Proposal: add Vector::InsertPick(int i, pick_ T&)
Re: Proposal: add Vector::InsertPick(int i, pick_ T&) [message #21194 is a reply to message #21189] Fri, 08 May 2009 21:21 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14266
Registered: November 2005
Ultimate Member
Mindtraveller wrote on Fri, 08 May 2009 04:30

Actually it doesn`t. Differences are:
- you require M to have default constructor, which is not strong requirement for Vector element



Does it?

Quote:


- you have one redundant call (ctor and operator= instead of ctor), which sometimes is crucial (picking was made for efficiency, right?)

And IMO this code is little bit less clear than plain v.InsertPick(a).



While I can agree with symmetry point and clarity issue, I do not see how adding InsertPick should solve above problem.

Maybe you can rewrite mrjt's example with InsertPick?

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Incorrect ASSERT in Value::Serialize
Next Topic: XmlParser and <![CDATA[
Goto Forum:
  


Current Time: Sat Jul 19 04:48:34 CEST 2025

Total time taken to generate the page: 0.03320 seconds