mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-16 02:27:43 +02:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user