Suppose I have a function that takes an argument of type T
.
It does not mutate it, so I have the choice of passing it by const reference const T&
For an abstract "T" in an abstract "C++" the rule of thumb would be to use the way that better reflects the intention, which for an argument that isn't modified is almost always "pass by value". Besides, concrete real world compilers expect such an abstract description and gonna pass your T in the most efficient way, regardless of how you do this in the source.
Or, to talk about naivie compilation and composition, "very cheap to copy" is "anything you can load in a single register". Doesn't get any cheaper than that really.