template template parameters with container and default allocator: can I make my declaration more compact? <p>I was looking at this interesting thread: <a href="http://stackoverflow.com/a/16596463/2436175">http://stackoverflow.com/a/16596463/2436175</a></p> <p>My specific case concerns declaring a templated function using a std container of cv::Point_ and cv::Rect_ from opencv. I want to template against: </p> <ul> <li>the type of std container I will use</li> <li>the basic data types to complete the definition of cv::Point_ and cv::Rect_</li> </ul> <p>I ended up with the following declaration:</p> <pre><code>template &lt;typename T, template &lt;typename, typename&gt; class Container_t&gt; void CreateRects(const Container_t&lt;cv::Point_&lt;T&gt;,std::allocator&lt;cv::Point_&lt;T&gt; &gt; &gt;&amp; points, const T value, Container_t&lt;cv::Rect_&lt;T&gt;,std::allocator&lt;cv::Rect_&lt;T&gt; &gt; &gt;&amp; rects) { } </code></pre> <p>which compiles fine with this:</p> <pre><code>void dummy() { const std::vector&lt;cv::Point_&lt;double&gt; &gt; points; std::vector&lt;cv::Rect_&lt;double&gt; &gt; rects; CreateRects(points,5.0,rects); } </code></pre> <p>(I have also seen that I can also use, for example, <code>CreateRects&lt;double&gt;(points,5,rects)</code>)</p> <p>I was wondering if there existed any way to make my declaration more compact, e.g. without the need to specify 2 times the default allocator.</p>