change Flags in cconfig to have a template get_val function to avoid
force cast of CFlags