import std.random;

struct Mystruct {
        int id;
        
        static opCall() {
                Mystruct s;
                s.id = uniform(0, 10);
                return s;
        }
}

void main() {
    auto s = Mystruct();
        // whatever
}
---

This make sense, thant you for the explanation.

Reply via email to