This POD-like class describes a node suitable for use in a doubly- linked (bidirectional) list, holding the addresses of the preceding and succeeding nodes, either or both of which may be 0. This class is "POD-like" to facilitate efficient allocation and use in the context of a container implementations. In order to meet the essential requirements of a POD type, this class does not declare a constructor or destructor. However its data members are private. It satisfies the requirements of a trivial type and a standard layout type defined by the C++11 standard.
- Note
- Note that this type does not contain any "payload" member data: Clients creating a doubly-linked list of data must define an appropriate node type that incorporates
BidirectionalLink (generally via inheritance), and that holds the "value" of any data stored in that node.
See bslalg_bidirectionallink