std::packaged_task

What does std::packaged_task provide that a raw std::function does not?

A

It compiles the function at runtime for better optimization

B

It runs the function on a separate thread automatically

C

It wraps a callable so the return value or exception can be retrieved asynchronously

D

It makes the function thread-safe by adding internal locking