title: How to write a type trait `is_container` or `is_vector`?
body: <p>Is it possible to write a type trait whose value is true for all common STL structures (e.g., <code>vector</code>, <code>set</code>, <code>map</code>, ...)?</p>
  
  <p>To get started, I'd like to write a type trait that is true for a <code>vector</code> and false otherwise. I tried this, but it doesn't compile:</p>
  
  <pre><code>template&lt;class T, typename Enable = void&gt;
  struct is_vector {
    static bool const value = false;
  };
  
  template&lt;class T, class U&gt;
  struct is_vector&lt;T, typename boost::enable_if&lt;boost::is_same&lt;T, std::vector&lt;U&gt; &gt; &gt;::type&gt; {
    static bool const value = true;
  };
  </code></pre>
  
  <p>The error message is <code>template parameters not used in partial specialization: U</code>. </p>