i defined a variant where the values having different datatypes like int, float, string.
std::variant<int, float, string>> storage;
i can’t use the get method, because id don’t know the exact datatype of the values.
std::get<specified datatype>(storage); // can't use this.
what i need is something like a function that typecheck the value, converting it into different datatype.
test = std::get<int>(storage); // get wrong datatype
because of the , i can’t know which datatype i have. how can i get the typeid and check it which datatype it its to convert it.