From 17f76d0258786c3d013e1c527666767d6ea2be54 Mon Sep 17 00:00:00 2001 From: Andrew Pardoe Date: Mon, 23 Oct 2017 11:20:37 -0700 Subject: [PATCH] Update CppCoreGuidelines.md --- CppCoreGuidelines.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 2688f1c..187f929 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -16243,7 +16243,7 @@ and should be used only as building blocks for meaningful concepts, rather than template concept Addable = has_plus; // bad; insufficient - template auto plus(const N& a, const N& b) // use two numbers + template auto algo(const N& a, const N& b) // use two numbers { // ... return a + b; @@ -16273,7 +16273,7 @@ The ability to specify a meaningful semantics is a defining characteristic of a && has_multiply && has_divide; - template auto plus(const N& a, const N& b) // use two numbers + template auto algo(const N& a, const N& b) // use two numbers { // ... return a + b; @@ -16281,11 +16281,11 @@ The ability to specify a meaningful semantics is a defining characteristic of a int x = 7; int y = 9; - auto z = plus(x, y); // z = 18 + auto z = algo(x, y); // z = 18 string xx = "7"; string yy = "9"; - auto zz = plus(xx, yy); // error: string is not a Number + auto zz = algo(xx, yy); // error: string is not a Number ##### Note