1. When you create a unique pointer you can provide a function to run on deletion. Why is this useful?
2. Which of the following is _NOT_ an instance of undefined behavior in C++?
free
return
void
std::vector
3. Why should you use std::make_unique instead of new when constructing a unique_ptr?
std::make_unique
new
unique_ptr
4. What is the advantage of a "time-traveling" debugger?
5. What happens when you run std::move() on a unique_ptr value?
std::move()
6. For which of the following is static_cast NOT appropriate?
static_cast
7. What happens when the only two shared_ptrs pointing to an object both go out of scope?
8. Which of the following best describes the primary use of std::forward?
std::forward
9. Which if the following is NOT a reason that assertions are helpful in your code?
10. Which of the following debugging techniques should typically be attempted only after the other techniques fail to help you resolve the issue?
Click Check Answers to identify any errors and try again. Click Show Answers if you also want to know which answer is the correct one.