aboutsummaryrefslogtreecommitdiff
path: root/contributing.md
diff options
context:
space:
mode:
Diffstat (limited to 'contributing.md')
-rw-r--r--contributing.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/contributing.md b/contributing.md
index 2fe46f7..e910dba 100644
--- a/contributing.md
+++ b/contributing.md
@@ -386,6 +386,37 @@ that you can click on to open them.
#endif
```
</td></tr></table></details>
+- <details><summary>
+ Variables that are being moved always use the fully qualified <code>std::move</code>
+ </summary><table><tr><th>Good</th><th>Bad</th></tr><tr><td>
+
+ ```cpp
+ using namespace std;
+ string foo = "bar";
+ ref_fn(std::move(foo));
+ ```
+ </td><td>
+
+ ```cpp
+ using namespace std;
+ string foo = "bar";
+ ref_fn(move(foo));
+ ```
+ </td></tr></table></details>
+- <details><summary>
+ If possible, classes and structs are passed to functions by (const) reference
+ </summary><table><tr><th>Good</th><th>Bad</th></tr><tr><td>
+
+ ```cpp
+ void foo(const Point & p);
+ ```
+ </td><td>
+
+ ```cpp
+ void foo(Point & p);
+ void bar(Point p);
+ ```
+ </td></tr></table></details>
## CMakeLists-specific