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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It would be better to highlight the whole condition:

87386.cc:4:15: error: static assertion failed: eee
4 | static_assert(foo::test<int>::value, "eee");
  |               ^~~~~~~~~~~~~~~~~~~~~


Which is what already happens for a more complex expression:

namespace foo {
  template<typename> struct test { static constexpr bool value = false; };
}
static_assert(foo::test<int>::value && true, "");


87386.cc:4:37: error: static assertion failed
4 | static_assert(foo::test<int>::value && true, "");
  |               ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

Reply via email to