How to simulate a new type

Charles Hixson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 14 11:41:32 PDT 2015


What are the downsides to simulating a new type with a struct.

What I have in mind is something along the lines of:

struct myType
{  uint64_t  value;
}

The goal of this type is to prevent accidental conversions from myType 
into ints, uint64_ts, etc.



More information about the Digitalmars-d-learn mailing list