<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - [Regression]"
href="https://bugs.llvm.org/show_bug.cgi?id=34298">34298</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[Regression]
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>5.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</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>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>arphaman@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>The following code no longer compiles:
```
#include <functional>
class Continuation
{
public:
Continuation(const std::function<Continuation()>& next)
: m_next(next) {}
Continuation() {}
private:
std::function<Continuation ()> m_next;
};
```
Because of the following error:
```
/Users/alex/bisect/b/include/c++/v1/type_traits:4323:23: error: calling
'operator()' with incomplete return type 'Continuation'
_LIBCPP_INVOKE_RETURN(_VSTD::forward<_Fp>(__f)(_VSTD::forward<_Args>(__args)...))
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/alex/bisect/b/include/c++/v1/__config:441:15: note: expanded from macro
'_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
^
/Users/alex/bisect/b/include/c++/v1/type_traits:4220:23: note: expanded from
macro '_LIBCPP_INVOKE_RETURN'
noexcept(noexcept(__VA_ARGS__)) -> decltype(__VA_ARGS__) \
^~~~~~~~~~~
/Users/alex/bisect/b/include/c++/v1/type_traits:4340:9: note: in instantiation
of exception specification for '__invoke<std::__1::function<Continuation ()>
&>' requested here
_VSTD::__invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...));
^
/Users/alex/bisect/b/include/c++/v1/__config:441:15: note: expanded from macro
'_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
^
/Users/alex/bisect/b/include/c++/v1/functional:1601:33: note: in instantiation
of template class 'std::__1::__invokable_r<void,
std::__1::function<Continuation ()> &>' requested
here
__invokable<_Fp&, _ArgTypes...>::value>
^
/Users/alex/bisect/b/include/c++/v1/functional:1626:9: note: in instantiation
of default argument for '__callable<std::__1::function<Continuation ()> >'
required here
__callable<_Fp>::value && !is_same<_Fp, function>::value
^~~~~~~~~~~~~~~
/Users/alex/bisect/b/include/c++/v1/functional:1628:5: note: in instantiation
of default argument for 'function<std::__1::function<Continuation ()> >'
required here
function(_Fp);
^~~~~~~~~~~~~
/Users/alex/bisect/b/include/c++/v1/functional:1588:28: note: while
substituting deduced template arguments into function template 'function' [with
_Fp =
std::__1::function<Continuation ()>, $1 = (no value)]
class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
^
cxx.cpp:3:7: note: while declaring the implicit copy constructor for
'Continuation'
class Continuation
^
/Users/alex/bisect/b/include/c++/v1/functional:1680:9: note: 'operator()'
declared here
_Rp operator()(_ArgTypes...) const;
^
cxx.cpp:3:7: note: definition of 'Continuation' is not complete until the
closing '}'
class Continuation
^
1 error generated.
```
I suspect libc++ for now, but it could be Clang itself.
libc++ r311156, LLVM r311438, Clang r311434</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>