Comment #0 by bearophile_hugs — 2013-12-26T16:35:23Z
In some cases I have to tell apart different Typedefs using the cookie, but I don't need to specify a different init value:
alias Meters = Typedef!(double, "Meters");
alias Liters = Typedef!(double, "Liters");
For such cases I suggest to replace this part of the std.typecons module:
/**
Library typedef.
*/
template Typedef(T)
{
alias .Typedef!(T, T.init) Typedef;
}
With two (shorter) aliases:
/// Library typedef.
alias Typedef(T) = .Typedef!(T, T.init);
/// ditto
alias Typedef(T, string cookie=null) = .Typedef!(T, T.init, cookie);
Comment #1 by robert.schadek — 2024-12-01T16:19:46Z