method static-ness has no effect on the type?
Cauterite via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Aug 8 03:14:07 PDT 2016
On Monday, 8 August 2016 at 10:05:58 UTC, ag0aep6g wrote:
> The first assert compares the return types of f1 and f2. They
> both return `void`, so everything's fine there.
I think you're mistaken about this. typeof(S.f1) definitely gives
the type of the function, not of the return. Try it out:
struct S {
void f1(int, string, float) {};
};
static assert(typeof(S.f1).stringof == "void(int, string,
float)");
( https://dpaste.dzfl.pl/cda66002120a )
More information about the Digitalmars-d-learn
mailing list