NamedDecl *ToParam = ToTP->getParam(N - I - 1);
if (auto *FTTP = dyn_cast<TemplateTypeParmDecl>(FromParam)) {
- if (inheritDefaultTemplateArgument(Context, FTTP, ToParam))
+ if (!inheritDefaultTemplateArgument(Context, FTTP, ToParam))
break;
} else if (auto *FNTTP = dyn_cast<NonTypeTemplateParmDecl>(FromParam)) {
- if (inheritDefaultTemplateArgument(Context, FNTTP, ToParam))
+ if (!inheritDefaultTemplateArgument(Context, FNTTP, ToParam))
break;
} else {
- if (inheritDefaultTemplateArgument(
+ if (!inheritDefaultTemplateArgument(
Context, cast<TemplateTemplateParmDecl>(FromParam), ToParam))
break;
}
template<typename = int> struct A;
template<int = 0> struct B;
template<template<typename> class = A> struct C;
+ template<typename = int, int = 0, template<typename> class = A> struct D {};
template<typename U> struct Y {
template<typename> friend struct A;
template<int> friend struct B;
template<template<typename> class> friend struct C;
+ template<typename, int, template<typename> class> friend struct D;
};
}
template<typename T = int> struct F;
+template<typename T, typename U> struct I;
template<typename T, int N, template<typename> class K> struct J;
J<> post_j2;
FriendDefArg::Y<int> friend_def_arg;
+FriendDefArg::D<> friend_def_arg_d;
template<typename T = int> struct D;
template<typename T = int> struct E {};
template<typename T> struct H {};
+template<typename T = int, typename U = int> struct I {};
#include "b.h"
// expected-note@a.h:6 {{default argument declared here}}
H<> h; // expected-error {{default argument of 'H' must be imported from module 'X.A' before it is required}}
// expected-note@a.h:7 {{default argument declared here}}
+I<> i;