On Sunday, 18 September 2016 at 09:36:13 UTC, e-y-e wrote:
On Sunday, 18 September 2016 at 08:06:54 UTC, Lutger wrote:
[...]

Use std.range's 'only' function [1], it takes variadic arguments of the same type and constructs a range consisting of them.

Example:

    import std.meta : AliasSeq;
    import std.range : only;
    import std.algorithm.comparison : equal;

    alias names = AliasSeq!("Alice", "Bob");

    auto range = only(names, "Chuck");
    assert(range.equal(["Alice", "Bob", "Chuck"]));

That's *exactly* what I was looking for, thanx!

Reply via email to