diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-14 15:38:35 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-14 15:38:35 +0000 |
commit | d2e0a8dd949ab874c6d66f97106bd5c270e2fa7d (patch) | |
tree | e8a99a0386e8f6bece630700da5915c8a312c2d9 /test/SemaTemplate/deduction.cpp | |
parent | fdc82ccb3f2b23a89e7002fe8238e1422b00f96a (diff) |
Diffstat (limited to 'test/SemaTemplate/deduction.cpp')
-rw-r--r-- | test/SemaTemplate/deduction.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/SemaTemplate/deduction.cpp b/test/SemaTemplate/deduction.cpp index 0c0e7d599ccb..16e01a934630 100644 --- a/test/SemaTemplate/deduction.cpp +++ b/test/SemaTemplate/deduction.cpp @@ -383,6 +383,23 @@ namespace deduction_after_explicit_pack { template<typename... T> struct X { X(int); operator int(); }; template<typename... T> void p(T..., X<T...>, ...); // expected-note {{deduced conflicting}} void q() { p(X<int>(0), 0); } // expected-error {{no match}} + + struct A { + template <typename T> void f(T, void *, int = 0); // expected-note 2{{no known conversion from 'double' to 'void *' for 2nd argument}} + void f(); // expected-note 2{{requires 0}} + + template <typename T> static void g(T, void *, int = 0); // expected-note 2{{no known conversion from 'double' to 'void *' for 2nd argument}} + void g(); // expected-note 2{{requires 0}} + + void h() { + f(1.0, 2.0); // expected-error {{no match}} + g(1.0, 2.0); // expected-error {{no match}} + } + }; + void f(A a) { + a.f(1.0, 2.0); // expected-error {{no match}} + a.g(1.0, 2.0); // expected-error {{no match}} + } } namespace overload_vs_pack { |