This document discusses different approaches for passing arguments to non-template functions in C++, specifically comparing passing by reference versus passing by value. It argues that passing by value has performance advantages because it allows movable objects to be moved rather than copied, but it also has some drawbacks. The key points made are:
- Passing by value can be more efficient by enabling movable objects to be moved rather than copied when passed as rvalues.
- However, it has drawbacks like an extra move for lvalues and interface dependence on implementation.
- The document recommends passing by value if the function conceptually needs to make a copy, and considering overloads for lvalue/rvalue if profiling shows copies are