Make cv_status a class enum. Fixes PR18314. Thanks to Andersca for the report and the patch.