<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - istream fails to parse a number followed by "x""
   href="http://llvm.org/bugs/show_bug.cgi?id=22372">22372</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>istream fails to parse a number followed by "x"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>alessandro@pintle.it
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu, mclow.lists@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I apologize if this was already reported or fixed; I couldn't find any matching
bug report. I also apologize if this is not a bug and it's expected/undefined
behavior.

This can be reproduced using the libc++ version that is carried with MacOS X
Yosemite.

#include <stdio.h>
#include <limits>
#include <iostream>
#include <sstream>

int main( ) {
  double x = 0;
  double y = 0;
  std::string point_str("4x5");
  std::istringstream iss(point_str);

  // Prints "0,0" on Yosemite, "4,5" on other platforms
  iss >> x;
  iss.ignore(std::numeric_limits<std::streamsize>::max(), 'x');
  iss >> y;
  std::cout << x << "," << y << std::endl;
}</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>