Исправление shdown, (текущая версия) :
Ты сам же процитировать часть, из которой следует, что это не UB:
- an aggregate or union type that includes one of the aforementioned
types among its members (including, recursively, a member of a
subaggregate or contained union), or
struct S
содержит int
в качестве члена. Словом “aggregate” в стандарте называется структура (struct).
Исходная версия shdown, :
Ты сам же процитировать часть, из которой следует, что это не UB:
- an aggregate or union type that includes one of the aforementioned
types among its members (including, recursively, a member of a
subaggregate or contained union), or
struct S
содержит int
в качестве члена.