Skip to content

Commit

Permalink
Fix template function in TagBoundEncoder (#12273)
Browse files Browse the repository at this point in the history
Should take argument with perfect forwarding, otherwise non-copyable
arguments don't work.
  • Loading branch information
mlepage-google authored and pull[bot] committed Jul 22, 2022
1 parent 170c5da commit 1128170
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/data-model/TagBoundEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class TagBoundEncoder
TagBoundEncoder(TLV::TLVWriter * aWriter, TLV::Tag aTag) : mWriter(aWriter), mTag(aTag) {}

template <typename... Ts>
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<Ts>(aArgs)...);
Expand Down

0 comments on commit 1128170

Please sign in to comment.