Maybe add init template to std.conv?
Borislav Kosharov
bosak at gmail.com
Wed Aug 7 13:22:59 PDT 2013
I have created 2 probably useful and short templates that enhance
.init
///Returns Source's .init converted with std.conv.to to Target
@property auto init(Source, Target)() {
return init!Source.to!Target;
}
///Sets target to Source's .init value
@property void init(Source, Target)(out Target target) {
target = init!(Source, Target);
}
See: https://gist.github.com/nikibobi/6178215
If you like them they could be added to std.conv maybe? If you
have any suggestions on improvements please tell.
More information about the Digitalmars-d
mailing list