Factory function returning const
<p>I have a factory for creating containers based on ugly containers    </p>

<pre><code>template&lt;class T&gt;
std::vector&lt;T&gt; containerFactory(const UglyContainer* uglyContainer)
{
    std::vector&lt;T&gt; container(uglyContainer-&gt;count);
    Getter getter;
    for(unsigned int i=0;i&lt;uglyContainer-&gt;count;++i)
    {
        getter(container[i], uglyContainer-&gt;values[i]);
    }
    return container;
}
</code></pre>

<p>How might I go about complementing containerFactory with a factory function which returns const std::vector? </p>
