http://d.puremagic.com/issues/show_bug.cgi?id=8388
Summary: std.traits.MemberFunctionsTuple doesn't work with
constructors or destructors
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Jonathan M Davis <[email protected]> 2012-07-13 22:52:08
PDT ---
This code
import std.stdio;
import std.traits;
class C
{
this() {}
this(int i) {}
this(int i, float j) {}
this(string s) {}
~this() {}
}
void main()
{
writeln(__traits(hasMember, C, "__ctor"));
writeln(__traits(hasMember, C, "__dtor"));
foreach(f; MemberFunctionsTuple!(C, "__ctor"))
writeln(f.stringof);
foreach(f; MemberFunctionsTuple!(C, "__dtor"))
writeln(f.stringof);
}
prints
true
true
The MemberFunctionsTuple results are empty. The constructors and destructor
should be listed, but none are. So, clearly, while hasMember properly finds the
constructors and destructor, MemberFunctionsTuple does not.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------