test: Add check for return type in HasToBytes concept

Add return type check for `ToBytes()` which should be convertible to
`std::span<const std::byte>`.
This commit is contained in:
yuvicc
2026-04-01 20:12:58 +05:30
parent 1ad551281a
commit 577a3e74c8

View File

@@ -265,7 +265,9 @@ void run_verify_test(
}
template <typename T>
concept HasToBytes = requires(T t) { t.ToBytes(); };
concept HasToBytes = requires(T t) {
{ t.ToBytes() } -> std::convertible_to<std::span<const std::byte>>;
};
template <typename T>
void CheckHandle(T object, T distinct_object)