https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99683
--- Comment #1 from Omer Rosler <omer.rosler at gmail dot com> --- It seems that Reduced: template<typename> struct A { constexpr A(int) {} }; A(int) -> A<int>; template<A> //template<auto> works fine struct B { template<typename T> B(T); }; template<typename T> B(T) -> B<A{T{}}>; //see below int main() { B t(42); } specifying A<T> explicitly also works, it's the deduction that triggers the bug If the initializer of `A` is not dependent on the template parameter of the guide (i.e `T`) than the bug isn't showing