@@ -3083,8 +3083,7 @@ static TemplateDeductionResult ConvertDeducedTemplateArguments(
3083
3083
3084
3084
// If there was no default argument, deduction is incomplete.
3085
3085
if (DefArg.getArgument ().isNull ()) {
3086
- Info.Param = makeTemplateParameter (
3087
- const_cast <NamedDecl *>(TemplateParams->getParam (I)));
3086
+ Info.Param = makeTemplateParameter (TemplateParams->getParam (I));
3088
3087
Info.reset (
3089
3088
TemplateArgumentList::CreateCopy (S.Context , CTAI.SugaredConverted ),
3090
3089
TemplateArgumentList::CreateCopy (S.Context , CTAI.CanonicalConverted ));
@@ -3100,8 +3099,7 @@ static TemplateDeductionResult ConvertDeducedTemplateArguments(
3100
3099
if (S.CheckTemplateArgument (
3101
3100
Param, DefArg, TD, TD->getLocation (), TD->getSourceRange ().getEnd (),
3102
3101
/* ArgumentPackIndex=*/ 0 , CTAI, Sema::CTAK_Specified)) {
3103
- Info.Param = makeTemplateParameter (
3104
- const_cast <NamedDecl *>(TemplateParams->getParam (I)));
3102
+ Info.Param = makeTemplateParameter (TemplateParams->getParam (I));
3105
3103
// FIXME: These template arguments are temporary. Free them!
3106
3104
Info.reset (
3107
3105
TemplateArgumentList::CreateCopy (S.Context , CTAI.SugaredConverted ),
@@ -3227,7 +3225,7 @@ static TemplateDeductionResult FinishTemplateArgumentDeduction(
3227
3225
if (ParamIdx >= TPL->size ())
3228
3226
ParamIdx = TPL->size () - 1 ;
3229
3227
3230
- Decl *Param = const_cast <NamedDecl *>( TPL->getParam (ParamIdx) );
3228
+ Decl *Param = TPL->getParam (ParamIdx);
3231
3229
Info.Param = makeTemplateParameter (Param);
3232
3230
Info.FirstArg = Ps[ArgIdx].getArgument ();
3233
3231
return TemplateDeductionResult::SubstitutionFailure;
0 commit comments