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

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: 1428
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: Sun Apr 26 13:37:01 GMT+2 2026

Total time taken to generate the page: 0.00597 seconds