title: istream_iterator invalid when using std::copy
body: <p>I'm trying to copy some <code>ints</code> from <code>stdin</code> into a <code>vector</code>. I have the code working but I'm unsure why I need the <code>()</code> after the second argument of <code>copy</code>. By this I mean the <code>istream_iterator&lt;int&gt;()</code> argument in the <code>copy</code> call.</p>
  
  <p>Code here...</p>
  
  <pre><code>#include &lt;iterator&gt;
  #include &lt;vector&gt;
  #include &lt;iostream&gt;
  
  using std::vector;
  using std::copy;
  using std::cin;
  using std::istream_iterator;
  
  int main()
  {   
       vector&lt;int&gt; nums;
       copy(istream_iterator&lt;int&gt;(cin), istream_iterator&lt;int&gt;(), back_inserter(nums)); // why do I need the empty brackets after the 2nd argument?
  
       return 0;
  }   
  </code></pre>
  
  <p>If I remove the brackets I get an error from the compiler, however if I slightly modify my code to code below my program works fine.</p>
  
  <pre><code>int main()
  {   
       vector&lt;int&gt; nums;
       istream_iterator&lt;int&gt; end; // no brackets used here
       copy(istream_iterator&lt;int&gt;(cin), end, back_inserter(nums)); 
  
       return 0;
  }  
  </code></pre>
  
  <p>I'm coming from a Java background so empty brackets simply means you have used an empty constructor. The first code snippet goes against what I thought I understood, from my understanding in C++ if you  want to use an empty constructor you simply miss off the <code>()</code> however this isn't the case here</p>
  
  <p>help! </p>