r/cpp • wx | soci | swig • Jun 17 '15

Standardizing Variant: Difficult Decisions

https://www.justsoftwaresolutions.co.uk/cplusplus/standardizing-variant.html
32 Upvotes

56 comments sorted by

View all comments

Show parent comment

3

u/eric_niebler Jun 18 '15

This behavior is easily implemented in terms of the variant currently proposed and optional with some trivial forwarding functions.

-1

u/foonathan Jun 18 '15

Of course it is. I was just argueing against your point that an empty state leads to conditionals in user code. This is not the case (idiomatic use taken for granted).