now, this isn't always true! #cpp folks have been investigating adding pattern matching, even though they have std::variant
Sometimes, it generates the same code, but is just way harder to write: godbolt.org/z/59rWd1E45
or if you want to get fancy (got help for this one) godbolt.org/z/6W4b89GKd
Compiler Explorer
If you have a fediverse account, you can quote this note from your own instance. Search https://bsky.brid.gy/convert/ap/at://did:plc:3danwc67lo7obz2fmdg6jxcr/app.bsky.feed.post/3lmcvk5cyls2e on your instance and quote it. (Note that quoting is not supported in Mastodon.)