<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:f.kazmin@corp.mail.ru" title="Fedor Kazmin <f.kazmin@corp.mail.ru>"> <span class="fn">Fedor Kazmin</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - clang 12.0.0 ignores copy constructor and fails to compile seemingly correct code"
href="https://bugs.llvm.org/show_bug.cgi?id=50344">bug 50344</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>RESOLVED
</td>
<td>REOPENED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>INVALID
</td>
<td>---
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - clang 12.0.0 ignores copy constructor and fails to compile seemingly correct code"
href="https://bugs.llvm.org/show_bug.cgi?id=50344#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - clang 12.0.0 ignores copy constructor and fails to compile seemingly correct code"
href="https://bugs.llvm.org/show_bug.cgi?id=50344">bug 50344</a>
from <span class="vcard"><a class="email" href="mailto:f.kazmin@corp.mail.ru" title="Fedor Kazmin <f.kazmin@corp.mail.ru>"> <span class="fn">Fedor Kazmin</span></a>
</span></b>
<pre>Sorry, I can hardly understand the phrase "A class with a deleted move
constructor has a move constructor". If a move constructor is deleted it is not
where. If it is not where what does a class have?
I always thought a compiler can implicitly create a move constructor for a
class and explicitly deleting it is the way to ensure it does not exist.
Thinking this way, "The compiler doesn't check whether a constructor is deleted
until after it decides which constructor to use" is exactly the thing looking
like a bug.
Moreover, clang 12 apple version compiles the code in question silently!
f.kazmin@f-kazmin target % clang++ -v
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
f.kazmin@f-kazmin build % clang++ --std=c++17 movector.cpp
f.kazmin@f-kazmin build % echo $?
0
The "--std=c++17" parameter changes nothing for linux version so it was omitted
in previous input to strip the example.
I recon one of the clang versions misbehaves and I guess it is linux version
because gcc 10.3.0 compiles the code as well.</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>