A C++ container for non-copyable objects

Elists are a useful tool to organise non-copyable C++ objects is multiple lists.

Documentation

The reference documentation can be found in the namespace smart::util at: www.libsmart.com/doc_html

The paper can be downloaded below.

From the abstract:

This paper describes an alternative implementation to organise a number of non-copyable C++ objects using a container similar to std::list. The presented implementation supports the linking of one object in multiple lists without additional memory allocation overhead and the unlinking of individual objects by reference or pointer in constant time. Additionally, this paper wants to illuminate why the standard containers are not sufficient to organise pointers to non-copyable objects and how to use the container described instead.

Forum

You are welcome to post your experience using the elist container to the Elist forum. Please register first.

Issue tracker

Post bugs, patches to the Elist issue tracker.

Download

AttachmentSize
elist.pdf77.63 KB
elist.html36.85 KB
elist.ps.gz246.32 KB
elist.hpp21.78 KB

Comments

Added iteratorOf member function

For solving some more complex requirements I added the

const_iterator iteratorOf(const element_type&) const;
iterator iteratorOf(element_type&);

member functions to the elist container.

The member functions return the appropriate iterator of the given element type.

— armin