From 7a8cac8dbc418f00f7330ab54e3363ccd5bda71c Mon Sep 17 00:00:00 2001 From: Andrew Pardoe Date: Sun, 20 Mar 2016 17:24:56 -0700 Subject: [PATCH] Changed { { hack to proper liquid template fix --- CppCoreGuidelines.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index b13af23..dbd3230 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -4416,7 +4416,7 @@ A class with members that all have default constructors implicitly gets a defaul vector v; }; - X x; // means X{ {}, {} }; that is the empty string and the empty vector + X x; // means X{{}, {}}; that is the empty string and the empty vector Beware that built-in types are not properly default constructed: @@ -6416,7 +6416,7 @@ Subscripting the resulting base pointer will lead to invalid object access and p void use(B*); - D a[] = { {1, 2}, {3, 4}, {5, 6} }; + D a[] = {{1, 2}, {3, 4}, {5, 6}}; B* p = a; // bad: a decays to &a[0] which is converted to a B* p[1].x = 7; // overwrite D[0].y @@ -10419,7 +10419,7 @@ To make error handling systematic, robust, and non-repetitive. void use() { - Foo bar { {Thing{1}, Thing{2}, Thing{monkey}}, {"my_file", "r"}, "Here we go!"}; + Foo bar {{Thing{1}, Thing{2}, Thing{monkey}}, {"my_file", "r"}, "Here we go!"}; // ... }