We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 138053d commit da207d4Copy full SHA for da207d4
doc/developer-notes.md
@@ -500,6 +500,12 @@ class A
500
- *Rationale*: Easier to understand what is happening, thus easier to spot mistakes, even for those
501
that are not language lawyers
502
503
+- Use `Span` as function argument when it can operate on any range-like container.
504
+
505
+ - *Rationale*: Compared to `Foo(const vector<int>&)` this avoids the need for a (potentially expensive)
506
+ conversion to vector if the caller happens to have the input stored in another type of container.
507
+ However, be aware of the pitfalls documented in [span.h](../src/span.h).
508
509
Strings and formatting
510
------------------------
511
0 commit comments