Partial return type specification

Daniel Murphy yebblies at nospamgmail.com
Sun Oct 3 17:02:25 PDT 2010


Maybe typeof(return) is what you're looking for? *

auto foo()
{
    return map!("a * a")([1, 2, 3, 4]);
    static assert(is(Unqual!(ForeachType!(typeof(return))) == int));
}

* Not tested, I don't know if it works like this at all. 




More information about the Digitalmars-d mailing list