https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61850
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Known to fail| |6.4.0 Status|UNCONFIRMED |RESOLVED Keywords| |ice-on-invalid-code Known to work| |8.1.0 Target Milestone|--- |8.0 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- GCC 8 and above produces: <source>: In instantiation of 'struct join_impl<int, float, void>': <source>:41:1: required by substitution of 'template<class V1, class V2> typename join_impl<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, typename std::remove_cv<typename std::remove_reference<V2>::type>::type>::type join(V1, V2) [with V1 = int; V2 = float]' <source>:52:3: required from here <source>:29:36: error: no type named 'type' in 'struct join_impl<float, int, void>' using type = typename super::type; ^ GCC 7 produces: <source>: In substitution of 'template<class T1, class T2> struct join_impl<T1, T2, typename std::enable_if<join_impl<T2, T1>::forward>::type> [with T1 = int; T2 = float]': <source>:41:1: recursively required by substitution of 'template<class T1, class T2> struct join_impl<T1, T2, typename std::enable_if<join_impl<T2, T1>::forward>::type> [with T1 = int; T2 = float]' <source>:41:1: required by substitution of 'template<class V1, class V2> typename join_impl<typename std::remove_cv<typename std::remove_reference<_From>::type>::type, typename std::remove_cv<typename std::remove_reference<_To>::type>::type>::type join(V1, V2) [with V1 = int; V2 = float]' <source>:52:3: required from here <source>:41:1: fatal error: template instantiation depth exceeds maximum of 900 (use -ftemplate-depth= to increase the maximum) join(V1 v1, V2 v2) ^~~~ So fixed for GCC 8.