Why C++ containers does not implement interfaces
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1039853/why-is-the-c-stl-is-so-heavily-based-on-templates-and-not-on-interfaces">Why is the C++ STL is so heavily based on templates? (and not on <em>interfaces</em>)</a>  </p>
</blockquote>



<p>Why doesn't neither <code>stl</code>nor <code>Qt</code> containers implement interfaces. For example, it colud be <code>Enumerable</code> for <code>vectors</code> and <code>lists</code>. </p>

<p>Like this:</p>

<pre><code>template &lt;typename T&gt;
class Enumerable
{
public:
    virtual const T at(int k) = 0;
    //....
    virtual ~Enumerable() {}
};

template &lt;typename T&gt;
class Vector: public Enumerable&lt;T&gt;
{
public:
    virtual const T at(int k);
    //....
};
</code></pre>

<p>As a result, code that I use, forces me to use concrete types of containers, that are used in it.</p>
