{ \
if (ElementTypeID != ExpectedTypeID) { \
size_t __bytes_that_would_have_been_written =
snprintf( \
NULL, 0, \
#ElementName " implementation '%s'(%p) does not match rmw implementation '%s'(%p)", \
ElementTypeID, ElementTypeID, ExpectedTypeID, ExpectedTypeID); \
char * __msg = \
reinterpret_cast<
char *>(
rmw_allocate(__bytes_that_would_have_been_written + 1)); \
snprintf( \
__msg, __bytes_that_would_have_been_written + 1, \
#ElementName " implementation '%s'(%p) does not match rmw implementation '%s'(%p)", \
ElementTypeID, ElementTypeID, ExpectedTypeID, ExpectedTypeID); \
RMW_SET_ERROR_MSG(__msg); \
rmw_free(__msg); \
OnFailure; \
} \
}
void * rmw_allocate(size_t size)