[Issue 9792] length field of a const SortedRange
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Feb 3 16:25:54 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=9792
Justin Whear <justin at economicmodeling.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |justin at economicmodeling.com
--- Comment #1 from Justin Whear <justin at economicmodeling.com> 2014-02-03 16:25:48 PST ---
(In reply to comment #0)
> I'd like this code to work:
>
>
> import std.algorithm: sort;
> void main() {
> const data = [1, 5, 2].sort();
> auto len = data.length;
> }
>
>
> DMD 2.063alpha gives:
>
> temp.d(4): Error: mutable method std.range.SortedRange!(int[], "a <
> b").SortedRange.length is not callable using a const object
Additionally `contains`, and probably `lowerBound`, `equalRange`, and
`upperBound`.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list