[Bug c++/72845] gcc crashes (ICE) when compiling program with complex noexcept declaration
trippels at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Aug 9 06:26:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72845
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-08-09
CC| |trippels at gcc dot gnu.org
Ever confirmed|0 |1
Known to fail| |5.4.0, 6.1.0, 7.0
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
template <typename> struct g { static const int h = 0; };
template <typename i> void declval() { static_assert(!g<i>::h,""); }
template <typename> struct a {
template <typename d, typename c>
friend auto f(d &&, c &&) noexcept(declval<c>) -> decltype(declval<c>);
};
template <typename d, typename c> auto f(d &&, c &&) -> decltype(declval<c>);
struct e {};
static_assert((e{}, declval<a<int>>),"");
Clang accepts the code. Might be related to PR71784.
More information about the Gcc-bugs
mailing list