Skip to content

Commit 82814f9

Browse files
author
Pavel Siska
committed
unirec++: skip type check for std::byte fields in UnirecRecord
Avoid calling getExpectedUnirecType for std::byte fields in checkDataTypeCompatibility(), since byte buffers are handled as raw data and don't have a defined Unirec type mapping.
1 parent 66562ae commit 82814f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

unirec/include/unirec++/unirecRecord.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,9 @@ class UnirecRecord {
339339
if (ur_is_array(fieldID)) {
340340
expectedType = getExpectedUnirecType<RequiredType*>();
341341
} else {
342-
expectedType = getExpectedUnirecType<RequiredType>();
342+
if constexpr (!std::is_same_v<RequiredType, std::byte>) {
343+
expectedType = getExpectedUnirecType<RequiredType>();
344+
}
343345
}
344346

345347
if (expectedType != ur_get_type(fieldID)) {

0 commit comments

Comments
 (0)