<html>
<head>
<base href="http://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 --- - The name of a function doesn't decays to a function pointer automatically"
href="http://llvm.org/bugs/show_bug.cgi?id=18104">18104</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>The name of a function doesn't decays to a function pointer automatically
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.3
</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>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ldesegur@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Based on the C++ Programming Language 4th Edition (C++11), the following
example compiles with GNUC++4.9 but needs a function pointer in front of the
function name when using CLANG.
#include <future>
void f()
{
}
int main()
{
packaged_task<void()> pt {&f}; //use '&' to compile
}
I get this error when the ampersand is removed:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:1670:45:
error: multiple overloads of 'address' instantiate to the same signature
'const_pointer (const_reference) const noexcept'
_LIBCPP_INLINE_VISIBILITY const_pointer address(const_reference __x) const
_NOEXCEPT
clang -v
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix</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>