http://d.puremagic.com/issues/show_bug.cgi?id=9513


Steven Schveighoffer <schvei...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schvei...@yahoo.com


--- Comment #7 from Steven Schveighoffer <schvei...@yahoo.com> 2013-02-15 
06:58:45 PST ---
(In reply to comment #3)
> (In reply to comment #1)
> > The second program gives me:
> > 
> > temp.d(28): Error: template instance RedBlackTree!(element, lessfun)
> > RedBlackTree!(element, lessfun) does not match template declaration
> > RedBlackTree(T, alias less = "a < b", bool allowDuplicates = false) if
> > (is(typeof(binaryFun!(less)(T.init, T.init))))
> 
> The function taking ref arguments can not work for T.init and T.init since ref
> implies lvalue.

Yes, this was recently more strictly enforced.  However, the function will only
ever be called on lvalues inside the class

We should change the if statement to something like this:

if(is(typeof({T t; bool x = binaryFun!less(t, t);})))

That should fix the issue.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to