From 2e3f98397120017e95752b3d4f3bd0956e7f3913 Mon Sep 17 00:00:00 2001 From: hsutter Date: Thu, 3 Sep 2020 16:34:34 -0700 Subject: [PATCH] Restored whitespace after "might" Fixing previous commit where we ate the whitespace after "may" in four places (yay regex search `might[^\s]`) --- CppCoreGuidelines.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index ddb5a13..f7c7a2e 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -2332,7 +2332,7 @@ Function definition rules: * [F.3: Keep functions short and simple](#Rf-single) * [F.4: If a function might have to be evaluated at compile time, declare it `constexpr`](#Rf-constexpr) * [F.5: If a function is very small and time-critical, declare it inline](#Rf-inline) -* [F.6: If your function mightnot throw, declare it `noexcept`](#Rf-noexcept) +* [F.6: If your function might not throw, declare it `noexcept`](#Rf-noexcept) * [F.7: For general use, take `T*` or `T&` arguments rather than smart pointers](#Rf-smart) * [F.8: Prefer pure functions](#Rf-pure) * [F.9: Unused parameters should be unnamed](#Rf-unused) @@ -2581,7 +2581,7 @@ Small simple functions are easily inlined where the cost of a function call is s * Flag functions that are too complex. How complex is too complex? You could use cyclomatic complexity. Try "more than 10 logical path through." Count a simple switch as one path. -### F.4: If a function mighthave to be evaluated at compile time, declare it `constexpr` +### F.4: If a function might have to be evaluated at compile time, declare it `constexpr` ##### Reason @@ -2625,7 +2625,7 @@ Most computation is best done at run time. ##### Note -Any API that mighteventually depend on high-level run-time configuration or +Any API that might eventually depend on high-level run-time configuration or business logic should not be made `constexpr`. Such customization can not be evaluated by the compiler, and any `constexpr` functions that depended upon that API would have to be refactored or drop `constexpr`. @@ -4799,7 +4799,7 @@ For resources represented as classes with a complete set of default operations, ##### Example class X { - ifstream f; // mightown a file + ifstream f; // might own a file // ... no default operations defined or =deleted ... };