diff options
Diffstat (limited to 'clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp')
| -rw-r--r-- | clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp b/clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp index 6b45a8bb2ae..011130d0e77 100644 --- a/clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp +++ b/clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp @@ -136,4 +136,17 @@ namespace look_into_current_instantiation { B(typename X::type); // expected-note {{couldn't infer template argument 'T'}} }; B b = 0; // expected-error {{no viable}} + + // We should have a substitution failure in the immediate context of + // deduction when using the C(T, U) constructor (probably; core wording + // unclear). + template<typename T> struct C { + using U = typename T::type; + C(T, U); + }; + + struct R { R(int); typedef R type; }; + C(...) -> C<R>; + + C c = {1, 2}; } |

