summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/deduction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/deduction.cpp')
-rw-r--r--test/SemaTemplate/deduction.cpp17
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 {