From f9f35c78bcb371705f8246b0712d30017c9e1824 Mon Sep 17 00:00:00 2001 From: Andrew Pardoe Date: Mon, 27 Mar 2017 12:02:06 -0700 Subject: [PATCH] adding space after includes per #769 --- CppCoreGuidelines.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index b348d30..f27a624 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -1,6 +1,6 @@ # C++ Core Guidelines -March 20, 2017 +March 27, 2017 Editors: @@ -8694,14 +8694,14 @@ Any type (including primary template or specialization) that overloads unary `*` ##### Example // use Boost's intrusive_ptr - #include + #include void f(boost::intrusive_ptr p) // error under rule 'sharedptrparam' { p->foo(); } // use Microsoft's CComPtr - #include + #include void f(CComPtr p) // error under rule 'sharedptrparam' { p->foo(); @@ -10049,7 +10049,7 @@ Requires messy cast-and-macro-laden code to get working right. ##### Example - #include + #include // "severity" followed by a zero-terminated list of char*s; write the C-style strings to cerr void error(int severity ...) @@ -10089,7 +10089,7 @@ This is basically the way `printf` is implemented. ##### Enforcement * Flag definitions of C-style variadic functions. -* Flag `#include` and `#include` +* Flag `#include ` and `#include` ## ES.stmt: Statements @@ -16414,7 +16414,7 @@ Your IDE (if you use one) may have strong opinions about suffices. int a; // a definition void foo() { ++a; } -`#include` twice in a program and you get a linker error for two one-definition-rule violations. +`#include ` twice in a program and you get a linker error for two one-definition-rule violations. ##### Enforcement @@ -16436,11 +16436,11 @@ Including entities subject to the one-definition rule leads to linkage errors. } // file1.cpp: - #include + #include // ... more ... // file2.cpp: - #include + #include // ... more ... Linking `file1.cpp` and `file2.cpp` will give two linker errors. @@ -16492,20 +16492,20 @@ Minimize context dependencies and increase readability. ##### Example - #include - #include - #include + #include + #include + #include // ... my code here ... ##### Example, bad - #include + #include // ... my code here ... - #include - #include + #include + #include ##### Note @@ -16555,7 +16555,7 @@ The errors will not be caught until link time for a program calling `bar` or `fo int foobar(int); // foo.cpp: - #include + #include void foo(int) { /* ... */ } int bar(double) { /* ... */ } @@ -18392,7 +18392,7 @@ Too much space makes the text larger and distracts. ##### Example - #include + #include int main(int argc, char* argv[]) {