From 7c25281c38525d90ee0c3c06f232e3fccc40b6f2 Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Sun, 18 Oct 2015 11:01:14 +0200 Subject: [PATCH] Fix singular/plural mismatches. Either the rules eliminate, or the rule eliminates. Multiple 'Date' classes have default dates. ... --- CppCoreGuidelines.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index b100add..ace4e0b 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -3817,7 +3817,7 @@ A constructor can be used for convenience even if a class does not have an invar ##### Note -The C++11 initializer list rules eliminates the need for many constructors. For example: +The C++11 initializer list rule eliminates the need for many constructors. For example: struct Rec2{ string s; @@ -3978,7 +3978,7 @@ Many language and library facilities rely on default constructors, e.g. `T a[10] There is no "natural" default date (the big bang is too far back in time to be useful for most people), so this example is non-trivial. `{0, 0, 0}` is not a valid date in most calendar systems, so choosing that would be introducing something like floating-point's NaN. -However, most realistic `Date` classes has a "first date" (e.g. January 1, 1970 is popular), so making that the default is usually trivial. +However, most realistic `Date` classes have a "first date" (e.g. January 1, 1970 is popular), so making that the default is usually trivial. ##### Enforcement @@ -4936,7 +4936,7 @@ Providing a nonmember `swap` function in the same namespace as your type for cal y = tmp; } -This is not just slow, but if a memory allocation occur for the elements in `tmp`, this `swap` may throw and would make STL algorithms fail if used with them. +This is not just slow, but if a memory allocation occurs for the elements in `tmp`, this `swap` may throw and would make STL algorithms fail if used with them. ##### Enforcement