Skip to content

Commit 9bbd249

Browse files
authored
Fix a static assertion incompatible with C++98 (ruby#14229)
1 parent 38558dd commit 9bbd249

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

include/ruby/internal/core/rtypeddata.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,9 @@ struct RTypedData {
375375
void *data;
376376
};
377377

378+
#if !defined(__cplusplus) || __cplusplus >= 201103L
378379
RBIMPL_STATIC_ASSERT(data_in_rtypeddata, offsetof(struct RData, data) == offsetof(struct RTypedData, data));
380+
#endif
379381

380382
RBIMPL_SYMBOL_EXPORT_BEGIN()
381383
RBIMPL_ATTR_NONNULL((3))

0 commit comments

Comments
 (0)