Bizarre C++ compiler problem
<p>I have the following C++ code:</p>

<pre><code>typedef istream_iterator&lt;string&gt; isi;

// (1)
vector&lt;string&gt; lineas(isi(cin), isi());

// (2)
//vector&lt;string&gt; lineas;
//copy(isi(cin), isi(), back_inserter(lineas));

typedef vector&lt;string&gt;::iterator vci;
for (vci it = lineas.begin(); it != lineas.end(); ++it)
    cout &lt;&lt; *it &lt;&lt; endl;
</code></pre>

<p>However, I get the error while compiling:</p>

<pre><code>test.cpp: In function 'int main(int, char**)':
test.cpp:16: error: request for member 'begin' in 'lineas', which is of non-class type 'std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;(main(int, char**)::isi, main(int, char**)::isi (*)())'
test.cpp:16: error: request for member 'end' in 'lineas', which is of non-class type 'std::vector&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;(main(int, char**)::isi, main(int, char**)::isi (*)())'
</code></pre>

<p>However, if I replace (1) by (2), it compiles.</p>

<p>I'm using g++ 4.4.0</p>

<p>What's wrong?</p>
