Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Enums nested in Structs, variables with values in Structs #212

Answered by dcharkes
kirill-21 asked this question in Q&A
Discussion options

You must be logged in to vote

8 bytes on x64: https://godbolt.org/z/jn7G33zKP
4 bytes on ia32: https://godbolt.org/z/oxa41jnr1

(You can sum up the bits manually as well 😄 which is precisely 32, but it's probably safer to use sizeof to see what the compiler is actually doing.)

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
9 replies
@dcharkes
Comment options

@dcharkes
Comment options

@kirill-21
Comment options

@dcharkes
Comment options

Answer selected by kirill-21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants