= DeduceTemplateArguments(Context, TemplateParams, SpecParam, Arg,
Info, Deduced);
- if (Result && (TDF & TDF_DerivedClass) &&
- Result != Sema::TDK_Inconsistent) {
+ if (Result && (TDF & TDF_DerivedClass)) {
// C++ [temp.deduct.call]p3b3:
// If P is a class, and P has the form template-id, then A can be a
// derived class of the deduced A. Likewise, if P is a pointer to a
// note that we had some success.
if (BaseResult == Sema::TDK_Success)
Successful = true;
- // If deduction against this base resulted in an inconsistent
- // set of deduced template arguments, template argument
- // deduction fails.
- else if (BaseResult == Sema::TDK_Inconsistent)
- return BaseResult;
}
// Visit base classes
struct D : public C<int, 1> { };
struct E : public D { };
struct F : A<float> { };
+struct G : A<float>, C<int, 1> { };
template<typename T, int I>
C<T, I> *f4a(const C<T, I>&);
C<T, I> *f4c(C<T, I>*);
int *f4c(...);
-void test_f4(D d, E e, F f) {
+void test_f4(D d, E e, F f, G g) {
C<int, 1> *ci1a = f4a(d);
C<int, 1> *ci2a = f4a(e);
C<int, 1> *ci1b = f4b(d);
C<int, 1> *ci2b = f4b(e);
C<int, 1> *ci1c = f4c(&d);
C<int, 1> *ci2c = f4c(&e);
+ C<int, 1> *ci3c = f4c(&g);
int *ip1 = f4c(&f);
}