Skip to content

Commit 4890ab7

Browse files
committed
mention removing const& from setters
1 parent c326c63 commit 4890ab7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,7 @@ is unscoped in the old class.
509509
* should not be added to any random class or methods that have side effects (the user might have called the method for its side effectes)
510510
* Adding `explicit` to a constructor with only 1 parameter.
511511
* except for classes that are expected to be implicitly constructed from that 1 parameter.
512+
* Removing the `const&` when passing a copyable and movable parameter (`void Set(const int&);` -> `void Set(int);`)
512513
* Removing the `const` when returning by value: `const RetT SomeMethod()`
513514
* except from non-private virtual methods, since the user's derived class might overide them.
514515
* this change can break some rare cases (see [neg-tests/RemoveConstReturnByValueTest.cpp](neg-tests/RemoveConstReturnByValueTest.cpp)):

0 commit comments

Comments
 (0)