From 1de6e77b159b856ac133b9994f414b8aa46174b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20K=C3=A4lberer?= Date: Sat, 3 Oct 2015 16:47:24 +0200 Subject: [PATCH] Fix ES.103 example ``` int area(int h, int w) { return h*w; } auto a = area(10'000'000 * 100'000'000); // bad ``` The `*` in the second line should be a comma --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 06c16fc..745151d 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -8451,7 +8451,7 @@ Incrementing a value beyond a maximum value can lead to memory corruption and un int area(int h, int w) { return h*w; } - auto a = area(10'000'000*100'000'000); // bad + auto a = area(10'000'000, 100'000'000); // bad **Exception**: Use unsigned types if you really want modulo arithmetic.