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
stand
Can anyone please explain to me what's going on here?
import std.container;
import std.socket;
import std.typecons;
void main()
{
/* Doesn't work
alias Rec_type = Tuple!(Address, "x", int, "y", int, "z");
RedBlackTree!Rec_type[] records;
*/
// Works
alias Rec_type = Tup
I'd like to thank everyone for their help! I was finally able to
do what I'd like. I didn't end up using a variant, but maybe
there's a better way to do what I want using it, and I just
couldn't figure it out.
Here's the solution I finally came up with:
https://run.dlang.io/is/GdDDBp
If anyon
I want to create a heterogeneous collection of red-black trees,
and I can't seem to figure out if it's possible.
I can easily do:
import std.container.rbtree;
import std.typecons;
void main()
{
alias Rec_type = Tuple!(int, "x", int, "y", int, "z");
RedBlackTree!Rec_type[1] test;
}
Tha