From: Guillaume L. <gla...@te...> - 2002-01-25 11:33:48
|
On Friday 25 January 2002 12:19, Richard Bown wrote: > > And why pass "const int &" to a function instead of "int"? > > I was labouring under the impression it was good practice. It is for objects when you want to simulate a pass-by-value rather than a pass-by-pointer, but still spare calls to the copy ctor and dtor. However for scalar types it doesn't make any sense. -- Guillaume http://www.telegraph-road.org |