I have a factory for creating containers based on ugly containers
template<class T>
std::vector<T> containerFactory(const UglyContainer* uglyContainer)
{
std::vector<T> container(uglyContainer->count);
Getter getter;
for(unsigned int i=0;i<uglyContainer->count;++i)
{
getter(container[i], uglyContainer->values[i]);
}
return container;
}
How might I go about complementing containerFactory with a factory function which returns const std::vector?