On Mon, Oct 14, 2013 at 12:56 AM, Gordon Woodhull <gordon@woodhull.com> wrote:
> On Oct 13, 2013, at 11:44 PM, Michael Marcin <mike.marcin@gmail.com> 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