Need to include <stdexcept> for runtime_error.