style issues

This commit is contained in:
Thibault Kruse
2016-08-23 11:58:03 +02:00
parent 0aea7d997b
commit 27b585ad71

View File

@@ -3142,10 +3142,10 @@ Here on one popular implementation I got the output:
I expected that because the call of `g()` reuses the stack space abandoned by the call of `f()` so `*p` refers to the space now occupied by `gx`. I expected that because the call of `g()` reuses the stack space abandoned by the call of `f()` so `*p` refers to the space now occupied by `gx`.
Imagine what would happen if `fx` and `gx` were of different types. * Imagine what would happen if `fx` and `gx` were of different types.
Imagine what would happen if `fx` or `gx` was a type with an invariant. * Imagine what would happen if `fx` or `gx` was a type with an invariant.
Imagine what would happen if more that dangling pointer was passed around among a larger set of functions. * Imagine what would happen if more that dangling pointer was passed around among a larger set of functions.
Imagine what a cracker could do with that dangling pointer. * Imagine what a cracker could do with that dangling pointer.
Fortunately, most (all?) modern compilers catch and warn against this simple case. Fortunately, most (all?) modern compilers catch and warn against this simple case.
@@ -12069,7 +12069,7 @@ A `thread` that has not been `detach()`ed when it is destroyed terminates the pr
##### Enforcement ##### Enforcement
* Flag `join's for `raii_thread`s ??? * Flag `join`s for `raii_thread`s ???
* Flag `detach`s for `detached_thread`s * Flag `detach`s for `detached_thread`s
@@ -15762,7 +15762,7 @@ Use `!=` instead of `<` to compare iterators; `!=` works for more objects becaus
// ... // ...
} }
Of course, range-for is better still where it does what you want. Of course, range-`for` is better still where it does what you want.
##### Example ##### Example
@@ -16409,7 +16409,7 @@ This slowdown can be significant compared to `printf`-style output.
##### Example ##### Example
cout << "Hello, World!" << endl; // two output operations and a flush cout << "Hello, World!" << endl; // two output operations and a flush
cout << "hello, World!\n"; // one output operation and no flush cout << "Hello, World!\n"; // one output operation and no flush
##### Note ##### Note