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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2026-07-08
             Status|UNCONFIRMED                 |NEW

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
#include <meta>

template <std::meta::info I = std::meta::current_function ()>
consteval std::string_view
bar ()
{
  return std::meta::display_string_of (I);
}

template <typename T>
void
foo ()
{
  auto a = bar ();
  __builtin_printf ("%.*s\n", (int) a.size (), a.data ());
}

int
main ()
{
  foo <int> ();
}

The ICE is when trying to instantiate bar<int> ().  int is template argument of
foo, but why it got into the template argument of bar is a mystery.

Reply via email to