Commit graph

424 commits

Author SHA1 Message Date
MetaLang
8eabb58fd8 Remove forwarding of save and remove unittests for save functionality 2014-03-18 20:08:53 -03:00
MetaLang
d882fb44e9 Merge branch 'master' into std-range-tee-fixup 2014-03-18 18:57:39 -03:00
monarch dodra
44371f8c8c Tweak Zip implementation 2014-03-18 20:32:57 +01:00
Andrej Mitrovic
9e9c2f6cef Merge pull request #1972 from monarchdodra/12007-3
Fixup Repeat condition
2014-03-13 20:48:29 +01:00
monarchdodra
468d57e328 Add missing imports 2014-03-12 07:40:44 +01:00
MetaLang
c1f6fc9656 Removed type parameter on Result struct 2014-03-10 22:01:06 -03:00
Per Nordlöw
275db682a5 Issue 3882: Explicitly capture return values for strictly pure functions returning non-void 2014-03-09 18:55:07 +01:00
monarchdodra
7e52bfdb9b Fixup Repeat condition 2014-02-27 18:42:42 +01:00
MetaLang
259dd0c07b Documentation tweaks 2014-02-26 19:29:31 -04:00
MetaLang
ec828b6ec9 Remove unnecessary check for static length on input range 2014-02-26 19:24:14 -04:00
Dmitry Olshansky
98d4c60840 Merge pull request #1895 from monarchdodra/12007
Fix issue 12007 - cartesianProduct does'nt work with ranges of immutable...
2014-02-27 00:31:30 +03:00
monarchdodra
189d64433f Simplify Zip's constructor 2014-02-26 21:18:59 +01:00
monarchdodra
301b42f0de Fix issue 12007 - cartesianProduct does'nt work with ranges of immutables
https://d.puremagic.com/issues/show_bug.cgi?id=12007

This makes a tweak to `Zip`'s `save`: Now, it *builds* a new `Zip` object
from the saved ranges, rather than assigning each range individually.

