http://d.puremagic.com/issues/show_bug.cgi?id=4875



--- Comment #3 from bearophile_h...@eml.cc 2010-09-15 16:18:13 PDT ---
Is this good enough?


struct HANDLE {
    size_t value = -1; // variables are lowercase in D

    this(void *ptrValue) {
        value = cast(size_t)ptrValue;
    }
    this(size_t intValue) {
        value = intValue;
    }

    void opAssign(void *ptrValue) {
        value = cast(size_t)ptrValue;
    }
    void opAssign(size_t intValue) {
        value = intValue;
    }
}

// alias size_t HANDLE;

class File {
    HANDLE handle;
    this() {
        handle = 5;
    }
}

void main() {}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to