История изменений
Исправление safocl, (текущая версия) :
Какой еще инициализации? Там говорится что если начинается union с одного и того же в разных вариантах, то это первое значение (type, x.type) можно использовать всегда. Такое же правило у каста между структурами A и B, когда в начале B располагается A.
ну ты что читать не можешь?
contains several standard-layout structs that share a common initial sequence
and if a non-static data member of an object of this standard-layout union type is active and is one of the standard-layout structs, the common initial sequence of any of the standard-layout struct members can be inspected
Uint32 не является `standard-layout structs`
https://eel.is/c draft/class.prop#10
https://eel.is/c draft/class.mem.general#27
https://eel.is/c draft/class.mem#general-30
Исправление safocl, :
Какой еще инициализации? Там говорится что если начинается union с одного и того же в разных вариантах, то это первое значение (type, x.type) можно использовать всегда. Такое же правило у каста между структурами A и B, когда в начале B располагается A.
ну ты что читать не можешь?
contains several standard-layout structs that share a common initial sequence
and if a non-static data member of an object of this standard-layout union type is active and is one of the standard-layout structs, the common initial sequence of any of the standard-layout struct members can be inspected
Uint32 не является `standard-layout structs`
https://eel.is/c draft/class.prop#10
https://eel.is/c draft/class.mem.general#27
Исправление safocl, :
Какой еще инициализации? Там говорится что если начинается union с одного и того же в разных вариантах, то это первое значение (type, x.type) можно использовать всегда. Такое же правило у каста между структурами A и B, когда в начале B располагается A.
ну ты что читать не можешь?
contains several standard-layout structs that share a common initial sequence
and if a non-static data member of an object of this standard-layout union type is active and is one of the standard-layout structs, the common initial sequence of any of the standard-layout struct members can be inspected
Uint32 не является `standard-layout structs`
https://eel.is/c draft/class.prop#10
Исправление safocl, :
Какой еще инициализации? Там говорится что если начинается union с одного и того же в разных вариантах, то это первое значение (type, x.type) можно использовать всегда. Такое же правило у каста между структурами A и B, когда в начале B располагается A.
ну ты что читать не можешь?
contains several standard-layout structs that share a common initial sequence
and if a non-static data member of an object of this standard-layout union type is active and is one of the standard-layout structs, the common initial sequence of any of the standard-layout struct members can be inspected
Uint32 не является `standard-layout structs`
Исходная версия safocl, :
Какой еще инициализации? Там говорится что если начинается union с одного и того же в разных вариантах, то это первое значение (type, x.type) можно использовать всегда. Такое же правило у каста между структурами A и B, когда в начале B располагается A.
ну ты что читать не можешь?
contains several standard-layout structs that share a common initial sequence
and if a non-static data member of an object of this standard-layout union type is active and is one of the standard-layout structs, the common initial sequence of any of the standard-layout struct members can be inspected