News for hackers. Stuff that matters.
Re:Why should I have written ZeroMQ in C, not C++ (2012) by detrino on Thursday May 21, 2015 @01:34AM (#9581116)
How is it possible to write a no-allocation intrusive linked list without move constructors ? When you move one of the nodes (or sentinel if you use one) it would invalidate the links in other nodes.
Re:Why should I have written ZeroMQ in C, not C++ (2012) by dschatz on Friday May 22, 2015 @11:31PM (#9591904)
The list takes an OwningPointer to the object to be inserted. One of the requirements of this trait (which is unsafe to implement) is "the object cannot be moved while in the `LinkedList`." So Box would work, or a mutable reference would as well (the library implements the trait for these types already). The list itself doesn't do the allocation though.