Defined in carb/variant/VariantUtils.h

template<class Type>
VariantData carb::variant::translate(Type &&type) noexcept

A helper function to translate a typed value into a VariantData via a Translator.

A compile error will occur if no Translator could be found for the decayed type.


type – The value of type Type.


A VariantData constructed from type. traits::destruct() must be called on the VariantData when finished with it.