Commit fc40eb75 by Jason Merrill

re PR c++/66919 (C++14 ICE during error reporting)

	PR c++/66919
	* g++.dg/cpp1y/auto-fn27.C: New.

From-SVN: r226993
parent 8e43da81
// PR c++/66919
// { dg-do compile { target c++14 } }
template <int>
struct A {
template <typename F, typename R, typename T>
static auto run (F fn, R, T) { auto r = fn (); } // { dg-error "" }
};
template <typename F, typename T>
auto foo (F fn, T)
{
A <0>::run (fn, 0, 0);
}
struct B;
struct C {
typedef B D;
};
struct E {
virtual void bar (const int &);
};
template <typename C>
struct F : E {
typedef typename C::D::G G;
void bar (const G &);
typename C::D::H I;
};
struct J { struct K {}; };
template <typename T>
void
F<T>::bar (const G &)
{
auto s = I;
typedef decltype (s) L;
auto u =[&](L) { auto t = foo (J::K (), 0); }; // { dg-error "" }
}
struct B {
typedef int G;
typedef int H;
};
struct M : F <C> {
M () {}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment