diff --git a/clang/test/CXX/drs/dr12xx.cpp b/clang/test/CXX/drs/dr12xx.cpp --- a/clang/test/CXX/drs/dr12xx.cpp +++ b/clang/test/CXX/drs/dr12xx.cpp @@ -27,6 +27,21 @@ #endif } +#if __cplusplus >= 201103L +namespace dr1227 { // dr1227: yes +template struct A { using X = typename T::X; }; // expected-error {{type 'int' cannot be used prior to '::' because it has no members}} +template typename T::X f(typename A::X); +template void f(...) { } +template auto g(typename A::X) -> typename T::X; // expected-note {{in instantiation of template class 'dr1227::A' requested here}} +template void g(...) { } + +void h() { + f(0); // OK, substituting return type causes deduction to fail + g(0); // expected-note {{while substituting explicitly-specified template arguments into function template 'g'}} +} +} +#endif + namespace dr1250 { // dr1250: 3.9 struct Incomplete; diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -7176,7 +7176,7 @@ 1227 CD3 Mixing immediate and non-immediate contexts in deduction failure - Unknown + Yes 1228