Home Segments Index Top Previous Next

675: Mainline

Because your class-object parameters should be call-by-reference parameters, rather than call-by-value parameters, you may want to use a trick to prevent yourself from inadvertently introducing a call-by-value class-object parameter.

Because your copy constructors are in the private parts of the class definitions in which they appear, any attempt at copying—introduced inadvertently by a call-by-value parameter—leads to a compiler error.