cpp17_in_TTs icon indicating copy to clipboard operation
cpp17_in_TTs copied to clipboard

Add a bit about monostate in std::variant section?

Open jmarrec opened this issue 5 years ago • 0 comments

Thank you for the link to the ALL_IN_ONE.md and the work behind it. What a great read, I wish I knew it existed before!

By usage, I found one thing that's hard/awkward with std::variant is when your types aren't defaulted constructible (or when you want an option for the case where it's not initialized (optional)), with the use of std::monostate. Perhaps adding a small bit about this would be good?

I realize this isn't meant to replace actual documentation but rather get to the point (and it's doing an awesome job at it!), so perhaps that would be considered clutter, I'm not sure.

jmarrec avatar Dec 11 '20 07:12 jmarrec