Skip to content

Commit

Permalink
Treat MutableCharSpan and MutableByteSpan as "basic types".
Browse files Browse the repository at this point in the history
In particular, they are known to not be fabric-scoped.  This should allow
Encode() on these to work directly.
  • Loading branch information
bzbarsky-apple committed Jun 23, 2023
1 parent e39e16f commit 6063017
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app/data-model/BasicTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,24 @@ struct IsBasicType<ByteSpan>
static constexpr bool value = true;
};

template <>
struct IsBasicType<MutableByteSpan>
{
static constexpr bool value = true;
};

template <>
struct IsBasicType<CharSpan>
{
static constexpr bool value = true;
};

template <>
struct IsBasicType<MutableCharSpan>
{
static constexpr bool value = true;
};

} // namespace DataModel
} // namespace app
} // namespace chip

0 comments on commit 6063017

Please sign in to comment.