提交 eba891e9 编写于 作者: E Erick Tryzelaar

tutorial: Mention by-value argument passing style.

上级 8319b5a2
......@@ -104,6 +104,9 @@ Another style is by-move, which will cause the argument to become
de-initialized on the caller side, and give ownership of it to the
called function. This is written `-`.
Sometimes you need to pass a structural type by value, such as when
interfacing with external native functions. This is written `++`.
Finally, the default passing styles (by-value for non-structural
types, by-reference for structural ones) are written `+` for by-value
and `&&` for by(-immutable)-reference. It is sometimes necessary to
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册