[Issue 4597] std.algorithm.filter fails with a const range

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 7 22:37:30 PDT 2010


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


Andrei Alexandrescu <andrei at metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrei at metalanguage.com


--- Comment #1 from Andrei Alexandrescu <andrei at metalanguage.com> 2010-08-07 22:37:26 PDT ---
This is quite problematic. Most of std.algorithm fails on const and immutable
arrays because it does not do the conversion const(int[]) -> const(int)[] and
immutable(int[]) -> immutable(int)[], both of which are legal.

I'm not sure how this can be addressed. A brute force solution would be to
special-case all algorithms for certain array types, but that would be
horrible. Ideas are welcome.

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