Hi, I am looking for zero-sized data type, something like Flexible Array 
Member.
The size of `struct {}` is indeed zero, but for what reason when it's 
inside a struct with another member say (https://go.dev/play/p/DpydJIke7dS):

type C struct {
    Pre   uint64
    Inner struct{}
}

That struct sized for 16, while the sum of all member sizes is only 8, it's 
like there's hidden padding/align.

Thanks!
Nugraha

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/2f7254a8-379a-4dc2-bf10-70ee7a209af2n%40googlegroups.com.

Reply via email to