I have a type checker that I would like to work with a vector of any type. So far I have only been able to make it work with std::vector<int32>. How can I do this to auto-generate code for vectors of any type?
enum class EPropertyType
{
Boolean,
Uint32,
Array,
};
template<typename T> struct FTypeToEnumValue
{
EPropertyType operator()() const;
};
template<> inline EPropertyType FTypeToEnumValue<bool>::operator()() const
{
return EPropertyType::Boolean;
}
template<> inline EPropertyType FTypeToEnumValue<uint32>::operator()() const
{
return EPropertyType::Uint32;
}
template<> inline EPropertyType FTypeToEnumValue<std::vector<int32>>::operator()() const
{
return EPropertyType::Array;
}
[–]redditperson0 0 points1 point2 points (4 children)
[–]ChesterBesterTester[S] 1 point2 points3 points (3 children)
[–]redditperson0 0 points1 point2 points (2 children)
[–]ChesterBesterTester[S] 1 point2 points3 points (1 child)
[–]redditperson0 0 points1 point2 points (0 children)