|
Archives
D Programming
digitalmars.Ddigitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger D.gnu D C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D - Bug in std.range.retro?
Originally I posted in learn: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=16913 Move here to double confirm whether it is a bug: static if (isRandomAccessRange!(R) && hasLength!(R)) ref ElementType!(R) opIndex(uint n) { return _input[_input.length - n + 1]; } Shouldn't it be _input.length-(n+1) ? Regards, Sam Jun 22 2009
Sam Hu wrote:Originally I posted in learn: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=16913 Move here to double confirm whether it is a bug: static if (isRandomAccessRange!(R) && hasLength!(R)) ref ElementType!(R) opIndex(uint n) { return _input[_input.length - n + 1]; } Shouldn't it be _input.length-(n+1) ? Regards, Sam Jun 22 2009
|