From 0491ccb88031050db2d2b67ad408e03a5628ebb4 Mon Sep 17 00:00:00 2001 From: Thibault Kruse Date: Sun, 17 Apr 2016 18:33:52 +0200 Subject: [PATCH] Remove superfluous newlines --- CppCoreGuidelines.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index fafc3f9..7ca8fc6 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -5696,6 +5696,7 @@ Interfaces should normally be composed entirely of public pure virtual functions The `Derived` is `delete`d through its `Goof` interface, so its `string` is leaked. Give `Goof` a virtual destructor and all is well. + ##### Enforcement * Warn on any class that contains data members and also has an overridable (non-`final`) virtual function. @@ -6113,6 +6114,7 @@ However, misuses are (or at least has been) far more common. Flag uses of `final`. + ## C.140: Do not provide different default arguments for a virtual function and an overrider ##### Reason @@ -9630,6 +9632,7 @@ In general, don't complicate your code without reason (??) Never write `return move(local_variable);`, because the language already knows the variable is a move candidate. Writing `move` in this code won't help, and can actually be detrimental because on some compilers it interferes with RVO (the return value optimization) by creating an additional reference alias to the local variable. + ##### Example, bad vector v = std::move(make_vector()); // bad; the std::move is entirely redundant