TypeTuple of functions

bearophile bearophileHUGS at lycos.com
Thu Jan 26 10:32:35 PST 2012

I'm asking questions all the time :-)

I have just closed this bug report as fixed:

Using that idiom I've seen a difference:

template TypeTuple(TList...) {
    alias TList TypeTuple;

double f1(in double x) pure nothrow { return x; }
alias TypeTuple!(f1) funcs1;

alias TypeTuple!(function(in double x) pure nothrow { return x; }) funcs2;

void main() {
    pragma(msg, typeid(typeof(funcs1[0])).stringof); // &D18TypeInfo_FNaNbxdZd6__initZ
    pragma(msg, typeid(typeof(funcs2[0])).stringof); // &D22TypeInfo_PFNaNbNfxdZxd6__initZ

Do you know what's the difference between those two functions? (I am not able to read mangled names).

Bye and thank you,

More information about the Digitalmars-d-learn mailing list