<div dir="ltr"><div>In C11, the lvalue conversions replace atomic types with the unqualified, non-atomic version. This is similar to the array-to-pointer and function-to-pointer conversions in C++.<br><br></div>I believe that this parallel should be reflected in template argument deduction (specifically, in the place in [temp.deduct.call] where array-to-pointer and function-to-pointer conversion is mentioned).<br><div><div><div><br>That is, I believe the following should compile successfully (Clang doesn't do so at this time):<br><span style="font-family:monospace,monospace">extern _Atomic const int x;<br>template <typename T> struct C { typedef T type; };<br>template <typename T> C<T> foo(T);<br>extern decltype(foo(x))::type chk;<br>extern int chk;</span><br></div><div><br>Comments welcome.<br><br></div></div></div></div>