from

Encompases the from import idiom in an opDispatch version

enum from = FromImpl!null();

Examples

// Call a function
auto _0 = from.std.algorithm.map!"a"([1, 2, 3]);
// Assign an object
auto _1 = from.std.datetime.stopwatch.AutoStart.yes;

// compile-time constraints
auto length(R)(R range) if (from.std.range.isInputRange!R) {
    return from.std.range.walkLength(range);
}

assert(length([1, 2]) == 2);

See Also

Meta

Since

- 0.12.0