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 » A probably simple question about pick semantics
Re: A probably simple question about pick semantics [message #34795 is a reply to message #34794] Mon, 12 December 2011 17:08 Go to previous messageGo to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Use a reference parameter: Test(T& v) or Test(const T& v).

Pick semantics kick in on a copy operation. Even without pick semantics using reference would be advised, since otherwise you would be needlessly copying around data when passed to the function.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: gdk_pixbuf-2.0 linker error
Next Topic: Small fix for Find in Algo.h
Goto Forum:
  


Current Time: Thu Jun 06 03:11:03 CEST 2024

Total time taken to generate the page: 0.01477 seconds