Re: Templated Binary Search Tree treats class as const, compiler complains

2018-01-21 Thread Mark via Digitalmars-d-learn
On Sunday, 21 January 2018 at 20:46:56 UTC, Timon Gehr wrote: On 21.01.2018 21:20, Mark wrote: Just realized that I commented out the creation of the BST new link: https://dpaste.dzfl.pl/ce620cbee919 'in' means 'const scope', but it seems you need references that are allowed to mutate the

Re: Templated Binary Search Tree treats class as const, compiler complains

2018-01-21 Thread Timon Gehr via Digitalmars-d-learn
On 21.01.2018 21:20, Mark wrote: Just realized that I commented out the creation of the BST new link: https://dpaste.dzfl.pl/ce620cbee919 'in' means 'const scope', but it seems you need references that are allowed to mutate the incoming items. Remove the 'in' attribute from the parameters

Re: Templated Binary Search Tree treats class as const, compiler complains

2018-01-21 Thread Mark via Digitalmars-d-learn
Just realized that I commented out the creation of the BST new link: https://dpaste.dzfl.pl/ce620cbee919

Templated Binary Search Tree treats class as const, compiler complains

2018-01-21 Thread Mark via Digitalmars-d-learn
Hello, I re wrote my old BST. This one is far more complete and clean. However, It fails my final unittest when I try to stick a class in as its type. Link: https://dpaste.dzfl.pl/95e1ae49b25b Ive done this type of thing before, but it is giving me this error: BinarySearchTree.d(30):