title: C++ vector::push_back using default copy constructor
body: <p>I have a class (Uniform) that has a constructor with 2 parameters, and a default copy constructor (it only contains int, floats, a std::vector and a std::map). I created a</p>
  <pre><code>std::vector&lt;Uniform&gt; uniforms
  </code></pre>
  <p>that I want to fill using the</p>
  <pre><code>uniforms.push_back()
  </code></pre>
  <p>line. I use this code to do that (the 2nd line is just here to test the copy constructor, as it currently fails)</p>
  <pre><code>Uniform uni(uniform_name,type);
  Uniform uni2=uni;
  uniforms.push_back(uni2);
  </code></pre>
  <p>The default constructor works fine, the &quot;uni2=uni&quot; compiles without problem (so the default copy constructor is OK too), but the push_back returns (using g++ as a compiler):</p>
  <blockquote>
  <p>/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/ext/new_allocator.h:108:9: erreur: no matching function for call to ‘Uniform::Uniform(const Uniform&amp;)’</p>
  <p>/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/ext/new_allocator.h:108:9: note: candidates are:</p>
  <p>./inc/uniform.h:16:5: note: Uniform::Uniform(std::string, Uniform_Type)</p>
  <p>./inc/uniform.h:16:5: note:   candidate expects 2 arguments, 1 provided</p>
  <p>./inc/uniform.h:14:7: note: Uniform::Uniform(Uniform&amp;)</p>
  <p>./inc/uniform.h:14:7: note:   no known conversion for argument 1 from ‘const Uniform’ to ‘Uniform&amp;’</p>
  </blockquote>
  <p>Thanks :)</p>