http://d.puremagic.com/issues/show_bug.cgi?id=5373
--- Comment #5 from Rob Jacques <sandf...@jhu.edu> 2011-02-03 15:00:16 PST --- This is the patch from Issue 5406. It appear to solve both issue's test cases. template binaryFunImpl(alias fun, string parm1Name, string parm2Name) { static if (is(typeof(fun) : string)) { enum testAsExpression = "{ ElementType1 " ~parm1Name~"; ElementType2 " ~parm2Name~"; return ("~fun~");}()"; typeof(mixin(testAsExpression)) result(ElementType1, ElementType2)(ElementType1 __a, ElementType2 __b) if(__traits(compiles, mixin(testAsExpression))) { mixin("alias __a "~parm1Name~";"); mixin("alias __b "~parm2Name~";"); mixin("return (" ~ fun ~ ");"); } } else { alias fun result; } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------