--- Comment #2 from 2010-10-26 15:34:16 PDT ---
It seems currently (2.050alpha) nested functions can't be pure:

import std.traits: FunctionAttribute, functionAttributes;
void main() {
    static pure int foo1(int x) { return x; }
    pure int foo2(int x) { return x; }
    static assert(functionAttributes!(foo1) & FunctionAttribute.PURE); //
    static assert(functionAttributes!(foo2) & FunctionAttribute.PURE); //

void main() {}

This is a problem because I'd like many functions of std.algorithm to be weakly
pure. Many high order functions take an optional delegate argument, so if
there's no handy way to build a pure delegate, they become less useful.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to