File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -972,8 +972,15 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction(
972
972
// equivalence.
973
973
LocalInstantiationScope ScopeForParameters (S);
974
974
if (auto *FD = DeclInfo.getDecl ()->getAsFunction ())
975
- for (auto *PVD : FD->parameters ())
976
- ScopeForParameters.InstantiatedLocal (PVD, PVD);
975
+ for (auto *PVD : FD->parameters ()) {
976
+ if (!PVD->isParameterPack ()) {
977
+ ScopeForParameters.InstantiatedLocal (PVD, PVD);
978
+ continue ;
979
+ }
980
+ // Parameter packs should expand to a size-of-1 argument.
981
+ ScopeForParameters.MakeInstantiatedLocalArgPack (PVD);
982
+ ScopeForParameters.InstantiatedLocalPackArg (PVD, PVD);
983
+ }
977
984
978
985
std::optional<Sema::CXXThisScopeRAII> ThisScope;
979
986
Original file line number Diff line number Diff line change @@ -599,3 +599,26 @@ template <class DerT>
599
599
unsigned long DerivedCollection<DerTs...>::index() {}
600
600
601
601
} // namespace GH72557
602
+
603
+ namespace GH101735 {
604
+
605
+ template <class , class >
606
+ concept True = true ;
607
+
608
+ template <typename T>
609
+ class A {
610
+ template <typename ... Ts>
611
+ void method (Ts&... ts)
612
+ requires requires (T t) {
613
+ { t.method (static_cast <Ts &&>(ts)...) } -> True<void >;
614
+ };
615
+ };
616
+
617
+ template <typename T>
618
+ template <typename ... Ts>
619
+ void A<T>::method(Ts&... ts)
620
+ requires requires (T t) {
621
+ { t.method (static_cast <Ts &&>(ts)...) } -> True<void >;
622
+ } {}
623
+
624
+ }
You can’t perform that action at this time.
0 commit comments