logoalt Hacker News

ketzuyesterday at 8:50 PM2 repliesview on HN

"zero sized objects don't have identity" actually would answer my question and is a really interesting factoid, thanks!


Replies

tialaramexyesterday at 9:43 PM

This is why C++ doesn't have ZSTs, it wants all objects to have identities, the obvious way to distinguish them is by where they are in memory, but ZSTs don't have distinct addresses in memory.