[llvm-bugs] [Bug 25608] std::function consturctors use unique_ptr with incorrect template param

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 24 11:40:45 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25608

Antony Polukhin <antoshkka at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Antony Polukhin <antoshkka at gmail.com> ---
I've digged deeper and the issue now seems more interesting:

memory:2672:34: error: invalid conversion from
'std::__y1::unique_ptr<std::__y1::__function::__base<void(const Class&)>,
std::__y1::__allocator_destructor<std::__y1::allocator<std::__y1::__function::__func<OtherClass::Function(const
vector<Class>&)::<lambda(const Class&)>,
std::__y1::allocator<OtherClass::Function(const vector<Class>&)::<lambda(const
Class&)> >, void(const Class&)> > > >::pointer {aka
std::__y1::__function::__base<void(const Class&)>*}' to
'std::__y1::__allocator_destructor<std::__y1::allocator<std::__y1::__function::__func<OtherClass::Function(const
vector<Class>&)::<lambda(const Class&)>,
std::__y1::allocator<OtherClass::Function(const vector<Class>&)::<lambda(const
Class&)> >, void(const Class&)> > >::pointer {aka
std::__y1::__function::__func<OtherClass::Function(const
vector<Class>&)::<lambda(const Class&)>,
std::__y1::allocator<OtherClass::Function(const vector<Class>&)::<lambda(const
Class&)> >, void(const Class&)>*}' [-fpermissive]


Seems like `unique_ptr::pointer` type was incorrectly detected. First template
parameter of `unique_ptr` was used for detecting pointer type, not the
deleter's pointer type. This is probably a GCC error (I've failed to localize
it).

In that case, this issue becomes duplicate for
https://llvm.org/bugs/show_bug.cgi?id=25582

*** This bug has been marked as a duplicate of bug 25582 ***

-- 
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/20151124/25dc993f/attachment.html>


More information about the llvm-bugs mailing list