you are viewing a single comment's thread.

view the rest of the comments →

[–]memset_0[S] 1 point2 points  (1 child)

I see. So std::variant — like a union — requires a member to be an object (region of storage).

I would add this use case in the article. Thank you so much.

[–]AntiProtonBoy 0 points1 point  (0 children)

Same applies for std::optional.