https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88162
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- ICC also rejects this at both -std=c++17 and -std=c++20: <source>(15): error: a nontype template parameter may not have class type template<template<auto> class T> using nttp_t = typename decltype( f(T<zero>()) )::type; ^ <source>(15): error: no instance of function template "f" matches the argument list argument types are: (int_constant<<error-constant>>) template<template<auto> class T> using nttp_t = typename decltype( f(T<zero>()) )::type; ^ <source>(6): note: this candidate was rejected because at least one template argument could not be deduced template<auto X, template<auto> class T> id<decltype(X)> f( T<X> ) ^ detected during instantiation of type "nttp_t<int_constant>" at line 22 <source>(15): error: no instance of function template "f" matches the argument list argument types are: (char_constant<<error-constant>>) template<template<auto> class T> using nttp_t = typename decltype( f(T<zero>()) )::type; ^ <source>(6): note: this candidate was rejected because at least one template argument could not be deduced template<auto X, template<auto> class T> id<decltype(X)> f( T<X> ) ^ detected during instantiation of type "nttp_t<char_constant>" at line 22 <source>(15): error: no instance of function template "f" matches the argument list argument types are: (long_constant<<error-constant>>) template<template<auto> class T> using nttp_t = typename decltype( f(T<zero>()) )::type; ^ <source>(6): note: this candidate was rejected because at least one template argument could not be deduced template<auto X, template<auto> class T> id<decltype(X)> f( T<X> ) ^ detected during instantiation of type "nttp_t<long_constant>" at line 22 <source>(15): error: no instance of function template "f" matches the argument list argument types are: (voidp_constant<<error-constant>>) template<template<auto> class T> using nttp_t = typename decltype( f(T<zero>()) )::type; ^ <source>(6): note: this candidate was rejected because at least one template argument could not be deduced template<auto X, template<auto> class T> id<decltype(X)> f( T<X> ) ^ detected during instantiation of type "nttp_t<voidp_constant>" at line 22 compilation aborted for <source> (code 2)