Skip to content

Conversation

@PankajBhojwani
Copy link

@PankajBhojwani PankajBhojwani commented Oct 1, 2020

Hello! Thank you for this implementation - it is extremely useful!

I'd like to propose a change that would allow custom structs to be used as keys to the tree as long as those structs have the <, <=, >, >=, == operators defined.

The only code change this involves is instead of checking for equality with 0, we check for equality with the default constructor. For integral values, this does not change the behaviour.

UPDATE:
This also now adds a default constructor and the equality/inequality operators just for ease of use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants