[llvm-bugs] [Bug 26782] Assertion failed: TemplateTypeParm->getDepth() == 0 && "Can't deduce with depth > 0"
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jun 10 12:15:44 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=26782
Yaron Keren <yaron.keren at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #2 from Yaron Keren <yaron.keren at gmail.com> ---
as of r305089, fails with errors:
file.cpp:2:30: error: partial specialization of 'function' does not use any of
its template parameters
template <typename> struct function<void()> {
^
file.cpp:6:22: error: no viable conversion from '(lambda at file.cpp:6:26)' to
'function<void ()>'
function<void()> f = [] {};
^ ~~~~~
file.cpp:2:30: note: candidate constructor (the implicit copy constructor) not
viable: no known conversion from '(lambda at file.cpp:6:26)' to 'const
function<void ()> &' for 1st argument
template <typename> struct function<void()> {
^
file.cpp:2:30: note: candidate constructor (the implicit move constructor) not
viable: no known conversion from '(lambda at file.cpp:6:26)' to 'function<void
()> &&' for 1st argument
template <typename> struct function<void()> {
^
file.cpp:3:34: note: candidate template ignored: couldn't infer template
argument '_Functor'
template <typename _Functor> function(_Functor) {}
^
file.cpp:6:26: note: candidate function
function<void()> f = [] {};
^
2 errors generated.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170610/47ce787a/attachment.html>
More information about the llvm-bugs
mailing list