Better HN
topnewbestaskshowjobs
Log inSign up

jjdisn

1 karma · joined May 28, 2024 (2y ago) · 1 submissions

Submissions

comment 2y ago · link · parent

Honest question: what's wrong with std::variant? I'm quite fond of using it.

Sure it has trade offs like being empty by exception, but that's necessary if you don't want it to allocate.

Also, pattern matching would be nice instead of std::get with visitor, but that's more of a language issue than an std::variant issue