title: Why do different GCC 4.9.2 installations give different results for this regex match?
body: <p>I posted the following code on <a href="http://ideone.com/uwX850" rel="noreferrer">ideone</a> and <a href="http://coliru.stacked-crooked.com/a/e62775d39c257dd0" rel="noreferrer">Coliru</a>:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;regex&gt;
  #include &lt;string&gt;
  
  int main() 
  {
      std::string example{"   &lt;match1&gt;  &lt;match2&gt;    &lt;match3&gt;"};
      std::regex re{"&lt;([^&gt;]+)&gt;"};
      std::regex_token_iterator&lt;std::string::iterator&gt; it{example.begin(), example.end(), re, 1};
      decltype(it) end{};
      while (it != end) std::cout &lt;&lt; *it++ &lt;&lt; std::endl;
      return 0;
  }
  </code></pre>
  
  <p>Both sites use GCC 4.9.2. I don't know what compilation arguments ideone uses, but there is nothing unusual in Coliru's.</p>
  
  <p>Coliru doesn't give me the <code>match1</code> result:</p>
  
  <h3>Coliru</h3>
  
  <pre><code># g++ -v 2&gt;&amp;1 | grep version; \
  # g++ -std=c++14 -O2 -Wall -pedantic -pthread main.cpp &amp;&amp; ./a.out
  gcc version 4.9.2 (GCC) 
  match2
  match3
  </code></pre>
  
  <h3>ideone (and, incidentally, <a href="http://coliru.stacked-crooked.com/a/db830d26223fab33" rel="noreferrer">Coliru's clang 3.5.0 using libc++</a>)</h3>
  
  <pre><code>match1
  match2
  match3
  </code></pre>
  
  <p>Does my code have undefined behaviour or something? What could cause this?</p>