<html>
<head>
<title>P0615R0: Renaming for structured bindings</title>

<style type="text/css">
  ins { text-decoration:none; font-weight:bold; background-color:#A0FFA0 }
  del { text-decoration:line-through; background-color:#FFA0A0 }
  strong { font-weight: inherit; color: #2020ff }
  #xins:checked ~ * ins { display:none; visibility:hidden }
  #xdel:checked ~ * del { display:none; visibility:hidden }
</style>

</head>

<body>
<p>
ISO/IEC JTC1 SC22 WG21 P0615R0<br/>
Group: WG21<br/>
Jens Maurer<br>
2017-03-01
</p>

<input type="checkbox" id="xins"/><label for="xins">Hide inserted text</label>
<input type="checkbox" id="xdel"/><label for="xdel">Hide deleted text</label>

<h1>P0615R0: Renaming for structured bindings</h1>

As per EWG guidance on Monday, this paper replaces the term
"decomposition declaration" with "structured binding declaration" and
adds the term "structured binding" for each name so introduced.

<p>

Change in 7 [dcl.dcl] paragraph 8:

<blockquote>
A <em>simple-declaration</em> with an <em>identifier-list</em> is
called a <em><del>decomposition</del> <ins>structured binding</ins>
declaration</em> (8.5 [dcl.decomp]).
</blockquote>

Change in 7.1.7.2 [dcl.type.simple] paragraph 4:

<blockquote>
For an expression e, the type denoted by decltype(e) is defined as follows:
<ul>
  <li>if e is an unparenthesized <em>id-expression</em> naming <del>an
lvalue or reference introduced from the <em>identifier-list</em> of a
decomposition declaration</del> <ins>a structured
binding (8.5 [dcl.decomp])</ins>, <code>decltype(e)</code> is the referenced type as
given in the specification of
the <del>decomposition</del> <ins>structured binding</ins> declaration
    <del>(8.5 [dcl.decomp])</del>;</li>
  <li>...</li>
</ul>
</blockquote>

Change in 7.1.7.4 [dcl.spec.auto] paragraph 1:

<blockquote>
The <code>auto</code> <em>type-specifier</em> is also used to
introduce a <del>decomposition</del> <ins>structured binding</ins>
declaration (8.5 [dcl.decomp]).
</blockquote>

Change the section heading and paragraph 1 of 8.5 [dcl.decomp]:

<blockquote>
<b>8.5 <del>Decomposition</del> <ins>Structured binding</ins> declarations <del>[dcl.decomp]</del> <ins>[dcl.struct.bind]</ins></b>
<p>
A <del>decomposition</del> <ins>structured binding</ins> declaration
introduces the identifiers v0, v1, v2 , ... of
the <em>identifier-list</em> as names (3.3.1)<ins>,
called <em>structured binding</em>s</ins>. ...

... where the declaration is never interpreted as a function
declaration and the parts of the declaration other than
the <em>declarator-id</em> are taken from the
corresponding <del>decomposition</del> <ins>structured binding</ins>
declaration. ...
</blockquote>

Change in 14.6.2.2 [temp.dep.expr] paragraph 3:

<blockquote>
An <em>id-expression</em> is type-dependent if it contains
<ul>
  <li>...</li>
  <li>an <em>identifier</em> associated by name lookup with
  a <del>decomposition</del> <ins>structured binding</ins> declaration
    (8.5) whose <em>brace-or-equal-initializer</em> is type-dependent,</li>
  <li>...</li>
</ul>
</blockquote>

Change in Annex B [implimits]:

<blockquote>
  <ul>
    <li>...</li>
    <li><del>Identifiers</del><ins>Structured bindings</ins> introduced in
    one <del>decomposition</del>
    declaration [256].</li>
    <li>...</li>
  </ul>
</blockquote>

</body>
</html>
