<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - problem in tuple implementation using non-default-constructible arguments."
href="https://llvm.org/bugs/show_bug.cgi?id=24779">24779</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>problem in tuple implementation using non-default-constructible arguments.
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>3.7
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>bayoubengal@mac.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>clang version used: Apple LLVM version 7.0.0 (clang-700.0.72) (xcode 7 GM)
However, mclow confirms it fails on ToT too. The code works in prior versions
of clang and gcc.
#include <iostream>
#include <memory>
#include <tuple>
class cHandlerDesc
{
public:
static void handleModificationSuspensionTokenRelease(cHandlerDesc* thePtr)
{
}
};
void f(cHandlerDesc *)
{
}
using entry_type = std::unique_ptr<cHandlerDesc, decltype(&f)> ;//void (*)
(cHandlerDesc*) >; //decltype(&f)
int main(int argc, const char * argv[])
{
entry_type tmpU(nullptr, &f);
std::tuple<entry_type> tmpT( entry_type(nullptr, &f) ); //<--will compile
std::tuple<entry_type, entry_type> tmpT2( entry_type(nullptr, &f),
entry_type(nullptr, &f) ); //<--won't compile due to static assert
// insert code here...
//std::cout << "Hello, World!\n";
return 0;
}</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>