https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63356
--- Comment #9 from fiesh at zefix dot tv --- Ever so little simplified: struct A {}; template <typename _B1> struct B : _B1 {}; template <typename _Tp> _Tp declval(); template <typename _From, typename _To> struct C { template <typename _From1, typename _To1, typename = decltype(_To1(declval<_From1>()))> static A __test(int); typedef decltype(__test<_From, _To>(0)) type; }; template <typename _From, typename _To> struct I : C<_From, _To>::type {}; template <int> struct D {}; template <class _T1, class> struct F { _T1 first; template <class _U1, class _U2, class = typename D<B<I<_U1, _T1>>::value>::type> F(F<_U1, _U2>); template <class _U2> F(_T1 p1, _U2) : first(p1) {} }; class G; class H { public: void push_back(F<F<F<G, G>, int>, int *>); }; class G { public: template <typename PointType> G(PointType); H processEvent__counts_from_scanline; void processEvent_() { processEvent__counts_from_scanline.push_back( F<F<F<G, G>, int>, int *>(F<F<G, G>, int>(F<G, G>(0, 0), 0), 0)); } };