title: base class 'class std::vector<...>' has a non-virtual destructor
body: <p>One of my C++ classes derives from <code>std::vector</code> so that it can act as a container that also perform custom actions on its content. Unfortunately, the compiler complains about the destructor not to be virtual, which I cannot change, since its in the standard library.</p>
  
  <p>Am I doing the whole thing wrong (thou shall not derive from STL) or is there something I could do to keep the compiler happy ? (appart from stop using -Weffc++ :)</p>
  
  <p><em>edit</em>: the derived class do not touch the vector-manipulation algorithms, but merely add some information such as "element width/height" for a vector of images. As an example, you could think of </p>
  
  <pre><code>class PhotoAlbum: public std::vector&lt;Photo&gt; {
      String title;
      Date from_time, to_time;
      // accessors for title and dates
      void renderCover(Drawable &amp;surface);
  };
  </code></pre>
  
  <p>where you think of a photo album primarily as a collection of pictures with some meta-data (title and time) and album-specific features such as rendering a thumbnail of some Photo onto a surface to make the album cover. So imho, the photo album IS-A collection of <code>Photo</code>, more than it HAS-A such collection.</p>
  
  <p>I fail to see any benefit I'd gain of having <code>getPhotoVector()</code> method in a <code>PhotoAlbum</code> that would have an extra "collection" field.</p>