'strong types' a la boost

Brad Anderson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Mar 14 11:23:11 PDT 2015


On Saturday, 14 March 2015 at 15:45:30 UTC, Charles Cooper wrote:
> I think I may have answered my own question. It seems 
> std.typecon provides a facility for this.
> http://dlang.org/phobos/std_typecons.html#.Proxy
> http://dlang.org/phobos/std_typecons.html#.Typedef
>
> Is this the 'right' way to do things? It seems that Proxy is 
> used as a mixin whereas Typedef is used to create standalone 
> types.

If memory serves me, Typedef was created to regain this exact 
feature after "typedef" was deprecated. "typedef" did this while 
its replacement, "alias", did not and the realization that we had 
lost that capability led to the creation of Typedef.


More information about the Digitalmars-d-learn mailing list