ordering operators

Sep 30, 2014 at 12:47 PM
Just to confirm my conclusions from reading through the source code:
Using the ordering operators makes a vector<> copy of all the data elements rather than, for example, a reference to the elements.
What would you recommend when handling large objects with expensive copies? shared_ptr?
Thanks for a great library
Sep 30, 2014 at 2:32 PM
That was one of the reasons ref () was added. As you recall std::vector doesn't support reference types as values.

ref () creates a reference wrapper around each ref.

shared_ptr<> would work too but would be more intrusive in your code.

Try ref () and see if it works for you.
Oct 1, 2014 at 10:32 AM
Thanks a lot. I had guessed as much.