typedef alternative

Yao G. nospamyao at gmail.com
Sat Aug 14 18:15:40 PDT 2010


On Sat, 14 Aug 2010 20:05:04 -0500, Jonathan M Davis  
<jmdavisprog at gmail.com> wrote:

> [snip]
>
> Are you looking to create a new type that while technically identical to
> another type is not considered the same as that type by the type system?
>
> - Jonathan M Davis

Yes, This is exactly what I want. I need, for example, that if you pass a  
Year instance to the Month parameter, generate a compiler error.


-- 
Yao G.


More information about the Digitalmars-d-learn mailing list