Re: Type sequence concatenation / associative array implementation

2020-02-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/12/20 5:47 PM, Paul Backus wrote: On Wednesday, 12 February 2020 at 20:58:49 UTC, Marcel wrote: 2- How is the builtin associative array implemented? I think I read somewhere it's implemented like C++'s std::unordered_map but with BSTs instead of DLists for handling collisions: is this corr

Re: Type sequence concatenation / associative array implementation

2020-02-12 Thread Paul Backus via Digitalmars-d-learn
On Wednesday, 12 February 2020 at 20:58:49 UTC, Marcel wrote: 2- How is the builtin associative array implemented? I think I read somewhere it's implemented like C++'s std::unordered_map but with BSTs instead of DLists for handling collisions: is this correct? It's an open-addressed hash tabl

Re: Type sequence concatenation / associative array implementation

2020-02-12 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Feb 12, 2020 at 09:05:22PM +, user1234 via Digitalmars-d-learn wrote: > On Wednesday, 12 February 2020 at 20:58:49 UTC, Marcel wrote: > > Hello! > > I have two questions: > > > > 1- How can I concatenate two type sequences? > > alias Concatenated = AliasSeq!(TList1, TList2); [...] T

Re: Type sequence concatenation / associative array implementation

2020-02-12 Thread user1234 via Digitalmars-d-learn
On Wednesday, 12 February 2020 at 20:58:49 UTC, Marcel wrote: Hello! I have two questions: 1- How can I concatenate two type sequences? alias Concatenated = AliasSeq!(TList1, TList2); or maybe alias Concatenated = AliasSeq!(TList1[0..$], TList2[0..$]); since I don't remember if they nest or

Type sequence concatenation / associative array implementation

2020-02-12 Thread Marcel via Digitalmars-d-learn
Hello! I have two questions: 1- How can I concatenate two type sequences? 2- How is the builtin associative array implemented? I think I read somewhere it's implemented like C++'s std::unordered_map but with BSTs instead of DLists for handling collisions: is this correct?