title: Declare template function to accept any container but only one contained type
body: <p>I want to declare a function that accepts different STL containers, but they must contain objects of a specific class (e.g. it should accept <code>std::vector&lt;double&gt;</code> and <code>std::deque&lt;double&gt;</code> but no <code>std::vector&lt;std::string&gt;</code>).</p>
  
  <p>I have found answers for templating both the container and the contained types, but my attempts to adapt them so that the contained type is fixed have been unsuccessful.</p>