------- Comment #8 from rguenth at gcc dot gnu dot org 2008-01-25 09:50 ------- EDG accepts this one where we still ICE the same:
struct default_policy {}; template <class T = default_policy> struct policy { typedef int precision_type; }; template <class Real, class Policy> struct precision { typedef Real type; typedef typename Policy::precision_type precision_type; }; template <class T1, class T2, class Policy> struct bessel_traits { typedef T1 result_type; typedef typename precision<result_type, Policy>::type precision_type; }; template <class Fn> void def(char const* name, Fn fn); template <class T1, class T2, class Policy> typename bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol); template <class T1, class T2> typename bessel_traits<T1, T2, policy<> >::result_type cyl_bessel_j(T1 v, T2 x); void hedge_expose_polynomial() { def("cyl_bessel_j", cyl_bessel_j<int, double>); } 3.3 rejects this with t.ii: In function `void hedge_expose_polynomial()': t.ii:31: error: no matching function for call to `def(const char[13], <unknown type>)' 4.1 rejects it with t.ii: In instantiation of 'precision<int, Policy>': t.ii:14: instantiated from 'bessel_traits<int, double, Policy>' t.ii:31: instantiated from here t.ii:9: error: no type named 'precision_type' in 'Policy' t.ii: In function 'void hedge_expose_polynomial()': t.ii:31: error: no matching function for call to 'def(const char [13], <unresolved overloaded function type>)' and 4.2 and 4.3 ICE. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34950