LiveDemo: https://godbolt.org/z/daP7c8av6
template<typename T>
struct A {
A(T);
};
// OK
template<typename T>
A(T&&) -> A<T&&>;
template<typename T>
struct B {
B(T);
};
// GCC&Clang: OK
// MSVC: error C3539: a template-argument cannot be a type that contains 'auto'
B(auto&& ref) -> B<decltype(ref)>;