This gives 2 advantages:
1. Better support for `save` (which doesn't actaully guarantee assignability)
2. Avoids useless `opAssign` overhead
2014-02-26 21:18:59 +01:00
MetaLang
18483b3ec4 Actually define IndexType, change opDollar to alias length, not _input.length 2014-02-25 20:45:18 -04:00
MetaLang
71250414cf Forward random access if the underlying range has it AND pipeOnPop is false 2014-02-25 20:07:15 -04:00
MetaLang
28a6ce4678 Change documentation and unittests to make it clear that the function passed to tee is not executed until the resultant range is evaluated. 2014-02-25 19:12:18 -04:00
MetaLang
79d5d6034e Change unittests to use UFCS 2014-02-25 18:51:15 -04:00
MetaLang
52edb27719 Tabs to spaces 2014-02-25 18:41:21 -04:00
MetaLang
1cebf18fe3 Change documentation to reflect pipeOnPop, fix unittest failure. 2014-02-25 00:25:45 -04:00
MetaLang
8bdb382fbf Forward back, popBack, and length if available. If _input.length is available statically, make it available statically in the result as well. Change pipeOnFront back to pipeOnPop because _input may have back and popBack. 2014-02-24 23:29:19 -04:00
MetaLang
512edcaec2 Updated documentation to say that tee is useful for debugging long UFCS chains, and that the default behaviour is to call func on popFront 2014-02-24 21:46:34 -04:00
irritate
45c4e51982 Revive #1348: "Issue 9882 - Implement a "tee" style InputRange so that a function can be called during a chain of InputRanges." 2014-02-24 20:57:56 -04:00
monarch dodra
b770bddcaf Merge pull request #1950 from AndrejMitrovic/Fixup1835
Issue 12177 (regression) -  inout(Cycle!(string[2])) implicit cast problem
2014-02-18 07:59:33 +01:00
Daniel Murphy
4d0892baba Remove uses of the comma operator 2014-02-18 00:48:40 +11:00
Andrej Mitrovic
025c133e34 Introduce a cast as a workaround for missing inout constructors. 2014-02-17 11:10:14 +01:00
Andrej Mitrovic
8892490584 Use 4 spaces, not 3 for indentation. 2014-02-17 11:06:57 +01:00
monarchdodra
1cc6c6a142 Fix issue 12007 - cartesianProduct does'nt work with ranges of immutables
The fix consists in making Repeat!T assignable, even if T itself is not.
2014-02-12 09:57:13 +01:00
k-hara
6f43a92cd2 Fix predicate template implementations in std.traits and std.range
Use T.init property instead of void initializer, because it will work even if T is const or immutable type.

I must change a part of unit test for the bug 6935, because we cannot support ranges which overrides init property.
2014-02-11 18:36:37 +09:00
k-hara
b391b2ec9f Convert to new alias syntax 2014-02-11 15:27:05 +09:00
Marc Schütz
e4ce099124 Change documentation to use the correct parameter name. 2014-02-08 12:07:07 +01:00
Robert burner Schadek
3890dc69c8 std.range doc changes: less example redundance and examples for function
without
2014-02-04 15:07:11 +01:00
monarchdodra
266357743a Tweak zip implementation
Made doc location consistent in regards to static ifs.
2014-02-01 16:51:05 +01:00
Hara Kenji
8e302d0114 Merge pull request #1851 from monarchdodra/cycleMod
Fixes in Cycle
2014-01-25 14:15:35 -08:00
Daniel Murphy
a656f26e9e Remove use of automatic adjacent string literal concatenation from phobos 2014-01-20 03:42:21 +11:00
monarchdodra
63535371bc Cycle unittests 2014-01-13 20:50:31 +01:00
monarchdodra
25f123687c Fix issue 10845 2014-01-13 20:50:31 +01:00
monarchdodra
dde77ece73 Tweak Cycle indexing 2014-01-13 20:50:31 +01:00
David Nadlinger
4c0c73220d Fix Cycle!(T[N]).opSlice return type qualifier.
This is a fixup for commit 3faffc3c59.
2014-01-13 13:40:40 +01:00
David Nadlinger
3faffc3c59 Avoid calling a qualified constructor in Cycle.
This is actually invalid code, as typeof(this) == inout(this),
but Cycle has no inout constructor. This wasn't previously
detected, as the constructor was mistakenly flagged as creating
an unique object where qualifiers can be disregarded. (The
reference parameter is leaked into the Cycle instance, so
this is obviously not the case.)
2014-01-13 03:39:22 +01:00
monarchdodra
44fe3d88f7 Remove tabs 2014-01-08 08:37:52 +01:00
monarchdodra
1e479c8e5b Fixup commit a8177b8cc3
Per a8177b8cc3 (commitcomment-4991972) :
"nothrow" was superfluous
2014-01-06 19:26:38 +01:00
Andrej Mitrovic
7933ee1e57 Merge pull request #1835 from monarchdodra/cycle2
Bring the noise to Cycle
2014-01-06 05:40:28 -08:00
Andrej Mitrovic
a0e06cbf0f Merge pull request #1836 from monarchdodra/repeatConst
Tweaks in repeat
2014-01-05 09:43:04 -08:00
Andrej Mitrovic
351903bab9 Merge pull request #1832 from monarchdodra/takeBack
Fix Take's "back"
2014-01-05 09:14:02 -08:00
monarchdodra
5b331e0266 Add some inout to Repeat 2014-01-05 17:35:48 +01:00
monarchdodra
1c5dc0684c Use "in" preconditions over asserts 2014-01-05 17:34:23 +01:00
monarchdodra
03c769cc89 Place "Front" before "Back" 2014-01-05 17:32:52 +01:00
monarchdodra
9e52fa95e0 Redocument Repeat
Because once you've said what it adheres to, there's nothing else to document
2014-01-05 17:21:36 +01:00
monarchdodra
5694fdfea3 More documented unittest 2014-01-05 17:21:36 +01:00
monarchdodra
8317c38d9b Remove superfluous parens 2014-01-05 17:21:36 +01:00