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

--- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> ---
The ICE seems to be revealing a latent issue:  In the following example (which
GCC accepts), according to the static_assert labelled (1), the type of t is
const int*, but according to the static_assert labelled (2), the type of t is
int *const.



template <typename T>
void foo(const T t)
{
  static_assert(__is_same(decltype(t), const int*));  // (1)
}

static_assert(__is_same(decltype(foo<int[]>), void(int *)));  // (2)

int
main()
{
  foo<int[]>(nullptr);
}

Reply via email to