You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CODING_STYLE.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -119,7 +119,7 @@ Use `solAssert` and `solUnimplementedAssert` generously to check assumptions tha
119
119
4. Favour declarations close to use; don't habitually declare at top of scope ala C.
120
120
5. Pass non-trivial parameters as const reference, unless the data is to be copied into the function, then either pass by const reference or by value and use std::move.
121
121
6. If a function returns multiple values, use std::tuple (std::pair acceptable) or better introduce a struct type. Do not use */& arguments.
122
-
7. Use parameters of pointer type only if ``nullptr`` is a valid argument, use references otherwise. Often, ``boost::optional`` is better suited than a raw pointer.
122
+
7. Use parameters of pointer type only if ``nullptr`` is a valid argument, use references otherwise. Often, ``std::optional`` is better suited than a raw pointer.
123
123
8. Never use a macro where adequate non-preprocessor C++ can be written.
124
124
9. Only use ``auto`` if the type is very long and rather irrelevant.
125
125
10. Do not pass bools: prefer enumerations instead.
0 commit comments