This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/63356] Compilation failure where clang does not have problems


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

--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Or a bit more compact and obfuscated:

template <typename _Tp>
struct A {
  static constexpr _Tp value = 0;
};
template <typename...>
struct B;
template <typename _B1>
struct B<_B1> : _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<int> __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;
  template <class cT, class iT>
  void processEvent_(cT, iT, iT) {
    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));
  }
  void get_dispatch() { get_fracture(0, 0, 0); }
  template <typename output_container, typename concept_type>
  void get_fracture(output_container, int, concept_type) {
    processEvent_(0, 0, 0);
  }
};


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]