[Issue 7756] New: iota(const doubles) problem
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 23 16:11:09 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7756
Summary: iota(const doubles) problem
Product: D
Version: unspecified
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2012-03-23 16:11:31 PDT ---
This program compiles with no errors:
import std.range, std.array;
void main() {
alias const int CC;
array(iota(cast(CC)0, cast(CC)10, cast(CC)1));
}
While this:
import std.range, std.array;
void main() {
alias const double CC;
array(iota(cast(CC)0.0, cast(CC)10.0, cast(CC)1.0));
}
Gives with DMD 2.059head:
...\dmd2\src\phobos\std\array.d(55): Error: result[i] isn't mutable
test.d(4): Error: template instance std.array.array!(Result) error
instantiating
Elsewhere there is a bug report about array() of const items.
--
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