diff --git a/src/app/data-model/TagBoundEncoder.h b/src/app/data-model/TagBoundEncoder.h index aa0d89455517ec..583704e16b87c0 100644 --- a/src/app/data-model/TagBoundEncoder.h +++ b/src/app/data-model/TagBoundEncoder.h @@ -39,7 +39,7 @@ class TagBoundEncoder TagBoundEncoder(TLV::TLVWriter * aWriter, TLV::Tag aTag) : mWriter(aWriter), mTag(aTag) {} template - CHIP_ERROR Encode(Ts... aArgs) const + CHIP_ERROR Encode(Ts &&... aArgs) const { VerifyOrReturnError(mWriter != nullptr, CHIP_ERROR_INCORRECT_STATE); return DataModel::Encode(*mWriter, mTag, std::forward(aArgs)...);