[Issue 16389] "const" should be inferred for template methods

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Aug 15 06:50:48 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16389

--- Comment #3 from Andrei Alexandrescu <andrei at erdani.com> ---
(In reply to greenify from comment #2)
> > Currently defining const and non-const versions of methods in generic code is redundant and error-prone.
> 
> FWIW isn't inout a solution to a similar problem? In any case inout needs
> rebranding

Deduction is different because there's no qualifier applied if the method is
never used on a const object.

--


More information about the Digitalmars-d-bugs mailing list