Is there a way to create a variant of std::vector?
explained by following code:
rttr::variant createVectorVariant(const rttr::type& vectorType)
{
if(vectorType == rttr::type::get<std::vector<int>>())
{
return rttr::variant(std::vector<int>());
}
else if(vectorType == rttr::type::get<std::vector<float>>())
{
return rttr::variant(std::vector<float>());
}
else if ...
//endless type checks, and vectorType.create() doesn't work
//is there an actual way to implement this function?
}
Hello,
Is there a way to create a variant of std::vector? explained by following code: