Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I used it together with type() to read the variant's current type and act on that.

The std::variant has a bit nicer API compared to boost with e.g holds_alternative. I expect I would create a make_visitor wrapper myself or use an open source one if needed, but it wasn't needed.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: