https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124417

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
We should do what the comment mentions.  I.e. (probably after
processing_template_decl early out), pass to that function also ctx and
  if (!flag_exceptions)
    {
      if (!cxx_constexpr_quiet_p (ctx))
        {
          auto_diagnostic_group d;
          error_at (loc, "meta function would throw exception: %s", _(what));
          inform (loc, "exceptions are disabled though, treated as
non-constant");
        }
      *non_constant_p = true;
      return NULL_TREE;
    }
or something similar.

Reply via email to