title: template argument deduction/substitution failed
body: <p>I want to implement a container which can accept initial list of elements by supplying the constructor with sequence of values. </p>
  
  <pre><code>  9 template &lt;typename C, int max&gt;
   10 struct c_array
   11 {
   12     typedef C value_type;
   13 
   14     typedef C* iterator;
   15     typedef const C* const_iterator;
   16 
   17     typedef C&amp; reference;
   18     typedef const C&amp; const_reference;
   19 
   20     c_array() { }
   21     template &lt;class T&gt;
   22         c_array(typename T::iterator begin,typename T::iterator end)
   23         {
   24         }
   25 
   26     C v[max];
   27     operator C*() { return v; }
   28 
   29     reference operator[] (ptrdiff_t i) { return v[i]; }
   30     const_reference operator[] (ptrdiff_t i) const { return v[i]; }
   31 
   32     iterator begin() { return v; }
   33     const_iterator begin() const { return v; }
   34 
   35     iterator end() { return v+max; }
   36     const_iterator end() const { return v+max; }
   37 
   38     size_t size() const { return max; }
   39 };
   40 
   41 int main(int argc, char** argv)
   42 { 
   43     std::vector&lt;int&gt; myvector(10,10);
   44     c_array&lt;int,10&gt; myarray1(myvector.begin(),myvector.end());
          ... 
  </code></pre>
  
  <p>I am getting the following error while compiling</p>
  
  <pre><code> ...
   test.cc:56:61: error: no matching function for call to ‘c_array&lt;int, 10&gt;::c_array(std::vector&lt;int&gt;::iterator, std::vector&lt;int&gt;::iterator)’
   test.cc:56:61: note: candidates are:
   test.cc:22:9: note: template&lt;class T&gt; c_array::c_array(typename T::iterator, typename T::iterator)
   test.cc:22:9: note:   template argument deduction/substitution failed:
   test.cc:56:61: note:   couldn't deduce template parameter ‘T’
   ...
  </code></pre>
  
  <p>Thanks in advance,</p>