|
|
A correct program that still fails
|
Easy
|
Primitives
|
|
|
|
A raw pointer owns nothing
|
Medium
|
Primitives
|
|
|
|
auto copies, and does not say so
|
Medium
|
Primitives
|
|
|
|
Braces refuse to lose your data
|
Easy
|
Primitives
|
|
|
|
Erasing while you walk
|
Medium
|
Primitives
|
|
|
|
Exception safety you did not have to write
|
Medium
|
Primitives
|
|
|
|
int is not a width
|
Easy
|
Primitives
|
|
|
|
Owning something raw costs you five functions
|
Hard
|
Primitives
|
|
|
|
Reading text you do not own
|
Medium
|
Primitives
|
|
|
|
Read the diagnostic before you touch the code
|
Easy
|
Primitives
|
|
|
|
Say it in the signature
|
Easy
|
Primitives
|
|
|
|
std::move does not move anything
|
Medium
|
Primitives
|
|
|
|
The accessor that will not let you look
|
Easy
|
Primitives
|
|
|
|
The catch that threw half of it away
|
Medium
|
Primitives
|
|
|
|
The comparison that is always true
|
Medium
|
Primitives
|
|
|
|
The conversion nobody asked for
|
Medium
|
Primitives
|
|
|
|
The copy you did not write
|
Easy
|
Primitives
|
|
|
|
The delete you will forget
|
Medium
|
Primitives
|
|
|
|
The destructor is the whole idea
|
Easy
|
Primitives
|
|
|
|
The gap between new and the smart pointer
|
Medium
|
Primitives
|
|
|
|
The handler that hid the failure
|
Medium
|
Primitives
|
|
|
|
The handle you left in the door
|
Medium
|
Primitives
|
|
|
|
The line that does nothing, twice a second
|
Medium
|
Primitives
|
|
|
|
The lookup that writes
|
Medium
|
Primitives
|
|
|
|
The loop stops having bugs once it has a name
|
Medium
|
Primitives
|
|
|
|
The promise the standard library reads
|
Medium
|
Primitives
|
|
|
|
The vector that moves everything, repeatedly
|
Easy
|
Primitives
|
|
|
|
Two owners, and neither one ever leaves
|
Hard
|
Primitives
|
|
|
|
What gets compiled with your code
|
Easy
|
Primitives
|
|
|
|
What is left after you move from it
|
Medium
|
Primitives
|
|
|
|
Write the guard yourself
|
Medium
|
Primitives
|
|
|
|
Zero is an answer
|
Easy
|
Primitives
|
|