Quick actions

cmd+k|ctrl+k

Navigation

Languages

Untitled

Snippet info

Language

D

Visibility

unlisted

Author

legacy-anonymous

Created

2017-10-13T10:11:52Z

Updated

2017-10-13T10:11:52Z

import std.stdio;

struct Foo {
    this(int) {}
    ~this() {}
}

struct Bar {
    this(this) {
        writefln("Bar.this(this): %X", &this);
    }
    this(Foo, Foo) {
        writefln("Bar.this(int): %X", &this);
    }
    ~this() {
        writefln("Bar.~this(): %X", &this);
    }
}

void fun(Bar n) {
    writefln("fun: %X", &n);
}

void main() {
    Foo foo;
    auto bar = Bar(foo, Foo(0));
    fun(bar);
}
INFO