Boost logo

Boost Users :

Subject: [Boost-users] best way to remove duplicates from forwardIterator [startIter, endIter]
From: Sandeep Gupta (gupta.sandeep_at_[hidden])
Date: 2009-02-24 11:46:59


Hi,
 Given a collection in terms of [startIter, endIter] how can obtain
[uniqBeginIter, uniqEndIter] that represents unique elements of the
original container.
I can always explicitly instantiate a set S of [startIter, endIter]
and use [S.begin(), S.end()]. Is it possible to express this in terms
of algorithms.

Please note that I won't be able to use std::sort as startIter does
not conform to RandomAccessIterator. Its a forward iterator.

Thanks
Sandeep


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net