Skip to content

Commit 9d4fc0b

Browse files
committed
bad type
1 parent d6ffbfd commit 9d4fc0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CppCoreGuidelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12284,7 +12284,7 @@ One strategy is to add a `valid()` operation to every resource handle:
1228412284
// handle error or exit
1228512285
}
1228612286

12287-
Ifstream fs("foo"); // not std::ifstream: valid() added
12287+
ifstream fs("foo"); // not std::ifstream: valid() added
1228812288
if (!fs.valid()) {
1228912289
// handle error or exit
1229012290
}
@@ -12721,7 +12721,7 @@ In such cases, "crashing" is simply leaving error handling to the next level of
1272112721

1272212722
Most programs cannot handle memory exhaustion gracefully anyway. This is roughly equivalent to
1272312723

12724-
void f(Int n)
12724+
void f(int n)
1272512725
{
1272612726
// ...
1272712727
p = new X[n]; // throw if memory is exhausted (by default, terminate)

0 commit comments

Comments
 (0)