Could an implicit template deduction guide deduce a reference type?
问题 While testing C++17 deduction guide behaviour with gcc7, I found that this example fails: template<class T> struct S{ S(T&& v){} }; int i=10; auto v = S(i); According to what I have read from cpp reference, I thought v should be of type S<int &> . Nevertheless gcc7 does not compile this code complaining that a int& can not be bound to a int && (the universal reference mechanism fails). So my questions are: Should gcc7 have deduced v to be of type S<int&> ? Where are described automatic