<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
  <meta name="generator" content=
  "HTML Tidy for OS/2 (vers 1 September 2005), see www.w3.org">
<style type="text/css">
      del { font-weight:bold;background-color:#ffa0a0 }
      ins { font-weight:bold;background-color:#a0ffa0 }
      blockquote {
      display: block;
      font-family: "Times New Roman";
      background-color:lightgray;
      margin-top: 1em;
      margin-bottom: 1em;
      margin-left: 40px;
      margin-right: 40px
      }
</style>

  <title>N2xxx: Missing 'const' in decimal getpayload
  functions</title>
</head>

<body>
  <p><br>
  <!-- Who are the authors... -->
   <b>Submitter:</b>Fred J. Tydeman<br>
  <!-- What is the date of submission. yyyy-mm-dd -->
   <b>Submission Date:</b> 2020-mm-dd<br>
  <b>Document:</b> WG14 N2xxx<br>
  <b>Title:</b> N2xxx: Missing 'const' in decimal getpayload
  functions<br>
  <b>Reference Documents:</b> N2478, N2341</p>

  <p>Summary: 'const' is missing from the decimal getpayload
  functions.</p>

  <p>The binary getpayload functions (WG14 N2478 Annex B.11 and
  F.10.13.1):</p>

  <blockquote>
    <pre>
<code>
 double getpayload(const double *x);
 float getpayloadf(const float *x);
 long double getpayloadl(const long double *x);
</code>
</pre>
  </blockquote>have 'const' in the parameter.

  <p>While the corresponding decimal functions:</p>

  <blockquote>
    <pre>
<code>
 _Decimal32 getpayloadd32(_Decimal32 *x);
 _Decimal64 getpayloadd64(_Decimal64 *x);
 _Decimal128 getpayloadd128(_Decimal128 *x);
</code>
</pre>
  </blockquote>are missing that 'const'. That 'const' is there in
  N2341 (TS 18661-2) from CFP that was voted to be added to C2X.
  This looks like a minor typo in merging N2341 into C2X.

  <p>'const' should be added to the three decimal getpayloaddN
  functions as:</p>

  <blockquote>
    <pre>
<code>
 _Decimal32 getpayloadd32(<ins>const</ins> _Decimal32 *x);
 _Decimal64 getpayloadd64(<ins>const</ins> _Decimal64 *x);
 _Decimal128 getpayloadd128(<ins>const</ins> _Decimal128 *x);
</code>
</pre>
  </blockquote>
</body>
</html>