say I have
template T(alias fn) {
}
class Foo {
int i();
void i(int);
}
alias T!(Foo.i) Biz;
Is there a way to get a handle to both of the overloads of Foo.i inside T?
Actually, all I really need for that is to get 'Foo.i' out of fn.
mangleof looks promising..
On Wednesday, 8 August 2012 at 23:21:32 UTC, Ellery Newcomer
wrote:
say I have
template T(alias fn) {
}
class Foo {
int i();
void i(int);
}
alias T!(Foo.i) Biz;
Is there a way to get a handle to both of the overloads of
Foo.i inside T?
Actually, all I really need for that is to get
On 08/08/2012 04:21 PM, Ellery Newcomer wrote:
mangleof looks promising..
.. or maybe not. wtf?
template Z(string s) {
pragma(msg, fn.mangleof 2: ~ s);
}
struct S(alias fn, string prop) {
pragma(msg, fn.mangleof 1: ~ fn.mangleof);
alias Z!(fn.mangleof) F;
}
class Foo{
On Thu, Aug 9, 2012 at 2:00 AM, Ellery Newcomer
ellery-newco...@utulsa.edu wrote:
Awesome, thanks.
And to make this work with property functions (which is my real target
case):
pragma(msg, FunctionTypeOf!(Overloads[0])); // prints @property int()
pragma(msg,