Skip to content

Commit

Permalink
Treat MutableCharSpan and MutableByteSpan as "basic types". (#27441)
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 authored and pull[bot] committed Oct 6, 2023
1 parent 52740bc commit 3901763
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 3901763

Please sign in to comment.