F.19: For “forward” parameters, pass by TP& and only std::forward the parameter.
F.18: For “consume” parameters, pass by X& and std::move the parameter.F.17: For “in-out” parameters, pass by reference to non- const.F.16: For “in” parameters, pass cheaply-copied types by value and others by reference to const.F.15: Prefer simple and conventional ways of passing information.Curious? Read the post!Īccording to the guidelines, let's talk about in, out, in-out, consume, or forward parameter. Your decision should depend on if it is an in, and out, an in-out, a consume, or a forward function parameter. You can even move or forward your parameters. You have many choices to pass function parameters.