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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Another possibility would be to refuse to constant evaluate such metafunctions
when processing_template_decl.
Looking at the 3 finish_compound_literal calls, the first one is for some cases
of reflect_constant_array (with zero size), the second one already has:
  /* Don't throw in a template.  */
  if (processing_template_decl)
    {
      *non_constant_p = true;
      return NULL_TREE;
    }
and the last one is for all functions which return vector <info>.

Reply via email to