[Issue 9083] New: mixin expression on template argument doesn't work
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 27 07:12:09 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9083
Summary: mixin expression on template argument doesn't work
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2012-11-27 07:12:08 PST ---
Following code doesn't work.
template isFunction(X...) if (X.length == 1)
{
enum isFunction = true;
}
struct S
{
static string func(alias Class)()
{
foreach (m; __traits(allMembers, Class))
{
pragma(msg, m); // prints "func"
enum x = isFunction!(mixin(m)); //NG
//enum x = isFunction!(func); //OK
}
return "";
}
}
enum nothing = S.func!S();
--
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