From 22c305fdee146fc5e2c4f89c0001dde3fca7d180 Mon Sep 17 00:00:00 2001 From: Sergey Zubkov Date: Sat, 17 Jun 2017 20:36:23 -0400 Subject: [PATCH] travis fixes and a typo --- CppCoreGuidelines.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index d0caeb7..bed9b9e 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -8440,7 +8440,7 @@ Convenience of use and avoidance of errors. Day& operator++(Day& d) { - return d = (d==Day::sun) ? Day::mon : static_cast(static_cast(d)+1); + return d = (d == Day::sun) ? Day::mon : static_cast(static_cast(d)+1); } Day today = Day::sat; @@ -8450,9 +8450,9 @@ The use of a `static_cast` is not pretty, but Day& operator++(Day& d) { - return d = (d== Day::sun) ? Day::mon : Day{++d}; // error + return d = (d == Day::sun) ? Day::mon : Day{++d}; // error } - + is an infinite recursion, and writing it without a cast, using a `switch` on all cases is long-winded. @@ -19539,7 +19539,7 @@ and here are the [slides](http://2017.cppconf.ru/talks/sergey-zubkov). In Russia * Bjarne Stroustrup: [No Littering!](https://www.youtube.com/watch?v=01zI9kV4h8c). Bay Area ACCU 2016. It gives some idea of the ambition level for the Core Guidelines. -Note that slides for CppCon presentations are available (links with the posted videos videos). +Note that slides for CppCon presentations are available (links with the posted videos). Contributions to this list would be most welcome.