Closed strasdat closed 6 years ago
@strasdat - there are some meta-functions to get index
for a particular type but not other way around.
If you have a compelling use-case for variant_alternative
could you share it here, so it can be used as inspiration to add support, pls.
@strasdat - could you try and let me know if variant_alternative
works for you https://github.com/mapbox/variant/pull/162
Thanks; motivation is serialization/deserialization; using frameworks such as boost serialization or cereal.
I will see whether I find some time to try this out tonight...
variant_size
and variant_alternative
are now in master.
Is there an equivalent to
std::variant_alternative
(http://en.cppreference.com/w/cpp/utility/variant/variant_alternative)?I could not find it, but maybe I just did not look hard enough ;)