On 03/11/2012 08:17 PM, Andrei Alexandrescu wrote:
If you create a variable of type
TypeTuple!(ReturnType1, ReturnType2), what's its layout?


That is context-dependent:

union U{
    TypeTuple!(int, double) x; // superimposed according to union abi
}

struct S{
    TypeTuple!(int, double) x; // sequential according to struct ABI
}

void foo(){
TypeTuple!(int, double) x; // two non-overlapping memory areas on the stack
}

void bar(TypeTuple!(int, double) x){ // according to function call ABI
    // ...
}

TypeTuple!(int, double) qux(){ // D'oh!
    // ...
}

Reply via email to