<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Issue 1099: Various issues</title>
<meta property="og:title" content="Issue 1099: Various issues">
<meta property="og:description" content="C++ library issue. Status: NAD">
<meta property="og:url" content="https://cplusplus.github.io/LWG/issue1099.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#NAD">NAD</a> status.</em></p>
<h3 id="1099"><a href="lwg-closed.html#1099">1099</a>. Various issues</h3>
<p><b>Section:</b> 16 <a href="https://wg21.link/library">[library]</a> <b>Status:</b> <a href="lwg-active.html#NAD">NAD</a>
 <b>Submitter:</b> David Abrahams <b>Opened:</b> 2009-03-21 <b>Last modified:</b> 2016-01-28</p>
<p><b>Priority: </b>Not Prioritized
</p>
<p><b>View other</b> <a href="lwg-index-open.html#library">active issues</a> in [library].</p>
<p><b>View all other</b> <a href="lwg-index.html#library">issues</a> in [library].</p>
<p><b>View all issues with</b> <a href="lwg-status.html#NAD">NAD</a> status.</p>
<p><b>Discussion:</b></p>
<p>
Notes
</p>
<blockquote>
<p>
[2009-03-21 Sat] p. 535 at the top we need MoveConstructible V1,
MoveConstructible V2 (where V1,V2 are defined on 539).  Also make_tuple
on 550
</p>

<blockquote>
<p>
CD-1 reads:
</p>

<blockquote><pre>
template &lt;MoveConstructible T1, MoveConstructible T2&gt; 
pair&lt;V1, V2&gt; make_pair(T1&amp;&amp;, T2&amp;&amp;); 
</pre></blockquote>

<p>
Actually I'm guessing we need something like <code>MoveConstructible&lt;V1,T1&gt;</code>,
i.e. "<code>V1</code> can be constructed from an rvalue of type <code>T1</code>."
</p>

<p>
Ditto for <code>make_tuple</code>
</p>
</blockquote>

<p>
[2009-03-21 Sat] p1183 thread ctor, and in general, we need a way to
talk about "copiable from generalized rvalue ref argument" for cases
where we're going to forward and copy.  
</p>
<blockquote>
<p>
   This issue may well be quite large.  Language in para 4 about "if
   an lvalue" is wrong because types aren't expressions.
</p>

<blockquote>
<p>
Maybe we should define the term "move" so we can just say in the
effects, "<code>f</code> is moved into the newly-created thread" or something, and
agree (and ideally document) that saying "<code>f</code> is moved" implies 
</p>

<blockquote><pre>
F x(move(f))
</pre></blockquote>

<p>
is required to work.  That would cover both ctors at once.
</p>
</blockquote>

<p>
   p1199, call_once has all the same issues.
</p>
</blockquote>
<p>
[2009-03-21 Sat] p869 InputIterator pointer type should not be required
to be convertible to const value_type*, rather it needs to have a
operator-> of its own that can be used for the value type.
</p>

<blockquote><p>
This one is serious and unrelated to the move issue.
</p></blockquote>

<p>
[2009-03-21 Sat] p818 stack has the same problem with default ctor.
</p>
<p>
[2009-03-21 Sat] p816 priority_queue has the same sorts of problems as queue, only more so
</p>
<blockquote><pre>
   requires MoveConstructible&lt;Cont&gt; 
     explicit priority_queue(const Compare&amp; x = Compare(), Cont&amp;&amp; = Cont()); 
</pre>
<p>
   Don't require MoveConstructible when default constructing Cont.
   Also missing semantics for move ctor.
</p>
</blockquote>
<p>
 [2009-03-21 Sat] Why are Allocators required to be CopyConstructible as
 opposed to MoveConstructible?
</p>
<p>
 [2009-03-21 Sat] p813 queue needs a separate default ctor (Cont needn't
 be MoveConstructible).  No documented semantics for move c'tor.  Or
 *any* of its 7 ctors!
</p>
<p>
 [2009-03-21 Sat] std::array should have constructors for C++0x,
 consequently must consider move construction.
</p>

<p><i>[
2009-05-01 Daniel adds:
]</i></p>


<blockquote><p>
This could be done as part of <a href="lwg-closed.html#1035" title="&lt;array&gt;::swap can invalidate references, pointers, and iterators (Status: NAD)">1035</a><sup><a href="https://cplusplus.github.io/LWG/issue1035" title="Latest snapshot">(i)</a></sup>, which already handles
deviation of <code>std::array</code> from container tables.
</p></blockquote>

<p>
 [2009-03-21 Sat] p622 all messed up.
</p>
<blockquote>
<p>
   para 8 "implementation-defined" is the wrong term; should be "see
   below" or something.  
<p/>
   para 12 "will be selected" doesn't make any sense because we're not
   talking about actual arg types.
<p/>
   paras 9-13 need to be totally rewritten for concepts.
</p>
</blockquote>

<p>
 [2009-03-21 Sat] Null pointer comparisons (p587) have all become
 unconstrained.  Need to fix that
<p/>
 [2009-03-21 Sat] mem_fun_t etc. definition doesn't match declaration.
  We think CopyConstructible is the right reqt.
<p/>
 make_pair needs Constructible&lt;V1, T1&amp;&amp;&gt; requirements!
<p/>
 make_tuple needs something similar
<p/>
 tuple bug in synopsis:
</p>
<blockquote><pre>
   template &lt;class... UTypes&gt;
   requires Constructible&lt;Types, const UTypes&amp;&gt;...
   template &lt;class... UTypes&gt;
   requires Constructible&lt;Types, RvalueOf&lt;UTypes&gt;::type&gt;...
</pre>
<p>
   Note: removal of MoveConstructible requirements in std::function makes
   these routines unconstrained!
</p>
</blockquote>

<p><i>[
2009-05-02 Daniel adds:
]</i></p>


<blockquote><p>
This part of the issue is already covered by <a href="lwg-closed.html#1077" title="Nonesense tuple declarations (Status: NAD Editorial)">1077</a><sup><a href="https://cplusplus.github.io/LWG/issue1077" title="Latest snapshot">(i)</a></sup>.
</p></blockquote>

<p>
 these unique_ptr constructors are broken [ I think this is covered in "p622 all messed up" ]
</p>
<blockquote><pre>
 unique_ptr(pointer p, implementation-defined d);
 unique_ptr(pointer p, implementation-defined d);
</pre></blockquote>
<p>
 multimap range constructor should not have MoveConstructible&lt;value_type&gt; requirement.
</p>
<blockquote><p>
   same with <code>insert(..., P&amp;&amp;);</code> <code>multiset</code> has the same issue, as do
   <code>unordered_multiset</code> and <code>unordered_multimap</code>. Review these!
</p></blockquote>

</blockquote>

<p><i>[
Batavia (2009-05):
]</i></p>

<blockquote><p>
Move to Open, pending proposed wording from Dave for further review.
</p></blockquote>

<p><i>[
2009-10 post-Santa Cruz:
]</i></p>


<blockquote><p>
Tentatively NAD.  We are not sure what has been addressed and what hasn't.
Recommend closing unless someone sorts this out into something more readable.
</p></blockquote>



<p><b>Rationale:</b></p>
<p>
The issue(s) at hand not adequately communicated.
</p>


<p id="res-1099"><b>Proposed resolution:</b></p>
<p>
</p>





</body>
</html>
