Merge pull request #172 from miyuki-chan/master

Indent some code examples for correct rendering
This commit is contained in:
Gabriel Dos Reis 2015-09-27 09:29:45 -07:00
commit 4332e0790a

View File

@ -12235,7 +12235,7 @@ This class is a resource handle. It manages the lifetime of the `T`s. To do so,
If `i==0` the file handle for `a file` is leaked. On the other hand, the `ifstream` for `another file` will correctly close its file (upon destruction). If you must use an explicit pointer, rather than a resource handle with specific semantics, use a `unique_ptr` or a `shared_ptr`: If `i==0` the file handle for `a file` is leaked. On the other hand, the `ifstream` for `another file` will correctly close its file (upon destruction). If you must use an explicit pointer, rather than a resource handle with specific semantics, use a `unique_ptr` or a `shared_ptr`:
void f(int i) void f(int i)
{ {
unique_ptr<FILE> f = fopen("a file","r"); unique_ptr<FILE> f = fopen("a file","r");
// ... // ...