adding space after includes per #769

This commit is contained in:
Andrew Pardoe 2017-03-27 12:02:06 -07:00
parent 49abfa6509
commit f9f35c78bc

View File

@ -1,6 +1,6 @@
# <a name="main"></a>C++ Core Guidelines # <a name="main"></a>C++ Core Guidelines
March 20, 2017 March 27, 2017
Editors: Editors:
@ -8694,14 +8694,14 @@ Any type (including primary template or specialization) that overloads unary `*`
##### Example ##### Example
// use Boost's intrusive_ptr // use Boost's intrusive_ptr
#include<boost/intrusive_ptr.hpp> #include <boost/intrusive_ptr.hpp>
void f(boost::intrusive_ptr<widget> p) // error under rule 'sharedptrparam' void f(boost::intrusive_ptr<widget> p) // error under rule 'sharedptrparam'
{ {
p->foo(); p->foo();
} }
// use Microsoft's CComPtr // use Microsoft's CComPtr
#include<atlbase.h> #include <atlbase.h>
void f(CComPtr<widget> p) // error under rule 'sharedptrparam' void f(CComPtr<widget> p) // error under rule 'sharedptrparam'
{ {
p->foo(); p->foo();
@ -10049,7 +10049,7 @@ Requires messy cast-and-macro-laden code to get working right.
##### Example ##### Example
#include<cstdarg> #include <cstdarg>
// "severity" followed by a zero-terminated list of char*s; write the C-style strings to cerr // "severity" followed by a zero-terminated list of char*s; write the C-style strings to cerr
void error(int severity ...) void error(int severity ...)
@ -10089,7 +10089,7 @@ This is basically the way `printf` is implemented.
##### Enforcement ##### Enforcement
* Flag definitions of C-style variadic functions. * Flag definitions of C-style variadic functions.
* Flag `#include<cstdarg>` and `#include<stdarg.h>` * Flag `#include <cstdarg>` and `#include<stdarg.h>`
## ES.stmt: Statements ## ES.stmt: Statements
@ -16414,7 +16414,7 @@ Your IDE (if you use one) may have strong opinions about suffices.
int a; // a definition int a; // a definition
void foo() { ++a; } void foo() { ++a; }
`#include<foo.h>` twice in a program and you get a linker error for two one-definition-rule violations. `#include <foo.h>` twice in a program and you get a linker error for two one-definition-rule violations.
##### Enforcement ##### Enforcement
@ -16436,11 +16436,11 @@ Including entities subject to the one-definition rule leads to linkage errors.
} }
// file1.cpp: // file1.cpp:
#include<file.h> #include <file.h>
// ... more ... // ... more ...
// file2.cpp: // file2.cpp:
#include<file.h> #include <file.h>
// ... more ... // ... more ...
Linking `file1.cpp` and `file2.cpp` will give two linker errors. Linking `file1.cpp` and `file2.cpp` will give two linker errors.
@ -16492,20 +16492,20 @@ Minimize context dependencies and increase readability.
##### Example ##### Example
#include<vector> #include <vector>
#include<algorithm> #include <algorithm>
#include<string> #include <string>
// ... my code here ... // ... my code here ...
##### Example, bad ##### Example, bad
#include<vector> #include <vector>
// ... my code here ... // ... my code here ...
#include<algorithm> #include <algorithm>
#include<string> #include <string>
##### Note ##### Note
@ -16555,7 +16555,7 @@ The errors will not be caught until link time for a program calling `bar` or `fo
int foobar(int); int foobar(int);
// foo.cpp: // foo.cpp:
#include<foo.h> #include <foo.h>
void foo(int) { /* ... */ } void foo(int) { /* ... */ }
int bar(double) { /* ... */ } int bar(double) { /* ... */ }
@ -18392,7 +18392,7 @@ Too much space makes the text larger and distracts.
##### Example ##### Example
#include<map> #include <map>
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {