One approach would be to only guard cxx_constant_value with require_potential_constant_expression within a template.
Another approach would be to check potential_constant_expression at the same place that we check type/value_dependent_expression_p, i.e. in cp_finish_decl and convert_template_argument.
Jason