Where to find NSOrderedSet (Objective C) source code ? Reading elements from SET in the order of insertion in C++? <p>Is there any possibility of reading elements from <code>SET</code> (in C++ i,e std::set) on the basis of order of insertion of those elements into SET (in C++)? I could have used Vector or list for reading in the order of insertion. But I want insertion, searching etc to be done in O(log(n)). Using SET is requirement, I can't change that.</p> <p>Usage of extra memory for storing element id or insertion sequence number etc will require a lot of memory. Solutions of this kind are not helpful to me</p> <p>I read some where that in Objective-C, NSOrderedSet give this kind of functionality ( I do not know Objective-C, NSOrderedSet ). Can the similar functionality be achieved in C++?</p> <p>Edit1: Is <code>NSOrderedSet</code> source code available? If available, where Can I find?</p>