title: Boost Spirit Qi - Duplicate last letter with stream-based parsing
body: <p>This may be very obvious, but why does the stream-based parsing in boost duplicate the last letter? I must be doing something wrong:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;sstream&gt;
  
  #include &lt;boost/spirit/include/qi.hpp&gt;
  
  namespace qi = boost::spirit::qi;
  
  int main() {
      std::string input = "hello";
      std::stringstream ss(input);
  
      std::string r1, r2;
      boost::spirit::istream_iterator first(ss), last;
  
      qi::phrase_parse(input.begin(), input.end(), qi::lexeme[qi::alpha &gt;&gt; *qi::alnum], qi::space, r1);
  
      std::cout &lt;&lt; r1 &lt;&lt; std::endl; // prints "hello"
  
      qi::phrase_parse(first, last, qi::lexeme[qi::alpha &gt;&gt; *qi::alnum], qi::space, r2);
  
      std::cout &lt;&lt; r2 &lt;&lt; std::endl; // prints "helloo"
  }
  </code></pre>
  
  <p>Tested with XCode 5.0 and Boost 1.54.0.</p>
  
  <p><em>Edit:</em>
  The problem seems to be specific to libc++. Anybody using Clang care to confirm?</p>