[Issue 2512] ParameterTypeTuple do not support opCall
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed May 19 09:08:55 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2512
Haruki Shigemori <rayerd.wiz at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #2 from Haruki Shigemori <rayerd.wiz at gmail.com> 2010-05-19 09:08:52 PDT ---
ParameterTypeTuple supported opCall already.
This code compiles and runs fine on dmd v.2.046.
import std.traits;
class C {
int opCall(int,double){return 1;}
}
struct S {
int opCall(int,long){return 1;}
}
void main() {
static assert(is(ParameterTypeTuple!(C)[0] == int));
static assert(is(ParameterTypeTuple!(S)[1] == long));
C c;
static assert(is(ParameterTypeTuple!(c)[1] == double));
S s;
static assert(is(ParameterTypeTuple!(s)[0] == int));
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list