Hi,

I cannot make the following compile.

import std.functional;
import std.array;
import std.algorithm;
import std.stdio;

void main() {
    auto numbers = [0, 1, 2, 3, 4, 5];

    bool alwaysTrue(uint a) { return true; }
    alias not!(alwaysTrue) alwaysFalse;

    numbers = array(filter!(alwaysTrue)(numbers));
    writeln(numbers);
    numbers = array(filter!(alwaysFalse)(numbers)); // does not compile
    writeln(numbers);
}

The line with alwaysFalse fails with:
/path/to/../src/phobos/std/algorithm.d(854): Error: constructor
std.algorithm.Filter!(not,int[]).Filter.this cannot get frame pointer to
not

Any ideas what I'm doing wrong or workarounds?

Jens

Reply via email to