Bug 7824 – isInputRange fails to recognize inout(T)[]

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-04T17:01:00Z
Last change time
2012-05-31T04:07:15Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2012-04-04T17:01:11Z
cat > bug.d << CODE import std.range; inout(int)[] foo(inout(int)[] range) { static assert(isInputRange!(typeof(range))); return range; } CODE dmd -c bug -------- template isInputRange(R) { enum bool isInputRange = is(typeof( { ::: // This test fails, because "inout(int) h = r.front" can // only be declared in an inout function. auto h = r.front; // can get the front of the range })); }
Comment #1 by k.hara.pg — 2012-04-17T00:44:01Z
Comment #2 by github-bugzilla — 2012-05-27T19:56:08Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/ed00f6c28c602bd5c3b197e555c44d3b53ef76ba fix Issue 7824 - isInputRange fails to recognize inout(T)[] https://github.com/D-Programming-Language/phobos/commit/1c33f47992894fb53c9e0a3941b8780b9141c0e2 Merge pull request #539 from 9rnsr/fix7824 Issue 7824 - isInputRange fails to recognize inout(T)[]