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

--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
This is what C-reduce came up with:

markus@x4 ~ % cat boost.ii
template <typename _Tp>
struct integral_constant {
  static constexpr _Tp value = 0;
};
template <typename...>
struct __and_;
template <typename _B1>
struct __and_<_B1> : _B1 {};
template <typename _Tp>
_Tp declval();
template <typename _From, typename _To>
struct __is_convertible_helper {
  template <typename _From1, typename _To1,
            typename = decltype(_To1(declval<_From1>()))>
  static integral_constant<int> __test(int);
  typedef decltype(__test<_From, _To>(0)) type;
};
template <typename _From, typename _To>
struct is_convertible : __is_convertible_helper<_From, _To>::type {};
template <int>
struct Trans_NS_std_enable_if {};
template <class _T1, class>
struct pair {
  _T1 first;
  template <class _U1, class _U2,
            class = typename Trans_NS_std_enable_if<
                __and_<is_convertible<_U1, _T1>>::value>::type>
  pair(pair<_U1, _U2>);
  template <class _U2>
  pair(_T1 __x, _U2)
      : first(__x) {}
};
class point_data;
class vector {
 public:
  void push_back(pair<pair<pair<point_data, point_data>, int>, int *>);
};
template <typename _Key>
class map {};
class point_data {
 public:
  template <typename PointType>
  point_data(PointType);
  map<int> processEvent__iter;
  vector processEvent__counts_from_scanline;
  template <class cT, class iT>
  void processEvent_(cT, iT, iT) {
    processEvent__counts_from_scanline.push_back(
        pair<pair<pair<point_data, point_data>, int>, int *>(
            pair<pair<point_data, point_data>, int>(
                pair<point_data, point_data>(0, 0), processEvent__iter),
            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);
  }
};

markus@x4 ~ % icpc -std=c++11 -c boost.ii
markus@x4 ~ % clang++ -std=c++11 -c boost.ii
markus@x4 ~ % g++ -std=c++11 -c boost.ii
boost.ii: In instantiation of ‘struct
__is_convertible_helper<pair<pair<point_data, point_data>, int>,
pair<point_data, point_data> >’:
boost.ii:19:8:   required from ‘struct is_convertible<pair<pair<point_data,
point_data>, int>, pair<point_data, point_data> >’
boost.ii:8:8:   required from ‘struct
__and_<is_convertible<pair<pair<point_data, point_data>, int>, pair<point_data,
point_data> > >’
boost.ii:52:15:   recursively required by substitution of ‘template<class _U2>
pair<_T1, <template-parameter-1-2> >::pair(_T1, _U2) [with _U2 = <missing>]’
boost.ii:52:15:   required from ‘void point_data::processEvent_(cT, iT, iT)
[with cT = int; iT = int]’
boost.ii:57:26:   required from ‘void
point_data::get_fracture(output_container, int, concept_type) [with
output_container = int; concept_type = int]’
boost.ii:54:45:   required from here
boost.ii:16:26: error: no matching function for call to
‘__is_convertible_helper<pair<pair<point_data, point_data>, int>,
pair<point_data, point_data> >::__test(int)’
   typedef decltype(__test<_From, _To>(0)) type;
                          ^
boost.ii:16:26: note: candidate is:
boost.ii:15:33: note: template<class _From1, class _To1, class> static
integral_constant<int> __is_convertible_helper<_From, _To>::__test(int) [with
_From1 = _From1; _To1 = _To1; <template-parameter-2-3> =
<template-parameter-1-3>; _From = pair<pair<point_data, point_data>, int>; _To
= pair<point_data, point_data>]
   static integral_constant<int> __test(int);
                                 ^
boost.ii:15:33: note:   template argument deduction/substitution failed:
boost.ii:14:13: error: no matching function for call to ‘pair<point_data,
point_data>::pair(pair<pair<point_data, point_data>, int>)’
             typename = decltype(_To1(declval<_From1>()))>
             ^
boost.ii:14:13: note: candidates are:
boost.ii:30:3: note: template<class _U2> pair<_T1, <template-parameter-1-2>
>::pair(_T1, _U2)
   pair(_T1 __x, _U2)
   ^
boost.ii:30:3: note:   template argument deduction/substitution failed:
boost.ii:14:13: note:   candidate expects 2 arguments, 1 provided
             typename = decltype(_To1(declval<_From1>()))>
             ^
boost.ii:28:3: note: template<class _U1, class _U2, class> pair<_T1,
<template-parameter-1-2> >::pair(pair<_U1, _U2>)
   pair(pair<_U1, _U2>);
   ^
boost.ii:28:3: note:   template argument deduction/substitution failed:
boost.ii:26:13: error: no type named ‘type’ in ‘struct
Trans_NS_std_enable_if<0>’
             class = typename Trans_NS_std_enable_if<
             ^
boost.ii:23:8: note: constexpr pair<point_data, point_data>::pair(const
pair<point_data, point_data>&)
 struct pair {
        ^
boost.ii:23:8: note:   no known conversion for argument 1 from
‘pair<pair<point_data, point_data>, int>’ to ‘const pair<point_data,
point_data>&’
boost.ii:23:8: note: constexpr pair<point_data,
point_data>::pair(pair<point_data, point_data>&&)
boost.ii:23:8: note:   no known conversion for argument 1 from
‘pair<pair<point_data, point_data>, int>’ to ‘pair<point_data, point_data>&&’
boost.ii: In instantiation of ‘void point_data::processEvent_(cT, iT, iT) [with
cT = int; iT = int]’:
boost.ii:57:26:   required from ‘void
point_data::get_fracture(output_container, int, concept_type) [with
output_container = int; concept_type = int]’
boost.ii:54:45:   required from here
boost.ii:36:8: error:   initializing argument 1 of ‘void
vector::push_back(pair<pair<pair<point_data, point_data>, int>, int*>)’
   void push_back(pair<pair<pair<point_data, point_data>, int>, int *>);
        ^

Reply via email to