Brad Anderson
6b92abb044
fix Issue 6222 - A problem with iota() using size_t
...
If the common type of begin and end is unsigned and end is 0 the private
member pastEnd ends up being unsigned.max due to "pastEnd - 1" (used to make
end not inclusive) which results in iota behaving incorrectly. A simple change
to always make an empty range when begin==end prevents this.
Also fixed and clarified the documentation.
2012-04-20 20:34:10 -06:00
Andrei Alexandrescu
6a41af9bef
Merge pull request #508 from quickfur/stdrange_docs
...
Improve std.range's documentation.
2012-03-30 06:28:06 -07:00
H. S. Teoh
9969d60a88
Fix issues raised in pull request.
2012-03-29 20:30:56 -07:00
H. S. Teoh
62d9a71592
Indicate that std.algorithm.sort also returns SortedRange.
2012-03-28 07:43:39 -07:00
H. S. Teoh
dfd99cd91c
Grammar correction.
2012-03-28 07:43:39 -07:00
H. S. Teoh
a16a5ac7ef
A first stab at improving std.range's documentation.
2012-03-28 07:43:39 -07:00
Dmitry Olshansky
16bd8e423a
document isTwoWayCompatible
...
makes error messages understandable
2012-03-23 12:17:39 +04:00
Dmitry Olshansky
88ecf28752
fix Issue 7718 - regex and ctRegex produce different results
...
also fix unittest in std.range
2012-03-23 12:17:36 +04:00
Dmitry Olshansky
34683e4afb
apply code review suggestions, extending SortedRange
2012-03-23 12:17:31 +04:00
k-hara
348f68a159
Add @property more
2012-03-19 21:28:18 +09:00
dsimcha
7b62989568
Get rid of Bug 2443 workaround in InputRangeObject.
2012-03-08 22:51:06 -08:00
Andrei Alexandrescu
91c4363398
Merge pull request #365 from dsimcha/opDollar
...
Add opDollar aliases for std.range and std.algorithm.
2012-02-20 19:45:38 -08:00
k-hara
90497eeede
Issue 7476 - Write(ln) functions no longer accept retro range
2012-02-10 21:57:58 +09:00
k-hara
af9ea3465c
Move implementation templates into template local scope
2012-01-29 20:37:48 +09:00
dsimcha
86398b46fa
Fix a bug in std.range.hasLvalueElements due to ambiguity between addresses of functions and addresses of return values.
...
Remove workaround for Bug 2443 in lockstep.
2012-01-09 20:55:26 -05:00
Walter Bright
380ae65511
remove empty statements
2011-12-29 00:05:45 -08:00
dsimcha
052941a087
Add opDollar aliases for std.range and std.algorithm.
2011-12-11 12:38:45 -05:00
David Simcha
ae16fd1b51
Update std/range.d
2011-12-05 14:25:29 -05:00
dsimcha
36fc2fb922
Fix trivial regression in lockstep caused by DMD enforcing const more strictly.
2011-12-05 10:01:43 -05:00
David Nadlinger
130b1ac71c
Whitespace cleanup.
2011-12-04 09:56:14 +01:00
David Nadlinger
e312f9898b
Strict @property syntax compliance.
...
This enables the test suite to build with the -property switch enabled.
std.cpuid: vendor()/processor() have not been converted to properties in accordance to core.cpuid.
std.xml: Element.text() cannot be a property due to the optional parameter.
2011-12-04 09:56:14 +01:00
Denis Shelomovskij
e8712ed9e1
Documentation and struct staticness in std.algorithm fixes
2011-11-14 17:10:19 +03:00
k-hara
5e83c0020d
Issue 6935 - struct with @disable this cannot make range
2011-11-13 17:04:19 +09:00
Hara Kenji
e2ba3bd55a
Merge pull request #268 from denis-sh/patch-6
...
integer `iota` is incorrect for negative `step`
2011-10-13 16:49:22 -07:00
k-hara
8d97eb3b21
Add std.random import for debug.
2011-09-29 07:29:19 +09:00
k-hara
78a2d8abdc
Reduce module dependencies.
2011-09-29 07:09:16 +09:00
Denis
0f345ea6c2
http://www.d-p-l.org/expression.html
...
"the remainder has the same sign as the dividend"
Thanks, braddr.
2011-09-27 11:32:46 +03:00
Denis
f1b62aefbd
Let's just avoid %
on negative numbers.
2011-09-24 17:30:09 +03:00
Denis
2f5a744754
AFAIK, a % b
takes it's sign from a
(no idea where is it on dpl.org), so integer iota
is incorrect for negative step
(try proposed tests)
2011-09-20 10:19:40 +03:00
David Simcha
0597d946c1
Fix a few minor doc issues.
2011-09-01 09:33:01 -03:00
David Simcha
9cddfd96f2
Doc fix: s/reindexed/ind. I thought I fixed this a long time ago, but apparently not.
2011-08-30 03:02:48 -03:00
dsimcha
1a7cffeed2
Put back the rest of the lockstep fix commit.
2011-08-27 14:28:11 -04:00
dsimcha
a72896c0c1
Add back fix for lockstep that I accidentally removed by editing an outdated version of std.range.
2011-08-27 14:21:29 -04:00
dsimcha
7fcb6791d0
Add length to transversal.
2011-08-27 09:25:57 -04:00
dsimcha
4114b74b4d
Add std.range.indexed and chunks.
2011-08-24 22:35:58 -04:00
David Simcha
c692c2aa8d
Merge pull request #216 from dawgfoto/master
...
small bugfix for std.range.lockstep.
2011-08-24 09:15:28 -07:00
dawg
7de58633f6
fix lockstep requireSameLength check
...
- which didn't checked the copy on the stack
but the ranges in the LockStep struct
- introduced with: 98f98a74
2011-08-24 18:07:49 +02:00
dawg
2342e497cc
failing unit test for lockstep with StoppingPolicy.requireSameLength
2011-08-24 18:07:49 +02:00
jmdavis
6b6c604bbe
Added drop function to std.range.
2011-08-17 23:05:16 -07:00
Dmitry Olshansky
ca379e5993
minor fixes that get GSOC regular expressions to compile
2011-08-08 15:30:45 +04:00
David Nadlinger
a988cd19f3
The takeExactly() shortcut really depends on R having slicing, not being a random access range.
2011-08-02 22:18:41 +02:00
David Nadlinger
4df94e60b1
Make takeExactly(…).length for non-random-access ranges a property.
2011-08-02 22:18:41 +02:00
dsimcha
d08f0e6621
One more fix for the last pull request. It should really just take ulongs for indexing and slicing.
2011-07-12 22:06:09 -04:00
KennyTM~
95f3698bdc
Oops the previous commit doesn't completely fix all possibilities for 'zip'.
2011-07-13 06:36:43 +08:00
KennyTM~
5a2add5e7a
Fix bug 6301.
...
The following functions are modified to accept ranges with iota of longs:
* std.algorithm.map
* std.algorithm.splitter
* std.range.retro
* std.range.radial
* std.range.popBackN
* std.range.zip
* std.range.iota
* std.range.moveAt
2011-07-13 06:16:20 +08:00
Daniel Murphy
dc0beb97dc
Fix unlisted bug found by implementing http://d.puremagic.com/issues/show_bug.cgi?id=5399 .
...
InputRangeObject.popBack calls back when it should call popBack.
2011-06-30 02:39:47 +10:00
KennyTM~
252c29be22
Notice about bug 4040.
2011-06-22 14:47:45 +08:00
KennyTM~
8f7b9d0d13
Issue 5873 - Cannot call iota() on long with step
2011-06-21 16:42:44 +08:00
Andrei Alexandrescu
5a0134dd10
Fixed 672 broken links
2011-06-09 09:48:53 -05:00
dsimcha
9c7fe081f8
Fix Bug 5891
2011-05-05 18:44:15 -04:00