That's *such* a lame question...
Even if I _couldn't_ tell you a reason, that'd still be a lame
question, because the *entire point* of reflection is to access
type information information about the program... if for nothing
other than printing it out for the user.
But it's more than that: it's the same darn reason why you need
to distinguish between
void* and HWND -- it's an ERROR!
In other words, this must NOT compile!
auto call(F, T...)(F func, T args) { return func(args); }
void test(uint) { }
void main() { call!(typeof(&test), size_t)(&test, 1); }
If you're still asking "why shouldn't it compile" then you should
look up what "type safety" means.
On Saturday, 5 May 2012 at 21:24:50 UTC, Chris Cain wrote:
On Saturday, 5 May 2012 at 18:43:41 UTC, Mehrdad wrote:
Er, the point is, there are functions ALREADY using size_t,
and I need to figure out which parameters those are.
Out of curiosity, why would you need to "know" which parameters
are size_t? True, size_t is either uint or ulong and you can't
really know for sure if you have a uint or ulong and it was
actually a size_t ... but why would you need to know?