Skip to content

Commit 19d7fb1

Browse files
authored
Update CppCoreGuidelines.md
1 parent 17f76d0 commit 19d7fb1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CppCoreGuidelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16251,11 +16251,11 @@ and should be used only as building blocks for meaningful concepts, rather than
1625116251

1625216252
int x = 7;
1625316253
int y = 9;
16254-
auto z = plus(x, y); // z = 16
16254+
auto z = algo(x, y); // z = 16
1625516255

1625616256
string xx = "7";
1625716257
string yy = "9";
16258-
auto zz = plus(xx, yy); // zz = "79"
16258+
auto zz = algo(xx, yy); // zz = "79"
1625916259

1626016260
Maybe the concatenation was expected. More likely, it was an accident. Defining minus equivalently would give dramatically different sets of accepted types.
1626116261
This `Addable` violates the mathematical rule that addition is supposed to be commutative: `a+b == b+a`.

0 commit comments

Comments
 (0)