[Issue 10960] Copying a const value type should yield unqual

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 3 16:35:14 PDT 2013


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



--- Comment #1 from bearophile_hugs at eml.cc 2013-09-03 16:35:12 PDT ---
(In reply to comment #0)

> returning a const value type by value should be stripped of
> its constness, since it is not the original value
> being returned, but a copy.

The main point of my question in D.learn was: if the array A is mutable, and
the array B contains constant references (like const references to class
instances), is code like this acceptable?

schwartzSort!(i => B[i])(A);

-- 
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