[Issue 8483] New: Definition of isOutputList warped due to "put" implementation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 31 04:22:08 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8483
Summary: Definition of isOutputList warped due to "put"
implementation
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: monarchdodra at gmail.com
--- Comment #0 from monarchdodra at gmail.com 2012-07-31 04:22:05 PDT ---
This is a copy paste from the forum. It was originally written as both an
analysis and a proposed solution to a problem.
TL;DR:
"put" allows placing a range of objects inside an output range, which warps the
definition of "isOutputRange" The exact kind of errors it creates is this:
----
alias int[] A; alias int[] B;
A a = new int[](2);
B b = new int[](1);
assert(isOutputRange!(B, A));
if(!b.empty)
b.put(a);
----
Here b is not empty as output range of A object, b is not empty, yet putting a
inside b creates an empty range exception.
But more generally, the entire problem lies with the fact that B is NOT an
output range of A objects.
Please find the original abstract in the next post.
--
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