From ed8cd2755652651bcb4e5f0cc34801f58c9e4fdc Mon Sep 17 00:00:00 2001 From: Alexey Dmitriev Date: Tue, 22 Sep 2015 17:35:03 +0300 Subject: [PATCH 1/2] fix typo --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index fbf77cf..dc66681 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -3453,7 +3453,7 @@ It is often a good idea to express the invariant as an `Ensure` on the construct }; Rec r1 {"Foo",7}; - Rec r2 {"Bar}; + Rec r2 {"Bar"}; The `Rec2` constructor is redundant. Also, the default for `int` would be better done as a [member initializer](#Rc-in-class initializer). From 2801dc22d158a6e3021b0aa4adbfa67ecc8c2e0b Mon Sep 17 00:00:00 2001 From: Alexey Dmitriev Date: Tue, 22 Sep 2015 17:46:39 +0300 Subject: [PATCH 2/2] change {} -> () in function call at least it's consistent with prev example --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index dc66681..9794ac8 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -3904,7 +3904,7 @@ The common action gets tedious to write and may accidentally not be common. { if (!valid(i,m,y)) throw Bad_date{}; } Date2(int ii, Month mm) - :Date2{ii,mm,current_year{}} {} + :Date2{ii,mm,current_year()} {} // ... };