[Issue 1350] alias template, typeof, or tuple issue; wrong varags values

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 26 00:58:03 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=1350


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|template, tuple or static   |alias template, typeof, or
                   |foreach issue; wrong values |tuple issue; wrong varags
                   |                            |values


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-04-26 00:57:58 PDT ---
Reduced test case shows it has nothing to do with static foreach.

import std.stdarg;

void Goat(Callbacks ...)(void* argptr) {
    auto Cb = Callbacks[0];  // fails
//  alias Callbacks[0] Cb;  // works

    static if (is(typeof(Cb) P == delegate))
        static if (is(P Q == function))
           alias Q CBArgTypes;
    Cb(va_arg!(CBArgTypes[0])(argptr));
}

void foo(...){
    Goat!(
        (int i) { assert(i==333); } 
    )(_argptr);
}

void main() {
    foo(333);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list