For example:
If I wanted to create a message manager which among other functions would maintain a time-ordered list of messages, structured something like this.
class Message { MessageHeader header; MessageData data; }; where the header structure would, among other elements, contain a creation time-stamp.
struct MessageHeader { uint64_t timeStamp; userId_t sender; userId_t receiver; /* ... */ }; Is it possible using an existing container in the STL library to order the messages by the time stamp? I would be using nanosecond time stamps, so the likelihood of not unique values would be low.