[Bug c++/81997] [7/8 Regression] segfault while instantiating constrained function template
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 10 13:33:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81997
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase:
template <typename> void foo ();
namespace std {
template <class> struct initializer_list {
int *b;
unsigned long c;
int begin ();
int m ();
};
}
template <typename E, typename F> concept bool g = requires(E x) { x (foo <F>);
};
template <typename H, typename I> requires g<I, decltype(foo<H>)> I bar (H, H,
I);
void
baz ()
{
auto l = {5};
bar (l.begin (), l.m (), [](auto m) { m; });
}
Probably related to PR81918, at least the error is the same, just error
recovery different.
More information about the Gcc-bugs
mailing list