<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Issue 629: complex&lt;T&gt; insertion and locale dependence</title>
<meta property="og:title" content="Issue 629: complex&lt;T&gt; insertion and locale dependence">
<meta property="og:description" content="C++ library issue. Status: CD1">
<meta property="og:url" content="https://cplusplus.github.io/LWG/issue629.html">
<meta property="og:type" content="website">
<meta property="og:image" content="http://cplusplus.github.io/LWG/images/cpp_logo.png">
<meta property="og:image:alt" content="C++ logo">
<style>
  p {text-align:justify}
  li {text-align:justify}
  pre code.backtick::before { content: "`" }
  pre code.backtick::after { content: "`" }
  blockquote.note
  {
    background-color:#E0E0E0;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 1px;
    padding-bottom: 1px;
  }
  ins {background-color:#A0FFA0}
  del {background-color:#FFA0A0}
  table.issues-index { border: 1px solid; border-collapse: collapse; }
  table.issues-index th { text-align: center; padding: 4px; border: 1px solid; }
  table.issues-index td { padding: 4px; border: 1px solid; }
  table.issues-index td:nth-child(1) { text-align: right; }
  table.issues-index td:nth-child(2) { text-align: left; }
  table.issues-index td:nth-child(3) { text-align: left; }
  table.issues-index td:nth-child(4) { text-align: left; }
  table.issues-index td:nth-child(5) { text-align: center; }
  table.issues-index td:nth-child(6) { text-align: center; }
  table.issues-index td:nth-child(7) { text-align: left; }
  table.issues-index td:nth-child(5) span.no-pr { color: red; }
  @media (prefers-color-scheme: dark) {
     html {
        color: #ddd;
        background-color: black;
     }
     ins {
        background-color: #225522
     }
     del {
        background-color: #662222
     }
     a {
        color: #6af
     }
     a:visited {
        color: #6af
     }
     blockquote.note
     {
        background-color: rgba(255, 255, 255, .10)
     }
  }
</style>
</head>
<body>
<hr>
<p><em>This page is a snapshot from the LWG issues list, see the <a href="lwg-active.html">Library Active Issues List</a> for more information and the meaning of <a href="lwg-active.html#CD1">CD1</a> status.</em></p>
<h3 id="629"><a href="lwg-defects.html#629">629</a>. <code>complex&lt;T&gt;</code> insertion and locale dependence</h3>
<p><b>Section:</b> 29.4.6 <a href="https://wg21.link/complex.ops">[complex.ops]</a> <b>Status:</b> <a href="lwg-active.html#CD1">CD1</a>
 <b>Submitter:</b> Gabriel Dos Reis <b>Opened:</b> 2007-01-28 <b>Last modified:</b> 2016-01-28</p>
<p><b>Priority: </b>Not Prioritized
</p>
<p><b>View all other</b> <a href="lwg-index.html#complex.ops">issues</a> in [complex.ops].</p>
<p><b>View all issues with</b> <a href="lwg-status.html#CD1">CD1</a> status.</p>
<p><b>Discussion:</b></p>
<p>
is there an issue opened for (0,3) as complex number with
the French local?  With the English local, the above parses as an
imaginery complex number.  With the French locale it parses as a
real complex number.
</p>

<p>
Further notes&#47;ideas from the lib-reflector, messages 17982-17984:
</p>

<blockquote>
<p>
Add additional entries in <code>num_punct</code> to cover the complex separator (French would be ';').
</p>
<p>
Insert a space before the comma, which should eliminate the ambiguity.
</p>
<p>
Solve the problem for ordered sequences in general, perhaps with a
dedicated facet.  Then complex should use that solution.
</p>
</blockquote>

<p><i>[
Bellevue:
]</i></p>


<blockquote>
<p>
After much discussion, we agreed on the following: Add a footnote:
</p>
<p>
[In a locale in which comma is being used as a decimal point character,
inserting "showbase" into the output stream forces all outputs to show
an explicit decimal point character; then all inserted complex sequences
will extract unambiguously.]
</p>
<p>
And move this to READY status.
</p>
</blockquote>

<p><i>[
Pre-Sophia Antipolis, Howard adds:
]</i></p>


<blockquote><p>
Changed "showbase" to "showpoint" and changed from Ready to Review.
</p></blockquote>

<p><i>[
Post-Sophia Antipolis:
]</i></p>


<blockquote>
<p>
I neglected to pull this issue from the formal motions page after the "showbase" to "showpoint" change.
In Sophia Antipolis this change was reviewed by the LWG and the issue was set to Ready.  We subsequently
voted the footnote into the WP with "showbase".
</p>
<p>
I'm changing from WP back to Ready to pick up the "showbase" to "showpoint" change.
</p>
</blockquote>



<p id="res-629"><b>Proposed resolution:</b></p>
<p>
Add a footnote to 29.4.6 <a href="https://wg21.link/complex.ops">[complex.ops]</a> p16:
</p>

<blockquote><p>
[In a locale in which comma is being used as a decimal point character,
inserting <code>showpoint</code> into the output stream forces all outputs to show
an explicit decimal point character; then all inserted complex sequences
will extract unambiguously.]
</p></blockquote>





</body>
</html>
