std.socket.Address not allowed in tuples
Steven O
oliver.steven at gmail.com
Thu Jan 24 01:35:57 UTC 2019
On Wednesday, 23 January 2019 at 16:30:33 UTC, Neia Neutuladh
wrote:
> As always, it helps a lot to post the error message the
> compiler gave you.
Sorry about that.
> The issue is that Address doesn't have a comparison operator
> defined, so the resulting tuple type can't be compared with the
> standard operators. You need to define your own function for
> comparing the tuples in question and pass that to RedBlackTree.
Is there any documentation or examples of how to do that? The
RedBlackTree documentation gives trivial examples like
auto maxTree = redBlackTree!"a > b"(iota(5));
but, that doesn't really help me figure out how to do something
more complex.
More information about the Digitalmars-d-learn
mailing list