14 Oct
2013
14 Oct
'13
5:13 p.m.
On Mon, Oct 14, 2013 at 12:56 AM, Gordon Woodhull
On Oct 13, 2013, at 11:44 PM, Michael Marcin
wrote: I pass a mpl::vector with duplicates to mpl::unique and the result still has duplicates. What am I doing wrong?
Just like std::unique, the duplicated elements must be consecutive for mpl::unique to find them. Otherwise the complexity wouldn't be linear.
Michael, Use mpl::sort ( http://www.boost.org/doc/libs/1_54_0/libs/mpl/doc/refmanual/sort.html) first on your sequence. Rodrigo