Re: Ordered set container?

2019-01-29 Thread Dukc via Digitalmars-d-learn
On Monday, 28 January 2019 at 17:18:52 UTC, Victor Porton wrote: I want "ordered set" container (like list or vector but with the warranty of no duplicate elements). The above answers are ordered, but if you want a type that's a simple sorted array, there's none at the standa

Re: Ordered set container?

2019-01-28 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Jan 28, 2019 at 05:18:52PM +, Victor Porton via Digitalmars-d-learn wrote: > I want "ordered set" container (like list or vector but with the > warranty of no duplicate elements). > > Which type can I use? Try std.container.rbtree.RedBlackTree. T -- Th

Re: Ordered set container?

2019-01-28 Thread Neia Neutuladh via Digitalmars-d-learn
On Mon, 28 Jan 2019 17:18:52 +, Victor Porton wrote: > I want "ordered set" container (like list or vector but with the > warranty of no duplicate elements). > > Which type can I use? std.container.rbtree It has options to preserve or squash duplicates.

Ordered set container?

2019-01-28 Thread Victor Porton via Digitalmars-d-learn
I want "ordered set" container (like list or vector but with the warranty of no duplicate elements). Which type can I use?