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



--- Comment #3 from hst...@quickfur.ath.cx 2013-10-10 11:36:03 PDT ---
(In reply to comment #2)
> I'll give that a go and if it works, send a patch to Phobos.  Thanks for the
> thought.  Incidentally, shouldn't "in" be sufficient there for the input?

In this case, you need inout, because you want to propagate the incoming
qualifiers to the output: if x>=0, then you're returning x again, so the return
type needs to carry whatever qualifiers x had on entering the function.
Everything implicitly converts to const, of course, but it would suck if you
returned const and the caller passed in unqual, and now after calling abs he
can't modify the BigInt anymore!

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

Reply via email to